Simd Library Documentation.

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

Other image filters. More...

Functions

SIMD_API void SimdAbsGradientSaturatedSum (const uint8_t *src, size_t srcStride, size_t width, size_t height, uint8_t *dst, size_t dstStride)
 Puts to destination 8-bit gray image saturated sum of absolute gradient for every point of source 8-bit gray image. More...
 
SIMD_API void SimdLbpEstimate (const uint8_t *src, size_t srcStride, size_t width, size_t height, uint8_t *dst, size_t dstStride)
 Calculates LBP (Local Binary Patterns) for 8-bit gray image. More...
 
SIMD_API void SimdMeanFilter3x3 (const uint8_t *src, size_t srcStride, size_t width, size_t height, size_t channelCount, uint8_t *dst, size_t dstStride)
 Performs an averaging with window 3x3. More...
 
template<template< class > class A>
SIMD_INLINE void AbsGradientSaturatedSum (const View< A > &src, View< A > &dst)
 Puts to destination 8-bit gray image saturated sum of absolute gradient for every point of source 8-bit gray image. More...
 
template<template< class > class A>
SIMD_INLINE void GaussianBlur3x3 (const View< A > &src, View< A > &dst)
 Performs Gaussian blur filtration with window 3x3. More...
 
template<template< class > class A>
SIMD_INLINE void LbpEstimate (const View< A > &src, View< A > &dst)
 Calculates LBP (Local Binary Patterns) for 8-bit gray image. More...
 
template<template< class > class A>
SIMD_INLINE void MeanFilter3x3 (const View< A > &src, View< A > &dst)
 Performs an averaging with window 3x3. More...
 

Detailed Description

Other image filters.

Function Documentation

◆ SimdAbsGradientSaturatedSum()

void SimdAbsGradientSaturatedSum ( const uint8_t *  src,
size_t  srcStride,
size_t  width,
size_t  height,
uint8_t *  dst,
size_t  dstStride 
)

Puts to destination 8-bit gray image saturated sum of absolute gradient for every point of source 8-bit gray image.

Both images must have the same width and height.

For border pixels:

dst[x, y] = 0;

For other pixels:

dx = abs(src[x + 1, y] - src[x - 1, y]);
dy = abs(src[x, y + 1] - src[x, y - 1]);
dst[x, y] = min(dx + dy, 255);
Note
This function has a C++ wrapper Simd::AbsGradientSaturatedSum(const View<A>& src, View<A>& dst).
Parameters
[in]src- a pointer to pixels data of source 8-bit gray image.
[in]srcStride- a row size of source image.
[in]width- an image width.
[in]height- an image height.
[out]dst- a pointer to pixels data of destination 8-bit gray image.
[in]dstStride- a row size of destination image.

◆ SimdLbpEstimate()

void SimdLbpEstimate ( const uint8_t *  src,
size_t  srcStride,
size_t  width,
size_t  height,
uint8_t *  dst,
size_t  dstStride 
)

Calculates LBP (Local Binary Patterns) for 8-bit gray image.

All images must have the same width and height.

Note
This function has a C++ wrappers: Simd::LbpEstimate(const View<A>& src, View<A>& dst).
Parameters
[in]src- a pointer to pixels data of input 8-bit gray image.
[in]srcStride- a row size of src image.
[in]width- an image width.
[in]height- an image height.
[out]dst- a pointer to pixels data of output 8-bit gray image with LBP.
[in]dstStride- a row size of dst image.

◆ SimdMeanFilter3x3()

void SimdMeanFilter3x3 ( const uint8_t *  src,
size_t  srcStride,
size_t  width,
size_t  height,
size_t  channelCount,
uint8_t *  dst,
size_t  dstStride 
)

Performs an averaging with window 3x3.

For every point:

dst[x, y] = (src[x-1, y-1] + src[x, y-1] + src[x+1, y-1] +
             src[x-1, y] + src[x, y] + src[x+1, y] +
             src[x-1, y+1] + src[x, y+1] + src[x+1, y+1] + 4) / 9;

All images must have the same width, height and format (8-bit gray, 16-bit UV, 24-bit BGR or 32-bit BGRA).

Note
This function has a C++ wrapper Simd::MeanFilter3x3(const View<A>& src, View<A>& dst).
Parameters
[in]src- a pointer to pixels data of source image.
[in]srcStride- a row size of the src image.
[in]width- an image width.
[in]height- an image height.
[in]channelCount- a channel count.
[out]dst- a pointer to pixels data of destination image.
[in]dstStride- a row size of the dst image.

◆ AbsGradientSaturatedSum()

void AbsGradientSaturatedSum ( const View< A > &  src,
View< A > &  dst 
)

Puts to destination 8-bit gray image saturated sum of absolute gradient for every point of source 8-bit gray image.

Both images must have the same width and height.

For border pixels:

dst[x, y] = 0;

For other pixels:

dx = abs(src[x + 1, y] - src[x - 1, y]);
dy = abs(src[x, y + 1] - src[x, y - 1]);
dst[x, y] = min(dx + dy, 255);
Note
This function is a C++ wrapper for function SimdAbsGradientSaturatedSum.
Parameters
[in]src- a source 8-bit gray image.
[out]dst- a destination 8-bit gray image.

◆ GaussianBlur3x3()

void GaussianBlur3x3 ( const View< A > &  src,
View< A > &  dst 
)

Performs Gaussian blur filtration with window 3x3.

For every point:

dst[x, y] = (src[x-1, y-1] + 2*src[x, y-1] + src[x+1, y-1] +
            2*(src[x-1, y] + 2*src[x, y] + src[x+1, y]) +
            src[x-1, y+1] + 2*src[x, y+1] + src[x+1, y+1] + 8) / 16;

All images must have the same width, height and format (8-bit gray, 16-bit UV, 24-bit BGR or 32-bit BGRA).

Note
This function is a C++ wrapper for function SimdGaussianBlur3x3.
Parameters
[in]src- a source image.
[out]dst- a destination image.

◆ LbpEstimate()

void LbpEstimate ( const View< A > &  src,
View< A > &  dst 
)

Calculates LBP (Local Binary Patterns) for 8-bit gray image.

All images must have the same width and height.

Note
This function is a C++ wrapper for function SimdLbpEstimate.
Parameters
[in]src- an input 8-bit gray image.
[out]dst- an output 8-bit gray image with LBP.

◆ MeanFilter3x3()

void MeanFilter3x3 ( const View< A > &  src,
View< A > &  dst 
)

Performs an averaging with window 3x3.

For every point:

dst[x, y] = (src[x-1, y-1] + src[x, y-1] + src[x+1, y-1] +
             src[x-1, y] + src[x, y] + src[x+1, y] +
             src[x-1, y+1] + src[x, y+1] + src[x+1, y+1] + 4) / 9;

All images must have the same width, height and format (8-bit gray, 16-bit UV, 24-bit BGR or 32-bit BGRA).

Note
This function is a C++ wrapper for function SimdMeanFilter3x3.
Parameters
[in]src- a source image.
[out]dst- a destination image.