Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Isolating individual numbers from image for OCR

The method to perform character recognition for single digits its pretty easy. But this is when the image only contains ONE digit.

When the image contains multiple digits, we can't use the same algorithm since the entire bitmap is different. How do we process the image to split it, so we can "modularise" the OCR operation on each of the individual digits?

like image 533
Sid Sahay Avatar asked Oct 18 '22 09:10

Sid Sahay


1 Answers

Follow the following steps:

  1. Load the image.
  2. Select the digits ( By contour finding and applying constraints on area and height of letters to avoid false detections). This will split the image and thus modularise the OCR operation you want to perform.
  3. A simple K - nearest neighbour algorithm for performing the identification and classification.enter image description here
like image 82
Prakhar Agarwal Avatar answered Oct 21 '22 04:10

Prakhar Agarwal