Lightroom/Camera Raw: Artifacts on edges caused by clarity

  • 1
  • Problem
  • Updated 3 years ago
  • Solved
  • (Edited)
I noticed some unpleasent artifacs on hard edges in many of my raws captured with Sony. They seem to appear as soon as the clarity value is raised.

Here is an example:



And enlarged:



When leaving the clarity at 0 there are no artifacts visible:



The raws were captured with a Sony A7II camera (uncompressed). I do not know if these artifacts only occur with Sony raws or also with raws of other manufacturers.

Note: I already posted about this issue here https://forums.adobe.com/thread/20652...
Photo of Bastian Weber

Bastian Weber

  • 7 Posts
  • 0 Reply Likes
  • displeased

Posted 3 years ago

  • 1
Photo of Steve Sprengel

Steve Sprengel, Champion

  • 2656 Posts
  • 341 Reply Likes
Please supply a sample raw file that can be used to test the issue. Upload to somewhere like www.dropbox.com and post a public share link to it, here.
Photo of Bastian Weber

Bastian Weber

  • 7 Posts
  • 0 Reply Likes
I uploaded an example raw file here:

https://drive.google.com/file/d/0B5U6...
Photo of Steve Sprengel

Steve Sprengel, Champion

  • 2656 Posts
  • 341 Reply Likes
I've notified Adobe of this issue and included your example file along with a link to this discussion. We'll have to see if they can do anything about it in a subsequent release.

You can mitigate the issue to some degree at least in this example photo by using a large, very-feathered adjustment brush that has a large amount of negative clarity applied, thus reversing the clarity along the edge. The large feather and large brush are needed so the edge of the reversed Clarity area isn't obvious.
Photo of Todd Shaner

Todd Shaner, Champion

  • 1111 Posts
  • 359 Reply Likes
I can duplicate the same edge-artifacts with Clarity set to 0. This appears to be edge-aliasing at the raw data sensor pixel level. Other than using settings that don't exacerbate the aliasing there isn't much else that can be done. RawDigger DCRAW demosaic shows the same aliasing.



Photo of Robert Cullen

Robert Cullen

  • 157 Posts
  • 44 Reply Likes
I think you are seeing Chromatic aberration.
Even the image without clarity shows a yellow fringe. Clarity is just making it more obvious.
Before Clarity, open Lens Correctons Panel > Basic and check 'on' Remove chromatic aberration.

Before-


After-
Photo of Steve Sprengel

Steve Sprengel, Champion

  • 2656 Posts
  • 341 Reply Likes
Turning off and on CA doesn't affect what I see for edge artifacts:

Photo of Bastian Weber

Bastian Weber

  • 7 Posts
  • 0 Reply Likes
@Todd Shaner: You are right. It also happens in connection with the Shadows and Highlights settings. So it is not just a Clarity problem. Maybe it has something to do with the demosaicing.

However, I still think that this is not working as it's supposed to and Adobe should do something about it. I tried Capture One and set Shadows, Highlights, Clarity and Structure to the maximum. The result looks much better. There are some halos and also a bit of aliasing is introduced, but I think it is not more than you would expect from such exaggerated settings:


(Capture One output)

Although the edge becomes a bit jaggy, there is no trace of the strange artifacts ACR produces.

@Robert Cullen: I think you are referring to something else. I don't think it has anything to do with Chromatic Aberration.
Photo of Todd Shaner

Todd Shaner, Champion

  • 1111 Posts
  • 359 Reply Likes
The RawDigger TIFF does show slight CA in that area with Remove Chromatic Aberration unchecked, but not in the ARW. Looking further from the image center the CA is more pronounced. It's very obvious that the LR demosaic process is performing CA removal. It may in fact be causing the aliasing jaggies.
(Click on image to see full-size.)
Photo of Steve Sprengel

Steve Sprengel, Champion

  • 2656 Posts
  • 341 Reply Likes
If you look at the bottom of the Lens Corrections Profile area, you'll see that there is a built-in, always-on lens profile being applied that specifically removes CA in Adobe's rendering.

And if you zoom in on the gas tank edge in RawDigger you can see there are alternating columns of red and blue pixels that Clarity (and other adjustments with similar effect) accentuate the differences between.

It looks like the camera doesn't have an anti-aliasing optical filter and maybe Adobe's toning algorithms need to be tuned to not accentuate differences that are quite so small and not pick up the difference in red and blue pixels. It could also be that the toning algorithms aren't using the right red, green, blue weights for computing luminance map of the image their toning adjustments are manipulating.
Photo of Todd Shaner

Todd Shaner, Champion

  • 1111 Posts
  • 359 Reply Likes
You are correct. The RawDigger TIFF shows the same aliasing with Remove CA checked or unchecked, so strictly an aliasing issue.
Photo of Bastian Weber

Bastian Weber

  • 7 Posts
  • 0 Reply Likes
Well, it might indeed be connected to that, but I suppose only the devs can find out for sure.
Photo of Steve Sprengel

Steve Sprengel, Champion

  • 2656 Posts
  • 341 Reply Likes
If you look at the top, this discussion is marked with an In Progress status by Adobe so they've seen something and appear to be working on it.
Photo of Bastian Weber

Bastian Weber

  • 7 Posts
  • 0 Reply Likes
Another thing that I would like to add: If I change the process version from 2012 to 2010, the artifacts disappear.
(Edited)
Photo of Steve Sprengel

Steve Sprengel, Champion

  • 2656 Posts
  • 341 Reply Likes
But with 2010 there is a line along the edge, instead:



This thread is still marked as In Progress.
Photo of Bastian Weber

Bastian Weber

  • 7 Posts
  • 0 Reply Likes
Yes, indeed. However, that looks different than the aforementioned artifacts. But that's probably also not how it should be.
Photo of Steve Sprengel

Steve Sprengel, Champion

  • 2656 Posts
  • 341 Reply Likes
Of course it looks different--the toning model changed in PV2012 with attention to how edges are handled with Clarity and other toning adjustments that affect some areas more than others.  The point is that the demosaicking problem may still be there, just manifesting differently.  For one thing switching to PV2010 from PV2012 starts with Clarity = 0 because the two Clarity settings aren't interchangeable so maybe the problem "went away" because Clarity2010 was zero.
Photo of Todd Shaner

Todd Shaner, Champion

  • 1111 Posts
  • 359 Reply Likes
PV2010 is adding its own "flavor" of edge-artifacting, which is clearly different than PV2012 Clarity. Whether Adobe Engineering can "modify" the ARW demoasicing routine to "fix this issue is still listed as "In Progress." Many of the newer camera models are being offered with low-pass filters (LPFs) removed or cancelled. I downloaded some Canon 5Ds CR2 files and can see the same artifacting with Clarity 35 and higher. Some of my Canon 5D MKII CR2 files exhibit similar artifacting above 50 Clarity, which I never use!

To be honest I prefer the PV2010 Clarity behavior over PV2012. With the switch to PV2012 I rarely use higher than Clarity 25. When I do it's because of low contrast in the image due to fog, etc. The new Effect> Dehaze slider does a much better job for this purpose. Try using the Dehaze slider with a lower Clarity setting to achieve the look you want.
Photo of Todd Shaner

Todd Shaner, Champion

  • 1111 Posts
  • 359 Reply Likes
Here's  a try at creating the same toning and color with Clarity +35 and Dehaze +35:

Photo of Bastian Weber

Bastian Weber

  • 7 Posts
  • 0 Reply Likes
Whether clarity is above or below 50, the artifacts are always there. They might just not be as strong. And as you mentioned before, also other options introduce them, like for example "shadows".

I by the way also noticed these artifacts on raws of my old Pentax K100D if I switch them to process version 2012.

Well, I never really got to like dehaze. It might work well for images that are really foggy/hazy but apart from that I find it quickly introduces clipping in the blacks. On top of that it's currently not available to people who purchased Lightroom 6. Clarity does do something different and it can be very useful for many images, at least if applied moderately. Yet I have to say that I would also have appreciated it if the old clarity option had been maintained; it really just is something differnt. Or, as an alternative, Lightroom should start offering a real unsharp mask filter with radii above 3.5px and that allows multiple ones ones to be applied on top of eachother. However, this is kind of off-topic.