LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

high speed image acquisition

Thanks in advance for any help. I am trying to write a VI to control my camera (Dalsa DS-12-16K5H) for a high speed sequence acquisition using the NI PCI-1422. Frames will be 128x128 and 12 bit, so they will be about 25 kb.

 

I am using a fluorescent dye to measure electric potential of cells, so I require a high frame rate for a proper sampling rate. My camera can do up to about 490 FPS, and I want to maintain as high a rate as I can. I need to take frames for about 10-15 seconds, so I will be taking about 7500 frames (~185 mb total). After these images are taken as the fastest attainable rate, I want to save the images in a raw format. According to the little help I have received, I should save these as 3D arrays to make data analysis easier. Data analysis will require measuring the intensity in individual pixels in each frame (over time). I am not sure why I need to use arrays, any enlightenment would be appreciated. Also, if anyone can push me in the right direction for designing such a VI, I would appreciate that as well.

 

 

0 Kudos
Message 1 of 8
(3,927 Views)

Update: 

 

Also, can images or arrays be stacked in a way that I can analyze the intensity of the same pixel from one frame to the next sequentially.

0 Kudos
Message 2 of 8
(3,925 Views)

It would be great if you could explain a little bit more on what you are trying to do in your application.

 

From what I understand, its just analyzing the pixel data after acquition of images.

 

NI PCI-1422 supports

  • 40 MHz pixel clock rate with up to 80 MB/s acquisition

This means, if you acquire 490 frames per second(max of your camera), the acquition rate becomes 490*25kb, which is OK for this card.

 

Now, once you have acquired the images, you can use the picture functions (like read image and then unflatten pixelmap), where you can get a range of pixelmaps (24bit,8bit,4bit) in a 2D-Array format, and now you can carry out the analysis on each pixel depending on the image resolution and the parameters you give while reading the image files. So if you have 1000 images, you can run this in a loop, and try to use In Place element structure to reduce the memory usage.

-FraggerFox!
Certified LabVIEW Architect, Certified TestStand Developer
"What you think today is what you live tomorrow"
0 Kudos
Message 3 of 8
(3,915 Views)

Ok so let me focus on image capture for now.

 

It seems to me I could just simply run a sequence capture and save to array vi. When I do image capture using Vision assistant, I seem to capture at close to the cameras speed. However, there doesn't seem to be a quick and easy way to save all of the images into a stacked array or even some other type of raw format. Is such a program available, or do I have to combine VIs ready-made somehow? (Don't have much experience doing this).

 

Thanks.

 

0 Kudos
Message 4 of 8
(3,897 Views)

Hi anfleisch,

 

There are a lot of examples within LabVIEW that will do pretty much what you would like to do.  The function that you are looking for is the IMAQ ImagetoArray function and there is actually an example in the LabVIEW Example Finder that uses this function. You can find it by going into LabVIEW, going Help>>Find Examples... Then you will open the Toolkits and Modules section>>Vision>>Function>>ImagetoArray Example.vi.  If you would like to store the arrays to file, you can use the Write to Binary File function (Programming>>File I/O) or you can use the IMAQ function, IMAQ Write File (Vision and Motion>>Vision Utilities>>Files), to write images to file.

 

I hope this helps!

 

Kim W.

Applications Engineer
National Instruments
0 Kudos
Message 5 of 8
(3,885 Views)

Thanks Kim. So I would basically just have to find a way of connecting the code in sequence?

 

So I am assuming the image to array is a conversion and not image capture (I don't have labview in front of me).

 

LLsequence -> Image to Array -> Write to File

 

Any advice on connecting the VIs? 

0 Kudos
Message 6 of 8
(3,882 Views)

Hi anfleisch,

 

The example that I pointed you to takes a file from a file location, but you can always easily modify the VI to do an image acquisition.  An easy way to do an image acquisition if you are new to using LabVIEW is to use the Vision Acquisition Express VI (Vision and Motion>>Vision Express). The example will show you one use of the ImagetoArray functionality, but you can structure you VI differently.

 

As far as your sequence goes, that is exactly how you would want to do it.  Acquire the image >> Convert it to an array >> Write to file  >> Dispose Image.  You will want to have the image acquisition, the convert to array and the write to file in the while loop and the dispose image outside of the loop. One thing to note is that you may have to use the IMAQ ColorImage to Array VI (Vision and Motion >> Image Utilities >> Color Utilities) if your images are U32.

 

I hope this helps!

 

Kim W.

Applications Engineer
National Instruments
0 Kudos
Message 7 of 8
(3,865 Views)

Thanks alot. I think I am making some progress.

0 Kudos
Message 8 of 8
(3,862 Views)