LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

rewrite template vision assistance for image match

Solved!
Go to solution

hey guys , im using labview to detect an image and record its x-y coordinates.

 

does anybody know how i can automatically change , in runtime, the template used to match .

 

i get my template from the Vision Assistant Block 

 

please please help

 

Kevin

0 Kudos
Message 1 of 5
(2,418 Views)
Solution
Accepted by topic author kevinbarry92
Hey Kevin,

If you configure the Vision Assistant block and place it on your block diagram, you can then right click on it and select "Open Front Panel."

This shows you the LabVIEW code that the Express VI is running behind the scenes. From here you can find any parameters you have set, put down as constants. So for example, the file path you chose for the template is on the block diagram as a file path constant. 

You can right click on this and change it to a control, and then link this control to the connector pane
Reference: http://zone.ni.com/reference/en-XX/help/371361H-01/lvconcepts/building_connector_pane/

After saving this VI, and closing it, you will notice some changes to your main VI. Firstly the vision assistant block will have changed colour to yellow, and secondly, it will have one more input added to the bottom (if you drag it down) which is for the control you set in the subVI.

The attached example then adds a case structure to select the file path you want to use as a template during runtime. It would be better practice to use an event structure, but hopefully this works for demonstrative purposes.

Let me know if this helps out Kevin.


Thanks,
Justin, Applications Engineer
0 Kudos
Message 2 of 5
(2,370 Views)

hey justin, that was a great answer thanks for the help. so now i can change it for a pre existiing template.

 

but is there a way that the file dialog can be replace with a funtion that can retake the image and physically choose the template just like the vision assistant did ?

or is there a mean of opening vision assistant during runtime to change the template for matching?

 

really appreciate the help 

 

kevin

0 Kudos
Message 3 of 5
(2,361 Views)

Hey Kevin,

Unfortunately you cannot open an express VI during runtime.

During runtime, all the Vision Assistant will do is run LabVIEW code that it automatically created to perform the functionality you specified, and all the code is readily availiable to you.

Therefore any functionality of the Vision Assistant will be included in the subVI that you looked at. 

I'm not 100% sure of what you are trying to achieve, perhaps you could send some screenshot or small code to explain what you want and I can try to give you some pointers, all the functionality will be available in code to you though.

Thanks,
Justin, Applications Engineer
0 Kudos
Message 4 of 5
(2,354 Views)

ok thanks , its ok just thought itd b a nice feature . thanks again for all the help. will give great review

0 Kudos
Message 5 of 5
(2,347 Views)