Abstract

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 paper, we propose a sharpness metric based on LBP (local binary patterns) 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 of certain local binary patterns compared to those in sharp regions. Using this metric together with image matting and multi-scale inference, we 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 have big speed advantage over the others.

Fig. 1: Histogram of LBP patterns in three different patches which are sampled from blurred (A), sharp (B), and transitive (C) areas respectively. In the ground truth image, white denotes the sharp region and black the blurred region.

Fig. 1: Histogram of LBP patterns in three different patches which are sampled from blurred (A), sharp (B), and transitive (C) areas respectively. In the ground truth image, white denotes the sharp region and black the blurred region.

Downloads

[Paper (pre-publication version)], LBP-based segmentation of defocus blur: IEEE transaction on image processing (TIP), 2016

[Matlab Code]

Results

The following results are achieved by different blur detection methods. Final sharpness maps, prior to thresholding for segmentation, are shown. The original images are from the Blur Detection Dataset

Original image
Ground truth
Ours
mlbp
Shi15[20]
Vu[51]
Shi14[43]
Su[44]
Zhuo[57]
Zhu[56]