10-02-2013 12:59 PM
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?
10-02-2013 01:02 PM
I make next VI to get the image an process.
I make the .abc file by myself
10-04-2013 09:56 AM
Still trying, no luck
10-04-2013 10:01 AM
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):
I am attaching the code, so you can take a look at it.
I hope this information is useful!
Regards!
10-04-2013 10:03 AM
Here goes the abc file. It should have more training.
10-04-2013 10:26 AM
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?
10-04-2013 12:10 PM - edited 10-04-2013 12:13 PM
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.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
10-04-2013 12:22 PM
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!
10-04-2013 01:01 PM
@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.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
10-04-2013 01:42 PM
ok, no problem, I'll try to make what you did.