Ask Your Question

Revision history [back]

Can;t acquire maximum FPS in ubuntu

Dear all, I am using Logitech C270 webcam in ubuntu, and I need maximum fps for track an object. Although I can acquire 30 fps video using guvcview software in ubuntu, in OpenCV I got only 15 fps. But sometimes in openCV I got 30 fps without changing any capture settings, but mostly it is 15 fps.

Any help will be really appreciated, Thanks.

Can;t Can't acquire maximum FPS in ubuntu

Dear all, I am using Logitech C270 webcam in ubuntu, and I need maximum fps for track an object. Although I can acquire 30 fps video using guvcview software in ubuntu, in OpenCV I got only 15 fps. But sometimes in openCV I got 30 fps without changing any capture settings, but mostly it is 15 fps.

Any help will be really appreciated, Thanks.

Can't acquire maximum FPS in ubuntu

Dear all, I am using Logitech C270 webcam in ubuntu, and I need maximum fps for track an object. Although I can acquire 30 fps video using guvcview software in ubuntu, in OpenCV I got only 15 fps. But sometimes in openCV I got 30 fps without changing any capture settings, but mostly it is 15 fps.

Any help will be really appreciated, Thanks.

include <cv.h>
include <highgui.h>
define WIDTH 640
define HEIGHT 480

using namespace cv;

// Global variables for inputs

VideoCapture cap(1);

// set capture properties.

void initInput() { cap.set(CV_CAP_PROP_FRAME_WIDTH, WIDTH); cap.set(CV_CAP_PROP_FRAME_HEIGHT, HEIGHT); cap.set(CV_CAP_PROP_FPS, 30);

}

int main(int argc, char** argv) {

initInput();
if (!cap.isOpened()) 
    return;

namedWindow("input", 1);

while (1) {
    cap &gt;&gt; frame;
    imshow("input", frame);
    //detectPuck(&amp;frame);

    if (waitKey(1) &gt;= 0);
        //break;

}
return 0;

}