- 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
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
Sugandhi
am 22 Aug. 2023
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 Kommentare
Siehe auch
Kategorien
Mehr zu Point Cloud Processing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!