Summary: | Improve UnsharpenMask Filter | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | Paul Geraskin <paulgeraskin> |
Component: | Filters | Assignee: | Krita Bugs <krita-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | dimula73 |
Priority: | NOR | ||
Version: | git master (please specify the git hash!) | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/calligra/ae5b6bd07e918a1f8f4deb64f00f7a52db20c774 | Version Fixed In: | |
Sentry Crash Report: |
Description
Paul Geraskin
2014-01-14 08:38:49 UTC
Here is the file used for testing https://dl.dropboxusercontent.com/u/26887202/Krita/test_UnsharpenMask.psd Git commit fe7b1bebcbc8bb5dcbc6f4d2d6e2a7a9c553e5a7 by Dmitry Kazakov. Committed on 16/01/2014 at 12:36. Pushed by dkazakov into branch 'krita-testing-kazakov'. Fixed the Unsharp Mask filter Now it has the following features: 1) Uses Gaussian for the initial blurring instead of home-grown circle mask 2) Supports floating point Radius value 3) Fixed the bug with wrong channelFlags are feed to the blur algo. They didn't contain alpha channel before, resulting in really weird results generated. 4) Uses Luminocity masking instead of mixing colors directly in RGB M +48 -0 krita/image/kis_gaussian_kernel.cpp M +8 -0 krita/image/kis_gaussian_kernel.h M +3 -47 krita/plugins/filters/blur/kis_gaussian_blur_filter.cpp M +90 -52 krita/plugins/filters/unsharp/kis_unsharp_filter.cpp M +15 -0 krita/plugins/filters/unsharp/kis_unsharp_filter.h M +3 -3 krita/plugins/filters/unsharp/kis_wdg_unsharp.cpp M +13 -10 krita/plugins/filters/unsharp/wdgunsharp.ui http://commits.kde.org/calligra/fe7b1bebcbc8bb5dcbc6f4d2d6e2a7a9c553e5a7 Git commit 342c679d77aafd03fae279ddb80608dd23aa0f68 by Dmitry Kazakov. Committed on 16/01/2014 at 12:53. Pushed by dkazakov into branch 'krita-testing-kazakov'. Added a UI option for the LightnessOnly parameter of the Unsharp Mask filter Also renamed half-size into more common 'radius' M +1 -0 krita/plugins/filters/unsharp/kis_unsharp_filter.cpp M +3 -0 krita/plugins/filters/unsharp/kis_wdg_unsharp.cpp M +59 -45 krita/plugins/filters/unsharp/wdgunsharp.ui http://commits.kde.org/calligra/342c679d77aafd03fae279ddb80608dd23aa0f68 Issues: -Filter still not fixed. It does not work for one color with alpha. I sent the psd image to Dmitry. -And the algorthm is not like in gmic/gimp. :( Here is the screenshot with krita and gmic filtering: http://i.imgur.com/wH3629Y.png NOTE: GMIC FILTERING HAS 2 OPTIONS. Gaussian and Bilateral sharpening. Dmitry can you check it? Thanks. Yeah, sometimes filter works like Bevel/Bump filter. http://i.imgur.com/eeCGx2A.png Git commit 96053031e9366faea37df9639cc7c1643160c41a by Dmitry Kazakov. Committed on 16/01/2014 at 19:32. Pushed by dkazakov into branch 'master'. Fix Unsharp Mask filter on semi-transparent images This patch also adds KoColorSpace::differenceA() method that works like its difference() counterpart, but also takes alpha channel into account. M +1 -1 krita/plugins/filters/unsharp/kis_unsharp_filter.cpp M +7 -0 libs/pigment/KoColorSpace.h M +5 -0 libs/pigment/colorspaces/KoAlphaColorSpace.cpp M +1 -0 libs/pigment/colorspaces/KoAlphaColorSpace.h M +7 -0 libs/pigment/colorspaces/KoSimpleColorSpace.h M +41 -3 plugins/colorengines/lcms2/LcmsColorSpace.h http://commits.kde.org/calligra/96053031e9366faea37df9639cc7c1643160c41a Some bug is still there... http://i.imgur.com/zzNk0nz.png Git commit f5f3eb1fedc65bd211f67c46a7748980d22c364f by Dmitry Kazakov. Committed on 16/01/2014 at 19:32. Pushed by dkazakov into branch 'calligra/2.8'. Fix Unsharp Mask filter on semi-transparent images This patch also adds KoColorSpace::differenceA() method that works like its difference() counterpart, but also takes alpha channel into account. M +1 -1 krita/plugins/filters/unsharp/kis_unsharp_filter.cpp M +7 -0 libs/pigment/KoColorSpace.h M +5 -0 libs/pigment/colorspaces/KoAlphaColorSpace.cpp M +1 -0 libs/pigment/colorspaces/KoAlphaColorSpace.h M +7 -0 libs/pigment/colorspaces/KoSimpleColorSpace.h M +41 -3 plugins/colorengines/lcms2/LcmsColorSpace.h http://commits.kde.org/calligra/f5f3eb1fedc65bd211f67c46a7748980d22c364f Git commit 292adf4ca00a1500b1010277a5345850397f24d5 by Dmitry Kazakov. Committed on 16/01/2014 at 12:36. Pushed by dkazakov into branch 'calligra/2.8'. Fixed the Unsharp Mask filter Now it has the following features: 1) Uses Gaussian for the initial blurring instead of home-grown circle mask 2) Supports floating point Radius value 3) Fixed the bug with wrong channelFlags are feed to the blur algo. They didn't contain alpha channel before, resulting in really weird results generated. 4) Uses Luminocity masking instead of mixing colors directly in RGB M +48 -0 krita/image/kis_gaussian_kernel.cpp M +8 -0 krita/image/kis_gaussian_kernel.h M +3 -47 krita/plugins/filters/blur/kis_gaussian_blur_filter.cpp M +90 -52 krita/plugins/filters/unsharp/kis_unsharp_filter.cpp M +15 -0 krita/plugins/filters/unsharp/kis_unsharp_filter.h M +3 -3 krita/plugins/filters/unsharp/kis_wdg_unsharp.cpp M +13 -10 krita/plugins/filters/unsharp/wdgunsharp.ui http://commits.kde.org/calligra/292adf4ca00a1500b1010277a5345850397f24d5 Dmitry sorry me again. But UnsharpenMask still does not work as expected. :( Here is the test: http://i.imgur.com/w4bDI4G.png Here is the file: https://dl.dropboxusercontent.com/u/26887202/Krita/test_UnsharpenMask4.psd Git commit ce9346571c140a4f04cbfbee0447dab41f3147a0 by Dmitry Kazakov. Committed on 13/03/2014 at 17:02. Pushed by dkazakov into branch 'master'. Fixed the Unsharp Mask filter to not be applied with an offset Our gaussian kernel had a small offset which resulted in the difference in the Unsharp Mask filter being calculated wrongly. M +14 -2 krita/image/kis_gaussian_kernel.cpp M +- -- krita/image/tests/data/convolution_painter_test/gaussian__test_gaussian_10_10_fftw.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian__test_gaussian_10_10_spatial.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian__test_gaussian_15_15_fftw.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian__test_gaussian_15_15_spatial.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian__test_gaussian_5_5_fftw.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian__test_gaussian_5_5_spatial.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian_details_test_gaussian_10_10_fftw.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian_details_test_gaussian_10_10_spatial.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian_details_test_gaussian_15_15_fftw.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian_details_test_gaussian_15_15_spatial.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian_details_test_gaussian_5_5_fftw.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian_details_test_gaussian_5_5_spatial.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian_reduced_test_gaussian_10_10_fftw.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian_reduced_test_gaussian_10_10_spatial.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian_reduced_test_gaussian_15_15_fftw.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian_reduced_test_gaussian_15_15_spatial.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian_reduced_test_gaussian_5_5_fftw.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian_reduced_test_gaussian_5_5_spatial.png.png M +1 -1 krita/plugins/filters/unsharp/CMakeLists.txt A +10 -0 krita/plugins/filters/unsharp/tests/CMakeLists.txt A +- -- krita/plugins/filters/unsharp/tests/data/source_with_transparency.png A +- -- krita/plugins/filters/unsharp/tests/data/unsharp_mask_test/with_transparency_unsharp_with_transparency.png A +67 -0 krita/plugins/filters/unsharp/tests/kis_unsharp_mask_test.cpp [License: GPL (v2+)] A +31 -0 krita/plugins/filters/unsharp/tests/kis_unsharp_mask_test.h [License: GPL (v2+)] http://commits.kde.org/calligra/ce9346571c140a4f04cbfbee0447dab41f3147a0 I hope the bug is now finally fixed :) YES YES YES!!! YOU FIXED IT!!!! KRITA HAS PRO SHARPEN TOOLS!!!!!!! СПАСИБО БОЛЬШОЕ!!!!!!!!!! http://i.imgur.com/rwSE7As.png http://i.imgur.com/n0Jx1vw.png Git commit ae5b6bd07e918a1f8f4deb64f00f7a52db20c774 by Dmitry Kazakov. Committed on 13/03/2014 at 17:02. Pushed by dkazakov into branch 'calligra/2.8'. Fixed the Unsharp Mask filter to not be applied with an offset Our gaussian kernel had a small offset which resulted in the difference in the Unsharp Mask filter being calculated wrongly. M +14 -2 krita/image/kis_gaussian_kernel.cpp M +- -- krita/image/tests/data/convolution_painter_test/gaussian__test_gaussian_10_10_fftw.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian__test_gaussian_10_10_spatial.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian__test_gaussian_15_15_fftw.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian__test_gaussian_15_15_spatial.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian__test_gaussian_5_5_fftw.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian__test_gaussian_5_5_spatial.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian_details_test_gaussian_10_10_fftw.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian_details_test_gaussian_10_10_spatial.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian_details_test_gaussian_15_15_fftw.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian_details_test_gaussian_15_15_spatial.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian_details_test_gaussian_5_5_fftw.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian_details_test_gaussian_5_5_spatial.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian_reduced_test_gaussian_10_10_fftw.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian_reduced_test_gaussian_10_10_spatial.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian_reduced_test_gaussian_15_15_fftw.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian_reduced_test_gaussian_15_15_spatial.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian_reduced_test_gaussian_5_5_fftw.png.png M +- -- krita/image/tests/data/convolution_painter_test/gaussian_reduced_test_gaussian_5_5_spatial.png.png M +1 -1 krita/plugins/filters/unsharp/CMakeLists.txt A +10 -0 krita/plugins/filters/unsharp/tests/CMakeLists.txt A +- -- krita/plugins/filters/unsharp/tests/data/source_with_transparency.png A +- -- krita/plugins/filters/unsharp/tests/data/unsharp_mask_test/with_transparency_unsharp_with_transparency.png A +67 -0 krita/plugins/filters/unsharp/tests/kis_unsharp_mask_test.cpp [License: GPL (v2+)] A +31 -0 krita/plugins/filters/unsharp/tests/kis_unsharp_mask_test.h [License: GPL (v2+)] http://commits.kde.org/calligra/ae5b6bd07e918a1f8f4deb64f00f7a52db20c774 |