필터 지우기
필터 지우기

Plane fitting using PCA or princomp

조회 수: 4 (최근 30일)
Sharif
Sharif 2013년 7월 4일
hi i am trying to a fit plane to point clouds (x y z coordinates) to work out the orientation (of the points) based on the normal of the plane and the direction cosine to the Z axis (0 0 1)
i have a few thousand of these 'cluster' of points.
i find that the direction cosine (from [0 0 1]) of the normals are between 0 and 135 degrees as opposed to between 0 and 180 degrees . i have tried a variety of datasets showing the same anomaly. when i checked the minimum and maximum of the of the normal vectors matrix i found them to be [-0.7071 -0.7071 -0.7071] and [1 1 1] instead of +-[1 1 1].
does anyone have clue as to why this is happening?
I under that impression that PCA rotates and centers the points prior to fitting. does this mean i need to apply a transform on the normals?
Please help! thanks, S
plane fitting code:-
% do fit [coeff,score,roots] = pca(data);
% Get unit normal of fitted plane pc_normal(i,:) = coeff(:,3)'; %fill with normal vector
% calculate direction cosine from Z (vertical) axis pc_rads(i,1) = acos(dot(pc_normal(i,:), [0 0 1]));

답변 (0개)

카테고리

Help CenterFile Exchange에서 Dimensionality Reduction and Feature Extraction에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by