Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Why I always lost frames at high frame rates grabbing?

Dear All,

Recently I just found I always lost frame during high speed frame rates.
my system setup is: NI PCIe 1427 cameraLink frame grabber, P4 3.2GHz, 4GB Memeory, Labview 8.2, Cooke pco.1200hs high speed camera(with 1GB CamRAM as buffer).
ROI: 100*10, 10bit, 2000fps, whish is about 4MB/sec. the camera will send its grabbed images to PC via cameraLink(base mode).

this high speed camera can code BCD  timestamp on each frame, I can get the time information and frame index very accurate.
and it can run at FIFO and Ring mode. In FIFO mode, this camera can adjust its frame rate to allow all images in the CamRAM buffer to be sent to frame grabbers.
In Ring mode, if the old frames have't been sent out to PC, they won't be  overwritten  until the new frames arrive.

this is background of my setup in hardware level.

in software level, I'm using high level grab in Labview 8.2, vision 8.2.

My purpose is to grab images at the small ROI , running at 2000fps.

But I don't know why it always lose frames. the faster the frame rates, the more I lost.
for example, if I run at 100fps, I lost 1~2 frames every 1 frame.
if I run at 3000fps, I lost at least 10 frames every 1 frame grabbed, some times even more, like 80frames,

Camera company says maybe this is due to computer speed and frame grabber speed.

is there any one has idea of it? is it really matter with the mentioned hardware speed? or I need to use LL ring to try again?
btw, is it matter with the camera file (ico file)? because the original camera file only has PCIe 1430 and PCIe 1429 configuration. though there isn't specific configuration for PCIe 1427, I still can have the frame grabber running well.

any suggestions  will be appreciated.

thanks,

Jack : )


Message Edited by weichengatech on 06-12-2007 09:06 AM

0 Kudos
Message 1 of 26
(5,678 Views)
very sorry, I duplicated this thread by mistake.
i have the same one posted in this link
http://forums.ni.com/ni/board/message?board.id=200&message.id=13951  Smiley Sad

so sorry,

jack

0 Kudos
Message 2 of 26
(5,651 Views)
As you proposed, I would suggest you make a lower level acquisition loop to be sure that nothing undesired is happenning.

To make your tests, run the loop without any other computing VIs and make your VI "High priority"

Hope this helps
Doc-Doc
http://www.machinevision.ch
http://visionindustrielle.ch
Please take time to rate this answer
Message 3 of 26
(5,652 Views)

It isn't clear how you are running the acquisition on the computer end.  If you are using Grab, you will miss images on a regular basis.  A buffered ring is the only thing that will work for high speed acquisition.

Are you using a buffered ring acquisition with a large number of buffers (I would use several thousand)?  Are you reading all of these buffers in order instead of last one acquired?

For a quick test, acquire a sequence of several thousand images at high speed.  The sequence works just like a buffered ring, but doesn't loop.  This will show if you can capture every image coming in.

Bruce

Bruce Ammons
Ammons Engineering
Message 4 of 26
(5,648 Views)
Hi, Bruce and Doc

thank you very much for your reply.
I'm not using buffered ring acquisition. I just make my code based on the normal high level grab example.
how much buffer would this high level grab would allocate? none or very small?
I would try your suggestions and see what happened.
For a quick test without loop, by the way, is there any such example i can have a look?

thank you both,

jack

Message Edited by weichengatech on 06-12-2007 02:08 PM

0 Kudos
Message 5 of 26
(5,645 Views)

The high level grab only has a 1 image buffer.  If you don't read it before the next image is acquired, it is gone forever.  This is definitely your problem - you aren't reading images at 2000 images per second, and you are losing the ones in between.  You have to acquire them into a large buffer and read the buffer sequentially.

Look for a sequence example in the IMAQ examples.  It is a high level operation.  You might be better off just finding a LL ring example and skipping a step.

Bruce

Bruce Ammons
Ammons Engineering
Message 6 of 26
(5,639 Views)
Hi, Bruce,

I see...I should try LL ring again
how big buffer size you think is enough?
2000 or 3000?
thanks

Jack
0 Kudos
Message 7 of 26
(5,635 Views)

The buffer size isn't critical.  It depends what you are doing with the images and how much other stuff you have going on in the program.  You just want to make sure it is big enough that the buffer doesn't overflow before you get back to it to process more images.  It doesn't hurt to make the buffer too large, unless you start to run out of memory.  Your images are really small, so that shouldn't be an issue.

Bruce

Bruce Ammons
Ammons Engineering
Message 8 of 26
(5,630 Views)

Dear all,

 

recently I updated my system to PCIe-1430 frame grabber, Intel Core2 E6600, Labview 8.6

 

According to above suggestions, I run the capture at the LL ring mode, but the fastest frame rate is till very slow, only 20fps, way much lower than the speed supposed to be.

 

I attaced my code here, 

two steps are shown:

  • step 1, intialization,
  • step 2,  grabbing

I'm wondering is there any mistake on this LL ring code? 

any helps will be appreciated!!! Thank you veyr much

 

thanks

 

Jack

Download All
0 Kudos
Message 9 of 26
(4,966 Views)

Everything looks okay to me, but it is easy to miss small details when you can't run the code.

 

Have you tried acquiring with the same setting in MAX?  What frame rate do you get there?

 

Try disabling the case structure that does the time stamp.  Building an array could be slowing you down, but that is doubtful.

 

Many cameras are limited by the exposure time.  You can have a camera capable of 100 fps, but if you use a long exposure time it becomes the limiting factor.  I would try adjusting your different parameters and see if they change the frame rate.

 

Bruce

Bruce Ammons
Ammons Engineering
Message 10 of 26
(4,957 Views)