gpt4 book ai didi

image-processing - 使用 leptonica 进行 OCR 图像处理(反色文本)

转载 作者:行者123 更新时间:2023-12-03 23:46:19 24 4
gpt4 key购买 nike

我正在尝试使用 leptonica 处理以下图像以使用 tesseract 提取文本。

原始图片:
original image

原始图像上的 Tesseract 产生以下结果:

i s l
D2J1FiiE-l191x1iitmwii9 uhiaiislz-2 Q ~37
Bottom linez
With a little time!
you can learn social media technology
using free online resources-
And if you donity
youlll be at a significant disadvantage
to
other HOn-pFOiiTS-

不是很好,尤其是顶部背景。因此,使用 leptionica 我使用背景去除算法(模糊、差异、阈值、反转)来获得以下图像:
processed image

但是 tesseract 并没有很好地处理它:
@@r-mair lkrm@W lh@w ilr@ mJs@ iklh@ ii@c2lhm1@ll
mm Mime
VWU1 a Mitt-Jle time-
@1m ll@@Wn Om @@@lh1
using free onhne resources-
Andifyoudoni
9110 ate a $0 D
to other non-profrts
I

主要的问题似乎是,现在所有的文本都是轮廓而不是实体。我如何调整我的算法或者我可以添加什么来使文本变得坚固?

最佳答案

看来this paper提出了一种解决您问题的二值化方法:

T Kasar、J Kumar 和 A G Ramakrishnan。 Font and Background Color Independent Text Binarization . (2007)

Kasar etal method performance

关于image-processing - 使用 leptonica 进行 OCR 图像处理(反色文本),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11678542/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com