run
Class: vision.labeler.AutomationAlgorithm
Namespace: vision.labeler
Run label automation on every frame in interval
Description
The run
method computes the automated labels for a single frame
by executing the automation algorithm. During automation, the labeling apps run this method in
a loop to compute the automated labels for each frame in the selection being automated. A
single frame can contain multiple signals such as images and point clouds.
Clients of AutomationAlgorithm
must implement this
method.
processes a single frame, autoLabels
= run(algObj
,frame
)frame
, using the
algObj
automation algorithm, and returns the automated labels,
autoLabels
.
Input Arguments
algObj
— Automation algorithm
vision.labeler.AutomationAlgorithm
object
Automation algorithm, specified as a vision.labeler.AutomationAlgorithm
object.
frame
— Frame
numeric matrix | pointCloud
object | M X 1 cell array
Frame whose labels are being computed, specified as a numeric image matrix, a
pointCloud
object or an M X 1
cell array of multiple image matrices and pointCloud
objects. To specify a cell array of multiple signals,
algObj
must support multisignal automation.
Output Arguments
autoLabels
— Labels produced by automation
categorical matrix | structure array | table
Labels produced by the automation algorithm, returned as a categorical matrix, structure array, or table.
For algorithms that automate pixel labeling, implement the run
method to return autoLabels
as a categorical
label matrix, where each category represents a pixel label.
For more information, see How Labeler Apps Store Exported Pixel Labels.
For algorithms that automate nonpixel labels, implement the run
method to return a structure array. Each structure in the array contains the labels of a
specific name and type. The method combines labels of the same name and type into a
single structure in the array.
This table describes the columns of the autoLabels
table or
fields of each autoLabels
structure.
Field Name | Description | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Type |
| ||||||||||||||
Name | Character vector, string scalar, or categorical scalar containing the name of the label. | ||||||||||||||
Position | Position of labels of the specified
| ||||||||||||||
Attributes (optional) | Structure array that contains one structure for each attribute in
the label. If the label definition does not contain attributes, then the
For each structure in the |
To view a sample autoLabels
structure array, enter this code at
the MATLAB® command
prompt.
autoLabels(1).Name = "Car"; autoLabels(1).Type = labelType.Rectangle; autoLabels(1).Position = [20 20 50 50]; autoLabels(2).Name = "Truck"; autoLabels(2).Type = labelType.Rectangle; autoLabels(2).Position = [70 70 50 50; 100 100 25 25];
Alternatively, for nonpixel labels, you can use the run
method to
return autoLabels
as a table. The table rows are equivalent to the
structures in a structure array. The table columns are equivalent to the structure
fields. This table is equivalent to the sample autoLabels
structure
array previously
specified.
Name Type Position ____________ _________ ____________ "Car" Rectangle [1x4 double] "Truck" Rectangle [2x4 double]
Version History
Introduced in R2017a
See Also
Objects
Functions
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)