kernel iteration through for loop
Just wondering is there a way of generating dynamic variable in C++
For example could you write a function where you define a kernel size i.e. 3×3 5×5 7×7 and the function
dynamically generate the kernel rather that hand coding it as below
Code:
array[row-1][col-1]
array[row-1][col]
array[row-1][col+1]
array[row][col-1]
array[row][col]
array[row][col+1]
array[row+1][col-1]
array[row+1][col]
array[row+1][col+1]
This kernel would then be used to iterate through a for loop to calculate the average around row col value
May not be that clear, and I do apologise