Initialize state for algorithm execution (optional)

The initialize method initializes the state of the automation algorithm before the automation algorithm runs.

Clients of AutomationAlgorithm can optionally implement this method.




initialize(algObj,I) initializes state of the algObj automation algorithm. I is a numeric matrix containing the frame that corresponds to the start of the interval.

Clients of AutomationAlgorithm must implement this user-defined method.

initialize(algObj,I,labelsToAutomate) additionally provides a table, labelsToAutomate, that contains labels selected for the automation algorithm to use for labeling. This syntax is available only for time-dependent (temporal) automation algorithms. The Ground Truth Labeler (requires Automated Driving Toolbox™) and Video Labeler apps support these algorithms, but the Image Labeler does not. For more information, see Temporal Automation Algorithms.

Input Arguments

expand all

Automation algorithm, specified as a vision.labeler.AutomationAlgorithm object.

Image frame corresponding to start of time interval, specified as a numeric matrix.

Selected labels (ROI and Scene) that are marked before executing the algorithm, specified as a table with the following variables.

Variable NameDescription
TypeEnumeration of class labelType with possible values of Rectangle, Line and Scene.
NameCharacter vector containing the name of the specified label.
TimeScalar double specifying the time, in seconds, when the label was marked.

Label TypeDescription

Position of bounding box locations, specified as a 1-by-4 vector in the format [x,y,w,h].

LinePoints along a polyline, specified as an N-by-2 vector in the format [x1,y1;x2,y2; . . . xN,yN] for N points.

Example of a labelsToAutomate table:

       Type           Name           Time        Position  
     _________    ____________    _________    ____________
     Rectangle    'Car'           0.033333     [1x4 double]
     Line         'LaneMarker'    0.066667     [5x2 double]
     Scene        'Sunny'              0.1     [         0] 

Introduced in R2017a