Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Vision assistant in a while loop

Hello gentlemans, i'm quite new to LabView and Vision assistant. My goal is to detect a car plate from a color image. I succesfully find the ROI by using the two blue rectangles at the edge of italian's car plates, and it works. But then I have to OCR the actual plate, I can do it with success but some pictures require a certain Threshold, others another... So I though, i can run the Vision assistant into a while loop to try different thresholds, when I got a 'valid' plate (7 digits) I simply quit the loop. The parameters are defined by clusters, but it looks like is using always the FIRST value, regardless of the changing threshold. index goes from 0 to 20, and my intention is to have the threshold ranging from 0..100, 0..105, 0..110 and so on. Can you spot something wrong in the attached VI image?? Thanks a lot for any help! Mauro Cucco

0 Kudos
Message 1 of 4
(3,431 Views)

Hi Octopus

 

I belive that this problem originates in that the Vision Assistant handles the images references.

 

In normal LabVIEW programming every time you have a wire branch or a SubVI new copies of the data is created. For images this is not the case because an image often consume a lot of space in the memory. So for an Image LabVIEW edits the image in the  memory instead of creating a copy.

 

In this case your algorithm works the first time, but then the second time it will try to do the OCR on the last result of the OCR rather than the original image.

 

To avoid this you need to use the function IMAQ copy, to create a copy of the original image before sending it to the OCR function. See below:

 

imaq_copy_image.PNG

 

Best Regards

Anders Rohde

Applications Engineer

National Instruments Denmark

0 Kudos
Message 2 of 4
(3,415 Views)

Thanks for your reply Mr.Rohde, and excuse me for the late response.

I will try your suggestion as soon as I can, it makes perfect sense now, well in the LabView logic 🙂

This is my first project using Labview, and to solve the problem I had to use the IMAQ single functions instead of the 'friendly' vision assistant.

0 Kudos
Message 3 of 4
(3,397 Views)

Hi

 

Thanks for the reply. Please let me know if this solves your problem 🙂

 

Best Regards

Anders

0 Kudos
Message 4 of 4
(3,394 Views)