Simd Library Documentation.

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

Getting of statistic related with Sobel filters. More...

Functions

SIMD_API void SimdSobelDxAbsSum (const uint8_t *src, size_t stride, size_t width, size_t height, uint64_t *sum)
 Calculates sum of absolute value of Sobel's filter along x axis. More...
 
SIMD_API void SimdSobelDyAbsSum (const uint8_t *src, size_t stride, size_t width, size_t height, uint64_t *sum)
 Calculates sum of absolute value of Sobel's filter along y axis. More...
 
template<template< class > class A>
SIMD_INLINE void SobelDxAbsSum (const View< A > &src, uint64_t &sum)
 Calculates sum of absolute value of Sobel's filter along x axis. More...
 
template<template< class > class A>
SIMD_INLINE void SobelDyAbsSum (const View< A > &src, uint64_t &sum)
 Calculates sum of absolute value of Sobel's filter along y axis. More...
 

Detailed Description

Getting of statistic related with Sobel filters.

Function Documentation

◆ SimdSobelDxAbsSum()

void SimdSobelDxAbsSum ( const uint8_t *  src,
size_t  stride,
size_t  width,
size_t  height,
uint64_t *  sum 
)

Calculates sum of absolute value of Sobel's filter along x axis.

Input image must has 8-bit gray format.

For every point:

dst[x, y] = abs((src[x+1,y-1] + 2*src[x+1, y] + src[x+1, y+1]) - (src[x-1,y-1] + 2*src[x-1, y] + src[x-1, y+1])).
Note
This function has a C++ wrappers: Simd::SobelDxAbsSum(const View<A>& src, uint64_t & sum).
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]sum- a pointer to unsigned 64-bit integer value with result sum.

◆ SimdSobelDyAbsSum()

void SimdSobelDyAbsSum ( const uint8_t *  src,
size_t  stride,
size_t  width,
size_t  height,
uint64_t *  sum 
)

Calculates sum of absolute value of Sobel's filter along y axis.

Input image must has 8-bit gray format.

For every point:

sum += abs((src[x-1,y+1] + 2*src[x, y+1] + src[x+1, y+1]) - (src[x-1,y-1] + 2*src[x, y-1] + src[x+1, y-1]));
Note
This function has a C++ wrappers: Simd::SobelDyAbsSum(const View<A>& src, uint64_t & sum).
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]sum- a pointer to unsigned 64-bit integer value with result sum.

◆ SobelDxAbsSum()

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

Calculates sum of absolute value of Sobel's filter along x axis.

Input image must has 8-bit gray format.

For every point:

sum += abs((src[x+1,y-1] + 2*src[x+1, y] + src[x+1, y+1]) - (src[x-1,y-1] + 2*src[x-1, y] + src[x-1, y+1]));
Note
This function is a C++ wrapper for function SimdSobelDxAbsSum.
Parameters
[in]src- an input image.
[out]sum- an unsigned 64-bit integer value with result sum.

◆ SobelDyAbsSum()

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

Calculates sum of absolute value of Sobel's filter along y axis.

Input image must has 8-bit gray format.

For every point:

sum += abs((src[x-1,y+1] + 2*src[x, y+1] + src[x+1, y+1]) - (src[x-1,y-1] + 2*src[x, y-1] + src[x+1, y-1]));
Note
This function is a C++ wrapper for function SimdSobelDyAbsSum.
Parameters
[in]src- an input image.
[out]sum- an unsigned 64-bit integer value with result sum.