Estimation of image statistic for separate rows. More...
Functions | |
SIMD_API void | SimdGetRowSums (const uint8_t *src, size_t stride, size_t width, size_t height, uint32_t *sums) |
Calculate sums of rows for given 8-bit gray image. More... | |
SIMD_API void | SimdGetAbsDyRowSums (const uint8_t *src, size_t stride, size_t width, size_t height, uint32_t *sums) |
Calculate sums of absolute derivate along y axis for rows for given 8-bit gray image. More... | |
template<template< class > class A> | |
SIMD_INLINE void | GetRowSums (const View< A > &src, uint32_t *sums) |
Calculate sums of rows for given 8-bit gray image. More... | |
template<template< class > class A> | |
SIMD_INLINE void | GetAbsDyRowSums (const View< A > &src, uint32_t *sums) |
Calculate sums of absolute derivate along y axis for rows for given 8-bit gray image. More... | |
Detailed Description
Estimation of image statistic for separate rows.
Function Documentation
◆ SimdGetRowSums()
void SimdGetRowSums | ( | const uint8_t * | src, |
size_t | stride, | ||
size_t | width, | ||
size_t | height, | ||
uint32_t * | sums | ||
) |
Calculate sums of rows for given 8-bit gray image.
For all rows:
for(x = 0; x < width; ++x) sums[y] += src[x, y];
- Note
- This function has a C++ wrappers: Simd::GetRowSums(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 rows. It length must be equal to image height.
◆ SimdGetAbsDyRowSums()
void SimdGetAbsDyRowSums | ( | const uint8_t * | src, |
size_t | stride, | ||
size_t | width, | ||
size_t | height, | ||
uint32_t * | sums | ||
) |
Calculate sums of absolute derivate along y axis for rows for given 8-bit gray image.
For all rows except the last:
for(x = 0; x < width; ++x) sums[y] += abs(src[x, y+1] - src[x, y]);
For the last row:
sums[height-1] = 0;
- Note
- This function has a C++ wrappers: Simd::GetAbsDyRowSums(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. It length must be equal to image height.
◆ GetRowSums()
void GetRowSums | ( | const View< A > & | src, |
uint32_t * | sums | ||
) |
Calculate sums of rows for given 8-bit gray image.
For all rows:
for(x = 0; x < width; ++x) sums[y] += src[x, y];
- Note
- This function is a C++ wrapper for function SimdGetRowSums.
- Parameters
-
[in] src - an input image. [out] sums - a pointer to array of unsigned 32-bit integers result sums of rows. It length must be equal to image height.
◆ GetAbsDyRowSums()
void GetAbsDyRowSums | ( | const View< A > & | src, |
uint32_t * | sums | ||
) |
Calculate sums of absolute derivate along y axis for rows for given 8-bit gray image.
For all rows except the last:
for(x = 0; x < width; ++x) sums[y] += abs(src[x, y+1] - src[x, y]);
For the last row:
sums[height-1] = 0;
- Note
- This function is a C++ wrapper for function SimdGetAbsDyRowSums.
- Parameters
-
[in] src - an input image. [out] sums - a pointer to array of unsigned 32-bit integers result sums. It length must be equal to image height.