0

I want to be able to use tesseract to identify Scrabble letters. Right now, I am using an adaptive gaussian threshold and while the letters are looking nice, I cannot figure out how to remove the black area surrounding them.

Original Image enter image description here

image = cv2.adaptiveThreshold(image, 255, cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY, 11, 2)

I also have code that thins out the lines in order for it to work with tesseract but it is not working because of the large black area surrounding the letters

Alexander
  • 21
  • 4
  • 2
    Please provide the original image. – rayryeng Jun 08 '19 at 18:40
  • @rayryeng done! – Alexander Jun 08 '19 at 21:25
  • thanks. I'll get back to you. I've got a few things I'll try – rayryeng Jun 08 '19 at 21:35
  • If I were facing this, I'd be tempted to try a different approach: Identify where there aren't tiles (exploiting knowledge of board geometry), fill those non-tile pieces in with file color, invert, and then feed that through OCR, depending on bounding boxes to let me sort out the result (again, leveraging board geometry). – Dave W. Smith Jun 11 '19 at 20:47

0 Answers0