Main Content

findWorldPointsInView

Find world points observed in view

Since R2020b

Description

example

pointIndices = findWorldPointsInView(wpSet,viewId) finds the indices of the 3-D world points pointIndices observed in the specified view viewId.

[pointIndices,featureIndices] = findWorldPointsInView(wpSet,viewId) additionally returns the indices of the corresponding 2-D feature points in the view.

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 3-D to 2-D correspondences for view 1.

viewId1 = 1;
pointIndices1   = 1:10;
featureIndices1 = 1:10;
wpSet  = addCorrespondences(wpSet,viewId1,pointIndices1,featureIndices1);

Add 3-D to 2-D correspondences for view 2.

viewId2 = 2;
pointIndices2   = 6:10;
featureIndices2 = 1:5;
wpSet  = addCorrespondences(wpSet,viewId2,pointIndices2,featureIndices2);

Find world points in view 2.

[pointIndices,featureIndices] = findWorldPointsInView(wpSet,viewId2)
pointIndices = 5×1

     6
     7
     8
     9
    10

featureIndices = 5×1

     1
     2
     3
     4
     5

Input Arguments

collapse all

World point set, specified as a worldpointset object.

View identifier, specified as a scalar or an N-element vector. N is the number of views specified. The dimensions of the pointIndices and featureIndices arguments depends on the value of the viewId argument.

viewIdpointIndicesfeatureIndices
scalarM-element column vectorM-element column vector
N-element arrayN-element cell array N-element cell array

Output Arguments

collapse all

3-D world point indices, returned as an M-element column vector or an N-element cell array. M is the number of world points with corresponding feature points in the specified view. N is the number of views specified, and each element of the cell array contains a column vector of the world point indices with corresponding feature points in the associated view.

2-D feature point indices, returned as an M-element column vector or an N-element cell array. M is the number of world points with corresponding feature points in the specified view. N is the number of views specified, and each element of the cell array contains a column vector of the feature point indices in the associated view with corresponding world points.

Extended Capabilities

Version History

Introduced in R2020b