How to use OpenCV+Tesseract for accurate Text recognition in Android?

前端 未结 1 715
遥遥无期
遥遥无期 2020-12-14 05:05

I am trying to use OpenCV (Android) for processing image taken using camera and then pass it to Tesseract for text (digits) recognition but am not getting good results till

相关标签:
1条回答
  • 2020-12-14 05:27

    You can isolate/detect characters in images. This can be done with powerful algorithms such as the Stroke Width Transform.

    The following steps worked well with me:

    1. Obtain grayscale of image.
    2. Perform canny edge detection on grayscale image.
    3. Apply gaussian blur on grayscale image(store in seperate matrix)
    4. Input matrices from steps 2 & 3 into SWT algorithm
    5. Binarize(threshhold) resulting image.
    6. Feed image to tesseract.

    Please note, for step 4 you will need to build the c++ library in the link and then import into your android project with JNI wrappers. Also, you will need to do micro tweaking for all steps to get the best results. But, this should at least get you started.

    0 讨论(0)
提交回复
热议问题