mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:17:35 +00:00
PixelPaint: Add Median filter
The median filter replaces a pixel with the median of all pixels (usually grey value is used) in a square neighborhood. This is a standard image processing filter used for denoising, as despite its simplicity it can e.g. retain edges quite well. The first implementation is quite inefficient mostly to environmental constraints. Due to how images are passed to the processing function, two unnecessary copies happen. And because there's no fast sorting algorithm for small arrays (insertion sort) yet, quick sort needs to be used which is quite slow on this scale.
This commit is contained in:
parent
1712b6b3ed
commit
ec52d16f7a
5 changed files with 113 additions and 0 deletions
|
@ -10,6 +10,7 @@ compile_gml(EditGuideDialog.gml EditGuideDialogGML.h edit_guide_dialog_gml)
|
|||
compile_gml(FilterGallery.gml FilterGalleryGML.h filter_gallery_gml)
|
||||
compile_gml(ResizeImageDialog.gml ResizeImageDialogGML.h resize_image_dialog_gml)
|
||||
compile_gml(LevelsDialog.gml LevelsDialogGML.h levels_dialog_gml)
|
||||
compile_gml(Filters/MedianSettings.gml Filters/MedianSettingsGML.h median_settings_gml)
|
||||
|
||||
set(SOURCES
|
||||
CreateNewImageDialog.cpp
|
||||
|
@ -31,6 +32,8 @@ set(SOURCES
|
|||
Filters/Invert.cpp
|
||||
Filters/LaplaceCardinal.cpp
|
||||
Filters/LaplaceDiagonal.cpp
|
||||
Filters/Median.cpp
|
||||
Filters/MedianSettingsGML.h
|
||||
Filters/Sepia.cpp
|
||||
Filters/Sharpen.cpp
|
||||
HistogramWidget.cpp
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue