Add connection between views in view set
vSet = addConnection(vSet,viewId1,viewId2)
vSet = addConnection(vSet,viewId1,viewId2,relPose)
vSet = addConnection(vSet,viewId1,viewId2,relPose,infoMat)
example
vSet = addConnection(vSet,viewId1,viewId2) adds a connection between views viewId1 and viewId2 to the view set, vSet.
vSet
viewId1
viewId2
vSet = addConnection(vSet,viewId1,viewId2,relPose) specifies the relative pose of viewId2 with respect to viewId1.
relPose
vSet = addConnection(vSet,viewId1,viewId2,relPose,infoMat) specifies the information matrix associated with the connection.
infoMat
collapse all
Create an empty point cloud view set.
vSet = pcviewset;
Load point cloud data.
data = load('livingRoom.mat'); ptCloud1 = data.livingRoomData{1}; ptCloud2 = data.livingRoomData{2};
Add ptCloud1 to the point cloud view set. Specify a rigid3d object as the origin.
ptCloud1
rigid3d
absPose1 = rigid3d; vSet = addView(vSet,1,absPose1,'PointCloud',ptCloud1);
Add ptCloud2 to the point cloud view set. Specify a rigid3d object as the origin.
ptCloud2
vSet = addView(vSet,2,absPose1,'PointCloud',ptCloud2);
Estimate the rigid transformation between the two point clouds.
ptCloud2Downsampled = pcdownsample(ptCloud2,'gridAverage',0.1); gridStep = 0.5; relPose = pcregisterndt(ptCloud2Downsampled,ptCloud1,gridStep);
Add a connection between the views.
vSet = addConnection(vSet,1,2,relPose);
Compute the accumulated absolute pose.
absPose2 = rigid3d( absPose1.T*relPose.T );
Update the absolute pose of second view.
vSet = updateView(vSet,2,absPose2);
pcviewset
Point cloud view set, specified as a pcviewset object.
View identifier 1, specified as an integer. View identifiers are unique to a specific view.
View identifier 2, specified as an integer. View identifiers are unique to a specific view.
Relative pose of viewId2 with respect to viewId1, specified as a rigid3d object.
Information matrix associated with the connection, specified as a 6-by-6 numeric matrix.
View set with added connections between views, returned as a pcviewset object.
You have a modified version of this example. Do you want to open this example with your edits?