Pages

Saturday, September 7, 2024

Confusing Concepts - Digital Image "Sharpness"

HOPEFULLY, THIS final installment of my 3-part series will tie some things together. The concepts of resolution, diffraction, and image sharpness are integrally related, and difficult to discuss separately, even though I have attempted to do so. In my view, the last concept is the most important. If an image looks acceptably sharp, I normally do not care how it is effected by the other two concepts. They are still part of the equation, though. In my own photography, I try to achieve sharpness in the parts of the image that I think should be sharp. That doesn't mean every photo must be sharp across the entire image. In some cases, we are purposely trying to have parts of the image remain out-of-focus. Also, in the very rare case, we may not want any part of an image to be in sharp focus.

There is no perfectly "sharp" digital image

THE MOST common approach, though is to try to ensure that our photographs are in sharp focus. What does that mean, though? As I have noted here in the past, lack of sharp focus will usually ruin an otherwise nice photograph. In the numerous times I have discussed "sharpness" here, I have often described the concept as apparent sharpness.

WHY DO I call it "apparent?" There is no perfectly "sharp" digital image. There are many things that influence our perception of sharpness in a digital image, including contrast, viewing distance, focus, camera and/or subject movement, lens quality and design, image sensor size and design, and of course, resolution, and diffraction.

The concepts of resolution, diffraction, and image sharpness are integrally related

THERE IS a more fundamental element that goes to the heart of "apparent sharpness:" the way a digital image is recorded and displayed. Most of us remember a little bit of computer-programming science from way back, and are familiar with the way a computer compiles information in "bits and bytes," or 1's and 0's. That is the same basic building blocks that make up digital images. They start out as black and white 1's and 0's, which are recorded and as they accumulate, they stack against each other, to create shape. The "line" we see that creates the outer outline of detail in an image is created by contrast between these "pixels." The contrast is created by a black and white pixel opposite each other. Now that is really a kindergarten (maybe even pre-school) explanation, but it is probably the best I am qualified to do.

There are many things that influence our perception of sharpness

IN THE first installment in this series ("Resolution"), we introduced two filters that are used in the above process. By the time our final recorded image is made, the light rays must pass through a lens (which almost always a series of glass lenses constructed together to "bend" the light a certain way), whatever filter(s) we might be using in front of the lens, an "anti-aliasing" filter, and a (color) Bayer filter. All that glass in front of the sensor means we are going to have some inherent softness in any digitally recorded image. If we want color images, there is no avoiding the Bayer (or some other substitute) filter. We can, however, exert some control over the other physical elements. Many (if not most) newer cameras no longer use the anti-aliasing filter. When I selected my own Sony a7rii, I did so in large part due to Sony's purposeful exclusion of an anti-aliasing filter on their "r" versions. That does introduce another potential issue (moire) which is normally easily fixed by the photographic approach and with post processing. I have said many times here that I only rarely put a filter on the front end of a lens. My thinking is that I don't spend the money on quality glass, just to put another piece of glass on the front of it that will surely effect the image quality. I applied the same reasoning to the anti-aliasing filter.

NO MATTER what, though, the other factors above are going to result in some softness of an image. Our goal is to obtain as much apparent sharpness as possible. One way to do that is to create more well-defined contrast between pixels along the edges of an image. Generally, this means making the contrasting blacks more pure black and the whites more pure white. Every software sharpening process involves an increase in contrast along those edges. There is a lot of nuance to the process. For years, sharpening in Photoshop was a process of almost alchemy. The generally agreed best tool in the drawer at the time was called (ironically) "unsharp mask." That goes back to a traditional wet darkroom masking process that is not only beyond the scope of this blog, but beyond my ability to explain. 😅 For me (and plenty of others, I am sure), using the "unsharp mask" was mostly trial and error. The trick was to make the adjustments subtle, or your "sharpened" image could become a ghastly looking mess.

All that glass in front of the sensor means we are going to have some inherent softness in any digitally recorded image

OF COURSE most of us are working with color and of course there are many images where the edges do not consist of pure black and white pixels. Often, we do not want the pixels in between (which we usually refer to as mid-tones) to have high contrast, and part of the "unsharp mask" alchemy was adusting so only the parts we wanted to sharpen were effected. Left to their own mischief, sharpening tools can not only effect an image's apparent sharpness, but they can also introduce color casts. One approach to this was to sharpen in just one of the color channel which make up the rgb color image; a channel which contained only brightness information and no color information (the "Luminosity" channel). Applying this to selected portions of the image required some skill that not all of us found easy to master. Thankfully, some of those who did - and were really good at it - provided us with some pre-made masking tools. In the early 2000's, a photographer named Tony Kuyper made the luminosity mask popular by offereing his Photoshop Actions for a very reasonable nominal cost. I have them somewhere, but never really mastered them - though I know some others who have.

I DID spend an awful lot (too much) of time studying and trying to master the art of sharpening on my own. The best (and still seminal, in my opinion) text resource is "Real World Image Sharpening," an Adobe Photoshop and Light Room focused book, written by (the late) Bruce Fraser, and Jeff Schewe (two of my favorite digital processing authors). It is a $50 purchase on Amazon, so it is not inexpensive. Nor is it "Readers Digest" level reading. If you like technical "under the hood" stuff (I do), it is a fascinating read. Fortunately, there have been some folks (including Fraser and Schewe themselves) who have - over the years - provided us with a relatively easy to use pre-programmed version of their handi-work. Today, most software post-processing programs contain sharpening utilities. Some are better than others. Years back we didn't have the number of post-processing choices. In  2009, PK Sharpener was introduced by a company called Pixel Genius, founded by Fraser, Schewe, Seth Resnick, and a few other known Photoshop gurus (interestingly, the Nik collection contained Nik Sharpener Pro and was brought to market in 2006 - but I had not yet been introduced to Nik at that time). Like Photoshop itself, most of the utilities in the package were beyond my needs (and ability to understand). But what I could use, did a better job than I had ever been able to do before. A couple years back, I did some of my own empirical experimentation between the Nik and PK Sharpen. I found the differences to be "nuanced." I ultimately stayed with the PK Sharpen program (which I believe is no longer available). The point is that we don't have to become "under-the-hood" sharpening experts, as that has been done for us and incorporated into virtually every software out there today. The Nik and PK software can be easily loaded as "plugins" to Photoshop and Lightroom (how and if they work with other software, I don't really know).

WHAT ALL this work done by the experts on digital processing has given us is a nice collection of tools to achieve the most "apparently sharp" images we can with our own recorded digital images. In their Real World book, Fraser and Schewe brought a sharpening process to light. There are "recipes" in the appendix of the book for Photoshop Actions that will accomplish the process they espouse in the book." I don't know if very many people even write their own actions anymore. But if you are that type, it may be worth the $50. Their process, the one that seems to be the accepted approach today, posits that sharpening should be done in three separate phases or steps. The first phase is what they referred to as "pre-sharpening," and is (mostly) applied to raw files to account for the issues I spoke about above that were created by the lens and sensor filter issues. Every raw image converter I know of contains a pre-sharpening algorithm. In my "empirical" testing above, I concluded that the Adobe Raw Converter "default" sharpening tool does as well as any of the others (including my PK Sharpener), and so I leave it at its default setting (25%) to save myself the step of presharpening in my workflow. If you prefer a more "hands-on" approach, the setting can be set to zero. I put "empirical" in quotes because - of course - there is going to be some subjectivity in this analysis. It is what my own subjective conclusion is, but you should probably do your own.

THE SECOND phase of sharpening is best done, in my view, with a more "hands on" approach. It is sometimes referred to as "Targeted Sharpening." Targeted sharpening can be applied globally to an image, or to just select parts of it. Some images benefit from only sharpening certain areas. Shadow areas often won't benefit from sharpening, and sharpening them can sometimes make the image worse, as the sharpening "highlights" unwanted noise in the image. In some images with areas of of shallow depth of field, we want to leave them out of focus and unsharp purposefully, while sharpening other parts of the image that we want to be in critical focus. The beauty of the targeted phase is that we can use various masking techniques to selectively sharpen the image. This can be done manually, or some of the software has algorithms that do a pretty decent job of doing that for you.

FINALLY, WE should consider whether every image should be sharpened for "output." For many years, I made my own inkjet prints. There are major differences in the way an image is "projected" on a screen from the way it is printed with ink. Ink is laid onto paper in microspic droplets of colored pigment. Because they are liquid, even though microscopic, those droplets are going to have some "runout." They are also a reflective media, and as such, are going to be percieved visually very differently than projected media. I often found that I needed to apply much stronger sharpening to my print files. On screen, they would have an oversharpened look, but on paper, they were just right.

TODAY, WE have another new approach to sharpening denominated "AI" sharpening. This sharpening algorithm uses so-called artificial intelligence, using a memory bank of hundreds of thousands of images, to sharpen by replacing pixels with sharp(er) new pixels. Personally, I have not been as impressed with it as all the testimonials seem to suggest. I have tried it a couple times and have either felt it didn't live up to the hype, or it looked fake. I have consistently said you cannot fix a truly blurry image in digital processing. With AI, that view will undoubtedly change. I have seen so much "progress" with AI in just a couple short years. In my view, it is not there yet. But it is certainly worth keeping an eye on. It is coming.

No comments:

Post a Comment