From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LCD image reading

 

I have an aplication than need to Test the segments on a display.

 

I can get the image with USB cameras, but I can't to read the LCD using LabView Vision and Motion.

I have "Image Processing", "MachineVision", "Vision utilities", NI-IMAQ", "NI-IMAQdx", etc.

 

I anexed two different images.

Can any body help me to read the lcd to string?

Download All
0 Kudos
Message 1 of 14
(4,681 Views)

I make next VI to get the image an process.

I make the .abc file by myself

Download All
0 Kudos
Message 2 of 14
(4,675 Views)

Still trying, no luck

 

0 Kudos
Message 3 of 14
(4,618 Views)

Hello Luis, 

 

Have you used the examples provided in the NI Example Finder focused on OCR? I recommend looking for these ones: 

 

OCR Example (Express).vi 

OCR Example.vi 

 

You can find these by looking for "ocr"in Search. 

 

I did one myself using the images you provided (mostly using Vision Assistant):

 

 

1.PNG

 

I am attaching the code, so you can take a look at it. 

 

I hope this information is useful!

 

Regards!

 

 

 

 

 

 

José Alberto G.
National Instruments
ELP Support Engineer
www.ni.com/soporte
0 Kudos
Message 4 of 14
(4,616 Views)

Here goes the abc file. It should have more training.

José Alberto G.
National Instruments
ELP Support Engineer
www.ni.com/soporte
0 Kudos
Message 5 of 14
(4,615 Views)

Thank you jagutier,,,

 

But you can see than still has some character errors,

 

Why? the image looks to clear to me, but still is not detecting the 8's and "."

 

it's any way to clean the Picture? Eliminate pixels and put color (black to segments) to others?

0 Kudos
Message 6 of 14
(4,611 Views)

I didn't like the NI read LCD function either.  It didn't tell me much other then what it believed the numbers were, but I wanted to know the confidence, and possibly what segment was off, with more control.

 

So I ended up writing my own LCD reading function.  It worked much better because I was able to control when the LCD was on and not.  I ended up taking a baseline image when the LCD was off, then I would turn the LCD on with 8888 and take another picture, I would then subtract the two images getting the difference which was only the segments that are on but were off.  I would then convert this to binary with some threshold.  With this I could find the upper left corner, and then started looking for edges based on a coordinate system from this origin.  Two edges make a segment, from off to on and from on to off (remember the subtracted image is binary now).

 

In the end it gave much better results, with control over the binary threshold, edge detection, and expected spacing of the LCD that the canned NI function couldn't do for us.

 

EDIT:  Looking at your images I can tell you have a lighting problem.  You have many spots in the image that have glare, and spots that are naturally brighter or darker.  Unifom lighting helps alot.  Also your images are not consistent with orientation.  Sliding and twisting in the image.  I hope you have some code to help adjust for that.

Message 7 of 14
(4,593 Views)

 

Thank you,

I'm sure I can adjust the Light.

 

Can you share your VI with me? to se if I can adap it to my application.

 

see you!

0 Kudos
Message 8 of 14
(4,588 Views)

@LuisMontoya wrote:

 

Thank you,

I'm sure I can adjust the Light.

 

Can you share your VI with me? to se if I can adap it to my application.

 

see you!


Sorry I can't share it it was done for another company and they own the IP.  I just wanted to point you in the right direction and mention something that has worked for me in the past.

0 Kudos
Message 9 of 14
(4,582 Views)

ok, no problem, I'll try to make what you did.

 

 

0 Kudos
Message 10 of 14
(4,572 Views)