Main Content

removeCorrespondences

Remove 3-D to 2-D correspondences from world point set

Since R2020b

Description

wpSet = removeCorrespondences(wpSet,viewId,pointIndices) removes the correspondences between the 3-D world points, specified by the point indices pointIndices, and 2-D feature points for the specified view viewId from a world point set. Use this syntax if you added points using the addWorldPoints function without specifying unique point identifiers pointIds.

example

wpSet = removeCorrespondences(wpSet,viewId,pointIds) removes the correspondences between the 3-D world points, specified by point identifiers pointIds and 2-D feature points for the specified view viewId from a world point set. Use this syntax if you added points using the addWorldPoints function by specifying unique point identifiers pointIds.

Examples

collapse all

Generate 3-D world points.

worldPoints = rand(100,3);

Create a worldpointset object.

wpSet = worldpointset;

Add world points.

wpSet = addWorldPoints(wpSet,worldPoints);

Add correspondences for a view.

viewId = 1;
pointIndices   = 1:10;
featureIndices = 1:10;
wpSet  = addCorrespondences(wpSet,viewId,pointIndices,featureIndices);

Remove the first 5 correspondences.

pointIndices = 1:5;
wpSet  = removeCorrespondences(wpSet,viewId,pointIndices);

Generate 3-D world points.

worldPoints = rand(100,3);

Generate pointIds.

pointIds = randperm(100);

Create a worldpointset object.

wpSet = worldpointset;

Add world points.

wpSet = addWorldPoints(wpSet,worldPoints,pointIds);

Add correspondences for a view.

viewId = 1;
featureIndices = 1:10;
wpSet  = addCorrespondences(wpSet,viewId,pointIds(1:10),featureIndices);

Remove the first 5 correspondences.

wpSet  = removeCorrespondences(wpSet,viewId,pointIds(1:5));

Input Arguments

collapse all

World point set, specified as a worldpointset object.

View identifier, specified as a scalar.

World point indices, specified as an M-element column vector of integers. M is the number of world points from which to remove correspondences. Use this input when sequential indices are used for the points in the wpSet object.

World point identifiers, returned as an M-element vector of integers. M is the number of world points from which to remove correspondences. Use this input when points were added using addWorldPoints.

Output Arguments

collapse all

World point set, returned as a worldpointset object.

Extended Capabilities

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

Version History

Introduced in R2020b