Main Content

findWorldPointsInView

Find world points observed in view

Description

example

pointIndices= findWorldPointsInView(wpSet,viewId)finds the indices of the 3-D world pointspointIndicesobserved in the specified viewviewId.

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

Examples

阿胶pse all

Generate 3-D world points.

worldPoints = rand(100,3);

Create aworldpointsetobject.

wpSet = worldpointset;

Add world points.

wpSet = addWorldPoints(wpSet,worldPoints);

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

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

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

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

Find world points in view2.

[pointIndices,featureIndices] = findWorldPointsInView(wpSet,viewId2)
pointIndices =5×16 7 8 9 10
featureIndices =5×11 2 3 4 5

Input Arguments

阿胶pse all

World point set, specified as aworldpointsetobject.

视图标识符指定为一个标量或N-element vector.Nis the number of views specified. The dimensions of thepointIndicesandfeatureIndicesarguments depends on the value of theviewIdargument.

viewId pointIndices featureIndices
scalar M-element column vector M-element column vector
N-element array N-element cell array N-element cell array

Output Arguments

阿胶pse all

3-D world point indices, returned as anM-element column vector or anN-element cell array.Mis the number of world points with corresponding feature points in the specified view.Nis 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 anM-element column vector or anN-element cell array.Mis the number of world points with corresponding feature points in the specified view.Nis 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