Question

We are working on implementing an OCR on OpenCv. We have gained the contours from our images. Now the part we are stuck on is how can we use these contours to recognize the characters that are now showing on our contour image?

What is to be used? I mean basically how do we use the information gained from the contours to our benefit?

Was it helpful?

Solution

You can use various properties of contours for matching, like their bounding boxes (cvBoundingRect) or ellipses (cvFitEllipse2), their moments (cvContourMoments), their convexity (cvCheckContourConvexity, cvConvexHull2). `

cvMatchShapes calculates Hu moments for comparison. You can also create pairwise geometrical histograms (cvCalcPGH).

You may check Gary Bradski's and Adrian Kaehler's Learning OpenCV for details.

OTHER TIPS

You might want to look at tesseract to learn a bit more about OCR implementation :) http://code.google.com/p/tesseract-ocr/source/checkout

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top