![]() |
IDS peak ICV v1.0.0
|
#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. | |
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.
Definition at line 33 of file peak_icv_median_filter.hpp.
|
default |
Constructs a MedianFilter object with the default kernel size of 3x3.
|
inline |
Retrieves the current kernel size.
Definition at line 88 of file peak_icv_median_filter.hpp.
Applies the median filter on the provided image and returns the filtered Image.
| [in] | image | The image to be processed with the median filter. |
| NotSupportedException | If the image has an unsupported format. |
| NotPossibleException | If the kernel size is an odd number. |
| OutOfRangeException | If the kernel size is bigger than the given image. |
Definition at line 93 of file peak_icv_median_filter.hpp.
|
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.
| [in] | kernelSize | Size of the kernel used for the median filter. |
Definition at line 83 of file peak_icv_median_filter.hpp.