How to find critical points - maxima,minima and saddle points in an image?
Show older comments
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)
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
on 9 Oct 2014
If you also need obliquely oriented saddle points you could do something very similar to the above, but use conv2 with oblique differencing kernels like,
kernel = diag([1 -2 1])
Lalith kumar
on 9 Oct 2014
Edited: Lalith kumar
on 9 Oct 2014
Categories
Find more on Read, Write, and Modify Image in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!