poses
Absolute poses associated with views in view set
Description
returns a table of absolute poses associated with the views contained in the view set,
sensorPoses = poses(vSet)vSet.
Examples
Load images into the workspace.
imageDir = fullfile(toolboxdir("vision"),"visiondata","structureFromMotion"); images = imageDatastore(imageDir);
Compute features for the first image.
I = im2gray(readimage(images,1)); pointsPrev = detectSURFFeatures(I); [featuresPrev,pointsPrev] = extractFeatures(I,pointsPrev);
Create an image view set and add the extracted feature points to the image view set.
vSet = imageviewset; vSet = addView(vSet,1,Points=pointsPrev);
Compute features and matches for the rest of the images.
for i = 2:numel(images.Files) I = im2gray(readimage(images,i)); points = detectSURFFeatures(I); [features,points] = extractFeatures(I,points); vSet = addView(vSet,i,Features=features,Points=points); pairsIdx = matchFeatures(featuresPrev,features); vSet = addConnection(vSet,i-1,i,Matches=pairsIdx); featuresPrev = features; end
Get the absolute poses.
sensorPoses = poses(vSet)
sensorPoses=5×2 table
ViewId AbsolutePose
______ ________________
1 1×1 rigidtform3d
2 1×1 rigidtform3d
3 1×1 rigidtform3d
4 1×1 rigidtform3d
5 1×1 rigidtform3d
Input Arguments
Image view set, specified as an imageviewset
object.
Output Arguments
Absolute poses, returned as a two-column table. The table contains columns as described in this table.
| Column | Description |
|---|---|
ViewID | View identifier, returned as a positive integer. View identifiers are unique to a specific view. |
AbsolutePose | Absolute pose of the view, returned as a rigidtform3d or
se3
object. |
Extended Capabilities
When generating code, the output argument sensorPoses is returned
as a structure with fields ViewID and AbsolutePose.
Use posesSe3 instead of poses for code generation if you're using se3 poses as input to
vset
GPU Code Generation
Generate CUDA® code for NVIDIA® GPUs using GPU Coder™.
Version History
Introduced in R2020aStarting in R2022b, most Computer Vision Toolbox™ functions create and perform geometric transformations using the premultiply
convention. Accordingly, the poses function now returns the
AbsolutePose value in the sensorPoses argument as
a rigidtform3d
object, which uses the premultiply convention. Before, the function returned
AbsolutePose as a rigid3d object,
which uses the postmultiply convention. For more information, see Migrate Geometric Transformations to Premultiply Convention.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- 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)