Jump to content

gvstemp

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by gvstemp

  1. Thanks a ton for the advice.

    It seems like using LL Ring for my application is the best bet and to trust that at the camera end there is not jitter in the frame rate (once set).

    I use a MC1362 Mikrotron camera, does any one has any experience/benchmarks on how reliable the frame-rate is ?

    Anyway, I will try to set up the ring and see if I can record at 3-4kHz for long enough times.

    Thanks a ton for your time and advises

    Sorry I don't have IMAQ loaded on my current computer, but I can give some general observations.

    If at all possible you should try for a hardware timed acquisition with frame buffer handling done at the driver level. With a really high frame rate like you have, it seems way too risky to attempt any kind of queue-based software buffering at the LabVIEW level.

    I would try to use LL Ring.vi or Buffered Ring since your goal is continuous acquisition. I don't know how your frames are synced and timed on the hardware side, and so that could affect the system, but it seems like the Ring grab should be able to give you an accurate timing of frames. It shouldn't just be dropping frames, or if it does, you should try to fix that somehow so that you can grab without any dropped frames.

    If you get to that point, then the frame timestamp should be a simple multiplication of the frame number and your frame rate, added to the start time.

    If your framesync isn't even regular, like if it is based on some detection sensor, then you have a bigger problem. In that case I would get an NI mulitfunction or counter/timer card and use the RTSI bus to share the framesync with a hardware timer, and then you can build up a buffer of timestamps associated with framesyncs.

    If you can get that hardware-timed ring grab working, then you should be able to set up a parallel thread to monitor the current frame number and write any new frames to disk, hopefully without converting them to 2D arrays first (which is really slow); instead using some kind of IMAQ function to save the file.

    At any rate, my suggestion would be to get to the point where you can rely on every frame being acquired with a known delta time, because I don't think you'll be successful measuring it in software at those high rates.

    Good luck,

    Jason

    P.S. It probably would have been good to start a new thread since it's a new problem.

  2. I have a relted question. Actually the more I read on this, the more questions I have :P

    So seems like there are a few ways of doing this ( this = high speed imaging (3000Hz-5000Hz), then writing to disk and later post-processing)

    1. Use Grab VI and attach a time stamp to it (like for the filename) and write this combo. to a queue, later dequeue to post process.

    2. using "LL Sequence.VI"

    3. using " LL ring.VI" or "buffered ring"

    In Grab VI... the timestamps is the way to check FOR SURE that the frame rate is what I set it to be. ( Framerate = #frames/Total Time; and (N- (N-1)) frametimestamp = exposure time (should be constant)

    however, in the "Sequence" or "Ring" option, is there a way to get accurate time stamps of the acquired frame ? Seems like I can only set total number of frames (N) and maybe measure total time for acquisition and get the average framerate. Not very good for me, since I cant be sure that every frame was acquired with deltaT = (1/framerate).

    So whats the final word on "best way" to do highspeed image acquisition and writing to disk problem ?

  3. thanks for the reply !

    Am a newbie at IMAQ functions. I looked again at the NI-IMAQ functions to find a VI that can do high speed (3k-4k frames per second) streaming to disk. Couldnt find.

    Can you please elaborate which VIs would help ?

    An example would also be greatly appreciated.

    I was also thinking using the "LL Sequence.VI" to acquire N images. however I dont know and couldnot figure out a way to get time stamps for these frames. In post processing steps I use time information in the object tracking. So that might not be a solution for me.

    Any other advice will be appreciated.

    thanks

    Aren't there native IMAQ functions for writing images to disk? Why don't you stream your input straight to disk, and keep a list of frame numbers and/or file names and timestamps in your queue? That gives you an index into your collection of disk image files, and you can access them in your post-processing step.

  4. Hi Antoine Châlons

    I have been looking for a solution for "high speed grab with saving to disk". This particular thread seemed VERY interesting, however, you mentioned that you posted an example VI in some other thread and I cant seem to find that linked thread.

    Particularly you linked to

    http://forums.lavag....ate-t11317.html

    and this link just takes me back to the lavag forum main page.

    I am very curious at looking at your celebrated solution for highspeed grabbing. Also you mentioned in one of your replies above

    ==

    I have another application running with a Basler A504 camera and PCIe 1429, we acquire 4000frame per second (1000*128*8bit) during 1 second, so at that speed we don't even try to stream to disk, it's about 650Mbytes/s.. a CD ! So be configure a ring buffer, start the acquisition, stop it when all the fames have been acquired then we have all the time we want to save to hard drive. Complete different application, but the code is just slightly different

    ===

    As for my attempts, I can tell the following:

    I am trying to acquire images at 3000-4000Hz (400x400x8bit), for as long as I possible can. I am using a CMOS Mikrotron MC1362 camera with PCIe1433 card.

    In my first attempt I am trying to acquire a set number of frames N (say N= 4000). So used Queues (of size N+1000) and Grab Acquire VI. As soon as I grab the image, I assign a time stamp to it and this cluster of (Image + time stamp), I write to a queue. Once the entire N frames are acquired, I Dequeue and post process.

    I first tried to write the purple IMAQ image reference wire (rookie mistake, thinking that that was the actual image) to the queue and realised that I was writing the last frame N times to the queue.

    (Hence I reached to this Forum).

    At present my solution is: After the Grab Acquire.Vi, I convert Image to Array and write this array (IMAQ to Array.VI) to the queue (with time stamps). At the Dequeue end, I convert the array back to image for post processing.

    This works.... but I am limited to 1500-1900 Hz only. The camera (at this image size) is capable of 3000Hz. The whole convert-to-array step slows down the system.

    I would really like to look at your code that you used for 4000Hz acquisition, as well as the code for 'long measurement'.

    Since I cannot seem to find the examples that you had uploaded in the linked thread, can you please upload the example again ? will appreciate much.

    Thanks.

    GVS

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.