poses

Absolute poses associated with views in view set

Description

example

sensorPoses = poses(vSet) returns a table of absolute poses associated with the views contained in the view set, vSet.

Examples

collapse all

Load images into the workspace.

imageDir = fullfile(toolboxdir('vision'),'visiondata','structureFromMotion');
images = imageDatastore(imageDir);

Compute features for the first image.

I = rgb2gray(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 = rgb2gray(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 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

collapse all

Image view set, specified as an imageviewset object.

Output Arguments

collapse all

Absolute poses, returned as a two-column table. The table contains columns as described in this table.

ColumnDescription
ViewIDView identifier, returned as a positive integer. View identifiers are unique to a specific view.
AbsolutePoseAbsolute pose of the view, specified as a rigid3d object.

See Also

Objects

Introduced in R2020a