I have a Pentax K-S2 and whenever I use the A-HDR (advanced HDR) mode, the pictures come out with this strange halo around the edges of objects. Is this normal?
-
1\$\begingroup\$ Related: How to avoid these artifacts around cables in HDR? and Removing glow from behind and around trees. There are quite a number of other existing questions/answers that show up if you search the site for "halo". \$\endgroup\$– Michael CCommented Aug 8, 2022 at 8:50
2 Answers
Is it normal? Yes… and no.
It depends on the ability/quality of the HDR routine and its ability to recognise & correctly handle edges where the overall light level changes rapidly.
A low-ability algorithm will leave this halo to a greater or lesser extent - it's pretty much the trademark of poor HDR. This is an area where modern phones are beating regular cameras hands-down. They can form very well-defined masks to separate these contrast edges & the results are getting close to invisible.
For a DSLR etc, the best way to do this is actually in post, in Photoshop or a dedicated HDR app such as Aurora HDR [which I just learned is discontinued - the functionality has now been folded into Luminar Neo]
Some examples [chosen not by its inspiring subject matter but just because I rarely take photos that include sky;)… The processing was done on a small jpg not the original file, to make the results worse.
Photoshop, with the borders set intentionally high and overall settings to emphasise the bad edges. Clear halo. [Photoshop can do a lot better than this, but is not as good as dedicated software]
Aurora, at default settings, very slight halo
Aurora with intentionally aggressive settings, reasonably acceptable halo for the settings
AI-based algorithms will tend to improve on these results as they are developed further. My versions of Photoshop & Aurora are pre-AI. Newer software is likely to be better still.
The Halo effect you are seeing is the result of Unsharp masking (USM) imo. It seems likely your camera's A-HDR mode runs the photo through a faily intense USM. Many devices try to emulate HDR images using post-processing filters like this, however as you can see the results often have noticable drawbacks.
On a side note: If you want the highest dynamic range you're better off getting your cameras exposure and white-balance well adjusted for the scene and editing the RAW image manually.
-
\$\begingroup\$ No, these artifacts have nothing to do with USM. \$\endgroup\$– jarnbjoCommented Aug 8, 2022 at 19:01
-
1\$\begingroup\$ @jarnbjo many HDR are generated using various Tone-Mapping algos which are very closely related to Unsharp Masking, in fact some do just run a large-radius unsharp mask. \$\endgroup\$ Commented Aug 9, 2022 at 0:12