Optimized Despeckle plug-in
This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.
This is a read-only list on gimpusers.com so this discussion thread is read-only, too.
Optimized Despeckle plug-in | Przemys?aw Zych | 13 Jul 10:28 |
Optimized Despeckle plug-in | Martin Nordholts | 13 Jul 10:43 |
Optimized Despeckle plug-in | Sven Neumann | 13 Jul 19:50 |
Optimized Despeckle plug-in | gg@catking.net | 13 Jul 22:17 |
Optimized Despeckle plug-in | Sven Neumann | 13 Jul 23:34 |
Optimized Despeckle plug-in | Przemys?aw Zych | 05 Sep 16:23 |
Optimized Despeckle plug-in
Hi,
As a part of my student project for "Optimizing Open-Source Applications" at Warsaw University I have speed up despeckle plug-in for gimp.
Original version of the plugin run 56seconds for 1024x768 image with despeckle radius 30 and adaptive flag turned off (on my Intel Macbook 2.1GHz). My optimized version with the same settings completes the task in 3.5 seconds with the same image quality :-)
Sources for this optimized plug-in can be downloaded from here: http://students.mimuw.edu.pl/~pz248275/despeckle.c
What should I do to get this to the gimp repository? Should I change the copyright header?
Thanks, Przemyslaw Zych
Optimized Despeckle plug-in
On 07/13/2010 10:28 AM, Przemys?aw Zych wrote:
Hi,
As a part of my student project for "Optimizing Open-Source Applications" at Warsaw University I have speed up despeckle plug-in for gimp.
Original version of the plugin run 56seconds for 1024x768 image with despeckle radius 30 and adaptive flag turned off (on my Intel Macbook 2.1GHz). My optimized version with the same settings completes the task in 3.5 seconds with the same image quality :-)
Sources for this optimized plug-in can be downloaded from here: http://students.mimuw.edu.pl/~pz248275/despeckle.c
What should I do to get this to the gimp repository? Should I change the copyright header?
Hi!
That sounds great.
To maximize chances of getting this into GIMP:
1. Create a regression test for the despecle plug-in that is run
with 'make check'. This is a great way to convince us that
your optimization in fact does not change the output, only
improves performance.
2. Create a patch, following the instructions here:
http://www.gimp.org/bugs/howtos/submit-patch.html
Since your change is significant, feel free to add yourself to the copyright header.
Regards,
Martin
Optimized Despeckle plug-in
On Tue, 2010-07-13 at 10:49 +0200, Martin Nordholts wrote:
On 07/13/2010 10:28 AM, Przemys?aw Zych wrote:
Hi,
As a part of my student project for "Optimizing Open-Source Applications" at Warsaw University I have speed up despeckle plug-in for gimp.
Original version of the plugin run 56seconds for 1024x768 image with despeckle radius 30 and adaptive flag turned off (on my Intel Macbook 2.1GHz). My optimized version with the same settings completes the task in 3.5 seconds with the same image quality :-)
Sources for this optimized plug-in can be downloaded from here: http://students.mimuw.edu.pl/~pz248275/despeckle.c
What should I do to get this to the gimp repository? Should I change the copyright header?
Hi!
That sounds great.
To maximize chances of getting this into GIMP:
1. Create a regression test for the despecle plug-in that is run with 'make check'. This is a great way to convince us that your optimization in fact does not change the output, only improves performance.
Well, as far as I can see the current implementation of the despeckle plug-in does not match the expectations. IMO it is buggy. Thus we should not absolutely require that the result does not change. But it would be desirable to get fixes to the algorithm submitted separately from optimizations.
It would also help a lot if the patch followed the GIMP coding style. Please see the file HACKING in the GIMP source tree.
Sven
Optimized Despeckle plug-in
On 07/13/10 19:52, Sven Neumann wrote:
On Tue, 2010-07-13 at 10:49 +0200, Martin Nordholts wrote:
On 07/13/2010 10:28 AM, Przemys?aw Zych wrote:
Hi,
As a part of my student project for "Optimizing Open-Source Applications" at Warsaw University I have speed up despeckle plug-in for gimp.
Original version of the plugin run 56seconds for 1024x768 image with despeckle radius 30 and adaptive flag turned off (on my Intel Macbook 2.1GHz). My optimized version with the same settings completes the task in 3.5 seconds with the same image quality :-)
Sources for this optimized plug-in can be downloaded from here: http://students.mimuw.edu.pl/~pz248275/despeckle.c
What should I do to get this to the gimp repository? Should I change the copyright header?
Hi!
That sounds great.
To maximize chances of getting this into GIMP:
1. Create a regression test for the despecle plug-in that is run with 'make check'. This is a great way to convince us that your optimization in fact does not change the output, only improves performance.
Well, as far as I can see the current implementation of the despeckle plug-in does not match the expectations. IMO it is buggy. Thus we should not absolutely require that the result does not change. But it would be desirable to get fixes to the algorithm submitted separately from optimizations.
It would also help a lot if the patch followed the GIMP coding style. Please see the file HACKING in the GIMP source tree.
Sven
hi,
I agree. I had to clean up some photos recently and ended up doing most of it by hand.
If you code produces the same kind of results with that much of a speed increase a patch would be worth providing. Kudos for achieving that level of speed up.
I guess by now you must have got a good feel for the way that part of the code base works so if you can write a despeckle routing that does despeckle that would be a worthwhile contribution as well.
Thanks for you efforts.
/gg
Optimized Despeckle plug-in
On Tue, 2010-07-13 at 22:19 +0200, gg@catking.net wrote:
I agree. I had to clean up some photos recently and ended up doing most of it by hand.
If you code produces the same kind of results with that much of a speed increase a patch would be worth providing. Kudos for achieving that level of speed up.
The quality of results also very much depends on how the parameters are chosen. A speedup of the algorithm will make it easier to experiment with the parameters as it should also speed up the preview significantly.
So yes, we should try to get that patch into GIMP as soon as possible.
Sven
Optimized Despeckle plug-in
To maximize chances of getting this into GIMP:
1. Create a regression test for the despecle plug-in that is run with 'make check'. This is a great way to convince us that your optimization in fact does not change the output, only improves performance.
2. Create a patch, following the instructions here: http://www.gimp.org/bugs/howtos/submit-patch.htmlSince your change is significant, feel free to add yourself to the copyright header.
Regards,
Martin
Sorry for such a delay but my full time job absorbed me lately more than I would like to :-)
1) Unfortunatelly due to the nature of the filter it will not pass simple
golden image tests against the non-optimized version. Filter sorts pixels
based on their luma and takes a pixel that falls into median luma bucket.
Since there can be several pixels that fall into the same luma bucket, the
resulting pixel
might differ.
2) I've submitted a patch to Bugzilla https://bugzilla.gnome.org/show_bug.cgi?id=628817
Przemek