Simd Library Documentation.

Home | Release Notes | Download | Documentation | Forum | SourceForge | GitHub
Columns Statistic

Estimation of image statistic for separate columns. More...

Functions

SIMD_API void SimdGetColSums (const uint8_t *src, size_t stride, size_t width, size_t height, uint32_t *sums)
 Calculate sums of columns for given 8-bit gray image. More...
 
SIMD_API void SimdGetAbsDxColSums (const uint8_t *src, size_t stride, size_t width, size_t height, uint32_t *sums)
 Calculate sums of absolute derivate along x axis for columns for given 8-bit gray image. More...
 
template<template< class > class A>
SIMD_INLINE void GetColSums (const View< A > &src, uint32_t *sums)
 Calculate sums of columns for given 8-bit gray image. More...
 
template<template< class > class A>
SIMD_INLINE void GetAbsDxColSums (const View< A > &src, uint32_t *sums)
 Calculate sums of absolute derivate along x axis for columns for given 8-bit gray image. More...
 

Detailed Description

Estimation of image statistic for separate columns.

Function Documentation

void SimdGetColSums ( const uint8_t *  src,
size_t  stride,
size_t  width,
size_t  height,
uint32_t *  sums 
)

Calculate sums of columns for given 8-bit gray image.

For all columns:

for(y = 0; y < height; ++y)
    sums[x] += src[x, y]; 
Note
This function has a C++ wrappers: Simd::GetColSums(const View<A>& src, uint32_t * sums).
Parameters
[in]src- a pointer to pixels data of the input image.
[in]stride- a row size of the input image.
[in]width- an image width.
[in]height- an image height.
[out]sums- a pointer to array of unsigned 32-bit integers result sums of columns. It length must be equal to image width.
void SimdGetAbsDxColSums ( const uint8_t *  src,
size_t  stride,
size_t  width,
size_t  height,
uint32_t *  sums 
)

Calculate sums of absolute derivate along x axis for columns for given 8-bit gray image.

For all columns except the last:

for(y = 0; y < height; ++y)
    sums[y] += abs(src[x+1, y] - src[x, y]); 

For the last column:

sums[width-1] = 0; 
Note
This function has a C++ wrappers: Simd::GetAbsDxColSums(const View<A>& src, uint32_t * sums).
Parameters
[in]src- a pointer to pixels data of the input image.
[in]stride- a row size of the input image.
[in]width- an image width.
[in]height- an image height.
[out]sums- a pointer to array of unsigned 32-bit integers result columns. It length must be equal to image width.
void GetColSums ( const View< A > &  src,
uint32_t *  sums 
)

Calculate sums of columns for given 8-bit gray image.

For all columns:

for(y = 0; y < height; ++y)
    sums[x] += src[x, y]; 
Note
This function is a C++ wrapper for function SimdGetColSums.
Parameters
[in]src- an input image.
[out]sums- a pointer to array of unsigned 32-bit integers result sums of columns. It length must be equal to image width.
void GetAbsDxColSums ( const View< A > &  src,
uint32_t *  sums 
)

Calculate sums of absolute derivate along x axis for columns for given 8-bit gray image.

For all columns except the last:

for(y = 0; y < height; ++y)
    sums[y] += abs(src[x+1, y] - src[x, y]); 

For the last column:

sums[width-1] = 0; 
Note
This function is a C++ wrapper for function SimdGetAbsDxColSums.
Parameters
[in]src- an input image.
[out]sums- a pointer to array of unsigned 32-bit integers result columns. It length must be equal to image width.