Main Content

hasView

Check if view is in the map

Since R2021a

Description

tf = hasView(sMap,viewIds) checks if the views specified by viewIds are in the map.

example

Examples

collapse all

Load a map of segments and features from a MAT file.

data = load('segmatchMapFullParkingLot.mat');
sMap = data.segmatchMapFullParkingLot;

Specify a set of indices for views.

viewIds = [10,500,2,100];

Check if the specified indices correspond to existing view identifiers.

tf = hasView(sMap,viewIds)
tf = 1x4 logical array

   1   0   1   0

Input Arguments

collapse all

Map of segments and features, specified as a pcmapsegmatch object.

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

Output Arguments

collapse all

Views that exist in map, returned as an M-element vector. The function returns a value of 1 (true) if the view specified in the corresponding element of view Ids is in the map. The function returns 0 (false) if the view is not in the map.

Version History

Introduced in R2021a

See Also

Objects

Functions