【发布时间】:2014-07-24 08:44:12
【问题描述】:
我正在使用leptonica进行清理和图像处理,然后将其传递给tesseract进行OCR。但是即使图像质量很高,它也无法识别字符。图像规格如下。
1 bpp, uncompressed, 1280 * 960 , 300dpi horizontal and vertical resolution
以下是我使用 leptonica 依次进行的图像处理操作
pixConvertTo8
pixBackgroundNormSimple
pixOtsuAdaptiveThreshold
pixContrastTRC {Regarding this - I am passing high values like 1.0 or even 5.0 but image doesnt really change}
pixFindSkew
pixRotate { rotate by angle found by pixFindSkew}
pixRotate90 {do this 4 times to read image in all 4 orientations}
pixClipRectangle {crop image}
Finally tesseract command
我在输出中得到垃圾字符。示例输入图像如下。
我得到的输出如下
Final K-1
II]
s h d | K-1 ,.,
(F°o.~?n‘i&1) 5/>.©12 mm E2‘;
Deparlrnenl of tho Treasury , ,
I 1 I l I
‘mama, Ravenuo SGMW For cnlundm your 201), ‘ " °F°$ "'100fTIO
or lax yum boqmnnnq 7 _ 20\Q_
‘ 7660
and ondmg _ W vv I go
Beneï¬ciary's Share of Income, Deductions,
cl'editS, etc. F 800 buck 01 loam nnd lnstruoflons»
___lnformatI0n About mo Estate or Trust
‘ Ordmary d|v|dm
i 12113
_
‘; Quahfmd dlVIdG
\ 8132
3 1
Net shun-term
A Estate's at trust's omgiuym ldonnlmnluon numbol
56-0987654
B Estate's u trust‘: namo
ESTATE OF MARTHA SMITH
0 Fiduc§ary's name, address, clly, smlu‘ and /IP codo
N01 long~lerm c
\ 24043
u
‘ 28% vale gann
Ti
Unreptumd 5
Omar porfloho 4
nonbuslness lfll
/\..4........ L. ._.._ ,.
我应该怎么做才能提高准确性。
第 2 部分:
我尝试关注this link。并创建了一个 eng.user-words.traineddata 文件和 bazaar.train 文件并尝试使用“bazaar”作为附加参数运行。但我得到“read_params_file:无法打开市场错误”。 有什么建议么?
【问题讨论】:
-
嗨@nnm,您是否获得了有关使用 tesseract 处理这些税务文件的进一步帮助?我们需要在我们的一个项目中实现相同的要求。
标签: image-processing tesseract leptonica