addConnection

Add connection between views in view set

Description

example

vSet = addConnection(vSet,viewId1,viewId2) adds a connection between views viewId1 and viewId2 to the view set, vSet.

vSet = addConnection(vSet,viewId1,viewId2,relPose) specifies the relative pose of viewId2 with respect to viewId1.

vSet = addConnection(vSet,viewId1,viewId2,relPose,infoMat) specifies the information matrix associated with the connection.

Examples

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.

absPose1 = rigid3d;
vSet = addView(vSet,1,absPose1,'PointCloud',ptCloud1);

Add ptCloud2 to the point cloud view set. Specify a rigid3d object as the origin.

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);

Input Arguments

collapse all

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.

Output Arguments

collapse all

View set with added connections between views, returned as a pcviewset object.

See Also

Objects

Introduced in R2020a