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

조회 수: 9 (최근 30일)
Lalith kumar
Lalith kumar 2014년 10월 9일
편집: Matt J 2014년 10월 9일
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.

답변 (1개)

Matt J
Matt J 2014년 10월 9일
편집: Matt J 2014년 10월 9일
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
Lalith kumar
Lalith kumar 2014년 10월 9일
편집: Lalith kumar 2014년 10월 9일
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 2014년 10월 9일
편집: Matt J 2014년 10월 9일
I think this is due to the cx(end+1,:)=nan and cy(:,end+1)=nan part.
Whoops. Should be end+2 everywhere...

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by