|
OpenCV 2.4.4 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opencv.objdetect.CascadeClassifier
public class CascadeClassifier
Cascade classifier class for object detection.
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 |
---|
public CascadeClassifier()
Loads a classifier from a file.
public CascadeClassifier(java.lang.String filename)
Loads a classifier from a file.
filename
- Name of the file from which the classifier is loaded.Method Detail |
---|
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.
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.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.
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.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.
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 rejectLevelslevelWeights
- a levelWeightspublic 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.
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 rejectLevelslevelWeights
- a levelWeightsscaleFactor
- 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 outputRejectLevelspublic boolean empty()
Checks whether the classifier has been loaded.
public boolean load(java.lang.String filename)
Loads a classifier from a file.
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.
|
OpenCV 2.4.4 Documentation | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |