RaspberryPI (and ODroid) opencv frame rate

I have a very simple C++/OpenCV program in the body I have the following code which works fine, but runs slower than I would expect, it takes ~85ms to get a frame from the camera.

        
        for (int i = 0; i < frame_count; ++i) {
                // capture >> frame;   // runs the same regardless of which call
                capture.read(frame);
        }

Anyone know what I can do differently to get this running faster?

Could you describe the hardware setup? Specifically, what is in between your camera and the Raspberry pi? Is it a USB camera plugged in directly? Is it an ethernet camera going through a switch, then a router then to the pi?

Was this code the only software running on the pi at the time?

My money would be on auto exposure on the camera. I’ve found that with the Genius 120 degree webcam.

If you can fire up something like guvcview with a connected monitor see what frame rate you get there.

FYI, you can disable auto exposure on the Genius 120 like this: v4l2-ctl -d /dev/video0 -c exposure_auto=1 -c exposure_absolute=300

Different cameras may have different UVC control exposure however.

It is a USB camera (logitech), I will verify that autofocus is disabled and let you know.