This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


System object: vision.CascadeObjectDetector
Package: vision

Detect objects using the Viola-Jones algorithm


BBOX = step(detector,I)
[___] = step(detector,I,roi)



Starting in R2016b, instead of using the step method to perform the operation defined by the System object™, you can call the object with arguments, as if it were a function. For example, y = step(obj,x) and y = obj(x) perform equivalent operations.

BBOX = step(detector,I) returns BBOX, an M-by-4 matrix defining M bounding boxes containing the detected objects. This method performs multi-scale object detection on the input image, I.

Each row of the output matrix, BBOX, contains a four-element vector, [x y width height], that specifies in pixels, the upper left corner and size of a bounding box. The input image I, must be a grayscale or truecolor (RGB) image.

[___] = step(detector,I,roi) detects objects within the rectangular search region specified by roi. You must specify roi as a 4-element vector, [x y width height], that defines a rectangular region of interest within image I. Set the 'UseROI' property to true to use this syntax.


H specifies the System object on which to run this step method.

The object performs an initialization the first time the step method is executed. This initialization locks nontunable properties and input specifications, such as dimensions, complexity, and data type of the input data. If you change a nontunable property or an input specification, the System object issues an error. To change nontunable properties or inputs, you must first call the release method to unlock the object.