Simd Library Documentation.

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

Max image filters. More...

Functions

SIMD_API void SimdMaxFilterSquare3x3 (const uint8_t *src, size_t srcStride, size_t width, size_t height, size_t channelCount, uint8_t *dst, size_t dstStride, int threshold)
 Performs thresholded 3x3 square maximum filtering of an 8-bit interleaved image. More...
 
SIMD_API void SimdMaxFilterSquare5x5 (const uint8_t *src, size_t srcStride, size_t width, size_t height, size_t channelCount, uint8_t *dst, size_t dstStride, int threshold)
 Performs thresholded 5x5 square maximum filtering of an 8-bit interleaved image. More...
 
template<template< class > class A>
SIMD_INLINE void MaxFilterSquare3x3 (const View< A > &src, View< A > &dst, int threshold=1)
 Performs max filtration of input image (filter window is a square 3x3). More...
 
template<template< class > class A>
SIMD_INLINE void MaxFilterSquare5x5 (const View< A > &src, View< A > &dst, int threshold=1)
 Performs max filtration of input image (filter window is a square 5x5). More...
 

Detailed Description

Max image filters.

Function Documentation

◆ SimdMaxFilterSquare3x3()

void SimdMaxFilterSquare3x3 ( const uint8_t *  src,
size_t  srcStride,
size_t  width,
size_t  height,
size_t  channelCount,
uint8_t *  dst,
size_t  dstStride,
int  threshold 
)

Performs thresholded 3x3 square maximum filtering of an 8-bit interleaved image.

The filter is applied independently to every channel. Border pixels are handled by nearest-pixel replication. If threshold <= 1, dst receives the maximum value in the 3x3 window. Otherwise dst receives this maximum only when it occurs at least threshold times in the window; if not, dst receives the center pixel.

Note
This function has a C++ wrapper: Simd::MaxFilterSquare3x3(const View<A>& src, View<A>& dst).
Parameters
[in]src- a pointer to pixels data of original input image.
[in]srcStride- a row size of src image (in bytes).
[in]width- an image width.
[in]height- an image height.
[in]channelCount- a number of 8-bit channels per pixel.
[out]dst- a pointer to pixels data of filtered output image.
[in]dstStride- a row size of dst image (in bytes).
[in]threshold- a minimal count of maximal values required to replace the center pixel.

◆ SimdMaxFilterSquare5x5()

void SimdMaxFilterSquare5x5 ( const uint8_t *  src,
size_t  srcStride,
size_t  width,
size_t  height,
size_t  channelCount,
uint8_t *  dst,
size_t  dstStride,
int  threshold 
)

Performs thresholded 5x5 square maximum filtering of an 8-bit interleaved image.

The filter is applied independently to every channel. Border pixels are handled by nearest-pixel replication. If threshold <= 1, dst receives the maximum value in the 5x5 window. Otherwise dst receives this maximum only when it occurs at least threshold times in the window; if not, dst receives the center pixel.

Note
This function has a C++ wrapper: Simd::MaxFilterSquare5x5(const View<A>& src, View<A>& dst).
Parameters
[in]src- a pointer to pixels data of original input image.
[in]srcStride- a row size of src image (in bytes).
[in]width- an image width.
[in]height- an image height.
[in]channelCount- a number of 8-bit channels per pixel.
[out]dst- a pointer to pixels data of filtered output image.
[in]dstStride- a row size of dst image (in bytes).
[in]threshold- a minimal count of maximal values required to replace the center pixel.

◆ MaxFilterSquare3x3()

void MaxFilterSquare3x3 ( const View< A > &  src,
View< A > &  dst,
int  threshold = 1 
)

Performs max filtration of input image (filter window is a square 3x3).

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 SimdMaxFilterSquare3x3.
Parameters
[in]src- an original input image.
[out]dst- a filtered output image.
[in]threshold- threshold value.

◆ MaxFilterSquare5x5()

void MaxFilterSquare5x5 ( const View< A > &  src,
View< A > &  dst,
int  threshold = 1 
)

Performs max filtration of input image (filter window is a square 5x5).

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 SimdMaxFilterSquare5x5.
Parameters
[in]src- an original input image.
[out]dst- a filtered output image.
[in]threshold- threshold value.