Cascade classifier class used for object detection. Supports HAAR and LBP cascades. :
More...
#include <opencv2/cudaobjdetect.hpp>
Cascade classifier class used for object detection. Supports HAAR and LBP cascades. :
- Note
- A cascade classifier example can be found at opencv_source_code/samples/gpu/cascadeclassifier.cpp
- A Nvidea API specific cascade classifier example can be found at opencv_source_code/samples/gpu/cascadeclassifier_nvidia_api.cpp
virtual void cv::cuda::CascadeClassifier::convert |
( |
OutputArray |
gpu_objects, |
|
|
std::vector< Rect > & |
objects |
|
) |
| |
|
pure virtual |
Converts objects array from internal representation to standard vector.
- Parameters
-
gpu_objects | Objects array in internal representation. |
objects | Resulting array. |
Loads the classifier from a file. Cascade type is detected automatically by constructor parameter.
- Parameters
-
filename | Name of the file from which the classifier is loaded. Only the old haar classifier (trained by the haar training application) and NVIDIA's nvbin are supported for HAAR and only new type of OpenCV XML cascade supported for LBP. The working haar models can be found at opencv_folder/data/haarcascades_cuda/ |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Detects objects of different sizes in the input image.
- Parameters
-
image | Matrix of type CV_8U containing an image where objects should be detected. |
objects | Buffer to store detected objects (rectangles). |
stream | CUDA stream. |
To get final array of detected objects use CascadeClassifier::convert method.
GpuMat image_gpu(image_cpu);
GpuMat objbuf;
cascade_gpu->
convert(objbuf, faces);
for(int i = 0; i < detections_num; ++i)
- See Also
- CascadeClassifier::detectMultiScale
virtual Size cv::cuda::CascadeClassifier::getClassifierSize |
( |
| ) |
const |
|
pure virtual |
virtual bool cv::cuda::CascadeClassifier::getFindLargestObject |
( |
| ) |
|
|
pure virtual |
virtual int cv::cuda::CascadeClassifier::getMaxNumObjects |
( |
| ) |
const |
|
pure virtual |
virtual Size cv::cuda::CascadeClassifier::getMaxObjectSize |
( |
| ) |
const |
|
pure virtual |
virtual int cv::cuda::CascadeClassifier::getMinNeighbors |
( |
| ) |
const |
|
pure virtual |
virtual Size cv::cuda::CascadeClassifier::getMinObjectSize |
( |
| ) |
const |
|
pure virtual |
virtual double cv::cuda::CascadeClassifier::getScaleFactor |
( |
| ) |
const |
|
pure virtual |
virtual void cv::cuda::CascadeClassifier::setFindLargestObject |
( |
bool |
findLargestObject | ) |
|
|
pure virtual |
virtual void cv::cuda::CascadeClassifier::setMaxNumObjects |
( |
int |
maxNumObjects | ) |
|
|
pure virtual |
virtual void cv::cuda::CascadeClassifier::setMaxObjectSize |
( |
Size |
maxObjectSize | ) |
|
|
pure virtual |
Maximum possible object size. Objects larger than that are ignored. Used for second signature and supported only for LBP cascades.
virtual void cv::cuda::CascadeClassifier::setMinNeighbors |
( |
int |
minNeighbors | ) |
|
|
pure virtual |
Parameter specifying how many neighbors each candidate rectangle should have to retain it.
virtual void cv::cuda::CascadeClassifier::setMinObjectSize |
( |
Size |
minSize | ) |
|
|
pure virtual |
Minimum possible object size. Objects smaller than that are ignored.
virtual void cv::cuda::CascadeClassifier::setScaleFactor |
( |
double |
scaleFactor | ) |
|
|
pure virtual |
Parameter specifying how much the image size is reduced at each image scale.
The documentation for this class was generated from the following file: