Simd Library Documentation.

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

Median image filters. More...

Functions

SIMD_API void SimdMedianFilterRhomb3x3 (const uint8_t *src, size_t srcStride, size_t width, size_t height, size_t channelCount, uint8_t *dst, size_t dstStride)
 Performs median filtering with a 3x3 rhomb window for an 8-bit interleaved image. More...
 
SIMD_API void SimdMedianFilterRhomb5x5 (const uint8_t *src, size_t srcStride, size_t width, size_t height, size_t channelCount, uint8_t *dst, size_t dstStride)
 Performs median filtering with a 5x5 rhomb window for an 8-bit interleaved image. More...
 
SIMD_API void SimdMedianFilterSquare3x3 (const uint8_t *src, size_t srcStride, size_t width, size_t height, size_t channelCount, uint8_t *dst, size_t dstStride)
 Performs median filtering with a 3x3 square window for an 8-bit interleaved image. More...
 
SIMD_API void SimdMedianFilterSquare5x5 (const uint8_t *src, size_t srcStride, size_t width, size_t height, size_t channelCount, uint8_t *dst, size_t dstStride)
 Performs median filtering with a 5x5 square window for an 8-bit interleaved image. More...
 
template<template< class > class A>
SIMD_INLINE void MedianFilterRhomb3x3 (const View< A > &src, View< A > &dst)
 Performs median filtering with a 3x3 rhomb window for an 8-bit interleaved image. More...
 
template<template< class > class A>
SIMD_INLINE void MedianFilterRhomb5x5 (const View< A > &src, View< A > &dst)
 Performs median filtering with a 5x5 rhomb window for an 8-bit interleaved image. More...
 
template<template< class > class A>
SIMD_INLINE void MedianFilterSquare3x3 (const View< A > &src, View< A > &dst)
 Performs median filtering with a 3x3 square window for an 8-bit interleaved image. More...
 
template<template< class > class A>
SIMD_INLINE void MedianFilterSquare5x5 (const View< A > &src, View< A > &dst)
 Performs median filtering with a 5x5 square window for an 8-bit interleaved image. More...
 

Detailed Description

Median image filters.

Function Documentation

◆ SimdMedianFilterRhomb3x3()

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

Performs median filtering with a 3x3 rhomb window for an 8-bit interleaved image.

The filter is applied independently to every channel. Border pixels are handled by nearest-pixel replication. The rhomb window contains 5 samples: top, left, center, right and bottom. The output is the middle value of these 5 samples.

Note
This function has a C++ wrapper: Simd::MedianFilterRhomb3x3(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).

◆ SimdMedianFilterRhomb5x5()

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

Performs median filtering with a 5x5 rhomb window for an 8-bit interleaved image.

The filter is applied independently to every channel. Border pixels are handled by nearest-pixel replication. The rhomb window contains 13 samples. The output is the middle value of these 13 samples.

Note
This function has a C++ wrapper: Simd::MedianFilterRhomb5x5(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).

◆ SimdMedianFilterSquare3x3()

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

Performs median filtering with a 3x3 square window for an 8-bit interleaved image.

The filter is applied independently to every channel. Border pixels are handled by nearest-pixel replication. The output is the middle value of 9 samples in the 3x3 window.

Note
This function has a C++ wrapper: Simd::MedianFilterSquare3x3(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).

◆ SimdMedianFilterSquare5x5()

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

Performs median filtering with a 5x5 square window for an 8-bit interleaved image.

The filter is applied independently to every channel. Border pixels are handled by nearest-pixel replication. The output is the middle value of 25 samples in the 5x5 window.

Note
This function has a C++ wrapper: Simd::MedianFilterSquare5x5(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).

◆ MedianFilterRhomb3x3()

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

Performs median filtering with a 3x3 rhomb window for an 8-bit interleaved image.

The filter is applied independently to every channel. Border pixels are handled by nearest-pixel replication. The rhomb window contains 5 samples: top, left, center, right and bottom. The output is the middle value of these 5 samples.

The source and destination images must have the same width, height and format (8-bit gray, 16-bit UV, 24-bit BGR/RGB or 32-bit BGRA/RGBA).

Note
This function is a C++ wrapper for function SimdMedianFilterRhomb3x3.
Parameters
[in]src- an original input image.
[out]dst- a filtered output image.

◆ MedianFilterRhomb5x5()

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

Performs median filtering with a 5x5 rhomb window for an 8-bit interleaved image.

The filter is applied independently to every channel. Border pixels are handled by nearest-pixel replication. The rhomb window contains 13 samples. The output is the middle value of these 13 samples.

The source and destination images must have the same width, height and format (8-bit gray, 16-bit UV, 24-bit BGR/RGB or 32-bit BGRA/RGBA).

Note
This function is a C++ wrapper for function SimdMedianFilterRhomb5x5.
Parameters
[in]src- an original input image.
[out]dst- a filtered output image.

◆ MedianFilterSquare3x3()

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

Performs median filtering with a 3x3 square window for an 8-bit interleaved image.

The filter is applied independently to every channel. Border pixels are handled by nearest-pixel replication. The output is the middle value of 9 samples in the 3x3 window.

The source and destination images must have the same width, height and format (8-bit gray, 16-bit UV, 24-bit BGR/RGB or 32-bit BGRA/RGBA).

Note
This function is a C++ wrapper for function SimdMedianFilterSquare3x3.
Parameters
[in]src- an original input image.
[out]dst- a filtered output image.

◆ MedianFilterSquare5x5()

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

Performs median filtering with a 5x5 square window for an 8-bit interleaved image.

The filter is applied independently to every channel. Border pixels are handled by nearest-pixel replication. The output is the middle value of 25 samples in the 5x5 window.

The source and destination images must have the same width, height and format (8-bit gray, 16-bit UV, 24-bit BGR/RGB or 32-bit BGRA/RGBA).

Note
This function is a C++ wrapper for function SimdMedianFilterSquare5x5.
Parameters
[in]src- an original input image.
[out]dst- a filtered output image.