Main Content

updateConnection

Update connection between views in a view set

Description

example

vSet= updateConnection(vSet,viewId1,viewId2,relPose)updates the connection between viewsviewId1andviewId2with the relative pose specified byrelPose.

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 = rigid3d; absPose2 = rigid3d(absPose1.T*relPose.T );

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 apcviewsetobject.

看我dentifier 1, specified as an integer. View identifiers are unique to a specific view.

看我dentifier 2, specified as an integer. View identifiers are unique to a specific view.

Relative pose ofviewId2with respect toviewId1, specified as arigid3dobject.

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 apcviewsetobject.

Extended Capabilities

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

Version History

Introduced in R2020a

See Also

Objects