- Instead of directly multiplying the target plane's parameters with the transformation matrix, you need to extract the rotation matrix from ‘tform.T’ and apply it to the plane parameters to represent the rotation component.
- The translation component of the transformation matrix doesn't affect the plane parameters, hence apply the rotation part to the plane parameters.
- The transformed plane's parameters need to include the translation component (fourth element) from the original target plane parameters.
Visualize Deviation of Fit Plane from Reference Vector
조회 수: 2 (최근 30일)
이전 댓글 표시
I am trying to replicate the process outlined in normalRotation to visualized deviation from the [0 1 0] plane instead of the [0 0 1] plane. I suspect the issue has to do with mishandling of the tform object for my use case.
% My code
maxDistance = 0.1;
referenceVector = [0 1 0];
target_pc = pointCloud(xyz_data);
targetPlane = pcfitplane(target_pc,maxDistance,referenceVector);
tform = normalRotation(targetPlane,referenceVector);
target_tform = pctransform(target_pc,tform);
planeParams = targetPlane.Parameters * tform.T;
transformedPlane = planeModel(planeParams);
figure;
pcshowpair(target_tform,target_pc);
title(sprintf('target site %i', iSite))
xlabel('x'); ylabel('y'); zlabel('z');
hold on;
plot(targetPlane, 'Color', 'magenta');
plot(transformedPlane, 'Color', 'green');
댓글 수: 0
답변 (1개)
Sugandhi
2023년 8월 22일
Hi,
I understand that you are trying to visualize the deviation of a point cloud from a reference plane ([0 1 0] plane) instead of the [0 0 1] plane.
One of the possible workarounds could be:
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Point Cloud Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!