IDS peak ICV v1.0.0
Loading...
Searching...
No Matches
MedianFilter Class Reference

#include <peak_icv/algorithms/filters/peak_icv_median_filter.hpp>

Public Member Functions

 MedianFilter ()=default
 Constructs a MedianFilter object with the default kernel size of 3x3.
 
void SetKernelSize (size_t kernelSize)
 Sets the size of the kernel used for the median filter.
 
size_t GetKernelSize () const
 Retrieves the current kernel size.
 
Image Process (const Image &image) const
 Applies the median filter on the provided image and returns the filtered Image.
 

Detailed Description

Class for applying a median filter on an image.

The MedianFilter class provides an interface to apply a median filter to an image, which helps in reducing noise by replacing each pixel with the median of its neighboring pixels, based on the given kernel size.

Warning
This function is still in development and not released.

Definition at line 33 of file peak_icv_median_filter.hpp.

Constructor & Destructor Documentation

◆ MedianFilter()

MedianFilter ( )
default

Constructs a MedianFilter object with the default kernel size of 3x3.

Warning
This function is still in development and not released.

Member Function Documentation

◆ GetKernelSize()

size_t GetKernelSize ( ) const
inline

Retrieves the current kernel size.

Returns
The size of the kernel used for the median filter.
Warning
This function is still in development and not released.

Definition at line 88 of file peak_icv_median_filter.hpp.

◆ Process()

Image Process ( const Image & image) const
inline

Applies the median filter on the provided image and returns the filtered Image.

Note
This operation disregards any specified image regions. It processes the entire image.
Parameters
[in]imageThe image to be processed with the median filter.
Exceptions
NotSupportedExceptionIf the image has an unsupported format.
NotPossibleExceptionIf the kernel size is an odd number.
OutOfRangeExceptionIf the kernel size is bigger than the given image.
Warning
This function is still in development and not released.

Definition at line 93 of file peak_icv_median_filter.hpp.

◆ SetKernelSize()

void SetKernelSize ( size_t kernelSize)
inline

Sets the size of the kernel used for the median filter.

The kernel size must be an odd number greater than 1. Also it has to be smaller than the image size. A larger kernel size increases the amount of noise removed, but also smooths more details of the image.

Parameters
[in]kernelSizeSize of the kernel used for the median filter.
Warning
This function is still in development and not released.

Definition at line 83 of file peak_icv_median_filter.hpp.