Update representative view ID and corresponding feature index
updates representative view ID and corresponding feature index of world points in the
world point set object,
wpSet = updateRepresentativeView(
wpSet. The representative view is based on a
table of views,
pointIndices is the
index to the world point related to the update.
Update Representative View of World Point Set
vSet = imageviewset;
Add three views related to binary features.
viewId1 = 1; features1 = binaryFeatures(randi(255,[10, 32],"uint8")); vSet = addView(vSet,viewId1,Features=features1); viewId2 = 2; features2 = binaryFeatures(randi(255,[10, 32],"uint8")); vSet = addView(vSet,viewId2,Features=features2); viewId3 = 3; features3 = binaryFeatures(randi(255,[10, 32],"uint8")); vSet = addView(vSet,viewId3,Features=features3);
worldpointset object and add world points
wpSet = worldpointset; worldPoints = rand(10, 3); % Add world points wpSet = addWorldPoints(wpSet, worldPoints);
Add correspondences for three views.
pointIndices= 1:10; featureIndices1 = randperm(10); wpSet = addCorrespondences(wpSet,viewId1,pointIndices,featureIndices1); featureIndices2 = randperm(10); wpSet = addCorrespondences(wpSet,viewId2,pointIndices,featureIndices2); featureIndices3 = randperm(10); wpSet = addCorrespondences(wpSet,viewId3,pointIndices,featureIndices3);
Update representative view.
viewTable = findView(vSet, [viewId1,viewId2,viewId3]); wpSet = updateRepresentativeView(wpSet,pointIndices,viewTable);
Check representative view ID and feature index.
ans = 10×1 1 3 1 2 3 3 1 3 1 2
ans = 10×1 9 1 8 2 6 2 2 4 10 3
pointIndices — Point index
M-element column vector of integers
Point index, specified as an M-element column vector of integers, where M is the number of world points. The function updates the representative view ID and corresponding feature index of the point that corresponds to the specified index.
viewTable — One or more views
One or more connected or indirectly connected views, specified as a four-column table. The table must contain the columns as described in this table.
|View identifier for the view, specified as a unique integer|
|Absolute pose of the view, specified as a |
|Feature vectors, specified as an
M-by-N matrix of M
feature vectors or as a |
Image points, specified as one of these options:
For more details, see Point Feature Types.
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Introduced in R2022b