Hi in this excerpt of a code:
for(int j = 1 ; j < myImage.rows-1; ++j)
{
const uchar* previous = myImage.ptr<uchar>(j - 1);
const uchar* current = myImage.ptr<uchar>(j );
const uchar* next = myImage.ptr<uchar>(j + 1);
uchar* output = Result.ptr<uchar>(j);
for(int i= nChannels;i < nChannels*(myImage.cols-1); ++i)
{
output[i] = saturate_cast<uchar>(5*current[i]
-current[i-nChannels] - current[i+nChannels] - previous[i] - next[i]);
}
}
Shouldn’t on the line of output being assigned to a new value the current, previous and next pointers and even output have an asterisk before them so the actual value they point is taken?
I am got this from this example: OpenCV: Mask operations on matrices
Please help and thanks in advance!