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

7 vues (au cours des 30 derniers jours)
Lalith kumar
Lalith kumar le 9 Oct 2014
Modifié(e) : Matt J le 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.

Réponses (1)

Matt J
Matt J le 9 Oct 2014
Modifié(e) : Matt J le 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 commentaires
Lalith kumar
Lalith kumar le 9 Oct 2014
Modifié(e) : Lalith kumar le 9 Oct 2014
Hi Matt,
Thank you so much for your fast reply. When i tried the code which you suggested, i faced a few hiccups.
[i,j]=find( Cx.*Cy<=0); --> Matrix dimensions must agree.
I think this is due to the cx(end+1,:)=nan and cy(:,end+1)=nan part.
I tried to implement the second order derivative test(hessian matrix). But i am not sure on how to implement that on an image, because for a function, the test is fairly simple and straight forward.
I tried calculating the second order derivative by using this snippet of code :
im=double(dicomread'MR_017.dcm'); %calculating the partial derivatives of the image. [imx,imy]=gradient(im); [imxx,imxy]=gradient(imx); [imyx,imyy]=gradient(imy);
I am not sure on how to proceed after this, because i have never done a test of this sort on an image.
Matt J
Matt J le 9 Oct 2014
Modifié(e) : Matt J le 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...

Connectez-vous pour commenter.

Catégories

En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by