LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

low level grab IMAQdx frame rate is very slow.

Hello,   I'm using NI vision software 8.5 (IMAQdx 3.1) on win XP to run a high speed AVT (pike) camera.  I'm getting the 800mbps dl rate along the IEEE 1394b firewire, and camera is working in MAX.  However, when I run, for example, the low-level grab IMAQdx to test the frame rate, I'm getting about 30-50fps, depending on how small I make the window.  If i change the IMAQdx get Image.vi buffer to "last", instead of "next" (which I think basically tells the program to not wait for another image), I get around the expected higher frame rate, but it's just a bunch of copies of about 50 frames, and then it jump to the next image (which isn't the next moment in time, but a jump ahead) and I get 50 more. This camera is design to get up to over 1000fps, so I'm not sure what i'm doing wrong.   I've attached a picture.

 

 

Thank you for your time,

veritas  

0 Kudos
Message 1 of 11
(5,931 Views)

Hi veritas,

 

When you say you're 'getting 800 mbps dl rate', do you mean you are actually achieving this rate or that this is the rate you should achieve?  If you are getting that rate, how are you doing it?

 

Also, when you say you jump to the next image as a 'jump ahead', can you clarify?  Thanks.

Stephen Meserve
National Instruments
0 Kudos
Message 2 of 11
(5,906 Views)

Veritas,

 

Right now you are just doing a grab with no processing. Meaning that you are limited to the refresh rate of the monitor basically (so 1000 fps won't be useful, as you will only see 60)

 

But hypothetically, if you want all 1000 fps, you are going to have to reduce your packet size, as windows is limited to the 800 Mbps rate.  How do you know you are getting the 800 Mbps? What service pack are you using?

 

I would suggest using a ring which takes EVERY image and buffers it as opposed to a grab which takes the next AVAILABLE image (ie frame loss for you) 

 

Like I said though, definitely check what SP you have, as Windows has an issues with meeting the 800 Mbps with SP 2 and 3. There is a fix for SP 2, but it does not work with SP 3. 

Chris Van Horn
Applications Engineer
0 Kudos
Message 3 of 11
(5,895 Views)

Thanks for the quick feedback guys.    

 

So, when i was first setting it up in MAX, the listing only allowed 100mbps, but then I dl the AVT package to "downgrade" my system back to sp1  (http://www.alliedvisiontec.com/avt-products/software/avt-1394-bus-driver-package.html), and now I have the 800mbps option.

 

---- 

with  640x480,mono-8, 5120 package size  I should be able to get 120fps (and much more with smaller window sizeframe rate), but I'm getting a maximum of ~55fps using the low-level grab, if I leave the buffer set to "next" (which waits for the next buffer before continuing).

 

If I don't select "next", but instead select "last" (which doesn't wait for the buffer), i get a MUCH higher frame rate, but when I look at the vid (avi, using the grab and store to avi), I see that about 50-100 frames are identical, and then when there is a change, it's not a consecutive frame.  For example, if I beam is oscillating at 20Hz during the recording, it's about 50-100 frames of no motion, and then frame 101, the beam is at a completely different location.  I'm not really sure why this would happen.

 -----

And, as a novice, I must ask, what is a ring structure?

 ----

Also, you say to reduce the package size? what exactly does this do, as some have told me I should increase the package size.

 

Thank you for your time and advice,

veritas 

 

0 Kudos
Message 4 of 11
(5,883 Views)

Hey veritas,

 

So, a ring acquisition takes EVERY image from the frame grabber, and if it buffers them. This is extremely useful for when acquisition rate is much higher than processing rate. Since you want 1000 fps, which LabVIEW can not achieve, you are going to have to buffer your images, or you will get missing frames.

 

To see one of these "in action" you can go to our NI example finder and search for ring. We have triggered rings, or just free-running (which is what you would want) called LL Ring.vi

 

As far as packet size. No matter how fast your camera can go and how fast your computer is, you are still limited by the bandwidth over the bus you are communicating with. So, if images/s multiplied by size/image is your max rate over the bus (size/s) then reducing the packet size will allow for more images.

Chris Van Horn
Applications Engineer
0 Kudos
Message 5 of 11
(5,856 Views)

Yes, I found that one before you replied and have been exploring it.  It is, however, built for IMAQ vi's, not IMAQdx.  The structure seems pretty different, so I was wondering if you know of any vi's that have used rings with IMAQdx, just so i can get a feel for what to do.

 

thank you,

veritas 

0 Kudos
Message 6 of 11
(5,850 Views)

Hi veritas,

 

There is not a LL Ring example that is written using IMAQdx.  You can use the IMAQ LL Ring example to build your own version of the LL Ring example for IMAQdx.  If you do that successfully, you can help your fellow users by posting it to the NI community for them to use.

Stephen Meserve
National Instruments
0 Kudos
Message 7 of 11
(5,806 Views)

In labview 8.5 I editted example VIs so that i can acquire .avi files from low level image grabber. (i attached it, and also attached a picture for fast viewing).

 

when I increase only the buffer size, I get decreasing frames per sec, but no real change in the number of different images (see attached matlab figures). That is, even though the number of frames per second differ between test runs at different buffer sizes, I'm still getting about the same number of repeated images.

 

i'll  make a ring structure vi today, and  submit my test here, but I'm wondering if the save to avi is a major source of this result I'm getting  (if so, perhaps someone has a more effective way to save image files).

 

thank you,

veritas

 

0 Kudos
Message 8 of 11
(5,793 Views)
sorry, the attachments wouldn't go throughin google chrome.

 

Message Edited by veritas on 04-06-2009 03:58 PM
Message Edited by veritas on 04-06-2009 03:59 PM
0 Kudos
Message 9 of 11
(5,791 Views)

HI 

 

I am using an logitech c310 30fps camera, i plan on using it to attach it to a rio evaluation kit for my final year project, so as it does   recognition test. How do i get the camera to work at full fps but maintain its resolution?

 

Regards

 

Siungu Maunge

0 Kudos
Message 10 of 11
(4,222 Views)