So I've implemented the retinex algorithm from GIMP in java. (Lots of reasons but mainly flexibility, threading and memory usage).<p>Here's an example of the current differences:<p>http://imgur.com/GPsy9.png<p>GIMP is the top, mine is the bottom. Given that in large part this is a Gaussian filter at first, I've got to assert that mine is probably the correct one. However, the sad part is I am really interesting in implementing this bugged behavior as well.<p>My implementation is here:<p>http://github.com/rortian/Retinex/blob/master/src/org/pseudopattern/retinex/ByteImage.java<p>which corresponds with this gimp file:<p>http://git.gnome.org/browse/gimp/tree/plug-ins/common/contrast-retinex.c?id=GIMP_2_6_8<p>I'm about to have to start building gimps that will give me more insight, which I don't honestly want to do. If anybody has any clue how this might be happening I'd love the help. I've got a minimal C background so any comments from someone knowledgeable there would be especially helpful.