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
OpenCV Framerate (Read 1479 times)
OpenCV Framerate
Dec 22nd, 2008, 12:59pm
 
Hi,

I have been using the OpenCV library to adapt some of my examples that used JMyron (OpenCV does background subtraction and thresholding) but I've run across a problem:

OpenCV maximum framerate seems to be 15 fps!

I've simplified my code to this:
Code:

import hypermedia.video.*;

OpenCV opencv;

void setup() {

opencv = new OpenCV( this );
opencv.capture(320,240);
}

void draw () {
opencv.read();
println(frameRate);
}


and compared it to this:
Code:

import JMyron.*;

JMyron m;

void setup() {

m = new JMyron();
m.start(320, 240);

}

void draw () {
m.update();
println(frameRate);
}


I tested three different webcams (2 brands) and the OpenCV version got only about 12-15 fps while the JMyron version got 25-35 fps.

Anyone knows why this is happening and if there's a way to make OpenCV faster?

I was really looking forward to using OpenCV since it has a lot of code I used to do manually because I thought it would be faster...

thanks
Page Index Toggle Pages: 1