提出一种基于粒子群优化算法和小波变换的无限制文本倾斜检查方法.首先对扫描的文本图像进行小波变换,然后利用小波变换的水平细节子带提取反映图像倾斜的特征,作为粒子群优化算法的适应度函数.最后利用粒子群优化算法在一90°到90°区间进行搜索,得到准确的倾斜角度.由于采用了小波变换,一方面降低了PSO搜索的计算量,又能更好地反映倾斜特征.实验结果表明,该方法能快速准确地检测出各类文本图像的倾斜角度,并具有很好的适应性,不受语言、字体、字号和非文本图形等因素的影响.最后还讨论了粒子数目、迭代次数和适应度函数对算法性能的影响.
A new unconstrained skew detection method based on wavelet decomposition and particle swarm optimization (PSO) was proposed. Document skew detection is necessary for most document analysis system. The scanned document images were firstly decomposed using discrete wavelet transform(DWT). Then the variance of projection profile of the horizontal sub-band was used to evaluate the fitness function of PSO. Finally, the PSO was used to find the correct skew angle in the whole searching space from - 90 to 90 degree. The adoption of DWT reduced the search load of PSO and improved the search results of skew angle. Experiment results have proved that the proposed method can rapidly and accurately detect the skewed angle of kinds of documents, and it is language fonts,size of fonts, and non-textual graphical elements independent. Moreover the effect of various number of particles, number of iterations and the different fitness function on the detection performance was discussed.