필터 지우기
필터 지우기

EigenVectors and EigenValues from Regionprops3

조회 수: 3 (최근 30일)
Ashbub
Ashbub 2018년 5월 2일
편집: Saurabh Patel 2018년 9월 21일
Hi
I am using regionprops3 to get eigenvectors and eigenvalues. Looks like the eigenvalues are sorted always. Am I right? The corresponding eigenvectors are in column or row?
Thanks.
  댓글 수: 3
KSSV
KSSV 2018년 9월 20일
What s the connection between eigenvalues and regionprops?
Saurabh Patel
Saurabh Patel 2018년 9월 21일
편집: Saurabh Patel 2018년 9월 21일
Let us say, you want the orientation of some object in your image. You could essentially fit a line or plane to the set of points in that object and get the orientation of the line or plane. Matlab does better, RegionProps fits an ellipse or ellipsoid to the segmented object with conservation of second central moment. The major, intermediate, and minor axis radii of this ellipse are stored as eigenvalues. The orientation of these axes are stored in eigenvectors.

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

답변 (1개)

Matt J
Matt J 2018년 9월 20일
편집: Matt J 2018년 9월 20일
We can investigate whether the eigenvectors are rows or columns using the single slice ellipse image below. Applying regionprops3 gives,
>> S=regionprops3(A,'Eigenvector','EigenValues'); S{1,1}{:}, S{1,2}{:}
ans =
0.1738 -0.9848 0
0.9848 0.1738 0
0 0 1.0000
ans =
897.8691
156.9113
0.0833
The largest eigenvalue 897.8961 corresponds to the long axis of the ellipse, which is therefore either the first column or row of the above 3x3 eigenvector matrix. However, as we can see from the image, the long axis of the ellipse points in a direction whose coordinates are the same sign (regardless of whether x,y or i,j coordinates are being used). Therefore, its corresponding eigenvector would be the first column, not the first row of the matrix.
Also, the size of the different components tells us that the first coordinate is the vertical axis and the second coordinate is the horizontal axis, indicating that the coordinate system used by regionprops3 is (i,j)-oriented in 2D, not (x,y)-oriented. This is oddly inconsistent with the conventions of all the 2D image processing toolbox functions. On the other hand, this inconsistency is consistent with the inconsistency between meshgrid and ndgrid :-)

카테고리

Help CenterFile Exchange에서 Eigenvalues and Eigenvectors에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by