Simd Library Documentation.

Home | Release Notes | Download | Documentation | Issues | GitHub

Functions for estimation of integral image. More...

Functions

SIMD_API void SimdIntegral (const uint8_t *src, size_t srcStride, size_t width, size_t height, uint8_t *sum, size_t sumStride, uint8_t *sqsum, size_t sqsumStride, uint8_t *tilted, size_t tiltedStride, SimdPixelFormatType sumFormat, SimdPixelFormatType sqsumFormat)
 Calculates integral images for an 8-bit gray image. More...
 
template<template< class > class A>
SIMD_INLINE void Integral (const View< A > &src, View< A > &sum)
 Calculates integral images for input 8-bit gray image. More...
 
template<template< class > class A>
SIMD_INLINE void Integral (const View< A > &src, View< A > &sum, View< A > &sqsum)
 Calculates integral images for input 8-bit gray image. More...
 
template<template< class > class A>
SIMD_INLINE void Integral (const View< A > &src, View< A > &sum, View< A > &sqsum, View< A > &tilted)
 Calculates integral images for input 8-bit gray image. More...
 

Detailed Description

Functions for estimation of integral image.

Function Documentation

◆ SimdIntegral()

void SimdIntegral ( const uint8_t *  src,
size_t  srcStride,
size_t  width,
size_t  height,
uint8_t *  sum,
size_t  sumStride,
uint8_t *  sqsum,
size_t  sqsumStride,
uint8_t *  tilted,
size_t  tiltedStride,
SimdPixelFormatType  sumFormat,
SimdPixelFormatType  sqsumFormat 
)

Calculates integral images for an 8-bit gray image.

The sum, square-sum and tilted-sum images have width + 1 columns and height + 1 rows. The first row and first column are initialized to zero for sum and square-sum images. The sum image is always 32-bit integer:

sum[x + 1, y + 1] = Sum(src[i, j]), 0 <= i <= x, 0 <= j <= y;
sqsum[x + 1, y + 1] = Sum(src[i, j]*src[i, j]), 0 <= i <= x, 0 <= j <= y;

sqsum and tilted are optional and can be NULL. If sqsum is not NULL, sqsumFormat selects 32-bit integer or 64-bit floating-point output. If tilted is not NULL, it is written as a 32-bit integer tilted integral image. sumFormat must be SimdPixelFormatInt32.

Note
This function has a C++ wrappers:
Simd::Integral(const View<A>& src, View<A>& sum),
Simd::Integral(const View<A>& src, View<A>& sum, View<A>& sqsum),
Simd::Integral(const View<A>& src, View<A>& sum, View<A>& sqsum, View<A>& tilted).
Parameters
[in]src- a pointer to pixels data of input 8-bit gray image.
[in]srcStride- a row size of src image (in bytes).
[in]width- an image width.
[in]height- an image height.
[out]sum- a pointer to pixels data of 32-bit integer sum image.
[in]sumStride- a row size of sum image (in bytes).
[out]sqsum- a pointer to pixels data of 32-bit integer or 64-bit float point square sum image. It can be NULL.
[in]sqsumStride- a row size of sqsum image (in bytes).
[out]tilted- a pointer to pixels data of 32-bit integer tilted sum image. It can be NULL.
[in]tiltedStride- a row size of tilted image (in bytes).
[in]sumFormat- a format of sum image and tilted image. It must be equal to SimdPixelFormatInt32.
[in]sqsumFormat- a format of sqsum image. It can be equal to SimdPixelFormatInt32 or SimdPixelFormatDouble.

◆ Integral() [1/3]

void Integral ( const View< A > &  src,
View< A > &  sum 
)

Calculates integral images for input 8-bit gray image.

The function can calculates sum integral image. A integral image must have width and height per unit greater than that of the input image.

Note
This function is a C++ wrapper for function SimdIntegral.
Parameters
[in]src- an input 8-bit gray image.
[out]sum- a 32-bit integer sum image.

◆ Integral() [2/3]

void Integral ( const View< A > &  src,
View< A > &  sum,
View< A > &  sqsum 
)

Calculates integral images for input 8-bit gray image.

The function can calculates sum integral image and square sum integral image. A integral images must have width and height per unit greater than that of the input image.

Note
This function is a C++ wrapper for function SimdIntegral.
Parameters
[in]src- an input 8-bit gray image.
[out]sum- a 32-bit integer sum image.
[out]sqsum- a 32-bit integer or 64-bit float point square sum image.

◆ Integral() [3/3]

void Integral ( const View< A > &  src,
View< A > &  sum,
View< A > &  sqsum,
View< A > &  tilted 
)

Calculates integral images for input 8-bit gray image.

The function can calculates sum integral image, square sum integral image and tilted sum integral image. A integral images must have width and height per unit greater than that of the input image.

Note
This function is a C++ wrapper for function SimdIntegral.
Parameters
[in]src- an input 8-bit gray image.
[out]sum- a 32-bit integer sum image.
[out]sqsum- a 32-bit integer or 64-bit float point square sum image.
[out]tilted- a 32-bit integer tilted sum image.