Is there any strategy to detect the region of an image that is sharp and in-focus, in order to separate the out-of-focus background? I've tried using edge detection methods but without any success.
In other words, is it possible to determine if an area of an image is blurred (out of focus) or not?