I'm currently working on a project that will read in an image of a Sudoku grid, detect the grid, identify the digits, solve the puzzle, & overlay the solution on the image. In order to identify the digits, I've divided the grid into n*2 images, where each image is an individual grid (examples: ex2 ex9), and run them into pytesseract. None of my images have any text being detected, however, even though it's just an image of a number w/ no noise/borders/etc.
I've tried the common methods of smoothing the image, various thresholding methods, resizing the image, inverting the image, and cropping the digit to a bounding box, but none of these seem to work. I've tested the code I wrote for pytesseract on other images and those all seem to work fine, it's only for my images that they don't work.
Can anyone provide suggestions for what I could try and/or why my images seem to not be easily processed?
For reference, here is the setup for pytesseract's image_to_string I've been using:
text = image_to_string(im, config='--psm 10 --oem 3' + '-c tessedit_char_whitelist=123456789')