MATLAB Answers

How to find critical points - maxima,minima and saddle points in an image?

3 views (last 30 days)
Lalith kumar
Lalith kumar on 9 Oct 2014
Edited: Matt J on 9 Oct 2014
Hi Matlab community, I am new to Matlab and sorry if my question is lame. I would like to find the critical points in an image (maxima,minima,saddle points). I am able to find out the maxima and minima using the 'imregionalmax,imregionalmin'function. But i dunno how to find out the saddle points in an image. I really need help, please help me out.

Answers (1)

Matt J
Matt J on 9 Oct 2014
Edited: Matt J on 9 Oct 2014
How about,
Cx=diff(Image,2,1); Cx(end+2,:)=nan;
Cy=diff(Image,2,2); Cy(:,end+2)=nan;
[i,j]=find( Cx.*Cy<=0);
  3 Comments
Matt J
Matt J on 9 Oct 2014
I think this is due to the cx(end+1,:)=nan and cy(:,end+1)=nan part.
Whoops. Should be end+2 everywhere...

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!