04-09-2014 07:27 PM
I currently have a consumer producer loop, and what I want to do is to add an element to queue if the element (picture), has a specific pattern (license plate). After that, I want to pass the image to the consumer loop, so I can use the vision assistant with it.
Can someone please help me?
04-09-2014 07:52 PM
What help do you need? Where are you having problems?
One thing to watch out for that is peculiar to Vision. The purple wire is actually a reference to an image rather than the image itself. So you can pass a reference to an image in one iteration, but it could wind up being overwritten with the next iteration of the producer loop.
04-09-2014 08:05 PM
what I want to know is how to use the pattern match 4, and how to fix this consumer producer loop, because I can't see any image in both of the screens.
Thanks for your help!
04-14-2014 05:03 PM
Hello there;
I was checking your code...
The first issue you are going to encounter is going to be the data transmission... as mentioned above, you are passing the refference to a memory location where an image resides (not the actual image) and you are re-writting on the same location over and over again, therefore even if you have 5 images in queue they are all going to point to the same exact place.
Third, when using the database connectivity toolkit you should connect to a .udl (ODBC database) or a .dsn (OLE DB) that configures the access to the database, if you use a string, you will get an error.
Before using the OCR algorithms I would recommend to set a refference or coordinate system; you can set it by identifing a refference or coordinate system. I am guessing this is where you want to use the match pattern VI; although I would recommendthe imaq match geometric pattern instead to locate the rectangle of the license plate; remember you need to train it first
You can find an example here:
https://decibel.ni.com/content/docs/DOC-30576
Hope this info helps
Greetings