Defocus blur is extremely common in images captured using optical imaging
systems. It may be undesirable, but may also be an intentional artistic effect, thus it can
either enhance or inhibit our visual perception of the image scene. For tasks, such as
image restoration and object recognition, one might want to segment a partially blurred
image into blurred and non-blurred regions. In this project, we propose a sharpness
metric based on the the Local maximum edge position octal pattern and a robust
segmentation algorithm to separate in- and out-of-focus image regions. The proposed
sharpness metric exploits the observation that most local image patches in blurry
regions have significantly fewer certain local binary patterns compared with those in
sharp regions. Using this metric together with image matting and multiscale fuzzy
inference, this work obtained high-quality sharpness maps. Tests on hundreds of
partially blurred images were used to evaluate our blur segmentation algorithm and six
comparator methods. The results show that our algorithm achieves comparative
segmentation results with the state of the art and has high speed advantage over others.
Keywords: Edge position, Fuzzy systems, Maximum, Octal patterns.