This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Class: viewSet

Check if view exists


tf = hasView(vSet,viewId)


tf = hasView(vSet,viewId) returns 1 if the view specified by viewID exists and 0 if it does not exist.

Input Arguments

expand all

viewSet object.

View ID in the viewSet object, specified as an integer.

Output Arguments

expand all

Validity of view connection, returned as a logical 1 or 0.


expand all

Create an empty viewSet object.

vSet = viewSet;

Detect interest points in the image.

imageDir = fullfile(toolboxdir('vision'),'visiondata','structureFromMotion');
I = imread(fullfile(imageDir,'image1.jpg'));
points = detectSURFFeatures(rgb2gray(I));

Add a new view.

vSet = addView(vSet, 1,'Points',points);

Confirm that the view with ID 1 exists.

tf = hasView(vSet,1);

Introduced in R2016a