Hi all,
I'm looking for a way to distinguish sharp areas in an image from those that exceed a certain amount of blur / "unsharpness". In HLSL.
More specifically, I want to detect / mask / mark the entire out-of-focus part of a photograph, or, vice-versa, its in-focus part.
So far I've tested several approaches dealing either with edge detection, or the overall-sharpness of images, but they all fail in properly and robustly masking areas with certain blur or sharpness.
I couldn't imagine that this would be such a hard task since the human eye can distinguish in-focus (sharp) from out-of-focus (blurred) areas of a photo quite easily.
Any ideas or hints?