We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
Duplicate frames captured (Read 483 times)
Duplicate frames captured
May 14th, 2009, 6:00pm
 
Hi,

I'm using firewire cameras to capture videos. I always found myself capturing two duplicate frames. Here's what I did:

setup()
{
 frame.frameRate(1);

 frameRate(60);
}
draw(){
I make sure to check frame.available() before grabbing frames with frame.read()

I display the frame captured.

I display an accumulator of how many available frames I have captured since the beginning.
}
I can see that the accumulator increments every second since I set framerate at 1, while image is updated every two seconds making me think always two identical frames are supplied to me. I tried two fire wire cameras and the same happened.

Can someone tell me what I did wrong? Thanks.
I do this for technical purposes so I need to have an accurate frame rate.
Re: Duplicate frames captured
Reply #1 - May 18th, 2009, 11:45am
 
Now I'm using openCV to capture frames and the frame rate has dropped but no duplicate frames any more. On the down side, the intervals between consecutive frames is not very constant, varying 30% in time. I only use opencv.image() once per draw cycle and assign it to a PImage variable. I did some timing and found it to be just the opencv.read() that took the time, not the rest of my program.alas. Angry
Page Index Toggle Pages: 1