Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -1074395628 IMAQ Learn Multiple Geometric Patterns

Hello IMAQ fellows,

 

I am creating a code for matching more than one object in an image, using the "Multiple Geometric Patterns" functions available on IMAQ.

 

In the example section there is a code quite simple illustrating this (http://www.ni.com/example/30535/en/). I tried to modified this VI to be then embeded in my application, but I am guetting a constant error even if the modifications made are small.

 

I'm not sure if I am doing wrong, or there is a problem with the function.

 

Please find attached the VI. I know that the arquitecture is a bit poor, but the only thing that I need is to clear the error.

 

any advice will be very appreciate.

 

Thanks

0 Kudos
Message 1 of 25
(8,855 Views)

Hi,

 

This error is usually due to an invalid template file being used. Typically its either a file format issue or the image is too large (> 160,000 pixels). I'd recommend testing it with a smaller image and a different file type (png)

 

Regards,

Applications Engineer
0 Kudos
Message 2 of 25
(8,799 Views)

How are you creating the template?

0 Kudos
Message 3 of 25
(8,797 Views)

Hello,

 

Thanks for your reply.

 

About the observations from adlb, I have tried using different file formats (JP2, JPG, PNG) and also with the size of the image small (10 to 100kb), however the error still appeared.

 

Considering the observation of , first I tried to create the template by clicking the image by the user interface and transmitting the data directly to the next operation (flat sequence. This is ideal since I want to make it available for constant changes in the objects). Then I modified the code to save those templates, and re-load them by the part of the code that should do the pattern matching, but the error still appear (even with the different file formats).

 

Please fin attached a sample image,

 

Thanks for you help

Download All
0 Kudos
Message 4 of 25
(8,789 Views)

Hello,

 

why don't you use the basic geometric matching and use loops to go through all the templates?

 

To be honest, I really never understood the purpose of multiple geometric pattern matching...

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 5 of 25
(8,780 Views)
Respected Sir,

 

                      My task is to recognize hexagonal shape (says bolts) which I place in front of my camera (Basler aca 2000-50gc) .I have to - "Train the Template during Live execution" and I am using  LabView 2012 and OS - Windows XP.
 

I am stuck  in -

 

1.Creating template path and how to use it in live acquisition of camera and then use it in geometric matching .

 

2.If I have 3 bolts of hexagonal shape then I have to make 3 template or just a single one.?

 

3.I am not allowed to use vision assistant .

 

4.Getting error 1074395628 in Learn geometric pattern vi.
                     
                    I just tried to make a rough vi related to my task. Please go through the attached vi and respected template image and suggest me changes.
 
Waiting for your reply.
 
Regards
Shreya Joshi
0 Kudos
Message 6 of 25
(8,302 Views)

Hello,

 

your template image actually does not have any geometric matching information. This (along with casting the image to U32) produces the error.

 

If all bolts are of the same geometric shape, you need only one template. In the matching phase, you then expect 3 matches with highest scores.

 

I have attached a basic example of the geometric matching (learn phase and matching phase are separated), where the image is read from the HDD. You can easily combine and adapt the code in order to use a live image stream. Mind that the code was just used for testing, so it is somewhat messy.

 

Hope this helps a bit.

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 7 of 25
(8,280 Views)

Respected Sir,

                       First of all thanks a lot for a quick response. Please forward your attachment in LabView 2012 version instead of LabView 2013. I am unable to open it.

 

Thanking You.

 

Regards

Shreya Joshi.

 

0 Kudos
Message 8 of 25
(8,276 Views)

Hi tiendetumano, 


Could you please clarify on what type of error are you exactly experiencing? If you could attach the error, then it will be easier for us to get to the bottom of the problem. 

Also, did the suggestions mentioned above help solve the issue?

Do let us know. 

Best Regards,

Shazil M.
Applications Engineer
National Instruments UK & Ireland

Shazil M.
CLAD
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 9 of 25
(8,268 Views)

Respected Sir,
                       First of all Thank You for quick response. My task is to recorgnize hexagonal shape (say bolts) which I place in front of my camera i.e. Basler aca 2000 50 gc .
                     

                        I have following doubts-

1.  My template size is 3.32 MB.Is it ok?  I am getting error 1074396080 occured at IMAQ matchgeometric pattern VI showing Invalid image typee.        
         


2.  In the code which VI I have to use -


a. IMAQ match geometric pattern VI 
b .IMAQ match geometric pattern 2 VI
c. IMAQ advanced setup match geometric pattern 2 VI. 


3. what should be control of the respected geometric matching VI .    

error1074396080.png

                     

  I am attaching my template image and respected VI . Please give me necessary solutions as soon as possible.

Thanking You

Regards
Shreya Joshi

                         

0 Kudos
Message 10 of 25
(8,259 Views)