OpenCV 2.4.8

org.opencv.objdetect
Class CascadeClassifier

java.lang.Object
  extended by org.opencv.objdetect.CascadeClassifier

public class CascadeClassifier
extends java.lang.Object

Cascade classifier class for object detection.

See Also:
org.opencv.objdetect.CascadeClassifier

Constructor Summary
CascadeClassifier()
          Loads a classifier from a file.
CascadeClassifier(java.lang.String filename)
          Loads a classifier from a file.
 
Method Summary
 void detectMultiScale(Mat image, MatOfRect objects)
          Detects objects of different sizes in the input image.
 void detectMultiScale(Mat image, MatOfRect objects, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize)
          Detects objects of different sizes in the input image.
 void detectMultiScale(Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights)
          Detects objects of different sizes in the input image.
 void detectMultiScale(Mat image, MatOfRect objects, MatOfInt rejectLevels, MatOfDouble levelWeights, double scaleFactor, int minNeighbors, int flags, Size minSize, Size maxSize, boolean outputRejectLevels)
          Detects objects of different sizes in the input image.
 boolean empty()
          Checks whether the classifier has been loaded.
 boolean load(java.lang.String filename)
          Loads a classifier from a file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CascadeClassifier

public CascadeClassifier()

Loads a classifier from a file.

See Also:
org.opencv.objdetect.CascadeClassifier.CascadeClassifier

CascadeClassifier

public CascadeClassifier(java.lang.String filename)

Loads a classifier from a file.

Parameters:
filename - Name of the file from which the classifier is loaded.
See Also:
org.opencv.objdetect.CascadeClassifier.CascadeClassifier
Method Detail

detectMultiScale

public void detectMultiScale(Mat image,
                             MatOfRect objects)

Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.

The function is parallelized with the TBB library.

Note:

Parameters:
image - Matrix of the type CV_8U containing an image where objects are detected.
objects - Vector of rectangles where each rectangle contains the detected object.
See Also:
org.opencv.objdetect.CascadeClassifier.detectMultiScale

detectMultiScale

public void detectMultiScale(Mat image,
                             MatOfRect objects,
                             double scaleFactor,
                             int minNeighbors,
                             int flags,
                             Size minSize,
                             Size maxSize)

Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.

The function is parallelized with the TBB library.

Note:

Parameters:
image - Matrix of the type CV_8U containing an image where objects are detected.
objects - Vector of rectangles where each rectangle contains the detected object.
scaleFactor - Parameter specifying how much the image size is reduced at each image scale.
minNeighbors - Parameter specifying how many neighbors each candidate rectangle should have to retain it.
flags - Parameter with the same meaning for an old cascade as in the function cvHaarDetectObjects. It is not used for a new cascade.
minSize - Minimum possible object size. Objects smaller than that are ignored.
maxSize - Maximum possible object size. Objects larger than that are ignored.
See Also:
org.opencv.objdetect.CascadeClassifier.detectMultiScale

detectMultiScale

public void detectMultiScale(Mat image,
                             MatOfRect objects,
                             MatOfInt rejectLevels,
                             MatOfDouble levelWeights)

Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.

The function is parallelized with the TBB library.

Note:

Parameters:
image - Matrix of the type CV_8U containing an image where objects are detected.
objects - Vector of rectangles where each rectangle contains the detected object.
rejectLevels - a rejectLevels
levelWeights - a levelWeights
See Also:
org.opencv.objdetect.CascadeClassifier.detectMultiScale

detectMultiScale

public void detectMultiScale(Mat image,
                             MatOfRect objects,
                             MatOfInt rejectLevels,
                             MatOfDouble levelWeights,
                             double scaleFactor,
                             int minNeighbors,
                             int flags,
                             Size minSize,
                             Size maxSize,
                             boolean outputRejectLevels)

Detects objects of different sizes in the input image. The detected objects are returned as a list of rectangles.

The function is parallelized with the TBB library.

Note:

Parameters:
image - Matrix of the type CV_8U containing an image where objects are detected.
objects - Vector of rectangles where each rectangle contains the detected object.
rejectLevels - a rejectLevels
levelWeights - a levelWeights
scaleFactor - Parameter specifying how much the image size is reduced at each image scale.
minNeighbors - Parameter specifying how many neighbors each candidate rectangle should have to retain it.
flags - Parameter with the same meaning for an old cascade as in the function cvHaarDetectObjects. It is not used for a new cascade.
minSize - Minimum possible object size. Objects smaller than that are ignored.
maxSize - Maximum possible object size. Objects larger than that are ignored.
outputRejectLevels - a outputRejectLevels
See Also:
org.opencv.objdetect.CascadeClassifier.detectMultiScale

empty

public boolean empty()

Checks whether the classifier has been loaded.

See Also:
org.opencv.objdetect.CascadeClassifier.empty

load

public boolean load(java.lang.String filename)

Loads a classifier from a file.

Parameters:
filename - Name of the file from which the classifier is loaded. The file may contain an old HAAR classifier trained by the haartraining application or a new cascade classifier trained by the traincascade application.
See Also:
org.opencv.objdetect.CascadeClassifier.load

OpenCV 2.4.8 Documentation