MATLAB: How to find the neighbour pixel having maximum value

Image Processing Toolboxmaximum pixelneighbour

i have calculated the parzen density for an image. Now i have to find the maximum valued pixel of an image in the 3×3 matrix window

Best Answer

out = imdilate(grayImage, true(3)); % In the IMage Processing Toolbox.