Go to Post Most of the people who fit the profile of long tenured FIRST mentor are either already on a team or locked up in an institution where they belong... - PayneTrain [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 26-01-2017, 15:21
phurley67 phurley67 is offline
Programming Mentor
FRC #0862 (Lightning Robotics)
Team Role: Mentor
 
Join Date: Apr 2014
Rookie Year: 2013
Location: Michigan
Posts: 73
phurley67 is an unknown quantity at this point
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?
Reply With Quote
  #2   Spotlight this post!  
Unread 26-01-2017, 16:46
Chris86 Chris86 is offline
Registered User
FRC #4064 (Inzombiacs)
Team Role: Mentor
 
Join Date: Mar 2010
Rookie Year: 2007
Location: Jacksonville, Florida
Posts: 35
Chris86 is a splendid one to beholdChris86 is a splendid one to beholdChris86 is a splendid one to beholdChris86 is a splendid one to beholdChris86 is a splendid one to beholdChris86 is a splendid one to beholdChris86 is a splendid one to behold
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?
__________________
Current mentor for Team #4064
Proud former member of Team #86: Team Resistance 2007-2011
Reply With Quote
  #3   Spotlight this post!  
Unread 26-01-2017, 16:50
sparkytwd's Avatar
sparkytwd sparkytwd is offline
Registered User
FRC #3574
Team Role: Mentor
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Seattle
Posts: 102
sparkytwd will become famous soon enough
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.
Reply With Quote
  #4   Spotlight this post!  
Unread 26-01-2017, 17:59
phurley67 phurley67 is offline
Programming Mentor
FRC #0862 (Lightning Robotics)
Team Role: Mentor
 
Join Date: Apr 2014
Rookie Year: 2013
Location: Michigan
Posts: 73
phurley67 is an unknown quantity at this point
Re: RaspberryPI (and ODroid) opencv frame rate

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


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:58.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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