LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Queuing Imaq images


@Nitai wrote:

@BOB: I have attached the .vi too which has three parallel loops running. One is for a piezo motor, second is for the camera acquiring the images and third is simply reading the FPGA output from FPGA.vi My concern is about the second (as mentioned) loop particularly about the queueing. I tried working with the buffers too but I guess you judged me beforehand as it was overwrting it always I couldn't work with storing it continously. I would not worry about producer/consumer right now as I am still good with my system RAM and working speed however, storing images in a queue seems a problem to me right now.


Nitai,

     You do realize that images are fairly large, don't you?  I don't know how big your image is, but if it is 640x480 color, then each image is about 1.2MB, so 1000 of them would require more than a Gigabyte to store.  Having said that, you certainly could write code to configure 1000 Image Buffers, take 1000 Images and save them in sequential buffers, stop taking images, and then use other IMAQ functions to selectively retrieve each Image and process it.  

     Of course, this is talking about collecting images using a PC, not an FPGA.  I don't have much experience with FPGA hardware/software, so this might not apply.

     I'm about to leave on a trip, so I don't have time to look at your code, but I did check out my own code to remind myself how you configure Camera Buffers (on a PC using IMAQdx).  The IMAQ command is called IMAQdx Configure Acquisition, which lets you specify the number of buffers the IMAQdx driver will use.  When you acquire images, you can specify the buffer to use, or (if my memory is correct) you can have it automatically use sequential buffers, which is probably what you want.

     By storing all of Images in separate buffers, you don't have to Queue anything, particularly if the nature of your processing requires you to work with 1000 images "all at once" (which means having them all in memory "all the time" might be a good thing).  Once they are all processed, you can simply pass them all to the data storage routine (note -- you really aren't passing 1GB of data -- you are passing 1000 "pointers to 1.2MB of data", and can effectively index through those buffers to extract the 1.2MB Image).

 

Bob Schor

0 Kudos
Message 11 of 12
(1,026 Views)

Hello Bob,

 

That's new information for me. Thanks for a valuable comment. I have 640x480 grayscale images. And, I feel sorry for myself that you couldn't see my code as I am using buffers but would have to use it in your way to have a desired output and I would love not to use queue just to minimize my program as much it's possible.  

 

And I am not using FPGA for any processing other than just using trigger for my camera so that rules out too.

 

And yes, this is I would want to do it if that's doable.

" By storing all of Images in separate buffers, you don't have to Queue anything, particularly if the nature of your processing requires you to work with 1000 images "all at once" (which means having them all in memory "all the time" might be a good thing).  Once they are all processed, you can simply pass them all to the data storage routine (note -- you really aren't passing 1GB of data -- you are passing 1000 "pointers to 1.2MB of data", and can effectively index through those buffers to extract the 1.2MB Image)."

 

I will try to do these things and see how it behaves.

 

Good luck for your trip though. Enjoy 🙂 (when will you be back?)  

 

thanks

0 Kudos
Message 12 of 12
(1,024 Views)