Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   RaspberryPI (and ODroid) opencv frame rate (http://www.chiefdelphi.com/forums/showthread.php?t=154288)

phurley67 26-01-2017 15:21

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.

Code:

       
        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?

Chris86 26-01-2017 16:46

Re: RaspberryPI (and ODroid) opencv frame rate
 
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?

sparkytwd 26-01-2017 16:50

Re: RaspberryPI (and ODroid) opencv frame rate
 
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.

phurley67 26-01-2017 17:59

Re: RaspberryPI (and ODroid) opencv frame rate
 
It is a USB camera (logitech), I will verify that autofocus is disabled and let you know.


All times are GMT -5. The time now is 07:06.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi