Technique / Discuss

Current Discussion

Painting like effect from photographs
Latest: 8 days ago
technique, How does Heartbeatbox process his photos?
Latest: 2 weeks ago
Awesome free actions
Latest: 3 weeks ago
How do you get this kind BW?
Latest: 2 months ago
Super cheap strobism (white background, manual triggers, multiple flashes on one exposure)
Latest: 3 months ago
Multisource pictures (lighting)
Latest: 3 months ago
How do you levitate in photos?
Latest: 4 months ago
Do you consider yourself to be talented?
Latest: 4 months ago
Add "things" with photoshop
Latest: 4 months ago
Bill Wadman - Dancers in Motion How??
Latest: 4 months ago
hi people
Latest: 5 months ago
Multiple Exposure
Latest: 5 months ago
More...

Search this group's discussions

HDR (with pfstools)

Wolfsauge [deleted] says:

If you want to process and create HDR based on open source or on the command line, like netpbm, it might be worthwhile to have a look at pfstools. In the following I will give you some links and a short overview on what you need to do.

Prerequisites
You will need to install OpenEXR. It's Industrial Light & Magic's main image file format - the first movies to employ it were Harry Potter and the Sorcerers Stone, Men in Black II, Gangs of New York, and Signs.

You will need to install pfstools, pfscalibration and pfstmo.


Basic steps and statements
0. Realize the calculations can take quite a while. Downsize your images to a smaller size for testing purposes, that speeds up the calculations a lot. You can recalculate the original size with the final parameters subsequently.


1. Creating an image list. _dsc1766-1.jpg, _dsc1766-2.jpg and _dsc1766-3.jpg I have created from three bracketed NEF exposures and enhanced them with EXIF headers so that jpg2hdrgen recognizes the shutter speeds and aperture settings from the headers.

$ jpeg2hdrgen _dsc1766-1.jpg _dsc1766-2.jpg _dsc1766-3.jpg > _dsc1766-HDR.hdrgen

$ cat _dsc1766-HDR.hdrgen
cam/152/nef/_dsc1766-1.jpg 2.5 16.0 0 0
cam/152/nef/_dsc1766-2.jpg 12.987 16.0 0 0
cam/152/nef/_dsc1766-3.jpg 40 16.0 0 0



2. Create the camera response curve. This should be done with different pictures, not the ones you want to use pfstools with (please see also the pfstools documentation itself). For this simple test I ignored this advice. See the post of Grzesiek: below, for more information on how to create a smooth response curve that results in a better color rendition.

$ pfsinhdrgen _dsc1766-HDR.hdrgen | pfshdrcalibrate -v -s _dsc1766-HDR.response

Optionally having a look at the curve:
$ gnuplot
gnuplot> plot "_dsc1766-HDR.response" with dots



3. Create the HDR image.

$ pfsinhdrgen _dsc1766-HDR.hdrgen | pfshdrcalibrate -v -f _dsc1766-HDR.response | pfsoutexr _dsc1766-HDR.exr

Alternative (added later):
$ pfsinhdrgen _dsc1766-HDR.hdrgen | pfshdrcalibrate -v -f _dsc1766-HDR.response| pfsclamp --min 0.001 -p | pfsoutexr _dsc1766-HDR.exr

Using this additional command in the pipe clamps the color and luminance levels to be within the specified range.


4. Try the seven different tone mapping operators available.

$ pfsin _dsc1766-HDR.exr | pfstmo_ashikhmin02 | pfsout _dsc1766-HDR-pfstmo_ashikhmin02.jpg

$ pfsin _dsc1766-HDR.exr | pfstmo_drago03 | pfsout _dsc1766-HDR-pfstmo_drago03.jpg

$ pfsin _dsc1766-HDR.exr | pfstmo_durand02 | pfsout _dsc1766-HDR-pfstmo_durand02.jpg

$ pfsin _dsc1766-HDR.exr | pfstmo_fattal02 | pfsout _dsc1766-HDR-pfstmo_fattal02.jpg

$ pfsin _dsc1766-HDR.exr | pfstmo_pattanaik00 | pfsout _dsc1766-HDR-pfstmo_pattanaik00.jpg

$ pfsin _dsc1766-HDR.exr | pfstmo_reinhard02 | pfsout _dsc1766-HDR-pfstmo_reinhard02.jpg

$ pfsin _dsc1766-HDR.exr | pfstmo_reinhard04 | pfsout _dsc1766-HDR-pfstmo_reinhard04.jpg


5. Decide which implementation suits the particular image and eventually, recalculate with the original size.


6. If you are not happy with the results, check out the maskless blending technique.


Variation
You can also use a single RAW file to create the HDR image.

Removed all images and glue text, 2007-02-17, Wolfsauge.
Originally posted at 6:22PM, 4 June 2006 PDT (permalink)
Wolfsauge edited this topic 64 months ago.

view photostream

Feileacán says:

I'll be checking this out as soon as I have finished my exams! Thanks a bunch! Any experience with the OSS Cinepaint and HDR, BTW?
Posted 73 months ago. (permalink)

view photostream

Amery Carlson says:

nice work
Posted 73 months ago. (permalink)

view photostream

Slipping Away  Pro User  says:

I was wondering if there were open source tools for HDR. You have created a very explanatory tutorial. I'll give it a try and let you know of my experiments. Thanks!
Posted 73 months ago. (permalink)

view photostream

Grzesiek: says:

Hi!
thanks for writing a tutorial on pfstools!
I'd like to add a note on calibration (step 2 of your tutorial). It is often good to use a separate set of images to obtain the camera curve. The best targets are uniform, neutral surfaces like wall etc. shot out of focus. The response curve is then smoother and leads to better color rendition in HDR images.
Hope that brings you to even better results ;)
Originally posted 73 months ago. (permalink)
Grzesiek: edited this topic 73 months ago.

Wolfsauge [deleted] says:

Thank you all for your comments.

@Papilionoidea:
Not yet. I have downloaded cinepaint-0.21-0_rc1.tar.gz but neither compiled nor tested it, yet. Probably a good idea, since it combines the editing possibilties of the old version Gimp with 16-bit deep images.

@Slipping Away (kmhg72):
I was wondering for quite a while. Pfstools seem very improminent and I wanted to change this, too, just by linking to it. It took me a lot of googling and reading time just to find it. On the other hand it is documented very well and once I found it, the results were visible to me very quickly.

@Grzesiek:
Thank you for the correction. Right, it's even said so in the pfstools documentation itself to do so! I added it to part 2., according to your request and placed a link to your flickr identity and a note about your post.

Everybody should read my post not as a tutorial, the pfstools documentation is a way better tutorial than my short writeup, but just as an overview to get started and see some example results. Once you read the pfstools documentation, you'll realize that I just went through the examples in the pfstools README. Nevertheless I'm very happy about corrections and additions, as well as discussion.

Added another note in 3. about pfsclamp, which helped me fix some issues with other pictures I played with.
Originally posted 72 months ago. (permalink)
Wolfsauge edited this topic 72 months ago.

view photostream

henrys_rod_shop says:

Howdy,

I've been having a heck of a time getting anything but super-white, washed out hdr images. I've turned off the auto-white balance, gone full manual, etc on my Canon A510, but still just weird outlines of the lightest parts of the photos.

I also haven't been able to get an EV over 3 at all, out of this camera despite shooting at F8-1/250s...?!

Any suggestions would be greatly appreciated!

Thanks for the great tutorial!

Ben
Posted 71 months ago. (permalink)

view photostream

8thcross  Pro User  says:

good...finally...one of the good to view HDRs...that actually look natural... :)
Posted 71 months ago. (permalink)

view photostream

ashwinmudigonda says:

HDR with camera shake

Church (HDR)

I feel HDR's work best amidst woods, like this:

Forest

I tried a panorama HDR..Didn't workout too well. I find Photomatix a better software tool than PS CS2.
Posted 71 months ago. (permalink)

view photostream

Bob۞Who  Pro User  says:

I couldn't find the file at ILM. Maybe something with firefox is making the file hide from me...i dunno.

I'll have to study this more...I had difficulty with other links too:

Once I got to sourceforge and found the much dreaded " tar.gz " file extensions. I started getting nausious, dizzy and my eyeballs are spinning backwards in my head!

Then, the command line instructions that you listed above started to give me the shakes and sweats.

Once I get past that code-phobia and clean the drool up I guess I'll give it a whack again, but I sure appreciate those Wonderbread and refined white sugar *.exe files for win32 apps! One double click and yer home free.....the good life! Like frechfries at McDonald's!

Anyway thanks for the efforts, I just need to figure out this "macrobiotic " and "vegan" linux and C++ looking stuff, eventually.

That and clean up the bathroom.

Yikes
Originally posted 71 months ago. (permalink)
Bob۞Who edited this topic 71 months ago.

view photostream

spsilk says:

For anyone trying to avoid the command line approach, the package Luminance HDR (formerly known as qtpfsgui) provides a GUI for pfstools. You can get it here: qtpfsgui.sourceforge.net/
Posted 22 months ago. (permalink)

Would you like to comment?

Sign up for a free account, or sign in (if you're already a member).

RSS 2.0 feedSubscribe to a feed of stuff on this page...</!!> Feed – Subscribe to Technique discussion threads