【问题标题】:Java OCR to detect Sudoku grid digitsJava OCR 检测数独网格数字
【发布时间】:2013-03-29 07:38:10
【问题描述】:

我使用 Tess4j 进行光学识别,它几乎适用于我提供给程序的图片。我将数独扫描网格切割成 81 个盒子。但是,当我取一个包含数字的正方形时,Tess4j 无法检测到该数字。我不知道为什么,数字在白色背景上是黑色的。谁能帮帮我?

感谢您的回复!

【问题讨论】:

    标签: java ocr tesseract


    【解决方案1】:

    您可以尝试 Tesseract 必须获得的各种页面分割模式 (PSM) 以获得最佳结果。

    pagesegmode values are:
    0 = Orientation and script detection (OSD) only.
    1 = Automatic page segmentation with OSD.
    2 = Automatic page segmentation, but no OSD, or OCR
    3 = Fully automatic page segmentation, but no OSD. (Default)
    4 = Assume a single column of text of variable sizes.
    5 = Assume a single uniform block of vertically aligned text.
    6 = Assume a single uniform block of text.
    7 = Treat the image as a single text line.
    8 = Treat the image as a single word.
    9 = Treat the image as a single word in a circle.
    10 = Treat the image as a single character.
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-04-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-12-02
      • 2013-11-10
      相关资源
      最近更新 更多