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
Retrieve Absolute Poses From Image View Set
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 1x1 rigid3d
2 1x1 rigid3d
3 1x1 rigid3d
4 1x1 rigid3d
5 1x1 rigid3d
Input Arguments
vSet
— Image view set
imageviewset
object
Image view set, specified as an imageviewset
object.
Output Arguments
sensorPoses
— Absolute poses
two-column table
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, specified as a rigid3d object. |
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
When generating code, the output argument sensorPoses
is returned
as a structure with fields ViewID and
AbsolutePose.
Version History
Beispiel öffnen
Sie haben eine geänderte Version dieses Beispiels. Möchten Sie dieses Beispiel mit Ihren Änderungen öffnen?
MATLAB-Befehl
Sie haben auf einen Link geklickt, der diesem MATLAB-Befehl entspricht:
Führen Sie den Befehl durch Eingabe in das MATLAB-Befehlsfenster aus. Webbrowser unterstützen keine MATLAB-Befehle.
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)