Gimp: Dynamic range compression (fake HDR)

Hi folks,

in the RawTherapee forum a nice guy named ben_pcc offered source code for dynamic range compression (background to the algorithm). Since his results looked quite promising (and testing with just a source code file for RawTherapee is not so nice) I wrapped it into a small command line program and added a gimp script to call it. Binaries and source are attached.

The algorithm can be used to get a more even exposure on images with very high dynamic range, while preserving local contrast, so the image doesn't look washed out afterwards... With a little more work in gimp you can create fake HDR effects or a result similar to topaz adjust.

The attached image is a result of this filter and some post work in gimp; mainly local contrast and saturation. More results for this picture on flickr, original on deviantart.

So have fun experimentating and give tribute to the inventors and the author!

Drop me a line, if you like it. Smile

greets mike

UPDATE: Copy the script in the plug-ins folder of gimp, NOT in the scripts folder. And set it executable on linux.

UPDATE2: Ben wants to let you know, this algorithm is still work in progress. Also from my side, the script calling drc is just one way to do so, there could also be different workflows in the script calling it. So, if you have ideas or encounter problems, please tell me.

UPDATE3: This code is now part of Photivo, my open source RAW/Bitmap processor.

AttachmentSize
drc-win32-bin.7z333.62 KB
drc-linux32-bin.7z18.62 KB
drc-linux64-bin.7z20.14 KB
drc-source.7z8.96 KB

Comments

tried everything and still don't see this working

i've tried everything and still can't get this to work.

i'm using windows vista and gimp 2.6.8. i installed phython which seems to work because i can open and edit your script.

i created c:\Tools\ and copied the filters to that directory. then copied the scripts to the plug-ins directory.

i edited the script from: path = "c:\\Tools\\DRC\\"
to: path = "c:\Tools\"

i've tried other thing but can't get this to work.

any help would be great...

Hi, just that you are able to

Hi,

just that you are able to open a script doesn't mean that python works. Please try other python gimp scripts from the gimp plugin registry, to see if those work. Furthermore the \\ need to stay in the script, so if you don't have the DRC folder your path should be "c:\\Tools\\".

However, the simplest thing should be, you have a look at Photivo, where I build this in. There are binaries available for windows, so that should be very easy.

greets mike

thanks for your response.

thanks for your response. i've tried everything i can think of but i can't get this to work.

i actually wanted to use Photivo first. i downloaded and installed it. when i tried to use it i got the following error:

The procedure entry point Open Process Token could not be located in the dynamic library KERNEL32.dll

i've tried to find an answer to this but have had no luck. its a shame because your software is awesome and i'd like to be able to use it.

Hi, I already heard from

Hi,

I already heard from another side, that Vista could give some problems. Please bring this up in the Photivo issue tracker, so that we could investigate a little further. Thank you.

greets mike

thanks mike i added the

thanks mike

i added the problem to the Photivo issue tracker as you suggested.

Great tool, but not loading correctly after reinstalls

Hi MIke,

This is a great script, and I've used it to good effect on several images. Thank you!

It's been several weeks since I had tried it, and in the meantime I've had to reinstall Vista, along with GIMP 2.6.8 and all the plugins. I've placed the DRC script, the DLLs, and the executable in the same plug-in sub-folder under "C:\Program Files\GIMP...etc" and, in Preferences, added that same sub-folder to the list of plug-in folders for GIMP to check at startup. Using different folders at the same depth, I've also successfully (re-)installed your EAW and LABCurves tools the same way, and altered the "path" variables in the Python files accordingly.

Problem is at startup, when GIMP is checking for new plug-ins, it coughs up a Windows command window and displays this message:

TIFFOpen: -gimp: cannot open

then, immediately afterwards, another Windows dialog pope up stating thet "drc.exe" has stopped working and requests I "Close the program" or "Check online for a solution". Looking in the "Details" of this error dialog it lists the 'fault module' as libtiff-3.dll,

Finally, when GIMP has started and an image is opened, I can still run the DRC filter.

Any thoughts on how to correct these startup issues would be greatly appreciated.

Thanks,

Hi, I have no vista and I'm

Hi,

I have no vista and I'm not using windows very often so I cannot help directly. However, with my short tests I had problems when the filters were located in the gimp plugins folder, so I put the filters to c:/Tools/ and just the scripts calling them to the plugins folder... maybe you try that.

greets mike

Right you are, Mike. That

Right you are, Mike. That worked just fine. Thanks again.

Cheers,

Terry

Nice.

Tried it and I'm pleased with the results. Good work y'all.

Post new comment

The content of this field is kept private and will not be shown publicly.
Smileys
:):D:bigsmile:;):p:O:|:(:~:((8):steve:J):glasses::party::love: