LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FPS issue GigE IMAQdx Grab and Save to AVI

I have been trying to get 30fps with a Grab and Save to AVI .vi with a Greypoint camera over GigE. I have tried both with the LabView example and with the ring buffer example (https://decibel.ni.com/content/docs/DOC-39157) & (https://decibel.ni.com/content/docs/DOC-36471).  I am using MJPEG to compress the file in AVI Create.  I have used both AVI and AVI2 vi.  Using the example code to read the buffer number I can see that I am acquiring at about 45fps and processing at an inconsistent 20 fps.  No matter what I do I can’t increase the fps.  I believe that with the Grab and Save, the frames are getting over written before they get a chance to be processed.  So using a producer consumer loop should fix that, but it doesn't increase the fps.  I know that IMAQ produces a pointer and is not actually queueing the actual image, but I found a code that puts the whole image into the queue, and that didn't seem to help either.  Appreciate any help, I'm stuck.

0 Kudos
Message 1 of 7
(3,102 Views)

-What camera you are using exactly? 

-What is the maximum fps of camera?

-What is the resolution you are trying to acquire?

-Can you post what you tried?Is that the same example?

-So only acquiring you are able to? If not i would first do that experiment to ensure you can acquire at the frame rate you require and then go to processing section.

Thanks
uday
0 Kudos
Message 2 of 7
(3,097 Views)

Camera data sheet is attached.  It is capable of 120fps.  I will be cropping the image but for now would just like to be able to record at 30fps for full resolution.  I know that I am aquiring at 45 fps based on IMAQdx buffer number example which I will attach when I get back to the lab in an hour.  

0 Kudos
Message 3 of 7
(3,094 Views)
You sent USB3 camera spec and your question is about GigE. Please clarify on which camera you are using.
Thanks
uday
0 Kudos
Message 4 of 7
(3,088 Views)

It is USB I was incorrect

0 Kudos
Message 5 of 7
(3,086 Views)

This is the code that I modified from the original example Save to AVI example built into Labview.  I added the code from Grab and Detect lost buffers.  This allows me to see the see the acquired frame rate and the processed frame rate.  I added the additional code CirImBuf which supposedly takes the images from IMAQ Create Vi and saves them to a circular buffer.  This should be saving the images directly as opposed to just saving the pointer to a buffer.  Adding it had no change on the fps processed over just having IMAQ create in line directly. 

0 Kudos
Message 6 of 7
(3,066 Views)

This is the code that I used to try and add a ring buffer to the code.  I can’t use the code to get the acquired and processed frame rate anymore but I know it’s less than 30 because I was recording a stop watch.  I modified the code by first removing the excess processing I didn’t need.  I then added the cirimbuf instead of the for loop.  Neither would increase the fps noticeably

0 Kudos
Message 7 of 7
(3,064 Views)