Main Content


Mixin interface for performing blocked image automation


The BlockedImageAutomation mixin class provides an interface for attaching blocked image properties to an automation algorithm. You can add this class only to automation algorithms used by the Image Labeler app.



To use the vision.labeler.mixin.BlockedImageAutomation object, open the Image Labeler app, load a blocked image, and create at least one label. Then, click Select Algorithm in the Automate Labeling section of the app toolstrip. Select Add Blocked Image Algorithm and then choose Create New Blocked Image Algorithm. A class template opens in the editor that inherits from both the vision.labeler.AutomationAlgorithm class and the vision.labeler.mixin.BlockedImageAutomation mixin class. Edit this template to create your blocked image automation algorithm.


expand all

The BlockedImageAutomation mixin class predefines this set of properties.

Number of blocks supplied to the apply function at a time, specified as an integer valued vector of length equal to the NumDimensions property of the blocked image.

Size of additional border elements to add around a block in each dimension, specified as a 1-by-D numeric vector, where D is equal to the NumDimensions property of the first blockedImage object.

Ratio that determines whether a block should be considered for processing, specified as a value in the range [0 1]. The value specifies the minimum percentage of nonzero pixels in the block. A value of 0 means that only one pixel in the block must be true/nonzero for it to be included in processing. A value of 1 requires that all pixels in the block be true/nonzero for it to be included in processing.

Method used to obtain padding pixels to honor the BorderSize or the PadPartialBlocks parameters, specified as scalar string or char vector

Pad partial blocks that might exist on the edges, specified as a logical scalar, true or false.

Continue processing from where a previous run stopped, specified as a logical scalar, true or false.

Object Functions

blockedImageAutomationAlgorithmImplements the blocked image automation algorithm
Introduced in R2021a