Consider a sample image
If I apply a
GradientFilter on it followed by a padding,
imggrad = GradientFilter[img,1];
gradpadded = ImagePad[imggrad,1];
Now I want to design a custom
3x3 max filter to detect the edges. The plan is to place the filter at the top left corner of the
gradpadded(at the position
(1,1)) and apply the filter on the first
3x3 image data. Next, I wish to find the position of the maximum value within the selected data. After that, the filter will be centered at that corresponding maximum value position and will be applied on the corresponding image portion. This process will carry on until the filter reaches the end of the image or returns back to an earlier position and thus completing a loop.
How can I do this?