07-21-2009 06:56 PM
07-22-2009 04:43 AM - edited 07-22-2009 04:44 AM
If you have fixed acquisition time I would like to recommend to allocate one big buffer instead of lot of small (in your case 80 x (4* 36000 * 😎 pixels), then drop small images into big one with Image to Image function. Should be fast enough on the modern PC.
Andrey.
07-22-2009 12:46 PM
Thank you Andrey, I'd like to try that. Do you mean for instance, I should acquire the images in a ring using small buffers and shuffle them off one at a time to the large image buffer? And that this is faster than converting each image to a subarray? (I did not mention these are 14-bit images.) It looks like ImagetoImage is not included with NI-IMAQ so I need IMAQ Vision.
-Charles Lasnier
07-22-2009 04:35 PM
One thing I can offer is you probably can reuse the allocated buffers. I mean, it'll take a long time the first time, but then you'll be able to pass them back into a sequence over and over again. That'll cut down on successive time use.
I don't think VHA is appropriate for this application.
09-21-2009 03:59 PM
I have found a work-around for this issue. I used the NI Camera File Generator to make a new camera file and chose line scan instead of area scan. I picked a vertical size of 5000 lines, which in my case would be 1000 times the actual number of lines in a camera frame. The frame grabber now ignores the frame valid signal and puts lines into the image buffer until it is full, then starts on the next buffer. No lines are dropped. After acquisition is complete, I extract the data into a large m x n array where n is the horizontal size of the image and m is 5000*number of buffers. I trim off the partial frames at the top and bottom, then reform the array into j x k x n where j is the number of complete frames, and k is the vertical size of one frame. This approach reduces the number of image buffers required by 1000, which makes the create and configure much faster.
This works easily for my camera because the top line of every frame is a header containing camera settings, so I can tell where a frame begins, to know how many lines to trim off to eliminate the partial frames at the start and end.