Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Save Template image data to array

I used "Imaq imagetoarray" for putting image data to array.

but in case of using Template image it not work, in the array there is not "data Vision info" and I can not do the matching .

Is there any way to save this information "data Vision infoin an array?

Thanks 

0 Kudos
Message 1 of 5
(2,937 Views)

From the same image Template :

Save data from Array to Image, the file it is around 1Kbyte.

Save data direct from image the file is around 600Kbyte.

Opening the file with WinHex Program there are a lot of data that I think is coming from

module Imaq Learn Pattern 4 .....

Any help is appreciates

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

IMAQ Write File / Read File has the option of saving a png with Vision Info.

That's usually better than saving as an array. You can also access vision info with IMAQ Get Custom Keys VI  and then write yourself something that loops through the keys and saves it etc. 

 

The 

Cheers, B

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

Hi ,

Thanks for your replay , I have just try your answer with "IMAQ Get Custom Keys" for get data, but i don't know why the output of "Keys" array is empty .... 

 

 

ps my goal is to create templates and save them directly in tdms, and then use them for matching later. for now I can only save the images using imagetoarray function

0 Kudos
Message 4 of 5
(2,903 Views)

Hmm, that used to work with older NI Vision Info. I'll try digging through the legacy versions when I'm on my other PC.

 

Still don't exactly understand your usecase. 
If you want to avoid writing to the file system, you can use IMAQ Write String (this also works with Vision Info)

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