LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save streaming image data in 3D array

I am acquiring images from a USB camera (Thorlabs DCC1545M).  I set the acquisition properties, then run the VI.  The output is a 2D mxn array that is displayed as a video.  I want to run the camera at a high frame rate (~420 Hz) which is possible when I use a 112x112 pixel area and increase the pixel clock.  So the data is there and its streaming live.

 

My problem is that I want to save about 4 seconds worth of data (k frames).  I'd like to save each mxn frame to an mxnxk array, then write that to a text file.  In a perfect world, I'd also like to save a 1xk array with the time stamp for each frame.  Saving the data to an .avi file is also acceptable.

 

I'm brand new to Labview and really have no idea how to do this.  Any responses with sample code/as much detail as possible is greatly appreciated.

 

Maybe something with the TDM streaming VIs?  Do I have to ring buffer to label the frames?  Not sure how to do that and would prefer not to...

0 Kudos
Message 1 of 3
(2,962 Views)

Hi lecoyle,

 

If you just need to save your images into an AVI file please refer to the example below and edit how often you want to write the data. If you want to do the array manipulation, in LabVIEW click Help>>Find Examples…>>Fundamentals>>Arrays and Clusters. There it shows the different ways to manipulate arrays. You can also find more IMAQdx examples under Help>>Find Examples…>>Hardware Input and Output>>IMAQdx. I would recommend using the example below and have a case structure around the IMAQ AVI Write Frame VI and write whatever logic you need to control how often it is called.

 

NI-IMAQdx Grab and Save to AVI
https://decibel.ni.com/content/docs/DOC-3587


Tim O

Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(2,922 Views)

hi, did you find a solution? i have same problem. Can you explain, what did you do?

0 Kudos
Message 3 of 3
(2,789 Views)