From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

OCR not working (training successuful though)

Hello,

I spent one week to solve this OCR problem but I ended with a failure. Please help me.

I used the vision toolkit of labview to recognize number I record with a usb webcam.

During the training, everything is fine, I even tweaked the brightness and the satuation and I used grayscale level to make the train stronger and the recognition more efficient but when I call the abc file and I select the ROI, the string comes empty from any character.

I tried also to use the vision assistant but it failed also.

I attached two versions of the VI., one with and one without the vision assistant.

Cheers,

Zied

0 Kudos
Message 1 of 6
(4,754 Views)

Could you provide some sample images you are working with so we can run your code with what you are trying to use?

0 Kudos
Message 2 of 6
(4,726 Views)

Here some pictures.

 

0 Kudos
Message 3 of 6
(4,718 Views)

With this type of display, its a bit difficult to get an OCR read, due to the separation that occurs when the center segment of the character is missing.  Try instead to use the GetPixelValue vi to read the image for the presence or absence of black in each of the seven regions of a numeral.  For each number position, you will need seven GetPixelValue calls

 

Example

 

 1

2 3

 4

5 6

 7

 

_

||

-

||

_

 

The numerals would have the folowing "bits" turned on, for which you could have a lookup table.

 

1 - 3, 6 -> 36

2 - 1,3,4,5,7 -> 93

3 - 1,3,4,6,7 -> 109

4 - 2,3,4,6 -> and so on...

5 - 1,2,4,6,7

6 - 1,2,4,5,6,7

7 - 1,3,6

8 - 1,2,3,4,5,6,7

9 - 1,2,3,4,6

0 - 1,2,3,5,6,7

Machine Vision, Robotics, Embedded Systems, Surveillance

www.movimed.com - Custom Imaging Solutions
Message 4 of 6
(4,705 Views)

Or just use the 7 segment reader that is part of the Vision toolkit.  No reason to reinvent the wheel.  It might take a little bit of work to set it up, but it works well once it is done.

 

Bruce

Bruce Ammons
Ammons Engineering
Message 5 of 6
(4,701 Views)

I would like to refer to my new topic as I tried to use the LCD reader. I think it is more appropiate to what I am doing but I got another kind of problem as it is hard to define or change the ROI.

Any help!

 

http://forums.ni.com/t5/Machine-Vision/invalid-LCD-ROI/m-p/3086771

 

Thanks

0 Kudos
Message 6 of 6
(4,662 Views)