Tuesday, January 31, 2017

computer vision - Suggested Preprocessing methods for OCR on Circular Images


Hello this is my sample image I am going to do real time character detection on images like that.


I've tried SURF, SIFT, MSER and template matching on original image without any preprocessing. I can detect characters but when the image changes this feature detection methods does not work because there isn't a lot of interested points in the characters on the image. I am not exactly sure what kind of preprocessing I should do for higher accuracy.


so my question is what methods can you guys suggest me to do for character detection with higher accuracy.


thanks in advance.


enter image description here




Answer



Here is what I did for a client (What you are asking is the same).


Assuming that you have access to certain type of a pattern on the image (or the center of the hole), you could always detect the template to obtain the location of a possible unwarp:


Pattern matching


Note that in the transformed image, two region of interests are defined and the region within which we would like to read the characters is the torus lying between two circles. Using this information, we could warp this image using an inverse polar transform to obtain:


inverse_polar_transform


I also provide the MATLAB code for this transformation at this file-exchange post.


In the next step, thanks to the template matching, the characters to be read always lie in the local region defined in the image above. Now, if you have appropriate illumination the character segmentation is nothing but a trivial set of image processing operations:


character segmentation


The connected components obtained eventually are fed into a neural network or an SVM, first to train and then to classify. This part is composed only of a basic machine learning task, which I won't go into the details, here.



Don't forget to take good care of the illumination, as it is almost solving the problem half way.


No comments:

Post a Comment

periodic trends - Comparing radii in lithium, beryllium, magnesium, aluminium and sodium ions

Apparently the of last four, $\ce{Mg^2+}$ is closest in radius to $\ce{Li+}$. Is this true, and if so, why would a whole larger shell ($\ce{...