I have a colour standard card QP 201 which I am hoping to use to calibrate gray values in some scientific photos. For this purpose I will need to know the percentage gray values of the gray squares (e.g. 18% gray, 95% gray), but the card does not come with that information. The closest that I can find is this chart - how do these RGB values correspond to percentages? Is it simply a linear transformation, so that 255 equals 100%, hence the corner squares (RGB 179, 180, 178) would be 70% gray?
2 Answers
Photography is approaching 200 years of age, first permanent image Joseph Niepce 1826. The digital era starts in 1975 when Steven Sasson at Kodak invented the first digital camera. In the early days, exactly how to expose and develop was hit and miss. It was Hurter & Driffield who conceived the science of Sensitometry. This is the science of how film and photo paper react to exposure and chemical developing. Thus applying numerical values to shades of gray or hues is rooted in this science. Their math is the basis of exposure calibration and film speed.
It’s a complicated subject because engineering of that era relies on logarithmic notation. This math notation, still used extensively, was the mainstay before engineers had electric calculators (computers). The slide rule was used every day for multiplication and division. Before the slide rule, books filled with tables were used. The basis of the tables and the slide rule is logarithmic notation. This math method substitutes addition for multiplication and subtraction for division. Its use permitted ships, buildings, airplanes, etc. to be designed with pen and paper. Photography also appreciated the use of logarithmic notation.
The increment of exposure is the f-stop. We open up or close down the circular opening of the aperture to control the light energy that plays on film or digital sensor. The f-stop adjustment changes the light energy of exposure in 2x increments, a doubling or halving of the exposing light energy. In modern cameras we often work in 1/2 or 1/3 f-stop increments.
Sensitometry (stemming from Hurter & Driffield) is the science of exposing film (now digital) using precise exposure changes, usually 1 stop or ½ f-stop. Typically a black & white film is exposed to make a gray scale --- clear film to max black. Each step is measured by passing a beam of light of known strength through the developed film. The amount of light blocked due to the density of each step is recorded. The results, called film density, is graphed on ruled paper. The result is a plot of the film’s response to exposure and development.
If the math used to record the density of each step is ordinary -- 10 base numbers, the graph is too long to be practical (several yards long). This is because each f-stop is a 2x change in exposure, so after fourteen steps, the scale is 8,192 the first step. To make the graph practical, some say elegant, logarithmic notation is used.
Sorry no time or space for a logarithmic lesson, but here is a taste of the math of photography:
T = Transmission the amount of light that gets through the film ÷ Amount of light that hit the film. A transmission of 18% means 18% of the light that hits gets through. Percent means per 100 so 18% in decimal form is 0.18.
O = Opacity the amount of light that hit ÷ Amount of light that gets through. O = 1/T we don’t use the word percentage thus 1 ÷ 0.18 = 5.56.
D = Density this value is the opacity in logarithmic form log(5.57) = 0.75
The key tone of photo film and paper is a gray patch with a density of 0.75 (log base 10). This is middle gray of the scale of film and photo print paper (battleship gray).
A patch of film with a density of 0.75 is the center value of the tonal range of a pictorial black & white negative (patch # 7 of photo below) A print made from this negative, properly exposed on photo paper and properly developed yields a gray patch, we say zone V, the pivotal point, and both properly exposed film and a print of that film have the same density. The film’s density is 0.75 transmission density, the print’s density is 0.75 reflected density. This is the value of the 18% gray card used to calibrate exposure meters.
-
\$\begingroup\$ Thank you very much for such a detailed answer, it really helps with understanding what is the meaning of 18% gray and is far more thorough than what I was expecting! The chart that you've shown gives some idea of how the reflectance and density relate to RGB values, but why are there two different columns - what do the two gamma values represent? \$\endgroup\$ Sep 6, 2019 at 21:39
-
1\$\begingroup\$ An H &D graph of pictorial negative film reveals that film density resembles the left half of a bell curve. The increasing density (blackening) is depicted as an upward clime. A normal contract film upsweeps at an angle of about 38 degrees. The tan of that angle = 0.8. This is what we commonly call gamma. Prints from this negative are represented as the right half of a bell curve. the typical gamma of this upward sweep is about 2. The two gamma columns, left one is has elevated contrast the second lest contrast. Likely the table is to aid in the control of two specific Kodak photo papers. \$\endgroup\$ Sep 6, 2019 at 23:15
Your example square is actually about 53%.
Upon reference image download exiftool shows that the ICC profile is ProPhoto RGB:
Kali:~ kelsolaar$ exiftool ***/rgbvalues.jpg
ExifTool Version Number : 10.80
File Name : rgbvalues.jpg
Directory : ***
File Size : 316 kB
File Modification Date/Time : 2019:09:08 14:06:30+12:00
File Access Date/Time : 2019:09:08 14:18:20+12:00
File Inode Change Date/Time : 2019:09:08 14:09:20+12:00
File Permissions : rw-r--r--
File Type : JPEG
File Type Extension : jpg
MIME Type : image/jpeg
JFIF Version : 1.02
Exif Byte Order : Big-endian (Motorola, MM)
Orientation : Horizontal (normal)
X Resolution : 72
Y Resolution : 72
Resolution Unit : inches
Software : Adobe Photoshop CS2 Macintosh
Modify Date : 2007:09:12 11:12:29
Color Space : Uncalibrated
Exif Image Width : 1742
Exif Image Height : 566
Compression : JPEG (old-style)
Thumbnail Offset : 332
Thumbnail Length : 4057
Current IPTC Digest : 460cf28926b856dab09c01a1b0a79077
Application Record Version : 2
IPTC Digest : 460cf28926b856dab09c01a1b0a79077
Displayed Units X : inches
Displayed Units Y : inches
Print Style : Centered
Print Position : 0 0
Print Scale : 1
Global Angle : 120
Global Altitude : 30
Copyright Flag : False
URL List :
Slices Group Name : ProPhoto
Num Slices : 1
Pixel Aspect Ratio : 1
Photoshop Thumbnail : (Binary data 4057 bytes, use -b option to extract)
Has Real Merged Data : Yes
Writer Name : Adobe Photoshop
Reader Name : Adobe Photoshop CS2
Photoshop Quality : 12
Photoshop Format : Progressive
Progressive Scans : 3 Scans
XMP Toolkit : 3.1.1-112
Format : image/jpeg
Creator Tool : Adobe Photoshop CS2 Macintosh
Create Date : 2007:09:12 11:12:29+02:00
Metadata Date : 2007:09:12 11:12:29+02:00
Document ID : uuid:1EB2585362B311DC9D2ADDF10FA72CD1
Instance ID : uuid:1EB2585462B311DC9D2ADDF10FA72CD1
Derived From Instance ID : uuid:1EB2585062B311DC9D2ADDF10FA72CD1
Derived From Document ID : uuid:4162C64161E811DC9D2ADDF10FA72CD1
Native Digest : 256,257,258,259,262,274,277,284,530,531,282,283,296,301,318,319,529,532,306,270,271,272,305,315,33432;80CC530BEFCFB6E95CD01DEF050420F7
Color Mode : RGB
ICC Profile Name : ProPhoto RGB
History :
Profile CMM Type : Unknown (KCMS)
Profile Version : 2.1.0
Profile Class : Display Device Profile
Color Space Data : RGB
Profile Connection Space : XYZ
Profile Date Time : 1998:12:01 18:58:21
Profile File Signature : acsp
Primary Platform : Microsoft Corporation
CMM Flags : Not Embedded, Independent
Device Manufacturer : Kodak
Device Model : ROMM
Device Attributes : Reflective, Glossy, Positive, Color
Rendering Intent : ICC-Absolute Colorimetric
Connection Space Illuminant : 0.9642 1 0.82487
Profile Creator : Kodak
Profile ID : 0
Profile Copyright : Copyright (c) Eastman Kodak Company, 1999, all rights reserved.
Profile Description : ProPhoto RGB
Media White Point : 0.9642 1 0.82489
Red Tone Reproduction Curve : (Binary data 14 bytes, use -b option to extract)
Green Tone Reproduction Curve : (Binary data 14 bytes, use -b option to extract)
Blue Tone Reproduction Curve : (Binary data 14 bytes, use -b option to extract)
Red Matrix Column : 0.79767 0.28804 0
Green Matrix Column : 0.13519 0.71188 0
Blue Matrix Column : 0.03134 9e-05 0.82491
Device Mfg Desc : KODAK
Device Model Desc : Reference Output Medium Metric(ROMM)
Make And Model : (Binary data 40 bytes, use -b option to extract)
DCT Encode Version : 100
APP14 Flags 0 : [14]
APP14 Flags 1 : (none)
Color Transform : YCbCr
Image Width : 1742
Image Height : 566
Encoding Process : Progressive DCT, Huffman coding
Bits Per Sample : 8
Color Components : 3
Y Cb Cr Sub Sampling : YCbCr4:4:4 (1 1)
Image Size : 1742x566
Megapixels : 0.986
Thumbnail Image : (Binary data 4057 bytes, use -b option to extract)
With that knowledge and Colour, it is possible to decode the values as given in your image and convert them to Luminance values which for practical purposes would be equivalent to reflectance values for the various gray swatches:
Kali:~ kelsolaar$ python
Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 12:04:33)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import colour
>>> RGB = colour.models.eotf_ROMMRGB([179, 180, 178], in_int=True)
>>> colour.models.RGB_luminance(RGB, colour.models.ROMM_RGB_COLOURSPACE.primaries, colour.models.ROMM_RGB_COLOURSPACE.whitepoint) * 100
53.26811741384234
I made a Google Colab notebook so that you don't need to install Colour on your machine: https://colab.research.google.com/drive/1OuaAnxqct3E4OAbddcA74vcNF4uwQyx4