A Text Detection Algorithm Based on Local Haar Binary Pattern with Multi-scale Directional Filtering

Pengfei Xu, Hongxun Yao, Rongrong Ji, Jicheng Wang, Xiaoshuai SunJournal of Image and Graphics 2010

Abstract

Complex lighting conditions and the fusion of text with backgrounds are primary challenges in natural scene text detection. This paper presents a text detection algorithm based on Local Haar Binary Pattern (LHBP) and Multi-scale Directional Filtering (MDF). The algorithm utilizes an LHBP texture descriptor, which is insensitive to light intensity variations and explicitly describes text features. Candidate text regions are identified using MDF on the LHBP patterns. Finally, a Support Vector Machine (SVM) based on LHBP histograms is employed for precise localization. Experimental results demonstrate that this approach effectively mitigates the impact of complex lighting and background interference, outperforming several mainstream algorithms.

Introduction

Detecting text in "wild" environments—such as street signs, storefronts, or cluttered indoor scenes—remains a significant computer vision challenge. While human perception handles these tasks effortlessly, algorithms often struggle under harsh lighting or when text blends into complex backgrounds. Traditional methods generally fall into three categories: edge-based, connected component-based, or texture-based. Edge-based methods often fail in low-contrast scenarios, while connected component methods are sensitive to noise that breaks character strokes. Texture-based methods offer more robustness but frequently fail under non-uniform illumination or when faced with "text-like" background noise.

Methodology

The proposed system addresses these issues through a three-stage pipeline: LHBP transformation, Multi-scale Directional Filtering (MDF), and SVM refinement. The integrated workflow, including the offline training of the classifier, is shown in Figure 1.

System architecture showing online detection and offline training phases.

The LHBP Operator

Standard Local Binary Patterns (LBP) are often sensitive to noise and local intensity shifts. The Local Haar Binary Pattern (LHBP) improves upon this by replacing raw pixel comparisons with Haar wavelet coefficients. By calculating differences in high-frequency energy across scales, the descriptor captures structural text features while ignoring the "DC component" (overall brightness). This ensures that the binary relationship remains stable even as lighting conditions fluctuate.

Multi-scale Directional Filtering (MDF)

Human-written text is characterized by strokes in specific orientations (horizontal, vertical, and diagonal). The MDF stage exploits this prior knowledge by applying a set of filters to the LHBP data. A sliding window identifies a "candidate" region only if it exhibits strong texture in at least two of the four primary directions. This effectively prunes non-text background noise, such as isotropic textures or unidirectional patterns like fences. Figure 2 illustrates the result of this multi-scale decomposition on a sample image.

Multi-scale directional decomposition of a sample text image.

SVM Refinement

Candidate regions are finally validated using an SVM classifier. The algorithm extracts a histogram of LHBP values from the candidate area, which serves as a statistical signature. The SVM, trained offline on a diverse set of text and non-text samples, provides the final precise localization.

Experimental Results

The algorithm was evaluated on the ICDAR 2003 robust reading dataset, which includes 249 test images with 1,127 labeled text regions. The LHBP approach achieved a Precision of 0.59 and a Recall of 0.79, resulting in an F-measure of 0.68. This significantly outperformed standard LBP methods (F-measure of 0.21) on the same dataset. Furthermore, the system processed images at a rate of 5.3 frames per second, demonstrating its potential for near real-time applications.

Conclusion

By combining the illumination-invariant properties of Haar wavelets with the geometric constraints of directional filtering, the proposed algorithm offers a robust solution for scene text detection. Future work will focus on achieving rotation invariance through multi-point circular sampling to handle tilted or curved text layouts.

Reference: Xu, P., Yao, H., Ji, R., Wang, J., & Sun, X. (2010). A Text Detection Algorithm Based on Local Haar Binary Pattern with Multi-scale Directional Filtering. Journal of Image and Graphics, 15(8).

Summary updated

BibTeX
@article{xu2010text,
  author = {Pengfei Xu and Hongxun Yao and Rongrong Ji and Jicheng Wang and Xiaoshuai Sun},
  title = {{A Text Detection Algorithm Based on Local Haar Binary Pattern with Multi-scale Directional Filtering}},
  journal = {Journal of Image and Graphics},
  year = {2010},
  doi = {10.11834/jig.20100806},
}
Figure