Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Detect roman numerals in image

Hi there I'm new in OpenCV and Python/C++. I've already worked through the tutorials on this site and now wanted to do some own exercices with OpenCV 2.4 and Python 2.7. I would like to recognize a black colored roman numeral (e.g. I, II, III, IV, V, ...) on a white background in an image and try to get a value according to this roman numeral.

I've already tried some OpenCV techniques like: - harrisCorner (counting the corners of the black "object" and return the value in an if-else contruct) e.g. roman numeral I has 12 corners (considering the serifs). - roughlines (counting long horizontal and vertical lines in the image and return the value in an if-else contruct) - templateMatching (compare the "scene" image with a template image of a roman numeral)

In simple cases these techniques are working. But most of the images contain noise and the matching fails. I think i should do image processing before to crop the black numeral and white background out of the image.

So my questions are: - Do you think these techniques or especially one would be good to detect the roman numeral? - Are there any image processing tutorials to extract a black object on a white background?

Thanks for your help!

Detect roman numerals in image

Hi there I'm new in OpenCV and Python/C++. I've already worked through the tutorials on this site and now wanted to do some own exercices with OpenCV 2.4 and Python 2.7. I would like to recognize a black colored roman numeral (e.g. I, II, III, IV, V, ...) on a white background in an image and try to get a value according to this roman numeral.

I've already tried some OpenCV techniques like: - harrisCorner (counting the corners of the black "object" and return the value in an if-else contruct) e.g. roman numeral I has 12 corners (considering the serifs). - roughlines (counting long horizontal and vertical lines in the image and return the value in an if-else contruct) - templateMatching (compare the "scene" image with a template image of a roman numeral)

In simple cases these techniques are working. But most of the images contain noise and the matching fails. I think i should do image processing before to crop the black numeral and white background out of the image.

So my questions are: - Do you think these techniques or especially one would be good to detect the roman numeral? - Are there any image processing tutorials to extract a black object on a white background?

There are some examples:

image description

image description

image description

image description

Thanks for your help!help