Cascade classifier class used for object detection. Supports HAAR and LBP cascades. :
More...
#include "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
§ convert()
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. |
§ create() [1/2]
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/ |
§ create() [2/2]
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
§ detectMultiScale()
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
§ getClassifierSize()
virtual Size cv::cuda::CascadeClassifier::getClassifierSize |
( |
| ) |
const |
|
pure virtual |
§ getFindLargestObject()
virtual bool cv::cuda::CascadeClassifier::getFindLargestObject |
( |
| ) |
|
|
pure virtual |
§ getMaxNumObjects()
virtual int cv::cuda::CascadeClassifier::getMaxNumObjects |
( |
| ) |
const |
|
pure virtual |
§ getMaxObjectSize()
virtual Size cv::cuda::CascadeClassifier::getMaxObjectSize |
( |
| ) |
const |
|
pure virtual |
§ getMinNeighbors()
virtual int cv::cuda::CascadeClassifier::getMinNeighbors |
( |
| ) |
const |
|
pure virtual |
§ getMinObjectSize()
virtual Size cv::cuda::CascadeClassifier::getMinObjectSize |
( |
| ) |
const |
|
pure virtual |
§ getScaleFactor()
virtual double cv::cuda::CascadeClassifier::getScaleFactor |
( |
| ) |
const |
|
pure virtual |
§ setFindLargestObject()
virtual void cv::cuda::CascadeClassifier::setFindLargestObject |
( |
bool |
findLargestObject | ) |
|
|
pure virtual |
§ setMaxNumObjects()
virtual void cv::cuda::CascadeClassifier::setMaxNumObjects |
( |
int |
maxNumObjects | ) |
|
|
pure virtual |
§ setMaxObjectSize()
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.
§ setMinNeighbors()
virtual void cv::cuda::CascadeClassifier::setMinNeighbors |
( |
int |
minNeighbors | ) |
|
|
pure virtual |
Parameter specifying how many neighbors each candidate rectangle should have to retain it.
§ setMinObjectSize()
virtual void cv::cuda::CascadeClassifier::setMinObjectSize |
( |
Size |
minSize | ) |
|
|
pure virtual |
Minimum possible object size. Objects smaller than that are ignored.
§ setScaleFactor()
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:
- /build/master-contrib_docs-lin64/opencv_contrib/modules/cudaobjdetect/include/opencv2/cudaobjdetect.hpp