updateLimitsAndDirection
Description
updates the distance limits and viewing direction of world points in the world point set
object, wpSet
= updateLimitsAndDirection(wpSet
,pointIndices
,viewTable
)wpSet
. The viewing direction is based on a table of views,
viewTable
. pointIndices
is the index to the
world point related to the update.
Examples
Update Distance Limits and Viewing Direction of World Points
Create a worldpointset
object and add world points and correspondences for view 1 and view 2.
wpSet = worldpointset; worldPoints = rand(10,3); wpSet = addWorldPoints(wpSet,worldPoints); pointIndices = 1:10; featureIndices = 1:10; viewId1 = 1; wpSet = addCorrespondences(wpSet,viewId1,pointIndices,featureIndices); viewId2 = 2; wpSet = addCorrespondences(wpSet,viewId1,pointIndices,featureIndices);
Create an imageviewset
object and add views and poses to the set. Add a translation in the x-axis for pose 2.
vSet = imageviewset; pose1 = rigidtform3d; vSet = addView(vSet, viewId1, pose1); pose2 = rigidtform3d([0 0 0],[1 0 0]); vSet = addView(vSet,viewId2,pose2);
Update the distance limit and viewing direction.
viewTable = findView(vSet,[viewId1,viewId2]); wpSet = updateLimitsAndDirection(wpSet,pointIndices,viewTable);
Check distance limits and viewing direction.
wpSet.ViewingDirection
ans = 10x3 single matrix
0.7703 0.1490 0.6200
0.6820 0.7308 0.0269
0.0988 0.7444 0.6604
0.6554 0.3483 0.6702
0.5161 0.6532 0.5540
0.1255 0.1826 0.9751
0.3099 0.4693 0.8269
0.4812 0.8058 0.3451
0.6815 0.5638 0.4665
0.7035 0.6996 0.1248
wpSet.DistanceLimits
ans = 10x2 single matrix
1.0576 1.0576
1.3281 1.3281
1.2858 1.2858
1.3936 1.3936
1.2252 1.2252
0.7771 0.7771
0.8987 0.8987
1.1364 1.1364
1.4050 1.4050
1.3715 1.3715
Input Arguments
wpSet
— World point set
worldpointset
object
World point set, specified as a worldpointset
object.
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 distance limits and viewing direction of the point that corresponds to the specified index.
viewTable
— One or more views
four-column table
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.
Column | Description |
---|---|
ViewId | View identifier for the view, specified as a unique integer |
AbsolutePose | Absolute pose of the view, specified as a rigidtform3d object. |
Features | Feature vectors, specified as an
M-by-N matrix of M
feature vectors or as a binaryFeatures . |
Points | Image points, specified as one of these options:
For more details, see Point Feature Types. |
Output Arguments
wpSet
— World point set
worldpointset
object
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 R2022b
See Also
Functions
Objects
Topics
Apri esempio
Si dispone di una versione modificata di questo esempio. Desideri aprire questo esempio con le tue modifiche?
Comando MATLAB
Hai fatto clic su un collegamento che corrisponde a questo comando MATLAB:
Esegui il comando inserendolo nella finestra di comando MATLAB. I browser web non supportano i comandi MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)