LBP-Based Segmentation of Defocus Blur


Sharpness metric based on local binary patterns and a robust segmentation algorithm to separate in- and out-of-focus image regions

Platform : Matlab

Delivery : One Working Day

Support : Online Demo ( 2 Hours)

100 in stock

SKU: LBP-Based Segmentation of Defocus Blur Category:



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 sharpness metric based on 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 with 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.


DEFOCUS blur in an image is the result of an out-of-focus optical imaging system. In the image formation process, light radiating from points on the focus plane are mapped to a point in the sensor, but light from a point outside the focus plane illuminates a non-point region on the sensor known as a circle of confusion. Defocus blur occurs when this circle becomes large enough to be perceived by human eyes. In digital photography, defocus blur is employed to blur background and “pop out” the main subject using largeaperture lenses. However, this inhibits computational image understanding since blurring of the background suppresses details beneficial to scene interpretation. In this case, separation of the blurred and sharp regions of an image may be necessary so that post-processing or restoration algorithms can be applied without affecting the sharp regions, or so that image features are only extracted from in-focus regions.


The most commonly seen approach for defocus segmentation literature is via local sharpness measurement. There are many works in this area in the past two decades and most of them can be found in the image quality assessment field where images are rated by a single sharpness score that should conform to the human visual perception. These applications only require a single sharpness value to be reported for a single image, thus most of the measures only rely on sharpness around local edges [14], [29], [31] or some distinctive image structures determined in the complex wavelet transform domain [17]. Similarly, the line spread profile has been adopted for edge blurriness measurement in image recapture detection [46]. Since most of these metrics are measured around edges, they cannot readily characterize sharpness of any given local image content unless edge-sharpness is interpolated elsewhere as was done


LBP-Based Segmentation of Defocus Blur

LBP-Based Segmentation of Defocus Blur


  • Operating system – Windows XP/7.
  • Coding Language – MATLAB
  • Tool – MATLAB R 2012


  • System – Pentium IV 2.4 GHz.
  • Hard Disk – 40 GB.
  • Floppy Drive – 1.44 Mb.
  • Monitor – 15 VGA Colour.
  • Mouse – Logitech.
  • RAM – 512 Mb.


We have proposed a very simple yet effective sharpness metric for defocus blur segmentation. This metric is based on the distribution of uniform LBP patterns in blur and non-blur image regions. The direct use of the local raw sharpness measure can achieve comparative results to the stat-of-the-art defocus segmentation method that based on sparse representation, which shows the potential of local based sharpness measures. By integrating the metric into a multiscale information propagation frame work, it can achieve comparative results with the state-of-the-art. We have shown that the algorithm’s performance is maintained when using an automatically and adaptively selected threshold Tseg. Our sharpness metric measures the number of certain LBP patterns in the local neighbourhood thus can be efficiently implemented by integral images. If combined with real-time matting algorithms, such as GPU implementations of global matting [18], our method would have significant speed advantage over the other defocus segmentation algorithms.


[1] R. Achanta, S. Hemami, F. Estrada, and S. Susstrunk, “Frequency-tuned salient region detection,” in Proc. IEEE Conf. Comput. Vis. Pattern Recognit. (CVPR), Jun. 2009, pp. 1597–1604.

[2] H.-M. Adorf, “Towards HST restoration with a space-variant PSF, cosmic rays and other missing data,” in Proc. Restoration HST Images Spectra-II, vol. 1. 1994, pp. 72–78.

[3] T. Ahonen, A. Hadid, and M. Pietikäinen, “Face description with local binary patterns: Application to face recognition,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 28, no. 12, pp. 2037–2041, Dec. 2006.

[4] S. Bae and F. Durand, “Defocus magnification,” Comput. Graph. Forum, vol. 26, no. 3, pp. 571–579, 2007.

[5] K. Bahrami, A. C. Kot, and J. Fan, “A novel approach for partial blur detection and segmentation,” in Proc. IEEE Int. Conf. Multimedia Expo (ICME), Jul. 2013, pp. 1–6.

 [6] J. Bardsley, S. Jefferies, J. Nagy, and R. Plemmons, “A computational method for the restoration of images with an unknown, spatially-varying blur,” Opt. Exp., vol. 14, no. 5, pp. 1767–1782, 2006. YI AND ERAMIAN: LBP-BASED SEGMENTATION OF DEFOCUS BLUR 1637

Additional information

Weight 0.000000 kg


There are no reviews yet.

Be the first to review “LBP-Based Segmentation of Defocus Blur”

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.