Stains on images captured with AVFoundation

97 Views Asked by At

When capturing a photo using AVFoundation classes stains appear on certain areas of the image.

Happens on iOS 14.4, iPhone 12 Pro. I managed to reproduce it using different custom ISO and exposure time settings and using the default auto setting. Both for single photo and bracket captures. Both with maxPhotoQualityPrioritization set to quality and to balanced. Both with ultra wide angle and wide angle cameras.

It's not deterministic. Seems like it is most prominent in images with high light contrast and different light sources (where the natural light mixes with artificial light and some areas are more lit than others). Also more prominent when capturing multiple images using bracket settings with both negative and positive exposure biases. example image

Does anybody know any fix or a workaround for this?

1

There are 1 best solutions below

1
On

What you describe as "stains" look like areas that are "blown out" (Areas where one or more color channels is at maximum and all detail is lost. This is known as "blown highlights" in photography.) This creates blobs of a solid color where there is a loss of all detail.

In your case, it looks like the "stains" are completely blown in all 3 color channels.

If you use Photoshop you can display a histogram of the image, as well as a mode where areas that are oversaturated are shown in red.

See this link, for example, for a description of how to do that.