TechByter Worldwide

Speak softly and carry a large microphone

 

28 Jan 2018

Looking Behind the Digital Curtain

I've been looking at an open-source imaging program that's modeled somewhat after Adobe Photoshop Lightroom except that it exposes a lot more of digital photography's operations. This seemed like a good time to talk about some of the unique features that can frustrate people who use digital cameras, so we'll do that this week.

I should warn you that this topic is long and somewhat complex even though I'll omit the really perplexing stuff. Although the topic could have been split up over several weeks, that seemed unfair because you'd need to go back and review the previous week's information. So here it is. Just take a deep breath and dive in.

There are two primary file formats that can be created by digital cameras: JPEG and some version of raw. Nikon users will be familiar with NEF and NRW files. Canon shooters will know CRW and CR2 files. Sony users have SRF and SR2 files. Pentax and Fuji users will be familiar with PEF and RAF files. Raw file formats are proprietary to the manufacturer and a CR2 file from one Canon model might not be the same as a CR2 file from another Canon model.

A JPEG file, on the other hand, is the same no matter which camera made it.

Always Raw? Never JPEG?

If you follow any of the popular photography sites such as Digital Photography Review's website or the Photoshop and Lightroom group on Facebook, you've probably encountered folks who proclaim that "real" photographers "never shoot in JPEG mode." My time as a professional photographer pre-dated digital, so back then we were told that "real" photographers never used (pick one or more): In-camera metering, auto-focus, 35mm camera, or auto-exposure.

In those days, "real" photographers used only roll film and the "real real" professionals used only view cameras -- the ones that require 20 minutes just to set up for a single shot. In my view, "real" photographers use whatever technology is appropriate to accomplish the task at hand. Today that might be a digital SLR, a point-and-shoot camera, or a cell phone.

There are even photographers who says that you're a failure if you don't get exactly the image you want in the camera. These are usually people who don't know the history of photography and are not aware that masters such as Edward Weston, Ansel Adams, and Dorothea Lange spent hours in their darkrooms perfecting their images. Silly arguments over which equipment and techniques are the only ones used by "real" photographers are the most tiring aspects of such groups. So put those thoughts away.

If you think this is an article that's intended only for professional photographers, put that thought away, too. Knowing how the camera records and stores data from the sensor as well as what it's doing to create a processed JPEG image can be helpful.

Press ESC to close.The first, and possibly most important fact to know about digital photography is this: Pixels are square. That's important because it has wide-ranging effects as you work with images in whichever photographic application you choose. It's also good to know that digital cameras record only monochrome images. For every photograph you take, there are 3 images: one through a red filter, one through a green filter, and one through a blue filter. These aren't filters such as you might have used with a film camera.

Instead, the camera's sensor has tiny filters atop each of the tiny photo-sites on the sensor. Half of the photo-sites have green filters, a quarter have red filters, and a quarter have blue filters. The resulting data from the sensor is an electronic map of the level of light from each photo-site.

White light consists of equal amount of red, green, and blue. As a result, recording a single white pixel requires input from several photo-sites: 2 with green filters and 1 each with red and blue filters. That's because our eyes are more sensitive to green light than to red or blue. The data from the sensor is not a photograph, but it holds the information that your camera needs to create a JPEG image or to store a raw file. When the information from the sensor is re-assembled to create an image file, it's based on a mosaic of tiny photo-site data points.

You've probably seen mosaic art in a church, gallery, or public building. From a distance, the image is crisp and clear; approach closer and you see the individual squares. There's a lot more going on here than I can explain briefly, but the mosaic pattern is a problem. The red-green-blue pattern has a name. It's called a Bayer array and most cameras have a low-pass filter in front of the sensor.

The low-pass anti-aliasing filter minimizes color moiré and aliasing that can appear as distracting patterns and jagged edges in images of subjects with hard edges and sharp corners. Building exteriors and interiors both have these, so virtually all cameras have the low-pass filters to eliminate that problem, but the low-pass filter makes every image slightly fuzzy. Photographers who shoot landscape images exclusively sometimes buy cameras without these filters because trees, mountains, and oceans don't exhibit the problems that sharp-edged structures do.

So your digital camera almost certainly has a low-pass filter and the photographs it creates are just slightly out of focus because of it. And this leads to the first big difference between JPEG images and raw images.

The raw image is simply the data from the sensor. Every bit of it, literally. The camera simply records it without any processing.

JPEG images, on the other hand, are processed in the camera before being written to the memory card. As a result, a JPEG image straight out of the camera will always look better than an image of the same subject stored as a raw image. So why should anyone ever want to shoot a raw image if the result is worse?

 Click any of the smaller images for a full-size view. To dismiss the larger image, press ESC or tap outside the image.

Press ESC to close.Think of it this way: The raw image is equivalent to a film negative. Give that film negative to a professional lab and the resulting print or transparency can be improved by means of careful processing. The JPEG image is the equivalent of a photo from the drug store and it's as good as it's ever going to be.

Contents of a raw file shown at right. A JPEG file would look about the same, but there's one big difference: Only the camera manufacturer knows what's in the raw file and the JPEG file format is a known standard that any photo application can read or write.

To create a JPEG image the camera starts with the raw data from the sensor, examines all the pixels; interpolates the data to create RGB pixels; applies demosaicing (further blurring the image); performs colormetric corrections; maps the image to a color space (probably sRGB, which is smaller than Adobe RGB); adjusts the white balance, contrast, and color saturation based on the settings you used; adds sharpening to reduce the fuzziness caused by demosaicing; and then throws away most of the data so that a 20MB raw image may be reduced to no more than 5MB (maybe even less) as a JPEG.

The primary advantage of shooting JPEG images is that you don't process them before using them. News and sport photographers on a tight schedule may choose JPEG because of the quick turnaround. Anyone who almost always gets the exposure right in the camera and doesn't need the expanded processing capabilities that raw shooting provides can do well with JPEG images.

If you're a control freak, though, you'll want raw. Sometimes I think of JPEG as the equivalent of a frozen pizza, while raw is more like a home-made pizza. You'll have to do all the work if you make the pizza, but it will be exactly what you want with precisely the ingredients you prefer. Is speed and ease of use more important to you or do you prefer that home-made taste. Although I rarely shoot JPEG, I also never tell someone that raw is the only option. Cameras offer two modes and lots of settings for a reason, after all.

Shoot Raw and You'll Have to Do Your Own Processing

Normally, I use Lightroom and Photoshop for photo editing and Adobe's Photographic plan ($10/month for both applications, Adobe Camera Raw, and Bridge) is a bargain. There are other applications. Both Alien Skin's Exposure X3 and On One's Photo Raw have thousands of satisfied users. But if you really want to examine what happens when raw images are processed, taking a look at the open source Raw Therapee would be worthwhile. Where Lightroom, Exposure X3, and Photo Raw are all like driving an automobile with an automatic transmission and Photoshop is more like driving a car with a stick shift, Raw Therapee is more like having the automobile delivered in parts with instructions for how to assemble it. In this regard, it's much like many other open source applications.

Let's take a look at it.

Press ESC to close.Now it's time to consider possibly the second most important bit of information about digital image files: Raw file formats are proprietary and no image editor can write changes back to the raw file. Lightroom stores information about changes in a catalog files and most other applications use sidecar files (small additional files) to store that information. As a result, most changes to raw files are non-destructive and you can always get back to the original image. JPEG files can be edited directly, but writing changes back to the file will trigger another round of compression and further degrade the file. When editing a JPEG, the edited file should always be saved as a TIFF or PSD file so that the original file from the camera is not changed.

Although you can open a JPEG file using a raw file editor such as Raw Therapee, Adobe Camera Raw, or Lightroom, the types of changes you can make are quite limited. It's possible to recover highlights in overexposed areas of a raw file, but this isn't an option for JPEG files. Those who used color slide film will recognize this problem because detail, once lost on a color slide, could never be recovered.

Adobe Camera Raw and Lightroom are much easier to use than Raw Therapee, but Raw Therapee gives users some insight into the process of modifying an image created from a raw file. Adobe products use a proprietary demosaicing process while Raw Therapee allows the user to select specific demosaicing processes and then fine-tune the choice. That's a highly technical consideration that most people will never need and I've mentioned it only as an example of the ability to modify a program's operation. Making changes here without knowing what you're doing would be unwise.

Press ESC to close.It's possible to open Lightroom as a new user and figure out how the basic controls work. That's not a good idea with Raw Therapee. You'll want to have the on-line manual open and use it as you work through your first few images, keeping in mind that you cannot damage the raw file.

Notice that the loaded image doesn't look like the thumbnail. The thumbnail is a JPEG image that the camera created and included in the raw file, so it has all of the JPEG processing. The raw image is just that -- the raw image -- and it will appear to be disastrously pixelated when you open it the first time. Don't worry. Read the manual.

Raw Therapee is more like Lightroom than like Photoshop because it's intended to make overall modifications to an image, along with some localized modifications. It does not offer pixel-level editing as found in Photoshop. If you consider yourself to be a computer geek, you may love Raw Therapee because of the astonishing number of adjustments that are possible and because of the customizations you can add. This would not be a good choice if you're new to digital photography or if you dislike reading long manuals to figure out how a program works.

But for those who want to examine what's going on in the background, this might be just the application for you.

Why "raw" in lower case but JPEG in caps?
It's not uncommon to see "RAW" used, but that's incorrect because the word simply denotes a type of file -- like a large ball, a small ball, or a red ball. JPEG, on the other hand is an acronym, a term created from the intial letters of the group it stands for, the Joint Photographic Experts Group -- like FAQ (frequently asked questions) or MOMA (Metropolitan Museum of Art). Not all acronyms are capitalized: Radar (radio detection and ranging) and Nato/NATO (North Atlantic Treaty Organization). In the United States, the term is generally "NATO", but is often styled as "Nato" in Europe.

Short Circuits

Adobe Photoshop Version 19.1 Improves Masking

Adobe's monthly update for Photoshop adds a blockbuster feature that was shown in a sneak peek a few months ago. Select Subject creates a starting point for selection of the main subject in an image with just a single click. It uses Adobe Sensei, the artificial intelligence system Adobe has been working on for a while.

Image selection is used when there is a need to move the subject from one image to another or to remove the background. It's always a time-consuming process that requires the use of several tools: Magic Wand, Quick Selection, Marquee Select, and Lasso (and the Polygonal and Magnetic options). Once the basic selection has been made, the user needs to use a variety of other tools to refine the edge.

Press ESC to close.Press ESC to close.Select Subject doesn't eliminate all the work, but it automates the process of creating the initial selection. The most difficult subjects are those with hair and fur -- in other words, anything with an edge that isn't clearly defined and has a lot of fine detail. Select Subject does a remarkably good job even with these difficult subjects and, by automating the initial selection, it allows the user to start work on the refinement process earlier. And, if the subject has clearly defined edges, refinement might not even be needed.

There's also a new slider that allows the user to control the amount of decontamination applied to an image. Edges often have color casts as a result of colors in the background and removing these has always been a challenge. This speeds the process.

Because computers, particularly notebook and tablet models, are now being sold with high-resolution monitors, text in menus and elsewhere on the user interface often looks too small. The Windows 10 Creator's Edition now offers a full range of choices for UI scale factors from 100% through 400% and Photoshop can now automatically adjust itself based on the user's Windows settings.

These are the kinds of changes that help users immediately and it's one of the primary advantages of a continuous-update system.

Reports of the PC's Demise are Premature

Worldwide, 260 million computers were sold in 2017. That's a decline of 2 tenths of a percent from 2016 sales. That could be further proof that desktop, notebook, and tablet computers are doomed to be replaced by phones. But consider the final quarter of 2017.

October through December sales were 70 million 600 thousand units and that's an increase of about 7 tenths of a percent from the final quarter of 2016. That's not a big increase, but it's the first increase in more than half a decade.

As useful as mobile phones are, there's still a need for their larger cousins -- tablets, notebooks, and even workstations. Those who need more processing power and particularly those who need more storage still need more than phones.

Computer analyst IDC says the market is still weak, but it seems to be stabilizing. Companies that have delayed buying replacements for aging computers are buying again. In addition, consumer purchases are increasing, too. At the recent Consumer Electronics Show in Las Vegas, several manufacturers showed new PC models that work with Amazon Alexa.

High-end laptops and convertible (2-in-1) devices that can be tablets or laptops were being promoted this year,too. About a year ago, I replaced a desktop Windows computer with a notebook computer that's connected to more than 8TB of external storage and a Macbook Pro. The two notebook computers consume less space and less power than the desktop system did.

Power users such as photographers and video editors are migrating to notebook computers, too. New systems promise much longer battery life and desktop-like computing power, but with high portability. IDC notes that these changes have energized the PC market, but still characterizes the market as "challenging".

IDC says Hewlett Packard sold the most units (just under 59 million) and Lenovo was second (about 55 million), then Dell (42 million), Apple (20 million), Acer (18 million), and ASUS (17 million). All other vendors combined sold about 50 million units.