Go Back   Steve's Digicams Forums > Digital SLR and Interchangeable Lens Cameras > Pentax / Samsung dSLR, K Mount Mirrorless

Reply
 
Thread Tools Search this Thread
Old Aug 12, 2010, 1:23 AM   #11
Senior Member
 
thkn777's Avatar
 
Join Date: Jun 2004
Location: Germany
Posts: 1,831
Default

RAW, JPEG and DYNAMIC RANGE - the color depth experiment

Q: Will my RAW images have a higher dynamic range than my JPEG's?
A: No, not really.

Did you went "huh?" at that point? --> That was the plan.

Now lets just say we have a scenery with really really high dynamic range, way higher than our camera sensor can capture. What to do? Well - we choose to capture only a part of that range by choosing aperture and shutter speed. That way, we limit the amout of light that reaches every pixel at the sensor.

Some sensor pixels will not get enough light and thus will report "no light" which in turn is "black" for us.

Some others will get the maximum or even more as the maximum amount of light they are able to detect and will report "maximum brightness" which in turn is "white" for us (including clipped highlights).

So for that scenery and a given camera setting we get all kind of brightness values, from zero to max. - if we look at the histogram of that image we'll see that the whole area is used and probably we notice the clipped shadows and highlights.

Now why do people think the dynamic range in a RAW image is higher than in a JPEG? They argue, that the color depth of the RAW image is way higher than in the JPEG.

Let's have a look:
- RAW: 12 bit (some even have 14 bit) color depth
- JPEG: 8 bit color depth

Ok, the color depth in the RAW image is higher. Does that mean, the dynamic range is higher?

At that point I started my little experiment which goes like this:
- lets say I have an image with high color depth and a given dynamic range, that is maxed out (everything there from full black to full white to say so)
- now I decrease the color depth
- what will happen with the dynamic range?

You can see the results of my experiment in the "Water lily exhibition". You can see the same image with 1,2,3,4,5,6,7 and 8 bit color depth and I provided the histogram for the 1bit, the 4bit and the 8bit color depth image.

To draw an analogy between JPEG and RAW lets say the 4bit lily is the JPEG and the 8bit lily is the RAW (just speaking in terms of color depth)... and while the images look different, the dynamic range is the same.

At this point I'll stop and invite you again to watch the images and join me here - what are your thoughts?

Am I talking about things, that are common knowledge for you or did I surprise you?

Kind regards,
Th.
thkn777 is offline   Reply With Quote
Old Aug 15, 2010, 3:08 PM   #12
Senior Member
 
thkn777's Avatar
 
Join Date: Jun 2004
Location: Germany
Posts: 1,831
Default

Good evening,
I thought I stop by and continue my monologue a bit

With the dynamic range covered in the last postings, I want to point out another thing, that comes into play when generating HDR images. And that is detail.

So while we found, that the dynamic range of the JPEG and the RAW image is the same (same camera, same sensor etc.), which was a bit surprising and ... well disappointing, the next story will show the true strength of the RAW file or to be more precise, the 12bit or 14bit color depth image one can generate from it.

What does that "color depth" value mean? The higher that value, the more shades of the same color can your camera electronics distinguish. Where a low color depth image shows an area with all the same color, a high color depth image might show some minor differences. Sounds not very spectacular?
Well, what about this: gradients (color, intensity, whatever) will look smoother which is already a nice thing. Now that was to be expected.
Even better: color reproduction will be better, more accurate. Remember, that the color value is a mixture of that red, green and blue sensor pattern in your image... now imagine a high color depth image sees that green just a little brighter, the blue and red a little darker than a low color depth image. Kaboom! You've got a different color!

Please have a look at the water lily series again. Do you notice the differences I described?

Now there's a big part in the HDR story, that relies on detail: local contrast enhancement. You know that crisp look in some HDR images, the "300% detail" to say so. That's what I am talking about.

With this in mind we can discuss an interesting question, that people often ask:

CAN I GENERATE AN HDR IMAGE FROM A RAW FILE? (and if so - will it be better than from a single JPEG?)
Note: Let's stay away from being the smart ass here and just say "of course" (see first posting here, "main course"), ok?

Instead let's have a closer look at what people most likely will do. I took a photo of my BBQ grill today, opened the RAW file in Oloneo PhotoEngine and then used the "auto tone mapper" feature with 100%, 200% and 300%. You can see the comparison below.

There is certainly quite a difference in those images and the part I want to talk about is the accentuation of the details. The coal pieces look more "three-dimensional" in some cases, there is some of the "woah - a HDR image" effect in those images, especially the 300% version, right?

What's happening here? Locally (hence the term "local contrast enhancement") the contrast of the image is increased. Make the darker part a tad darker and the brighter ones even brighter. Locally means a small area of your image - and of course the big challenge is to do that local contrast enhancement in a way, that the whole image isn't a complete mess afterwards.
Attached Images
 
thkn777 is offline   Reply With Quote
Old Aug 15, 2010, 3:24 PM   #13
Senior Member
 
thkn777's Avatar
 
Join Date: Jun 2004
Location: Germany
Posts: 1,831
Default

Now we can do that starting with a JPEG file, and we'll notice two things:
- different colors
- different detail

The whole image will look different.

Since we are talking about the details here, I'll first show a 1:1 comparison at 50% magnification and 100% magnification below.

The detail loss in the JPEG version (on the left) compared to the RAW version (on the right) is obvious and one can easily draw an analogy between these images and the water lily series.
Attached Images
  
thkn777 is offline   Reply With Quote
Old Aug 15, 2010, 3:46 PM   #14
Senior Member
 
thkn777's Avatar
 
Join Date: Jun 2004
Location: Germany
Posts: 1,831
Default

The color differences can be seen here, JPEG to the left, RAW to the right, 300% auto tone map effect.

So to answer the question:
- yes, you can create a HDR image from a RAW file
- yes, it will be better than if you would work from a JPEG (better color reproduction, better details)

Reminder: "create a HDR image" (only) means tonemapping a high color depth image into a lower color depth image.

While we won't compress the dynamic range from a higher value to the 8bit of a JPEG file there will still be a lot of things we can get from that tonemapping step.

A tonemapped RAW file will look "richer" in many ways, although a lot of these enhancements could be achieved with more common postprocessing techniques (highlights, shadows, local contrast enhancement, histogram works etc.), too. Image manipulation programs, that easily let you apply changes only locally, are the next step and it's somewhat understandable why people are so fascinated by them

That's it for now, I hope I didn't bore you to death ...

Kind regards,
Th.
Attached Images
 
thkn777 is offline   Reply With Quote
Old Aug 15, 2010, 5:11 PM   #15
Senior Member
 
thkn777's Avatar
 
Join Date: Jun 2004
Location: Germany
Posts: 1,831
Default

Just to complete that part...

The same differences can be seen when combining 3 bracketing shots, although often the color differences are more obvious than the details.

Here's a 100% crop, HDR image made from JPEG's on the left, the RAW version is on the right. -2EV,0,+2EV, Oloneo PhotoEngine, 300% auto tone mapper.

The RAW version is the clear winner here in terms of color reproduction, the "JPEG apple" is way too green and the leaf has way too much red in it.

See you tomorrow,
Th.
Attached Images
 

Last edited by thkn777; Aug 15, 2010 at 5:15 PM.
thkn777 is offline   Reply With Quote
Old Aug 17, 2010, 1:18 AM   #16
Senior Member
 
shoturtle's Avatar
 
Join Date: Dec 2009
Location: Frankfurt AM
Posts: 11,348
Default

thkn,

You have some interesting info in her, it is quite enlightening what you have put together. Think you are doing a very good service for the pentax forums. But as Hards said, it can be easily overlooked for members that do not venture in here to often.

I am still not sure hdr tone mapping is right for me. But I do like a 3 EV stack. Seem to be less digital art, and more photography oriented.
__________________
Super Frequent Flyer, no joke. Ex Patriot and loving it.
Canon Eos 60D, T1i/500D, Eos1, Eos 630, Olympus EPL-1, and a part time Pentax K-X shooter.
shoturtle is offline   Reply With Quote
Old Aug 17, 2010, 1:32 AM   #17
Senior Member
 
shoturtle's Avatar
 
Join Date: Dec 2009
Location: Frankfurt AM
Posts: 11,348
Default

Frogfish,

I am a mac user with aperture 3, and use topaz adjust. Which free Mac HDR program do you think is best. I have used the photomatrix trail a while back, but since I am not so on the idea hdr is for me yet, I just do not feel like investing in photomatrix, which is an excellent program.

Thanks
ST

Quote:
Originally Posted by Frogfish View Post
I like this idea as a place to find resources / discussion on the programs and techniques involved.

I would really like to stress though that HDR can be as simple or as complicated as you want it to be. A single shot in something like HDRTist and Voila ..... there is your HDR photo, nothing could be simpler, or alternatively you could go the PS5 route and get involved with layers and different techniques. All depends on you really.

I'm going to copy paste the programs from the other thread so people can easily find something to suit them :

To aid us all there are a few free HDR programs (others are 30 day free trials), some that can even apply a HDR effect even to a single shot, so you don't have to worry about taking a range of varying exposure shots.

MAC :
HDRtist (free)
Luminance HDR (free) http://qtpfsgui.sourceforge.net/about.php and tutorial here : http://garmahis.com/tutorials/hdr-tu...free-software/
Photomatix (free trial) http://www.hdrsoft.com/
Gimp (free) http://www.gimp.org/ and tutorial here : http://garmahis.com/tutorials/hdr-tu...free-software/
DPHDR (trial) http://www.mediachance.com/hdri/index.htm

PC :
Picturenaut (free - I wish they had this for the Mac ! ) http://www.hdrlabs.com/picturenaut/index.html
Photomatix (free trial) http://www.hdrsoft.com/
Luminance HDR (free) http://qtpfsgui.sourceforge.net/about.php
Gimp (free) http://www.gimp.org/ and tutorial here : http://garmahis.com/tutorials/hdr-tu...free-software/
DPHDR (trial) http://www.mediachance.com/hdri/index.htm
AutoHDR by Martin Sykes (free) http://www.autohdr.co.uk

Also if you already have it CS4/5 or Topaz Adjust I believe can apply HDR effects.

Other resources & information :
http://captainkimo.com/hdr-software-review-comparison
http://digitalphotographyclass.net/page/hdr.htm
__________________
Super Frequent Flyer, no joke. Ex Patriot and loving it.
Canon Eos 60D, T1i/500D, Eos1, Eos 630, Olympus EPL-1, and a part time Pentax K-X shooter.
shoturtle is offline   Reply With Quote
Old Aug 17, 2010, 2:02 PM   #18
Senior Member
 
Frogfish's Avatar
 
Join Date: Feb 2006
Location: Shanghai, China
Posts: 2,774
Default

Hi Sho,

I am using two at the moment :

1. HDRTist (free) is fine for a simple conversion and works on a single jpg too - but has very little control. Some nice results though.

2. Dynamic Photo HDR (DPHDR - link in the post above, Trial)- is easier to use and far less time consuming than Photomatix, though has many of the same features. I like my software to give me quick and easy results (usually max 5 mins a photo) as I don't want to be spending all my time working on PP. I'm going to buy this one I think.
Frogfish is offline   Reply With Quote
Old Aug 17, 2010, 2:03 PM   #19
Senior Member
 
Frogfish's Avatar
 
Join Date: Feb 2006
Location: Shanghai, China
Posts: 2,774
Default

thnk777 - just want to say what and great, and instructive, job you've done on this thread. Sorry I couldn't contribute more - these two/three months are high season for us and I hardly even have time to get my camera out

Thanks !
Frogfish is offline   Reply With Quote
Old Sep 9, 2010, 11:21 AM   #20
Senior Member
 
thkn777's Avatar
 
Join Date: Jun 2004
Location: Germany
Posts: 1,831
Default

Since the August monthly challenge ended I linked the thread in the HDR section of the forum so other folks can see and use it.

Regards,
Th.
thkn777 is offline   Reply With Quote
 
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -5. The time now is 10:43 PM.