Detect in-focus regions of an image 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?
it is quite easy to measure the local max frequency in an image (at least as a low resolution mask, with some regularization).
Several papers of the MIT graphics group have been around detecting and processing from this kind of clue, with regular or coded aperture cameras.
e.g. Defocus Magnification and Image and Depth from a Conventional Camera with a Coded Aperture.