【问题标题】:How to exclude special characters in tesseract?如何排除tesseract中的特殊字符?
【发布时间】:2016-05-09 09:21:14
【问题描述】:

我正在使用 tesseract 和 mcr.traineddata 从支票中读取 MICR 数字。 这是我要阅读的支票部分。

以下是从图片中检测到的部分文字。

我的问题是...... **如何从图像中排除特殊字符? 可以选择为特殊字符训练 tesseract 吗? **

除了特殊字符之外,其余的数字都被检测到了。

我的代码

    let tesseract = G8Tesseract()
    tesseract.language = "mcr"
    tesseract.engineMode = .TesseractOnly
    tesseract.pageSegmentationMode = .Auto
    tesseract.maximumRecognitionTime = 60.0
    imageView.image = imageView.image?.g8_grayScale()
    imageView.image = imageView.image?.g8_blackAndWhite()    
    tesseract.image = imageView.image
    tesseract.recognize()

【问题讨论】:

标签: ios objective-c swift ocr tesseract


【解决方案1】:

我创建了一个新的训练数据文件(my.traineddata)。我训练特殊字符被识别为'X'。我们使用的图像越多,训练的数据文件就越准确。然后我们可以对识别后的文本进行相应的操作。

【讨论】:

  • 你好。我面临同样的问题。你能帮忙吗?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2017-09-22
  • 2018-09-09
  • 2016-04-11
  • 1970-01-01
  • 1970-01-01
  • 2018-06-16
  • 2011-11-20
相关资源
最近更新 更多