Main Content


Find views associated with view identifiers



views = findView(vSet,viewIds) finds the views associated with the specified view viewIds and returns the view attributes.


collapse all

Create an empty image view set.

vSet = imageviewset;

Add two images.

imageDir = fullfile(toolboxdir("vision"),"visiondata","structureFromMotion");
I1 = im2gray(imread(fullfile(imageDir,"image1.jpg")));
I2 = im2gray(imread(fullfile(imageDir,"image2.jpg")));

Detect interest points in the two images

points1 = detectSURFFeatures(I1);
points2 = detectSURFFeatures(I2);

Extract features descriptors from the detected points.

[features1,validPoints1] = extractFeatures(I1,points1);
[features2,validPoints2] = extractFeatures(I2,points2);

Add the points to the imageviewset object.

vSet = addView(vSet,1,Features=features1,Points=validPoints1);
vSet = addView(vSet,2,Features=features2,Points=validPoints2);

Find the view that corresponds to viewID equal to 1.

view = findView(vSet,1)

Check the feature points that correspond to viewID equal to 1.

ans = 
  574×1 SURFPoints array with properties:

              Scale: [574×1 single]
    SignOfLaplacian: [574×1 int8]
        Orientation: [574×1 single]
           Location: [574×2 single]
             Metric: [574×1 single]
              Count: 574

Input Arguments

collapse all

Image view set, specified as an imageviewset object.

View identifiers, specified as an M-element vector of integers. Each view identifier is unique to a specific view.

Output Arguments

collapse all

View attributes, returned as a four-column table. The table contains the columns ViewId, AbsolutePose, Features, and Points attribute descriptions.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2021b

See Also