Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

OCR - Water bottle label

Solved!
Go to solution

 

I am trying to do OCR to extract water bottle label, but im not getting any close. The water bottle label resembles to Arial font, ive trained the characters with arial font. I have tried fiddling with the settings, and light exposure.. but still no good.

 

 

I am using the video feed, so even tried to reduce the buffer size but doesnt work..

 

Any recommendations ? 

 

Thankyou/

 

 

 

 

0 Kudos
Message 1 of 7
(4,576 Views)

Hi,

 

The OCR function uses the segmentation parameters that you specified when you trained the font.

The problem you are running into is that the image you used to train the characters is very different from the one you're actually using the character set file trained and the thresholding options are totally different.

When the function tries to segment the characters on your runtime image, no characters are found.

To train the font, you need to use an image that is acquired in the same condition than the one you'll be using at runtime.

Also, you need to define an ROI that completely emcompasses the characters.

 

Hope that helps.

 

Best regards,

 

-Christophe

0 Kudos
Message 2 of 7
(4,570 Views)

Thanks for the prompt reply..

 

Ok so I used original image from the scene and did the fixed range thresholding, it works perfect in the ocr training interface, but after running the VI the results havent changed much i would say the result is 40% improved but im not getting the exact label.. I have slowed down the loop to 1 frame per second, but it doesn't change anything.. even the in the vision assistant script im getting full text? 

running vi.JPGvision script.JPG

 

please help.. 

0 Kudos
Message 3 of 7
(4,558 Views)

It looks like the ROI you're using in Vision Assistant and in your LabVIEW code are different. Are you repositioning it in your code?

I could help more if you zipped a couple different images and attach them to the thread, if there is no copyright issues.

 

-Christophe

0 Kudos
Message 4 of 7
(4,546 Views)
Solution
Accepted by topic author co2junkie_

Increasing the image brightness and/or contrast would probably increase the OCR accuracy too.

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 5 of 7
(4,542 Views)

ya, it was luminosity, turns out the ambiant light had an unequal spread over the bottle 😛

 

Thankyou very much for the help, really appreciate it all.

0 Kudos
Message 6 of 7
(4,511 Views)

ya, it was luminosity, turns out the ambiant light had an unequal spread over the bottle 😛

 

Thankyou very much for the help, really appreciate it all.

0 Kudos
Message 7 of 7
(4,510 Views)