Code covered by the BSD License  

Highlights from
Adjust Plane to Given Normal

image thumbnail

Adjust Plane to Given Normal



27 Mar 2013 (Updated )

Adjust a more or less planar point cloud so that it fits a given normal vector.

%min example

%load the exampleData.mat

%normal it should be
adjustedNormal = [1 0 0];

pointCloudAdjusted = adjustPlanarPointCloud(pointCloud, adjustedNormal);

%plot the original data in green
plot3(pointCloud(:,1), pointCloud(:,2), pointCloud(:,3), '.g');

hold on
grid on
xlabel 'x'
ylabel 'y'
zlabel 'z'

%plot the adjusted data in red
plot3(pointCloudAdjusted(:,1), pointCloudAdjusted(:,2), pointCloudAdjusted(:,3), '.r');

Contact us