LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with learn multiple geometric pattern

Solved!
Go to solution

Hello Labview users,

My goal is to load different templates located in the target folder, create a multiple templates then, perfom some image processing (located in another file).
The example provide in the vision file works perfectly but if I modify the path, it seems to be impossible to create an multiple pattern. Indeed, I got the following error message:

Error -1074395628 occurred at IMAQ Learn Multiple Geometric Patterns

IMAQ Vision:  Invalid geometric matching template image.

 

Certainly, I don't understand one part but I don't know where is my mistake.

I add the multiple matching template, one exemple of template image, and the image to test.

 

Please, may I have some help or suggestion to grasp this problem.

Thank you in advance for your help,

Best regards

 

 

Download All
0 Kudos
Message 1 of 11
(7,089 Views)

Hi matriax,

 

I don't have labview 2013, but i've seen same example in 2012 and it works fine. coming to problem,these debugging points can give better idea.

After changing the folder location,

-Does your template folder location which you are giving is having diff templates with same names or not?

-Does your Template0,1,and 2 display template images or not?

-If above two are pass then check whether the templates are created by template editor or not.

-Then check if your template contains the same parameters during creation of template and setup match geometric pattern (scaling and rotation parameters) or not?

 

Let me know if you have any other queries.

 

Thanks
uday
0 Kudos
Message 2 of 11
(7,074 Views)

Many thanks for your reply and your help,

 

Yes the example provides in the help part works pretty well.

I use different three templates with 3 different names. All the templates are the same that the example provides by the vision help. The image format is *.png like the example and their sizes are similar.

I used a simple a copy-paste for the setting of the "learn multiple geometric pattern". so the setting should be the that the example.

If I click to continue on the error message, all the images are display but there are no processing.

 

The modification between the example and "my" IV is mainly that I dont use the same folder.for the template and the image to process.

I just want to add two screenshots in order to display the modification.

 

If you need any further detail please, don't hesitate to contact me.

Thank you in advance,

Best regards 

 

Download All
0 Kudos
Message 3 of 11
(7,056 Views)

Hey matriax,

 

I think I found the problem.

-Templates are fine, the problem is at setup match Geometric Pattern settings u've given for Macth Mode first three as True.

-These corresponds to Rotation,Scale and Occlusion respectively.

-But all three template doesn't have these info. For Bracket it's T,T,F, for Plate Template it's T,F,F and for hang Template it's T,F,T respectively.

-And make sure the order in which u've given the template names corresponds to the case structure's cases0,1, and 2. 

 

Hope that helps. Please revert back if problem is not fixed.

 

Thanks
uday
0 Kudos
Message 4 of 11
(7,037 Views)

Hi udka,

 

Thank you again for your message,

I checked the different option for learning but the problem is the same. If I am not mistaken, I think that my problem seems not to be linked to the option because in the example (vision), I modified the different boolean options and it is still running.

Probably, the problem is linked to the path of the template files because if I modify only the name of the image located in the vision example it's not possible to run it.

I also tried to add my template images in the same folder labview\vision\multiplematchingexample... and change the name of my template in the iv example provided with the vision software...but it's not working.

So, why the vision example can run with default tmeplate name but not with a slightly different names?

it 's still a mysterious for me.Smiley Surprised

 

I would like to highlight that the iv "single matching geometric template" as well as "find template" in the vision soft run perfectly for me. Consequently, it's seem that the problem is linked to the creation of the multiple geometric template only.

If somebody have a suggestion please, don't hesitate to purpose.

Thank you in advance,
Sincerely yours
 

 

 

 

0 Kudos
Message 5 of 11
(7,014 Views)

Hi matriax,

 

I've modified the inbuilt example in labview 2012 for multiple geometric match pattern and renamed the template images,and still works for me Smiley Frustrated. Please find the attachment and let me know if u've any other issues.

-Attachment contains, all vis,template images and testing images also.

 

Can you convert your vi to 2012 version and send me if possible (will check on the problem)!!!

Thanks
uday
0 Kudos
Message 6 of 11
(7,004 Views)

Hi udka,

 

Thank you for the file.  

I tested it a lot of times with different settings but the error message still appears on my display.
I really don't understand why it's possible to run all others lerning types (single geometric, circular, edge...) but learn a multiple templates indicated this famous error message.
Moreover if your version runs well in 2012 the same version and setting  in 2013 should be worked. Why if I used exactly the same code but with different paths it is impossible to run. (I used a labview 2013 64bits). Is it a bug?      

 

I send you my version (in the labview 2012 format) and the different images.

If you find any mistake please, don't hesitate to add a comment. I will be so glad if I can understand the setting problem.

Thank you again for your kind help.

 

0 Kudos
Message 7 of 11
(6,990 Views)

Hey matriax,

 

-Thanks for the 2012 version of code.

-The problem is still with templates and not with their names. The template images which u've sent me doesn't have any geometric mathcing info.

-You can see that by the image size itself. Iam attaching the modified code along with my templates.and it works fine.

-Templates are created by using template editor and the images will save the pattern/geometric match info along with image(increased size).

 

Please let me know if it helps 🙂

Thanks
uday
Message 8 of 11
(6,981 Views)

Hi Udka,

 

Many thank for your kind help, you won a KudoSmiley Wink.

WIth your pictures there are no problem, probably I did correctly save the template.

Following your email I tried again to create a template using the template editor. I saved the new template in my desktop and loaded it using the vision assistant. (see example.png). Using the vision assistant I can detect the template in the image test. I expected that the template with the geometric data is correctly saved.

However, when I use your script it's not run, same error message. 

I have 3 last questions:

-Please, could you check that my template (triangle.png) has the geometric information embedded inside the figure?
-Please, could you run it on your labview version in order to test it?

-Do you think that the template created with the assistant vision can not work for the iv "learn multiple geometric template"?

 

Sorry for my numerous basic questions,

Regards

 

 

Download All
0 Kudos
Message 9 of 11
(6,969 Views)
Solution
Accepted by topic author matriax

Hi matriax,

 

Good to know that it helped.

Coming to ur questions,

-yes,template has geometric info, if not even in vision assistant also it won't work.

-In my code also, it isn't working.Reason explained at bottom.

-Yes, Template created with vision assistatn also should work.

 

Coming to template creation, there are two methods in geometric matching-feature based and edge based.

-The labview code is using feature based geometric matching whereas u've created template in edge based method.

-If you see in vision assistant,Settings Tab you've Algorithm type Two options. Select the feature based and u should be able to run it in both labview and vision assistant then.

 

For more details on Geometric matching please refer to http://zone.ni.com/reference/en-XX/help/372916L-01/nivisionconcepts/geometric_matching_technique/

Hope that helps 🙂 Let me know if you've any other questions.

Thanks
uday
Message 10 of 11
(6,964 Views)