In developing a program in MATLAB in which the user will select a point in the image (I'm working on radar images which are gray-scale images with high luminosity points) and I want the program seeks for the maximum value in the neighborhood of this point.
The final aim is to show to the user the x-profile at this point (I mean, the values of that Y column) in order to analyze the diffraction effects. But I'm not sure how to implement it in an algorithmic way in order to apply it without knowing in advance where is the point and I'm having problems with the image limits (in my implementation, the matrix indices go out of bounds too much often).