Main Content

findViewsOfWorldPoint

Find views that observe a world point

Description

example

viewIds = findViewsOfWorldPoint(wpSet,pointIndex) finds the identifiers for views viewIds that observe the specified 3-D world points pointIndex in a world point set wpSet.

[viewIds,featureIndices] = findViewsOfWorldPoint(wpSet,pointIndex) additionally returns the indices of the 2-D feature points that correspond to each 3-D world point for each associated 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 views of world points.

pointIndex = 6:10;
viewIds = findViewsOfWorldPoint(wpSet,pointIndex);

Input Arguments

collapse all

World point set, specified as a worldpointset object.

World point indices, specified as a scalar or an N-element vector of integers.

Output Arguments

collapse all

View identifiers, returned as an M-element column vector or N-element cell array. The function returns an M-element vector column, where M is the number of views that observe the world point, when pointIndex is a scalar. The function returns an N-element cell array when pointIndex is an N-element vector of integers. Each cell contains a column vector of the view identifiers for the associated world point.

2-D feature point indices, returned as an M-element column vector or N-element cell array. The function returns an M-element vector column, where M is the number of views that observe the world point, when pointIndex is a scalar. The function returns an N-element cell array when pointIndex is an N-element vector of integers. Each cell contains a column vector of the corresponding feature indices for the associated world point.

Introduced in R2020b