X

DIGITAL PHOTOGRAPHY #101: HISTOGRAMS Part 2 – Physics Can’t Be Beat

HISTOGRAMS
Part 2:  Physics can’t be beat, we’re just trying to compete.
             Entering the World of Computer Algorithms
 
            Section C: Histogram Digital Data Distribution
                        Sub Section 1: Bits define Tonal Depth
                        Sub Section 2: Divvying up the Data
            Section D: Automatic EV (Exposure Value) Compensation
            Section E: Reading a Histogram, Exposure Evaluation    
______________________________________________
  
This is the second and final part of

EXPOSURE – Manipulating the Physics of Light

Reading a Histogram is quite simple.  You may jump to Section E if you are only interested in reading a Histogram.
 
Likewise, understanding the implications of Exposure allows us to move toward image enhancement in the Digital Darkroom utilizing a better DynamicRange.
 
Therefore, we must understand DigitalDynamicRange and how it is currently implemented as reflected by our current 8 bit,
5 Stop Histogram.  
 
The single biggest point in the section is that the TonalRange (Total Tonal Levels) define the DynamicRange in Digital Imaging, not Stops.
 
Here is a fun example of utilizing a compressed 8 bit, 5 Stop Digital Dynamic Range. (Compressed down from a 12 Bit Depth, outlined below).  This picture would be even smother if it could be displayed as 12 Bits, even within the same 5 StopDynamicRange.
 
YOGA by the FOUNTAIN  (Once open, hit  CNTL + or –  to control image size.) 
______________________________________________
 
If you are just joining us, the PRELUDE & SYLLABUS section is the logical starting point for the series.
 
Welcome to Digital Photography #101
by Virtual Studio Photography (VSPHO)
______________________________________________

Physics can’t be beat, we’re just trying to compete.
 
In Digital Imaging we define DynamicRange with Gradient Tonal Levels:
“Bit Depth divided by Digital Stops.”
(e.g. DynamicRange in the current lossy compression of the JPG standard has an 8 Bit Depth divided by 5 Stops.)
 
JPG/JPEG = Joint Photographic Experts Group
 
In Physics, DynamicRange (in real life perception) is the difference in light intensity from highest  intensity to the lowest intensity, measure in Stops.
 
We’ve previously outlined that a Stop in light intensity is exactly like an Octave on the piano.  With sound, each Octave doubles (or halves) the tonal frequency of the previous Octave.  With Light,  each Stop in light intensity has twice (or half) the photon count as the previous Stop.
 
We’ve previously outlined in ISO Sensitivity, the average human eye has a sensitive to light with as little as 5 photon bursts (some people even tested to 1 photon of sensitivity). 
 
So with DynamicRange in Physics, Stops define the light intensity range.  In relation to human vision, image definition within the DynamicRange for a person is defined by the sensitivity to “light intensity variations” in an image.
 
Note: I am not advocating that the human mind is capable of defining tonal variations in 5 photon increments.  But, with the vast quantity of photons in light (outlined as Moles in PART 1), whatever the photon granularity is for human comprehension in light variations for image definition, physics (mother nature) is far ahead of Digital Imaging.
 
Color definition works into the equation with “Eye Cone” color sensitivity (also outlined in PART 1).  The average human eye can discern about 10 million color variations. 
 
Note: We are leading into Bit Depth in relation to image definition, not color definition.  Our current JPG standard with 8 bits of Tonal Color Definition already produces over 16 million color variations.  Therefore, increasing the Bit Depth past 8 bits would not directly help the color definitions over an 8 bit digital image.
 
Color blindness has different severity levels, the worst color blindness meaning a vision with no color perception is restricted to only Shades of Grey.
 
But the “Shades of Grey” represent the gradient tonal definition in DigitalDynamicRange we are outlining in this section.
 
The point is that the human eye can define seemingly infinite gradient levels of light intensity within a PhysicalDynamicRange.  The equivalent in a Digital Image measured as Gradient Tonal Levels as defined by the Bit Depth would easily exceed 16 bits (65,536 levels).
 
 
Both of these DynamicRange formulas summarize definition (quality of tonal detail) as:
 
1. In Physics, the PhysicalDynamicRange (light intensity difference divided into Stops) divided by the sensitivity of the eye to differentiate light intensity levels, equal the quality of tonal detail.
 
Note: On a camera sensor that is gathering the light before the data conversion, the DynamicRange is expressed after the signal to noise ratio is factored into the equation.  We are not outlining the voltage conversion or chip performance, just the application of the data produced after conversion to Spatial pixels.
 
2. In Digital Imaging, the DigitalDynamicRange is defined by tonal transition levels (Bit Depth) divided by the Digital Stops, equal the quality of tonal detail (total tonal levels).
 
 
In this next example of DynamicRange on a computer monitor, the DynamicRange is characterized as the Contrast Ratio.  The Contrast Ratio on a typical computer monitor is almost 10 Stops of contrast.  This is notated as a 1000:1 Contrast Ratio.
 
This example exemplifies that even with a potential of 10 Stops of PhysicalDynamicRange, with a 1 Bit Depth (Black and White in this case) the Tonal Definition is defined by the Bit Depth.
 
ONE BIT  (Once open, hit  CNTL + or –  to control image size.)
The best analogy I can think of in relation to the restrictive nature of the current JPG standard is this:
 
With 8 bits of depth (times 3 colors, RGB), you can create 16 million color variations (the equivalent of 24 bits, 2^24).  But, after you create those 16 million colors, you can only apply them with 256 levels of definition (2^8).
 
It’s like a painter with 16 million colors on his pallet, but can only pick 256 colors at a time (actually, 256 color choices per pixel, but the Spatial pixels are averaged, not distinct).  It sounds like a lot, but compared to mother nature, it does not allow enough definition in the Tonal Depth.  We can do better in the 21st centruy.
______________________________________________
 
Section C: Histogram Digital Data Distribution
 
Exposure in Digital Imaging serves two purposes:
1. Obviously, to create a well exposed image for viewing (print or monitor display).
2. More importantly, to gather digital imaging information for data manipulation in the Digital Darkroom.
 
This is why understanding the information displayed in a Histogram is so beneficial. 
 
The technology of Digital Imaging has increased exponentially in the past few years.  But the artistic and technological potential is still restricted by the current infrastructure of the JPG standard.
 
If and when a new industry standard for the DigitalDynamicRange is introduced, Histograms will also be upgraded to the new standard.
 
For now, our Histogram reflects an 8 Bit, 5 Stop, DynamicRange of Tonal Definition.
 
The physical Bit Depth potential on the camera’s sensor is a direct correlation to voltage variations between capacitors, it is the analogy defined in ISO Sensitivity.
 
The newest 3rd generation cameras boast a DynamicRange of up to 11 Stops in light gathering capability. But more importantly, they can discern a 14 Bit Depth. 
 
So the potential Bit Depth is solely dependent on imaging sensor (CMOS) technology.
 
But the application of SensorDynamicRange and the applied Bit Depth is a function of computer programming.
 
Stops are no longer quantities of photons.  They are now the doubling or halving of numerical values.
 
Tonal Gradient Levels that help define the Spatial Resolution are defined by the Bit Depth.
 
The math is easy once you understand it.  You can figure out for yourself the advantage of higher Bit Depths and the potential for more TonalRange producing a smother DynamicRange.
 
You do not need to understand Bit Depth or Stops to read a Histogram, but it makes it more fun and comprehensive.
 
Early Digital Imaging evolved to an acceptable level of picture quality defined as the JPG standard of an 8 Bit Depth defined within 5 Stops.  It is categorized as a “lossy compression” format just as the lossy compressed MP3 standard is inferior to Pulse Code Modulation, uncompressed data is on an audio CD.  JPG is inferior to the picture quality potential of an image in a RAW file format.
 
I do not know if the current JPG standard was meant to be the permanent standard because of the 16 million color variations.  But the overall realism and artistic beauty of digital imaging could be advanced with a JPG standard upgrade.
______________________________________________
 
Sub Section 1: Bits define Tonal Depth
 
In Digital Imaging, you must first establish how many Bits you have to define the Tonal Depth.
 
Trivia: Do not to worry about understanding computer logic.  But these algorithms use the Binary Decimal System implemented through a structure call Hexadecimal.   So for a logical explanation, the numbering system fluctuates between binary and decimal.
 
The Bit Depth is in Binary (e.g. 8 Bits), but more importantly, the actual levels of Tonal Transition Levels are labeled in decimal (e.g. 256 Tonal Levels are incremented from 0 to 255.)
 
We know our Histogram reflects an 8 Bit Depth through a 5 Stop range.  When you review the breakdown of 8 Bits below, please be aware that 8 Bits allows for 7 Stops of Tonal Levels (not just 5 Stops).
 
When the JPG standard was introduced 1992, it was a compromise of Digital Imaging quality balanced against sensor speed performance and file size for storage.
 
Our digital cameras now commonly offer a 12 or 14 Bit Depth.  This is where our industry standard literally discards the incredible imaging potential and “averages” the Bit Depth back down to 8 Bits for print reproduction and computer video displays.
 
More than 90 percent of our high definition computer monitors are still restricted by an 8 Bit video card. 
http://www.ncbi.nlm.nih.gov/pubmed/22395766
 
When we are editing in 16 bit mode in Photoshop, most of us are only able to see the results in 8 bits through our video cards.  When we print, most local printers utilize the 8 bit JPG standard.   
 
Photoshop has set the standard for digital imaging performance.  They have set the precedence to allow for editing up to a 32 Bit Depth.  Most photographers edit in 16 bits as it is already an upscale of 12 or 14 bits from the RAW file.
 
We are currently stuck with a final output of the JPG standard of 8 Bits of Depth.
 
So we could call Digital Data Distribution:
“Divvying up the Data.”
______________________________________________
 
Sub Section 2: Divvying up the Data
 
We start with 8 bits, 256 total possible Tonal Gradient Levels:
 
1 Stop (with 7 bits) would give us 128 Tonal Levels (2^7 = 128).
 
2 Stops (with 6 more bits) would add another 64 Tonal Levels (total now 128+64=192 Tonal Levels).
 
3 Stops (5 more bits) adds another 32 Tonal Levels (total now 192+32=224 Tonal Levels).
 
4 Stops (4 more bits) adds another 16 Tonal Levels (total now 224+16=240 Tonal Levels).
 
5 Stops (3 more bits) adds another 8 Tonal Levels (240+8=248 Tonal Levels).
 
6 Stops (2 more bits) adds another 4 Tonal Levels (248+4=252 Tonal Levels).
 
7 Stops (1 last bit) add the last 2 tonal Levels (252+2=254 Tonal Levels).
 
Note: The 7th Stop shows only 254 Tonal Levels.   In hexadecimal (converted to binary), the first two positions are zero and one, they are not exponents in the order of magnitude.  So when including the first two positions (zero and one), the Tonal Levels are labeled as 0 to 255 (total 256).
 
But as you can see with the JPG compression, we are only using 248 Tonal Levels (5 Stops) out of a possible 256 Tonal Levels with a possible 7 Stops of DynamicRange.  The 5 Stops are still taking advantage of 97% of the total Tonal Level potential of 8 bits.  
 
The 5 Stop Dynamic Range is only part of the compromises that JPG incorporates to achieve its compression ratio to reduce file size.
 
It might be time to set a new standard for Digital Imaging.  As you can discern for yourself, applying the same analogy to 12, 14 and 16 bit depths, we could easily render 10 Stops of DynamicRange in a new standard.  Even with compression, 10 Stops of DigitalDynamicRange could be the new minimum standard.  Backward compatibility with 8 bit images is a given.
 
Finally on the subject of the JPG limitations, let’s quickly mention HighDynamicRange software.  Mathematically and literally, we are simply re-compiling more image data to fit in the little box of 8 bits, cut off at 5 Stops of DynamicRange.  It is a brillant solution to this limitation, but the reality is that a true higher gradient level would produce smoother and better defined images.
 
When JPG 2000 was introduced, they went from JPG’s DCT code to define data points to a wavelet based method.  The new method does not use a higher bit depth and creates its own unique artifacting problems.
 
So I don’t know if the added bit depth would help reduce artifacting, but it would still increase the TonalRange of the grey scale.
 
Every “bit” doubles the TonalRange.
 
We currently use an 8 bit depth.  9 bits has the same TonalRange (256 tonal levels) in just the First Stop as an 8 bit depth in all 7 stops combined.
 
Even a 10 Bit standard would quadruple the TonalRange of an 8 bit depth.  
______________________________________________
 
Section D: Automatic EV Compensation.
 
Your camera has the ability to set an EV (Exposure Value) compensation to add or subtract a Stop(s) to every exposure.  If you automatically add 1/2 or 1 whole exposure value, your images will be slightly brighter and give you the extra exposure head room for creative cropping in the Digital Darkroom. 
 
Note: Check the EV compensation value if you consistently find your pictures too light or too dark for no apparent reason.
______________________________________________
 
Section E: Reading the Histogram, Exposure Evaluation
 
Note: This section is highly visual through the examples.  If any image does not display properly, please try hitting the refresh icon at the top left of the screen when the window is open.  I will also display the text from the images to ensure you are able to read the example.
 
As outlined in Section A, of PART 1, our 8 bit Histogram has 768 vertical bars overlapping three colors (RGB) to create 268 gradient level vertical bars.
 
We can evaluate the data distribution (light distribution) of a picture just shot with the histogram.  We can actually determine the exposure accuracy though the Histogram as we will outline below.
 
When reading a Histogram, the far left side represents the starting point of the dark areas labeled in the data as 0 (zero) in the Tonal Gradient Levels.
 
Working from left to right, the far right of the graph represents the lightest area of the image labeled as 255 (the 256th gradient level, 0 to 255).
 
Let’s look at a Histogram using our Yoga instructor.  Along with showing the Exposure balance, we will clarify the meaning of the vertical bar height.  The vertical bar height has nothing to do with over-exposure or posterization (next two examples).
 
So do not worry if any of the bars touch the top, it means nothing to the integrity of the image.  It is just the height limitation of the graph itself.
 
YOGA HISTOGRAM  (Once open, hit  CNTL + or –  to control image size.)
 >>>
(If you couldn’t open, this is in the link:)
The Histogram shows the Exposure level and the balance of colors.  Some of the bars are against both ends.  A bar touching the Left (= Dark tones) means Posterization is starting in the Darkest of tones. 
A bar touching the Right (= Bright tones) means Posterization is starting in the Brightest of tones. 
The DynamicRange is stretched to the 5 Stop limit (between her black suit and the light reflecting off the water).
>>>
The bars touching the top do not hurt anything.  Vertical Height represents the total Spatial pixels in a specific color level in proportion to the total Spatial pixel count.  I will redo this image with different pixel proportions to exemplify this fact.
  
YOGA#2 HISTOGRAM   (Once open, hit  CNTL + or –  to control image size.)
 >>>   
(If you couldn’t open, this is in the link:)
This example includes the Histogram from the first picture.  We are showing that the height of the vertical bars is only a representation of the proportion of color intensity in comparison to the total Spatial pixel count.
The Histogram at the top is the original of just the water image.
This one to the right includes all the black on the page.
So “in proportion,” the colors are now relatively small compared to all the Black pixels.
 >>>
   
Next: In this example, we can use the Histogram to fine tune and exposure.  This exposure is very good, but the Histogram shows it has room for slightly more exposure for true perfection.
 
NEVER HISTOGRAM   (Once open, hit  CNTL + or –  to control image size.)
 
>>>
(If you couldn’t open, this is in the link:)
As you can see in this histogram, most of the data is
on the brighter side of the graph.  Likewise, it shows
that it is not touching the far right side, there is no
posterization.   It is however touching the left side, the
blacks (trees and pants) may be posterizing.  With the
room on the right, this could be shot slightly brighter.
>>>
 
Lastly, let’s under expose an image to show the results in the Histogram.
 
NEVER2 HISTOGRAM   (Once open, hit  CNTL + or –  to control image size.)
 
I will point out that the open lines in between the bars represent posterization caused by extreme modification in Photoshop.  It is caused when there is no actual data to graph between the gradient levels.
 
Note: If you are curious,  these two climbing the bleachers (called the wheelbarrow) are part of a group of personal trainers.
 
So the single best tip I can give you is to over-expose by 1/2 to 1 Stop (auto EV in Section D).  As outlined above, the higher gradient levels store more data.  So it is better to over-expose a little than under-expose (as long as it does not push the Histogram bars into crowding the right side).
 
So to summarize the Histogram:
A Histogram can not tell if a picture is in focus, has the correct Shutter Speed for motion blur, or the correct Aperture for background blurring (Depth of Field).  The middle tonal intensity (represented in the middle bars) is the easiest to see, but the outer edges (short of posterizing) can bring the most artistic value to an image.

BLACKSKY HISTOGRAM  (Once open, hit  CNTL + or –  to control image size.)

By using the Histogram to evaluate every exposure, you are sure to come home with images that are either perfectly exposed, or easily corrected in the Digital Darkroom.
Please join us in the next section:
DIGITAL PHOTOGRAPHY #101: HIGH DYNAMIC RANGE through TONE MAPPING 
 
Thanks Again,
VIRTUAL STUDIO PHOTOGRAPHY
 
These is still available:
16×20 EYE in the SKY.jpg

16×20 BLACK SKY.jpg

These JPG files can be printed as a 16×20 poster or an 8×10 print.
  
VSPHO:
Related Post