Ask Your Question
1

advice for costum font recognition

asked Oct 3 '12

julius gravatar image

hi,

ive found quite a lot of theoretical papers on google, but only a few practical examples. these are most of the chars i would like to recognize:

0-9: http://dmk-crew.dyndns.info/files/bf2-0-9.jpg

a-z: http://dmk-crew.dyndns.info/files/bf2-a-z.jpg

trying javaocr showed that the chars would need some space between them to be recognized. do you know any other ways in opencv to work with these?

greets

Preview: (hide)

2 answers

Sort by » oldest newest most voted
2

answered Oct 4 '12

elmiguelao gravatar image

An alternative is to segment each number and letter, via contour extraction, and analyse their Hu moments against those you pre-calculate on each reference character. Hu moments have the advantages of being rotation, reflection and scaling invariant, hence the name Hu invariants. This method is computationally cheap (i.e. fast): moments are aggregated measures from the shapes (center of mass, center of inertia, etc) so comparisons are made number-to-number, as opposed to pixel-to-pixel comparisons which are more costly.

In this article the whole recognition process is explained step-by-step, with CV code. In the Bradski-Kaehler openCV book (Chapter 8) there is a discussion about Hu moments for character recognition. Finally there is a library function cvMatchShapes which would extract those moments and compare them internally.

Finally, if you search in internet for "Hu moments character recognition", there are many academical references, but they boil down to the explanations quoted above.

Preview: (hide)
2

answered Oct 4 '12

Adi gravatar image

If the fonts are always fixed size, then maybe a simple template matching scan will be sufficient.

Preview: (hide)

Question Tools

Stats

Asked: Oct 3 '12

Seen: 1,285 times

Last updated: Oct 04 '12