Detect objects using the Viola-Jones algorithm
The cascade object detector uses the Viola-Jones algorithm to detect people’s faces, noses, eyes, mouth, or upper body. You can also use the Image Labeler to train a custom classifier to use with this System object. For details on how the function works, see Train a Cascade Object Detector.
To detect facial features or upper body in an image:
Create the vision.CascadeObjectDetector
object and set its properties.
Call the object with arguments, as if it were a function.
To learn more about how System objects work, see What Are System Objects?.
creates a detector to detect objects using the Viola-Jones algorithm.detector
= vision.CascadeObjectDetector
detector = vision.CascadeObjectDetector(
creates a detector configured to detect objects defined by the input character vector,
model
)model
.
detector = vision.CascadeObjectDetector(
creates a detector and configures it to use the custom classification model specified
with the XMLFILE
)XMLFILE
input.
sets properties using one or more name-value pairs. Enclose each property name in
quotes. For example, detector
= vision.CascadeObjectDetector(Name,Value
)detector =
vision.CascadeObjectDetector('ClassificationModel','UpperBody')
To use an object function, specify the
System object™ as the first input argument. For
example, to release system resources of a System object named obj
, use
this syntax:
release(obj)
[1] Lienhart R., Kuranov A., and V. Pisarevsky "Empirical Analysis of Detection Cascades of Boosted Classifiers for Rapid Object Detection." Proceedings of the 25th DAGM Symposium on Pattern Recognition. Magdeburg, Germany, 2003.
[2] Ojala Timo, Pietikäinen Matti, and Mäenpää Topi, "Multiresolution Gray-Scale and Rotation Invariant Texture Classification with Local Binary Patterns" . In IEEE Transactions on Pattern Analysis and Machine Intelligence, 2002. Volume 24, Issue 7, pp. 971-987.
[3] Kruppa H., Castrillon-Santana M., and B. Schiele. "Fast and Robust Face Finding via Local Context" . Proceedings of the Joint IEEE International Workshop on Visual Surveillance and Performance Evaluation of Tracking and Surveillance, 2003, pp. 157–164.
[4] Castrillón Marco, Déniz Oscar, Guerra Cayetano, and Hernández Mario, " ENCARA2: Real-time detection of multiple faces at different resolutions in video streams" . In Journal of Visual Communication and Image Representation, 2007 (18) 2: pp. 130-140.
[5] Yu Shiqi " Eye Detection." Shiqi Yu’s Homepage. http://yushiqi.cn/research/eyedetection.
[6] Viola, Paul and Michael J. Jones, " Rapid Object Detection using a Boosted Cascade of Simple Features" , Proceedings of the 2001 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, 2001. Volume: 1, pp.511–518.
[7] Dalal, N., and B. Triggs, " Histograms of Oriented Gradients for Human Detection" . IEEE Computer Society Conference on Computer Vision and Pattern Recognition. Volume 1, (2005), pp. 886–893.
[8] Ojala, T., M. Pietikainen, and T. Maenpaa, " Multiresolution Gray-scale and Rotation Invariant Texture Classification With Local Binary Patterns" . IEEE Transactions on Pattern Analysis and Machine Intelligence. Volume 24, No. 7 July 2002, pp. 971–987.
Image Labeler | insertShape
| integralImage
| trainCascadeObjectDetector
| vision.PeopleDetector