1
votes

one problem with optical character recognition (ocr) is it can't recognize numbers properly when numbers are inside square boxes. one failure example with tesseract is discussed here : Tesseract - How can I recognize numbers in box? i was testing with paddleocr here : https://www.paddlepaddle.org.cn/hub/scene/ocr you can quickly try that api too,,for this input image :

enter image description here it returns nothing..

again when i try image like this : enter image description here

it returns all the numbers successfully.most of the times these number recognition(both printed and handwritten) failing when they are inside square boxes.for recognizing numbers inside square boxes we need to convert these so called numbers in box image into numbers in image by removing all the square boxes. i have some images like below :

enter image description here enter image description here

enter image description here enter image description here

see, the full square box outside numbers are not fully visible,,only some part of the square boxes are visible.i want to convert these images into image where i will have only the numbers by removing square boxes or some part of square boxes that is present in these images after then hopefully number/digit recognition will work.how can i remove those complete or incomplete square boxes outside each number in image? thanks in advance.

you are expected to provide a minimal reproducible exampleChristoph Rackwitz