05-05-2022 11:40 AM
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
Solved! Go to Solution.
05-05-2022 12:32 PM
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
05-05-2022 04:00 PM
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
05-09-2022 04:00 AM
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:
05-09-2022 09:50 AM
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.
Thank you all for your help!
Thanks,
Dan
05-09-2022 10:08 AM
Awesome.
RamonG- yes, that was the vi I had in mind, mistakenly thought it was in VA.
-AK2DM