Main Content

updateConnection

Update connection between views in a view set

Since R2020a

Description

example

vSet = updateConnection(vSet,viewId1,viewId2,relPose) updates the connection between views viewId1 and viewId2 with the relative pose specified by relPose.

vSet = updateConnection(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 two views to the point cloud view set.

vSet = addView(vSet,1,'PointCloud',ptCloud1);
vSet = addView(vSet,2,'PointCloud',ptCloud2);

Add a connection between the two views.

vSet = addConnection(vSet,1,2);

Estimate the rigid transformation between the two point clouds.

ptCloud2Downsampled = pcdownsample(ptCloud2,'gridAverage',0.1);

gridStep = 0.5;
relPose = pcregisterndt(ptCloud2Downsampled,ptCloud1,gridStep);

Compute the accumulated absolute pose for each view.

absPose1 = rigidtform3d;
absPose2 = rigidtform3d(absPose1.A * relPose.A);

Update the connection with relative pose between views.

vSet = updateConnection(vSet,1,2,relPose);

Update the views with the absolute poses.

vSet = updateView(vSet,1,absPose1);
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 rigidtform3d object.

Information matrix associated with the connection, specified as a 6-by-6 numeric matrix.

Output Arguments

collapse all

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

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2020a

expand all

See Also

Objects