checkSignalType

Validate signal type

Description

In the labeling apps, the checkSignalType method validates whether the signal selected for automation supports the signal type relevant to the automation algorithm.

  • Algorithms that automate the labeling of image collections, videos, or image sequences support signals of type Image only.

  • Algorithms that automate the labeling of lidar point clouds support signals of type PointCloud only.

In automation algorithms created for the Image Labeler and Video Labeler apps, you do not need to implement this method. If you do implement this method or use the default implementation, the apps validate that the signal is of type Image, which is the only signal type that these apps support.

In automation algorithms created for the Ground Truth Labeler app, you must implement this method. Use this method to validate whether the automation algorithm supports Image or PointCloud signals. Use of the Ground Truth Labeler app requires Automated Driving Toolbox™.

example

isValid = checkSignalType(signalType) returns true whether the specified signal type is valid. In the Ground Truth Labeling app, if you select an automation algorithm for a signal type that is invalid and then click Automate, the app displays an error.

Examples

expand all

Implement the checkSignalType method to designate Image signals as valid and all other signals as invalid.

function isValid = checkSignalType(signalType)
    isValid = (signalType == vision.labeler.loading.SignalType.Image);
end

Implement the checkSignalType method to designate PointCloud signals as valid and all other signals as invalid.

function isValid = checkSignalType(signalType)
    isValid = (signalType == vision.labeler.loading.SignalType.PointCloud);
end

Input Arguments

expand all

Signal type, specified as a vision.labeler.loading.SignalType enumeration.

Example: vision.labeler.loading.SignalType.Image

Example: vision.labeler.loading.SignalType.PointCloud

Output Arguments

expand all

True or false result of the signal type validity check, returned as a 1 or 0 of data type logical.

Attributes

Statictrue

To learn about attributes of methods, see Method Attributes (MATLAB).

Introduced in R2020a