Monday, September 24, 2007
Blending Mode Math - Part 2
Screen Blending Mode (Alt+Shft+S)
Screen, part of the Lighten group, can be used to quickly lighten a dark image. Often times, there is a tremendous amount of detail that is obscured by shadow. A Screen self blend can be used to brighten the image or a selected area of the image.
Screen: X = 1- ((255-U)*(255-L))/255
Screen mode inverts the values of each of the visible pixels in the two layers of the image. (That is, it subtracts each of them from 255.) Then it multiplies them together, inverts this value again and divides by 255. The resulting image is usually brighter and sometimes “washed out” in appearance. The exceptions to this are a black layer, which does not change the other layer, and a white layer, which results in a white image. The mode is commutative; the order of the two layers doesn't matter.
Soft Light Blending Mode (Alt+Shft+F)
A Soft Light self blend dodges the light areas and burns the dark areas of an image. This can be helpful when used on an image with a “back lit” suspect. It has been one of my personal favorites. When trying to accomplish non-destructively what Shadows and Highlights can do, Soft Light is my tool of choice. Shadow detail can be found by using an inverted, desaturated, and blurred Soft Light self-blend.
Soft Light: X = (((255-L)*U*L)+ (L*R_s))/255
The Soft Light equation is complicated. It needs R_s, the result of the Screen mode equation (shown above). This one treats the Upper image as if it were the light source (a Soft Light) for the Lower image. So if the Upper Image, or blend colour, is brighter than 50% (has a numerical value greater than 127.5, which is half of 255), then the Lower image, or base colour, gets lightened subtly. If the Upper image's colour is darker than 50% (has a numerical value less than 127.5) then the Lower image's colour gets darkened a little. As stated above, it dodges the light areas and burns the dark areas.
Difference Blending Mode (Alt+Shft+E)
Difference is great for aligning images or stitching images together. It is also helpful in quickly comparing images of a scene to see what is missing or has been added. If there is no difference between the layers, the result is black.
Difference: X =|L-M|
Difference mode subtracts the pixel value of the upper layer from that of the lower layer and then takes the absolute value of the result. The mode is commutative; the order of the two layers doesn't matter. Because the order of the layers doesn’t matter, Difference examines the numerical values for colour in both the base and blend images, and subtracts the lower number (darker colour) from the higher number (brighter colour). The result colour has a numerical value which is the difference between the two values.
Well, there you have it. A quick but detailed look at the most common blending modes used in forensic video analysis. I certainly hope that this bit of information spurs thought and discussion on the issue of the science of forensic video analysis and the use of Adobe’s Photoshop within the analyst’s work flow. I have found Photoshop to be one of the most potent tools in my toolbox. I love finding new ways to employ my old and trusted friend. If there is some process that you use, take a second, put it down on paper, and send it in. Have a question? Ask.
I try to attend any Photoshop class, whatever the level, because there is always something more to learn … or a different way of looking at the same problem. I always encourage Photoshop users of all levels to do the same. Look for opportunities to further your knowledge. Read the new Photoshop books as they come out. See if and how the information conveyed in the book can apply to your workflow. If you find something new and great, don’t be afraid to share. For my part, I will be teaching a 2 day Forensic Photoshop class at the 2007 LEVA Conference. I’d love to see you there.
Beardsworth, J. (2005). Photoshop Blending Modes Cookbook. O'Reilly.
French, N. (2006). Adobe Photoshop Unmasked: The Art and Science of Selections, Layers, and Paths. Adobe Press.
GIMP Documentation Team. (2007). GNU Image Manipulation Program User Manual. Free Software Foundation.
Harrington, R. (2006). Understanding: Adobe® Photoshop®: Digital Imaging Concepts and Techniques. Peachpit Press.
Lawler, B. (2005). Official Adobe Print Publishing Guide, Second Edition: The Essential Resource for Design, Production, and Prepress. Adobe Press.
Long, B. (2007). Adobe Photoshop CS3 Beta First Look with Adobe Bridge and Camera Raw. Peachpit Press.
Pankala, B. (2006). Layer blending modes explained. Retrieved from TeamPhotoshop: teamphotoshop.com.
Reding, E. (2006). Adobe® Photoshop® CS2 Revealed. Course Technology.