Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

NI vision project can't find pattern after migrating to labview.

Solved!
Go to solution

Hi,
My problem is the following. I've made a project with NI vision builder. Alright it's working correctly. BUT, when I migrate this project to labview (and after that I build an executable version)  it can't find the pattern on the selected images. (Yes, I'm using the program with images, not with camera.) What should I do? I tried to put the templates beside the project but it haven't worked.

0 Kudos
Message 1 of 17
(4,423 Views)
-In labview code it's working? Or only in exe it is not working?
-Are you getting any error?
-Are you giving template path correctly?
-Send Snippet of code if possible.
Thanks
uday
Message 2 of 17
(4,418 Views)
check your path that you give for template image
also check if you use overlay for target that you find may be you find the pattern but do not overlay it
check your image is . png
Message 3 of 17
(4,411 Views)

The problem is that, sometimes it's working in labview, but mostly not. And I don't get any error.
I have 2 type of picture, these has 2 different geometry. I'm using the Geometric Matching function in the NI vision Builder, and in that function I can't give a path to the template, because it's selected from an image, and after that I think it's saved to the Config Files folder. Or is there any way to select a template from specified path? Sorry I'm just a beginner with NI and this is my first project with this software but it would be important to make this work.
If it's necessary, I can show the whole process and that part which is failing.

0 Kudos
Message 4 of 17
(4,412 Views)

Could that be a problem, if I get the picture, match pattern, do the analyze, specified to this image, and after this whole process I select the original image with Select image and put some overlay on it, to show the defects of the product?

0 Kudos
Message 5 of 17
(4,409 Views)

Oh and I forgot, the picture is in tif format.

0 Kudos
Message 6 of 17
(4,409 Views)
-The template should be in png format.
-You can check with the example in below link
http://www.ni.com/example/30555/en/
Thanks
uday
Message 7 of 17
(4,394 Views)

I was looking for the tempalte and NI vision saves it in png, by default. So that wasn't the problem. But I was thinking about the size of the template and the examined pic, and these were different. Now I made a template which is exactly the size of the analyzed picture and it looks working now.

0 Kudos
Message 8 of 17
(4,385 Views)

could you send your vi for check
also use some indicator to make sure that none of your terminal consist of empty data
like path of image image and so on 

0 Kudos
Message 9 of 17
(4,372 Views)

No, that wasn't the solution.. So I'm looking forward to figure out, what's the problem. Any more ideas?
Until this
-yes, the template is in PNG format.
-the last time I migrated it to LabVIEW, it was working well. But after restart the program, It's bad again.
-Could that be a problem, that I'm using 3 LabVIEW VIs at the project and these are hided, to don't bother the operator? Because when I stop the Labviev inspection, it doesnt exit properly, I have to kill the app with task manager.
Thank you for your answers btw.

0 Kudos
Message 10 of 17
(4,371 Views)