Note that there are some explanatory texts on larger screens.

plurals
  1. POPrepare complex image for OCR
    primarykey
    data
    text
    <p>I want to recognize digits from a credit card. To make things worse, the source image is not guaranteed to be of high quality. The OCR is to be realized through a neural network, but that shouldn't be the topic here.</p> <p>The current issue is the image preprocessing. As credit cards can have backgrounds and other complex graphics, the text is not as clear as with scanning a document. I made experiments with edge detection (Canny Edge, Sobel), but it wasn't that successful. Also calculating the difference between the greyscale image and a blurred one (as stated at <a href="https://stackoverflow.com/questions/5507885/remove-background-color-in-image-processing-for-ocr">Remove background color in image processing for OCR</a>) did not lead to an OCRable result.</p> <p>I think most approaches fail because the contrast between a specific digit and its background is not strong enough. There is probably a need to do a segmentation of the image into blocks and find the best preprocessing solution for each block?</p> <p>Do you have any suggestions how to convert the source to a readable binary image? Is edge detection the way to go or should I stick with basic color thresholding?</p> <p><strong>Here is a sample of a greyscale-thresholding approach</strong> (where I am obviously not happy with the results):</p> <p>Original image:</p> <p><img src="https://i.stack.imgur.com/sWZxA.png" alt="Original image"></p> <p>Greyscale image:</p> <p><img src="https://i.stack.imgur.com/8ao1K.png" alt="Greyscale image"></p> <p>Thresholded image:</p> <p><img src="https://i.stack.imgur.com/6f6Hk.png" alt="Thresholded image"></p> <p>Thanks for any advice, Valentin</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload