Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

how can I use Imaq usb to get a snap image, get template and do pattern matching?

Hi, Stephen,

Is that you answer my phone, right? When I put IMAQ cast VI. The error said type thing won't come again. But it still said that:

Hex 0XBFF60791 Invalid template descriptor. 

Is that some wrong? 

Thank you!

Guangli 

0 Kudos
Message 11 of 15
(1,995 Views)

Hi, Stephen,

I put the cast VI into the program. The previous error won't come out. The error pop up.

That is: Hex 0XBFF60791  Invalid template descriptor. I actually follow the example, Pattern Matching example.

Would you please help me figure out? 

Thank you very much!

Guangli 

0 Kudos
Message 12 of 15
(1,961 Views)

The big difference is I used the IMAQ Vision info Present 2 replace IMAQ Readfile because I get the static image from camera rather than opening from the folder. I'm sorry for my poor English. I  don't know if I talk about it clearly.

Thank you in advance. 

0 Kudos
Message 13 of 15
(1,958 Views)

Hi guangli,

 

You can do searches for errors that you are getting in your code on ni.com.  I searched for the text of your error and found this:

 

Common Errors and Issues When Using Pattern Matching with NI Vision
Stephen Meserve
National Instruments
0 Kudos
Message 14 of 15
(1,954 Views)

Stephen,

Thank you very much!

That really helpful. I am able to search the template in the static images saved in PC using my code.

The problems I got here is because I try to use camera acquire the static image per 5 seconds, learn the template in first static image and search it in current image or next frame. That's my hard time. I didn't use IMAQ Readfile VI. I try to use IMAQ Writefile 2 and  writefile and readfile. Right now I use IMAQ Copy (the image right after IMAQ USB Grab acquire and IMAQ cast type). None of them works.  

I have no problem when I use the code to process the image opened from the PC.

Did you ever see the project? I'm going through all questions about Machine vision in this forum. I don't find the similar project yet. 

By the way,  I'm using  Philips SPC 900NC PC Camera(USB) now.

Feel free help me!

Thank you very much!

Guangli 

Message Edited by guangli on 11-16-2009 04:43 PM
0 Kudos
Message 15 of 15
(1,933 Views)