loading
 
OCR Curved text
Oscar Ramirez from United States  [4 posts]
2 months
I was trying to use OCR in a curved text but (7 numbers) and it was only able to read 3 of them. Is there a way to read it all? I attached an image of what needs to be read by the program.

Thanks.

 
STeven from United States  [1403 posts] 2 months
Oscar,

If the position of the wheel and the camera is fixed you can use various other modules to unwarp the image to straighten out the text. If you have a larger version of the image you posted without any pre-processing we can better recommend how that might be done.

If things are not fixed, i.e. the tire and canera angle change, then its much harder to do and you'd need MANY more examples on which to test (i.e. 100's of images).

STeven.
Oscar Ramirez from United States  [4 posts] 2 months
Thanks, I attached a new image. Yeah, the idea is to have the camera fixed for better results.

Also, we are trying to do this with a video camera (live) (if that matters)

Thanks.
Regards.

 
STeven from United States  [1403 posts] 2 months
Oscar,

I've attached something that gets closer but you will still want to do 2 additional test:

1. Try to center the text plane and the camera perpendicular to each other. I.e. if you can get the surface of that text to be perpendicular to the camera the polar unwrap module will work better. Right now you can see how the width of the metal circle is not quite the same width after the polar module has done its work ... that's because the object is tilted in the X or Y plane slightly.

2. Try to use better lighting to highlight the text. Try lighting it from several sides at once to provide better contrast.

Maybe the attached gives you some additional ideas:

STeven.
program.robo
Oscar Ramirez from United States  [4 posts] 2 months
Oh wow, sorry for the delay, I was expecting to get an email when there was any change in this post, I must have missed it.

This looks great, I will play around with the lightning and let you know how it goes.

Thanks again.
Oscar Ramirez from United States  [4 posts] 2 months
It works great, thanks.

Is it also possible to flatten the attached image to also use with OCR? I can't seem to be able to do it correctly.

Also, is it possible to "train" the OCR with our own pictures for better results?

Thanks again.
Regards.

 
Carl from United States  [2 posts] 2 months
On the OCR training, there is info toward the bottom of the documentation page:  http://www.roborealm.com/help/OCR.php
STeven from United States  [1403 posts] 2 months
Because the text is not perpendicular to the camera it comes out a bit warped or in your case rotated into the image plane. The Transform Image module can be used to undo this to some extent. See the attached ... but as this is just for one image you will need to test with many more to determine if the rotation is consistent.

STeven.


 

program.robo

 Reply  New Post   Forum Index