|
OpenCV 2.4.2 | |||||||
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.
Field Summary | |
---|---|
protected long |
nativeObj
|
Constructor Summary | |
---|---|
|
CascadeClassifier()
Loads a classifier from a file. |
protected |
CascadeClassifier(long addr)
|
|
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. |
protected void |
finalize()
|
boolean |
load(java.lang.String filename)
Loads a classifier from a file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final long nativeObj
Constructor Detail |
---|
public CascadeClassifier()
Loads a classifier from a file.
protected CascadeClassifier(long addr)
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.
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
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.
|
Official OpenCV 2.4 Documentation | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |