Go to Post ...all that matters in my opinion is how much personal growth each one of you all achieve from being a part of this wonderful organization known as the FIRST robotics program. - Elgin Clock [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 15-11-2014, 17:24
Danodeth Danodeth is offline
Registered User
AKA: Daniel Clouse
FRC #0696 (Circuit Breakers)
Team Role: Mentor
 
Join Date: Sep 2014
Rookie Year: 2012
Location: La Crescenta, CA
Posts: 1
Danodeth is just really niceDanodeth is just really niceDanodeth is just really niceDanodeth is just really nice
Odroid U2/U3 multithreaded camera code

I just posted some C++ code I wrote to read from USB cameras and display the images to a monitor. Note that there is no "vision processing" going on here, so this isn't intended as a final solution to any particular problem. It's more of a test to see how fast I can capture and display images. It might be a nice starting place for someone who wants to do vision processing on a coprocessor, and in fact, team 696 may use it for that purpose in 2015, depending on the game.
This code has been run on Odroid U2 and U3 processors running Ubuntu, reading from either 1 or 2 Playstation Eye USB cameras, and displaying the images to a monitor attached to the Odroid via HDMI cable. I'm using 2 threads for each camera, 1 for reading in the image and one for sending the image to the display. The images are buffered in a queue in shared memory with pointers passed between threads to avoid unnecessary copying.
Here are the frame rates I've seen on Odroid U2:
1 camera 480 x 640 pixels: 43 fps
2 cameras 480 x 640 pixels: 15 fps
1 camera 240 x 320 pixels: 125 fps
1 camera 480 x 640 and 1 at 240x320: 30 fps
These are uncompressed images, and I expect we are limited by the speed of the USB connection.

The code is available here:
https://github.com/team696-public/2014_odroid_camera

Dependencies: Video4Linux, OpenCV.
The capture code accesses the cameras using the Video4Linux driver interfaces. OpenCV is used only to display the images.
 


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 22:15.

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