Main Content

hasView

(To be removed) Check if view exists

TheviewSetobject and itshasViewfunction will be removed in a future release. Use theimageviewsetobject and itshasViewfunction instead. For more information, seeCompatibility Considerations.

Description

example

tf= hasView(vSet,viewId)returns1if the view specified byviewIDexists and0if it does not exist.

Examples

collapse 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(im2gray(I));

Add a new view.

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

Confirm that the view with ID 1 exists.

tf = hasView(vSet,1);

Input Arguments

collapse all

viewSetobject.

View ID in theviewSet对象,指定为一个integer.

Output Arguments

collapse all

Validity of view connection, returned as a logical1or0.

Version History

Introduced in R2016a

expand all

Not recommended starting in R2020a