If you'd like to upload plug-ins, please create an account below. Otherwise (e.g. for download or commenting) you do not need one! Enjoy :-)
For best results, try to cutoff only on dark, bright or on both sides. Working on selections only greatly improves speed. Just make a rectangular selection in your image and then call the "Average Layer" script.
This was inspired by reports of a friend of mine on a Photoshop plugin, which also removes unwanted objects from a series of photographs. I haven't seen it myself nor do I know the algorithm behind it. If someone knows better algorithms than winsorizing means, tips are welcome!

After arithmetical mean with 67% cutoff (dark outlier pixels):
Some shades are still left, one might correct this quite easily with other tools.
| Attachment | Size |
|---|---|
| Iron_Teddy_1.jpg | 5.14 KB |
| Iron_Teddy_Arithmetical_Mean_Cutoff_dark.jpg | 1.69 KB |
| average_layer.py | 8.7 KB |
Comments
error in median filter?
Tried your nice plugin with 3 sample shots. The result was that "median" filter crashed with error text:
File "C:\Program Files\GIMP-2.0\lib\gimp\2.0\plug-ins\average_layer.py", line 205, in do_the_workworking_class.export()
File "C:\Program Files\GIMP-2.0\lib\gimp\2.0\plug-ins\average_layer.py", line 183, in export
self.write_out(meanlayer, self.meanarray)
File "C:\Program Files\GIMP-2.0\lib\gimp\2.0\plug-ins\average_layer.py", line 95, in write_out
assert(byte_image.size == self.selection_width * self.selection_height * self.bpp)
AssertionError
-> heeelp...
Edit: it seems that this line returns an empty array:
self.meanarray=median(self.sarray)Image size?
I cannot reproduce this error.
Are your images all of the exact same size?
oeller
installation
I've just copied both of your scripts (collect layer, average layer) to my plugins-folder. While collect-layer works, I can't find the average-layer-plugin, neither under filters ... nor under Xtns/PythonFu/Console/Browse. Any idea? Thanks in advance!
(WinXP, Gimp 2.4.5)
Installation
You should find it under /Filters/Layer Effects. If still not found, check executable bit (at least on unix/linux). Hope this helps!
:-(
No, it doesn't appear in the filters menu and could not be found by pythonfu-console-browser. I'm working on WinXP, so is there any equivalent to this "executable bit" in the Win-world? Ok, let's see if some other Win-user drops by.
Btw, a big applause for your script!! I've often heard about this PS-plugin so it's really great to have s.th. similiar for our Gimp!
Installation
1. What's your python version?
2. Thx for the compliments! :)
installation
#1 Python 2.5.2, works fine with your collect-layer and some other py-scripts
#2 my pleasure!
Installation prerequisites
You need the scipy package installed!
Download at: www.scipy.org
Its perfect, thank you.
Its perfect, thank you.

success with scipy
Excellent, that's it! Thx!