LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Performing OCR on Revolved Text using NI vision assistant

Solved!
Go to solution

Hello Everyone,

 

I am currently working on a vision project where I have to read a serial number on a part using OCR. I am using NI Vision Assistant to build the code and then I am exporting the script as a VI. Originally I had been reading serial numbers that were straight and I had a rectangle placed around the serial number so that it was easier to pattern match too (it was a bit overkill, but I'd rather be safe than sorry). Well, to keep a long story short, the location of the serial wasn't correct so the script needs to be changed. The serial number will now be revolved rather than straight. 

 

I am still using pattern matching to locate the serial number, and than setting a coordinate based on the matched pattern. Those both work great, but when it comes to detecting the correct serial number, it struggles with the revolution. I am using a test image built in word to locate the serial number, I am hoping to build up from there to full time production parts. I've attached images of my settings as well as the program running OCR on the serial number. I can add my script if someone wants to look at it and mess around with the settings. 

 

Thanks,

Dan

0 Kudos
Message 1 of 6
(1,286 Views)
Solution
Accepted by topic author drogers13

Have you tried checking the Auto Detect Multiline and Rotation in the Read options?

Also isn't there a vi in VA to unwrap circular text? If so you may want to try that before reading and decoding.

 

I have done some OCR in VA/LV but nothing with curved test.

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
Message 2 of 6
(1,264 Views)

Hey AK2DM,

 

I tried to use the Auto Detect Multiline and Rotation in the read options and it just changed the AB to an M instead. I haven't seen a VI to unwarp circular text, but there is a lot of stuff within VA. I will see if I can find something like buried within VA and post my results. 

 

Thanks,

Dan

0 Kudos
Message 3 of 6
(1,247 Views)

See LabVIEW\examples\Vision\Image Management\Unwrap Barcode.vi

Not sure if it's accessible from VA.

 

You can also manually create a circular strip ROI and convert it to annulus:

 

snip.png

Message 4 of 6
(1,215 Views)
Solution
Accepted by topic author drogers13

RamonG,

 

Thanks for the response. I was able to find a solution using NI Vision Assistant. I will most likely have to do some tweaking to get into working just right, but there is a annulus searching tool. 

drogers13_0-1652107787406.png

Thank you all for your help!

 

Thanks,

Dan

 

0 Kudos
Message 5 of 6
(1,202 Views)

Awesome.

 

RamonG- yes, that was the vi I had in mind, mistakenly thought it was in VA.

 

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 6 of 6
(1,194 Views)