Histogram Representation

Today I have been flicking through my books, trying to find some information surrounding our next project, which is Dynamic Range.  Whilst looking at FREEMANS ‘Digital SLR Handbook’ I came across some optimising tips (p.142), and found an image of a histogram that did not look quiet right, in fact it looked a little like this:

Histogram that does not look quiet right

Histogram that does not look quiet right

The reason that this image jumped out of the page is that I have come across this issue repeatedly whilst using Photoshop.  In fact, I commented on this during my post on the Sensor Linear Capture exercise “…the only thing that does not look right is the new histogram and although it has roughly the same shape, there are individual lines present and not a block of black as in previous representations…’.  Therefore, I am hoping to have found the answer as to why my histograms continue to be produced in this way.

As I have started using RAW as the main source for capturing my images, the information being captured by my camera and displayed by my computer is different to the information I produced and displayed when shooting in JPEG.  RAW files contain either 12-, 14- or 16-bits of colour information, and is dependent on the type of camera you shoot with; there are higher –bit readings, such as HDR photography that uses 24-bit colour information, but this is not being considered in this post.  After some investigation, I have found that the maximum bit colour information my camera (a Nikon D800) shoots at is 14-bit, which I already use.

A short digression to explain bit depth: – A bit represents the smallest unit of data and here quantifies the number of unique colours available in an image’s colour palette, this is determined by the number of zero’s and one’s (or bits) used to specify each colour, in grey-scale images, the bit depth identifies the number of unique shades available.

The three primary colours; red, green and blue; uniquely combine in various ways to create the individual pixels in digital images.  Each primary colour is often referred too as a ‘colour channel’ and will have many varying ranges of intensity, which is specified by its bit depth.  The bit depth of the primary colours is sometimes known as the ‘bits per channel’ and the ‘bits per pixel’ refers to the total number of bits in each of the colour channels, and the total number of colours available in each pixel.

Cambridge in Colour states that ‘… most colour images from digital cameras have 8-bits per channel, meaning that they can use a total of eight 0’s and 1’s.  This allows for 2^8 (16-bit) or 256 different colour combinations – translating into 256 different intensity values for each primary colour…’

Building on this, if all three primary colours are combined in each pixel, this allows for as many as 2^8*3 or 16,777,216 different colours – also known as ‘true colour’ or 24-bits per pixel, as each pixel is composed of three 8-bit colour channels.

The following table illustrates image type in terms of bit depth, total number of colours available and their common name:

Bits per Pixel

No. of Colours

Common Name(s)

1

2

Monochrome

2

4

CGA

4

16

EGA

8

256

VGA

16

65536

XGA, High Colour

24

16777216

SVGA, True Colour

32

16777216 + Transparency

48

281 Trillion

Bit-depth Comparison ~ Cambridge in Colour

So, getting back on track, why do I keep getting strange lines in my histogram?

According to FREEMAN, when editing RAW images, the RAW conversion software will import and processes the image as a 16-bit file (you many need to change a few settings in the software to make sure that this actually happens), and by doing this, retains the extra editing ‘headroom’ afforded to 16-bit files.

REECHMANN also adds that the advantage of using high bit images is that when changes are applied post-processing, you do so with choice of much more data (or headroom) than when working with lower bit images.  For example, when changing the tonal range of a file that has 65,536 levels (16-bit), over a file that has only 256 levels (8-bit) the file makes up for the loss of tonal range by leaving gaps in the data, which are represented by white-line gaps with black spikes immediately above – as seen in the histogram included at the top of this post.  This loss of data could also lead to posterisation, which manifests itself as abrupt jumps in the colour or brightness level of our image.

So, this is what my issue seems to be, I am working on 16-bit encoded images with 8-bit encoded processing procedures, hence my data is being lost and white lines are appearing in my histograms.  Happy with this explanation, I have worked through the steps to change everything to 16-bit, played with some images in Photoshop and STILL have the same issue??!?!?!  I have; walked away, rechecked the procedures, made sure I have not missed anything – and I am still producing histograms with white lines.  I have found one way to rectify the look of the histogram and that it to hit the refresh button once all of the changes have been made.  Another thing may be the fact that my camera records in 14-bit and converts the image to 16-bit in the RAW conversion software, but this is something I need to look into further – at the moment, I am just happy to understand what is going on.

Source:

Reference:

Cambridge in Colour.  (n.d.) Bit depth Tutorial [Online Article].  Available at: <http://www.cambridgeincolour.com/tutorials/bit-depth.htm&gt; [Accessed 29 May 2013].

Freeman, M.  (2011) The Digital SLR Handbook.  Revised 3rd Edition.  East Sussex: The Ilex Press Limited.

Reichmann, M.  (n.d.) Understanding Bit Depth [Online Article.  Available at: <http://www.luminous-landscape.com/tutorials/bit-depth.shtml&gt; [Accessed 29 May 2013].

Bibliography:

Bauer, P.  (2010) Photoshop® CS5 for Dummies®.  Indianapolis: Wiley Publishing, Inc.

Cambridge in Colour.  (n.d.) Understanding Digital Camera Histograms: Tones & Contrasts [Online Article].  Available at: <http://www.cambridgeincolour.com/tutorials/histograms1.htm&gt; [Accessed 29 May 2013].

Cambridge in Colour.  (n.d.) Understanding Digital Camera Histograms: Luminosity and Colour [Online Article].  Available at: <http://www.cambridgeincolour.com/tutorials/histograms2.htm&gt; [Accessed 29 May 2013].

Cambridge in Colour.  (n.d.) Bit depth Tutorial [Online Article].  Available at: <http://www.cambridgeincolour.com/tutorials/bit-depth.htm&gt; [Accessed 29 May 2013].

Freeman, M.  (2011) The Digital SLR Handbook.  Revised 3rd Edition.  East Sussex: The Ilex Press Limited.

Reichmann, M.  (n.d.) Understanding Bit Depth [Online Article].  Available at: <http://www.luminous-landscape.com/tutorials/bit-depth.shtml&gt; [Accessed 29 May 2013].

Posted Wednesday 29th May 2013

Posted in: Digital Image Qualities – Exercises

Tagged:     Learning Log – Digital Image qualities

Advertisements
This entry was posted in Digital Image Qualities ~ Learning Log, Other Writings and tagged , . Bookmark the permalink.

2 Responses to Histogram Representation

  1. Matt says:

    It looks like you are getting ‘combed’ histograms. Do you use the curves and levels adjustments in Photoshop? If so then may be try flattening the image at the end of editing.

  2. Hi Matt, yes i am having combing issues – i have changed everything to make sure i am importing and working with 16-bit images, but the lines keep appearing. i have just tried your suggestion and flattened the layers (file> scripts> flattern all layers) but that does nothing at all to my histograms. i have found that refreshing the histogram takes the lines away and makes all representations solid again, but when reading Freeman he said that by changing everything to 16-bit should eradicate the issue. i am okay with the refresh option, but i am wondering if there is either something i am still missing, or there is a fault somewhere, or that this is just what everyone experiences and i shouldn’t worry about it too much – very frustrating and something i am burning to find the answer too … thanks for your suggestion ..

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s