Simd Library Documentation.

Home | Release Notes | Download | Documentation | Issues | GitHub | SourceForge
Object Detection

Object Detection's low-level API for Simd::Detection. More...

Functions

SIMD_API void * SimdDetectionLoadA (const char *path)
 Loads a classifier cascade from file. More...
 
SIMD_API void SimdDetectionInfo (const void *data, size_t *width, size_t *height, SimdDetectionInfoFlags *flags)
 Gets information about the classifier cascade. More...
 
SIMD_API void * SimdDetectionInit (const void *data, uint8_t *sum, size_t sumStride, size_t width, size_t height, uint8_t *sqsum, size_t sqsumStride, uint8_t *tilted, size_t tiltedStride, int throughColumn, int int16)
 Initializes hidden classifier cascade structure to work with given size of input 8-bit gray image. More...
 
SIMD_API void SimdDetectionPrepare (void *hid)
 Prepares hidden classifier cascade structure to work with given input 8-bit gray image. More...
 
SIMD_API void SimdDetectionHaarDetect32fp (const void *hid, const uint8_t *mask, size_t maskStride, ptrdiff_t left, ptrdiff_t top, ptrdiff_t right, ptrdiff_t bottom, uint8_t *dst, size_t dstStride)
 Performs object detection with using of HAAR cascade classifier (uses 32-bit float numbers, processes all points). More...
 
SIMD_API void SimdDetectionHaarDetect32fi (const void *hid, const uint8_t *mask, size_t maskStride, ptrdiff_t left, ptrdiff_t top, ptrdiff_t right, ptrdiff_t bottom, uint8_t *dst, size_t dstStride)
 Performs object detection with using of HAAR cascade classifier (uses 32-bit float numbers, processes only even points). More...
 
SIMD_API void SimdDetectionLbpDetect32fp (const void *hid, const uint8_t *mask, size_t maskStride, ptrdiff_t left, ptrdiff_t top, ptrdiff_t right, ptrdiff_t bottom, uint8_t *dst, size_t dstStride)
 Performs object detection with using of LBP cascade classifier (uses 32-bit float numbers, processes all points). More...
 
SIMD_API void SimdDetectionLbpDetect32fi (const void *hid, const uint8_t *mask, size_t maskStride, ptrdiff_t left, ptrdiff_t top, ptrdiff_t right, ptrdiff_t bottom, uint8_t *dst, size_t dstStride)
 Performs object detection with using of LBP cascade classifier (uses 32-bit float numbers, processes only even points). More...
 
SIMD_API void SimdDetectionLbpDetect16ip (const void *hid, const uint8_t *mask, size_t maskStride, ptrdiff_t left, ptrdiff_t top, ptrdiff_t right, ptrdiff_t bottom, uint8_t *dst, size_t dstStride)
 Performs object detection with using of LBP cascade classifier (uses 16-bit integer numbers, processes all points). More...
 
SIMD_API void SimdDetectionLbpDetect16ii (const void *hid, const uint8_t *mask, size_t maskStride, ptrdiff_t left, ptrdiff_t top, ptrdiff_t right, ptrdiff_t bottom, uint8_t *dst, size_t dstStride)
 Performs object detection with using of LBP cascade classifier (uses 16-bit integer numbers, processes only even points). More...
 
SIMD_API void SimdDetectionFree (void *ptr)
 Frees pointers which was received with using of functions SimdDetectionLoadA and SimdDetectionInit. More...
 

Detailed Description

Object Detection's low-level API for Simd::Detection.

Function Documentation

◆ SimdDetectionLoadA()

void * SimdDetectionLoadA ( const char *  path)

Loads a classifier cascade from file.

This function supports OpenCV HAAR and LBP cascades type. Tree based cascades and old cascade formats are not supported.

Note
This function is used for implementation of Simd::Detection.
Parameters
[in]path- a path to cascade.
Returns
a pointer to loaded cascade. On error it returns NULL. This pointer is used in functions SimdDetectionInfo and SimdDetectionInit, and must be released with using function SimdDetectionFree.

◆ SimdDetectionInfo()

void SimdDetectionInfo ( const void *  data,
size_t *  width,
size_t *  height,
SimdDetectionInfoFlags flags 
)

Gets information about the classifier cascade.

Note
This function is used for implementation of Simd::Detection.
Parameters
[in]data- a pointer to cascade which was received with using of function SimdDetectionLoadA.
[out]width- a pointer to returned width of cascade window.
[out]height- a pointer to returned height of cascade window.
[out]flags- a pointer to flags with other information (See SimdDetectionInfoFlags).

◆ SimdDetectionInit()

void * SimdDetectionInit ( const void *  data,
uint8_t *  sum,
size_t  sumStride,
size_t  width,
size_t  height,
uint8_t *  sqsum,
size_t  sqsumStride,
uint8_t *  tilted,
size_t  tiltedStride,
int  throughColumn,
int  int16 
)

Initializes hidden classifier cascade structure to work with given size of input 8-bit gray image.

Note
This function is used for implementation of Simd::Detection.
Parameters
[in]data- a pointer to cascade which was received with using of function SimdDetectionLoadA.
[in]sum- a pointer to pixels data of 32-bit integer image with integral sum of given input 8-bit gray image. See function SimdIntegral in order to estimate this integral sum.
[in]sumStride- a row size of the sum image.
[in]width- a width of the sum image. It must be per unit greater than width of input 8-bit gray image.
[in]height- a height of the sum image. It must be per unit greater than height of input 8-bit gray image.
[in]sqsum- a pointer to pixels data of 32-bit integer image with squared integral sum of given input 8-bit gray image. Its size must be equal to sum image. See function SimdIntegral in order to estimate this squared integral sum. Its
[in]sqsumStride- a row size of the sqsum image.
[in]tilted- a pointer to pixels data of 32-bit integer image with tilted integral sum of given input 8-bit gray image. Its size must be equal to sum image. See function SimdIntegral in order to estimate this tilted integral sum.
[in]tiltedStride- a row size of the tilted image.
[in]throughColumn- a flag to detect objects only in even columns and rows (to increase performance).
[in]int16- a flag use for 16-bit integer version of detection algorithm. (See SimdDetectionInfo).
Returns
a pointer to hidden cascade. On error it returns NULL. This pointer is used in functions SimdDetectionPrepare, SimdDetectionHaarDetect32fp, SimdDetectionHaarDetect32fi, SimdDetectionLbpDetect32fp, SimdDetectionLbpDetect32fi, SimdDetectionLbpDetect16ip and SimdDetectionLbpDetect16ii. It must be released with using function SimdDetectionFree.

◆ SimdDetectionPrepare()

void SimdDetectionPrepare ( void *  hid)

Prepares hidden classifier cascade structure to work with given input 8-bit gray image.

You must call this function before calling of functions SimdDetectionHaarDetect32fp, SimdDetectionHaarDetect32fi, SimdDetectionLbpDetect32fp, SimdDetectionLbpDetect32fi, SimdDetectionLbpDetect16ip and SimdDetectionLbpDetect16ii.

Note
This function is used for implementation of Simd::Detection.
Parameters
[in]hid- a pointer to hidden cascade which was received with using of function SimdDetectionInit.

◆ SimdDetectionHaarDetect32fp()

void SimdDetectionHaarDetect32fp ( const void *  hid,
const uint8_t *  mask,
size_t  maskStride,
ptrdiff_t  left,
ptrdiff_t  top,
ptrdiff_t  right,
ptrdiff_t  bottom,
uint8_t *  dst,
size_t  dstStride 
)

Performs object detection with using of HAAR cascade classifier (uses 32-bit float numbers, processes all points).

You must call function SimdDetectionPrepare before calling of this functions. All restriction (input mask and bounding box) affects to left-top corner of scanning window.

Note
This function is used for implementation of Simd::Detection.
Parameters
[in]hid- a pointer to hidden cascade which was received with using of function SimdDetectionInit.
[in]mask- a pointer to pixels data of 8-bit image with mask. The mask restricts detection region.
[in]maskStride- a row size of the mask image.
[in]left- a left side of bounding box which restricts detection region.
[in]top- a top side of bounding box which restricts detection region.
[in]right- a right side of bounding box which restricts detection region.
[in]bottom- a bottom side of bounding box which restricts detection region.
[out]dst- a pointer to pixels data of 8-bit image with output result. None zero points refer to left-top corner of detected objects.
[in]dstStride- a row size of the dst image.

◆ SimdDetectionHaarDetect32fi()

void SimdDetectionHaarDetect32fi ( const void *  hid,
const uint8_t *  mask,
size_t  maskStride,
ptrdiff_t  left,
ptrdiff_t  top,
ptrdiff_t  right,
ptrdiff_t  bottom,
uint8_t *  dst,
size_t  dstStride 
)

Performs object detection with using of HAAR cascade classifier (uses 32-bit float numbers, processes only even points).

You must call function SimdDetectionPrepare before calling of this functions. All restriction (input mask and bounding box) affects to left-top corner of scanning window.

Note
This function is used for implementation of Simd::Detection.
Parameters
[in]hid- a pointer to hidden cascade which was received with using of function SimdDetectionInit.
[in]mask- a pointer to pixels data of 8-bit image with mask. The mask restricts detection region.
[in]maskStride- a row size of the mask image.
[in]left- a left side of bounding box which restricts detection region.
[in]top- a top side of bounding box which restricts detection region.
[in]right- a right side of bounding box which restricts detection region.
[in]bottom- a bottom side of bounding box which restricts detection region.
[out]dst- a pointer to pixels data of 8-bit image with output result. None zero points refer to left-top corner of detected objects.
[in]dstStride- a row size of the dst image.

◆ SimdDetectionLbpDetect32fp()

void SimdDetectionLbpDetect32fp ( const void *  hid,
const uint8_t *  mask,
size_t  maskStride,
ptrdiff_t  left,
ptrdiff_t  top,
ptrdiff_t  right,
ptrdiff_t  bottom,
uint8_t *  dst,
size_t  dstStride 
)

Performs object detection with using of LBP cascade classifier (uses 32-bit float numbers, processes all points).

You must call function SimdDetectionPrepare before calling of this functions. All restriction (input mask and bounding box) affects to left-top corner of scanning window.

Note
This function is used for implementation of Simd::Detection.
Parameters
[in]hid- a pointer to hidden cascade which was received with using of function SimdDetectionInit.
[in]mask- a pointer to pixels data of 8-bit image with mask. The mask restricts detection region.
[in]maskStride- a row size of the mask image.
[in]left- a left side of bounding box which restricts detection region.
[in]top- a top side of bounding box which restricts detection region.
[in]right- a right side of bounding box which restricts detection region.
[in]bottom- a bottom side of bounding box which restricts detection region.
[out]dst- a pointer to pixels data of 8-bit image with output result. None zero points refer to left-top corner of detected objects.
[in]dstStride- a row size of the dst image.

◆ SimdDetectionLbpDetect32fi()

void SimdDetectionLbpDetect32fi ( const void *  hid,
const uint8_t *  mask,
size_t  maskStride,
ptrdiff_t  left,
ptrdiff_t  top,
ptrdiff_t  right,
ptrdiff_t  bottom,
uint8_t *  dst,
size_t  dstStride 
)

Performs object detection with using of LBP cascade classifier (uses 32-bit float numbers, processes only even points).

You must call function SimdDetectionPrepare before calling of this functions. All restriction (input mask and bounding box) affects to left-top corner of scanning window.

Note
This function is used for implementation of Simd::Detection.
Parameters
[in]hid- a pointer to hidden cascade which was received with using of function SimdDetectionInit.
[in]mask- a pointer to pixels data of 8-bit image with mask. The mask restricts detection region.
[in]maskStride- a row size of the mask image.
[in]left- a left side of bounding box which restricts detection region.
[in]top- a top side of bounding box which restricts detection region.
[in]right- a right side of bounding box which restricts detection region.
[in]bottom- a bottom side of bounding box which restricts detection region.
[out]dst- a pointer to pixels data of 8-bit image with output result. None zero points refer to left-top corner of detected objects.
[in]dstStride- a row size of the dst image.

◆ SimdDetectionLbpDetect16ip()

void SimdDetectionLbpDetect16ip ( const void *  hid,
const uint8_t *  mask,
size_t  maskStride,
ptrdiff_t  left,
ptrdiff_t  top,
ptrdiff_t  right,
ptrdiff_t  bottom,
uint8_t *  dst,
size_t  dstStride 
)

Performs object detection with using of LBP cascade classifier (uses 16-bit integer numbers, processes all points).

You must call function SimdDetectionPrepare before calling of this functions. All restriction (input mask and bounding box) affects to left-top corner of scanning window.

Note
This function is used for implementation of Simd::Detection.
Parameters
[in]hid- a pointer to hidden cascade which was received with using of function SimdDetectionInit.
[in]mask- a pointer to pixels data of 8-bit image with mask. The mask restricts detection region.
[in]maskStride- a row size of the mask image.
[in]left- a left side of bounding box which restricts detection region.
[in]top- a top side of bounding box which restricts detection region.
[in]right- a right side of bounding box which restricts detection region.
[in]bottom- a bottom side of bounding box which restricts detection region.
[out]dst- a pointer to pixels data of 8-bit image with output result. None zero points refer to left-top corner of detected objects.
[in]dstStride- a row size of the dst image.

◆ SimdDetectionLbpDetect16ii()

void SimdDetectionLbpDetect16ii ( const void *  hid,
const uint8_t *  mask,
size_t  maskStride,
ptrdiff_t  left,
ptrdiff_t  top,
ptrdiff_t  right,
ptrdiff_t  bottom,
uint8_t *  dst,
size_t  dstStride 
)

Performs object detection with using of LBP cascade classifier (uses 16-bit integer numbers, processes only even points).

You must call function SimdDetectionPrepare before calling of this functions. All restriction (input mask and bounding box) affects to left-top corner of scanning window.

Note
This function is used for implementation of Simd::Detection.
Parameters
[in]hid- a pointer to hidden cascade which was received with using of function SimdDetectionInit.
[in]mask- a pointer to pixels data of 8-bit image with mask. The mask restricts detection region.
[in]maskStride- a row size of the mask image.
[in]left- a left side of bounding box which restricts detection region.
[in]top- a top side of bounding box which restricts detection region.
[in]right- a right side of bounding box which restricts detection region.
[in]bottom- a bottom side of bounding box which restricts detection region.
[out]dst- a pointer to pixels data of 8-bit image with output result. None zero points refer to left-top corner of detected objects.
[in]dstStride- a row size of the dst image.

◆ SimdDetectionFree()

void SimdDetectionFree ( void *  ptr)

Frees pointers which was received with using of functions SimdDetectionLoadA and SimdDetectionInit.

Note
This function is used for implementation of Simd::Detection.
Parameters
[in]ptr- a pointer which was received with using of functions SimdDetectionLoadA and SimdDetectionInit.