![]() Simd Library Documentation.Home | Release Notes | Download | Documentation | Forum | SourceForge | GitHub | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The Detection structure provides object detection with using of HAAR and LBP cascade classifiers. More...
Detailed Descriptiontemplate<template< class > class A>
|
typedef Simd::View<A> View |
An image type definition.
typedef Simd::Point<ptrdiff_t> Size |
An image size type definition.
typedef Simd::Rectangle<ptrdiff_t> Rect |
A rectangle type definition.
typedef int Tag |
A tag type definition.
bool Load | ( | const std::string & | path, |
Tag | tag = UNDEFINED_OBJECT_TAG |
||
) |
Loads from file classifier cascade. Supports OpenCV HAAR and LBP cascades type. You can call this function more than once if you want to use several object detectors at the same time.
[in] | path | - a path to cascade. |
[in] | tag | - an user defined tag. This tag will be inserted in output Object structure. |
bool Init | ( | const Size & | imageSize, |
double | scaleFactor = 1.1 , |
||
const Size & | sizeMin = Size(0, 0) , |
||
const Size & | sizeMax = Size(INT_MAX, INT_MAX) , |
||
const View & | roi = View() , |
||
ptrdiff_t | threadNumber = -1 |
||
) |
Prepares Detection structure to work with image of given size.
[in] | imageSize | - a size of input image. |
[in] | scaleFactor | - a scale factor. To detect objects of different sizes the algorithm uses many scaled image. This parameter defines size difference between neighboring images. This parameter strongly affects to performance. |
[in] | sizeMin | - a minimal size of detected objects. This parameter strongly affects to performance. |
[in] | sizeMax | - a maximal size of detected objects. |
[in] | roi | - a 8-bit image mask which defines Region Of Interest. User can restricts detection region with using this mask. The mask affects to the center of detected object. |
[in] | threadNumber | - a number of work threads. It useful for multi core CPU. Use value -1 to auto choose of thread number. |
bool Detect | ( | const View & | src, |
Objects & | objects, | ||
int | groupSizeMin = 3 , |
||
double | sizeDifferenceMax = 0.2 , |
||
bool | motionMask = false , |
||
const Rects & | motionRegions = Rects() |
||
) |
Detects objects at given image.
[in] | src | - a input image. |
[out] | objects | - detected objects. |
[in] | groupSizeMin | - a minimal weight (number of elementary detections) of detected image. |
[in] | sizeDifferenceMax | - a parameter to group elementary detections. |
[in] | motionMask | - an using of motion detection flag. Useful for dynamical restriction of detection region to addition to ROI. |
[in] | motionRegions | - a set of rectangles (motion regions) to restrict detection region to addition to ROI. The regions affect to the center of detected object. |
|
static |
The undefined object tag.