Go to Post Mind you... if your ball kicker has as much energy stored up as a trackball launcher, you ought to be able to kick balls up into the stands. - dtengineering [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

 
Closed Thread
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 06-01-2013, 03:55
jacob9706 jacob9706 is offline
Registered User
AKA: Jacob Ebey
FRC #3574 (High Tekerz)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Seattle
Posts: 101
jacob9706 is on a distinguished road
Example of Vision Processing Avaliable Upon Request

Last year my team was reconized for having such a great Vision System and if I get enough requests I would be more than happy to put together a quick tutorial to get teams up and running with "On Robot Tracking" instead of sending packets over the network.

Sending packets over the network may be a problem this year because the GDC has said taht those packets are "Deprioritized" over others.

Let me know what you think. I will need to know if you want the vision code to be in C++ or Python, and also if you want the robot code to be in C++ or Java.

Let me know if anyone is interested!

==========================EDIT==================== ================
Hey Everyone, It seems there is an overwhelming need for this. Let me specify what we did last year and what the tutorial will be like.

Last year
The main thing that set us appart form other teams what we did all our vision processing on our robot on a core i5 computer (ie. a motherboard with integrated graphics and a core i5, no screen or anything.). We used ubuntu (a version of linux). To deploy code we used git and bash scripts to deploy compile and run the code on boot.

The Tutorial
The one thing I will be covering is how to get a basic rectangle tracking system. This system will reconize a colored rectangle, find the bounding points and draw them on the image.

After seeing the above posts it seems like everyone would like to see the vision in C++.

Pros and Cons
C++
Pros
  • You know your errors on compile time (For the most part)
  • Many more tutorials (as of last year)

Cons
  • Extra scripts neded for compiling
  • Network sockets are "harder"

Python
Pros
  • Loosly typed language
  • Automatic memory allocation
  • "Easy" network sockets

Cons
  • Extra layer
  • Not as many examples
  • Not many people know Python

Because of the new documentation and that I am trying to convince my team to use Python this year all the way around (Robot and Vision) I will be doing the vision in python. Another reason for this is that the code is the same for windows and linux (C++ libraries varry a bit).

I will be posting back here when the tutorial is complete. I will not however be covering how to install python or the OpenCV libraries. When you wait for the tutorial from me about the rectangles here is how to install OpenCV (I will be using Python 2.7.3 and OpenCV 2.4.2) How to install OpenCV

At the end of the Python tutorial I will show you how to convert the code to C++
__________________
/*
* Team 3574 Alumni
*
* 2011 - Highest Seeded Rookie
* 2011 - Rookie All-Star
* 2012 - Engineering Inspiration
* 2012 - Olympic Deans List Winner
* 2013 - Engineering Inspiration
* 2013 - Judges Award (For unique circular robot and the way the team works together.)
*/

Last edited by jacob9706 : 06-01-2013 at 15:19. Reason: People responded
  #2   Spotlight this post!  
Unread 06-01-2013, 03:57
nathan_hui nathan_hui is offline
Registered User
AKA: Nathan Hui
FRC #2473 (CHS Robotics)
Team Role: Alumni
 
Join Date: Feb 2012
Rookie Year: 2009
Location: Cupertino, CA
Posts: 228
nathan_hui will become famous soon enoughnathan_hui will become famous soon enough
Send a message via AIM to nathan_hui
Re: Example of Vision Processing Avaliable Upon Request

What was your strategy to computer vision? Did you use the WPIlib functions or did you write your own image recognition functions?
  #3   Spotlight this post!  
Unread 06-01-2013, 03:59
jacob9706 jacob9706 is offline
Registered User
AKA: Jacob Ebey
FRC #3574 (High Tekerz)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Seattle
Posts: 101
jacob9706 is on a distinguished road
Re: Example of Vision Processing Avaliable Upon Request

Quote:
Originally Posted by nathan_hui View Post
What was your strategy to computer vision? Did you use the WPIlib functions or did you write your own image recognition functions?
We implemented an onboard machiene dedicated to processing our vision. We ended up utilizing OpenCV for the main processing.
__________________
/*
* Team 3574 Alumni
*
* 2011 - Highest Seeded Rookie
* 2011 - Rookie All-Star
* 2012 - Engineering Inspiration
* 2012 - Olympic Deans List Winner
* 2013 - Engineering Inspiration
* 2013 - Judges Award (For unique circular robot and the way the team works together.)
*/
  #4   Spotlight this post!  
Unread 06-01-2013, 08:33
ohrly?'s Avatar
ohrly? ohrly? is offline
Griffin Alum
AKA: Colin Poler
FRC #1884 (The Griffins)
Team Role: Alumni
 
Join Date: Jan 2013
Rookie Year: 2011
Location: London
Posts: 58
ohrly? is an unknown quantity at this point
Re: Example of Vision Processing Avaliable Upon Request

Quote:
Originally Posted by jacob9706 View Post
We implemented an onboard machiene dedicated to processing our vision. We ended up utilizing OpenCV for the main processing.
What did you run OpenCV on? Did you figure out how to run it on the cRIO, or did you run it on a laptop?
  #5   Spotlight this post!  
Unread 06-01-2013, 09:10
rich2202 rich2202 is offline
Registered User
FRC #2202 (BEAST Robotics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 1,192
rich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond repute
Re: Example of Vision Processing Avaliable Upon Request

I'm interested. One of the Team's programming goals is to use vision this year. Thanks!
  #6   Spotlight this post!  
Unread 06-01-2013, 10:55
arthurlockman's Avatar
arthurlockman arthurlockman is offline
Team Captain
FRC #0172 (Northern Force)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Gorham, ME
Posts: 29
arthurlockman is an unknown quantity at this point
Send a message via AIM to arthurlockman
Re: Example of Vision Processing Avaliable Upon Request

I'm definitely interested! Our team got vision almost working last year, but the problem with it was that it wasn't at all reliable. In c++, if you don't mind.
__________________
--
Arthur Lockman
Twitter: @arthurlockman
a.rthr.me
  #7   Spotlight this post!  
Unread 06-01-2013, 11:01
omsahmad's Avatar
omsahmad omsahmad is offline
Registered User
FRC #1595 (Dragons)
 
Join Date: Oct 2010
Rookie Year: 2011
Location: Spokane, WA
Posts: 66
omsahmad is just really niceomsahmad is just really niceomsahmad is just really niceomsahmad is just really niceomsahmad is just really nice
Re: Example of Vision Processing Avaliable Upon Request

I would also be interested. I got some vision going last year as well, but not super reliably either. C++ please.
  #8   Spotlight this post!  
Unread 06-01-2013, 11:03
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 989
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: Example of Vision Processing Avaliable Upon Request

An example for OpenCV vision processing on a coprocessor would be great!

For teams looking to process on the cRIO it looks like there are examples available in each language already. We'll be playing around with one soon to decide if its viable or if we want to focus on doing it on the DS or a coproc.
  #9   Spotlight this post!  
Unread 06-01-2013, 11:23
Fifthparallel Fifthparallel is offline
Registered User
AKA: Sam Chen
FRC #1410
 
Join Date: Dec 2012
Rookie Year: 2011
Location: Denver, CO
Posts: 65
Fifthparallel is an unknown quantity at this point
Re: Example of Vision Processing Avaliable Upon Request

Any ideas for a self-encapsulated program that takes an image and supplies an image to the cRio w/ C++ and Network Tables && runs on a separate system (a la Raspberry Pi, Arduino, and so on)?
__________________
sudo chmod u+x helloworld.sh
gotta start somewhere.
  #10   Spotlight this post!  
Unread 06-01-2013, 11:27
z_beeblebrox's Avatar
z_beeblebrox z_beeblebrox is offline
Custom User Title
AKA: Cal
FRC #4183 (Bit Buckets)
Team Role: Alumni
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Cambridge MA
Posts: 811
z_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond reputez_beeblebrox has a reputation beyond repute
Re: Example of Vision Processing Avaliable Upon Request

I'm interested in learning about using a coprocessor.
__________________
2012 Utah Regional Rookie All-Star
2013 Phoenix Regional Judge's Award for "design process and prototyping"
2014 Hub City Regional Quality Award, Arizona Regional Excellence in Engineering Award
2015 Arizona East Regional Creativity Award, Winner
2016 Arizona North Regional Finalist, Arizona West Excellence in Engineering Award, Finalist
  #11   Spotlight this post!  
Unread 06-01-2013, 11:42
ctccromer's Avatar
ctccromer ctccromer is offline
Animus
AKA: Tucker Campbell
FRC #3753 (Bulah Bots)
Team Role: Alumni
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Baton Rouge, Louisiana
Posts: 190
ctccromer is a name known to allctccromer is a name known to allctccromer is a name known to allctccromer is a name known to allctccromer is a name known to allctccromer is a name known to all
Re: Example of Vision Processing Avaliable Upon Request

team 3753 here, and we've never used vision before, though we're 100% determined to this year. Have last year's Kinect and some reflective tape at the ready!

We're programming in LabVIEW, but I do know basic C++ and Java both so this would still be immensely helpful even if not done in LabVIEW!
__________________
Team 3753 BulahBots
  #12   Spotlight this post!  
Unread 06-01-2013, 13:52
dheerm's Avatar
dheerm dheerm is offline
Drive Team and Head Programmer
AKA: Dheer Mirchandani
FRC #0224 (The Tribe)
Team Role: Programmer
 
Join Date: Oct 2012
Rookie Year: 2010
Location: Piscataway
Posts: 37
dheerm will become famous soon enough
Re: Example of Vision Processing Avaliable Upon Request

There was a card with an activation key for some sort of vision processing software to install on our driving computer. So I'm curious to see how that would work. I feel like it could have a lot of potential, I'll post back when I try it out.
__________________
"All you need is duct tape and a dream"

Team 224:
District Champions @TCNJ w/ Team 56 and Team 293

8th alliance captain at MAR championships w/ (take a guess) , Team 56 and Team 293.

www.team224.com
  #13   Spotlight this post!  
Unread 06-01-2013, 14:41
DjMaddius's Avatar
DjMaddius DjMaddius is offline
Registered User
AKA: Matt Smith
FRC #2620 (Southgate Titans)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Southgate, Mi
Posts: 161
DjMaddius is an unknown quantity at this point
Re: Example of Vision Processing Avaliable Upon Request

Do the vision processing in Python please! I'd love to see a tut on it.
  #14   Spotlight this post!  
Unread 06-01-2013, 15:13
jacob9706 jacob9706 is offline
Registered User
AKA: Jacob Ebey
FRC #3574 (High Tekerz)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Seattle
Posts: 101
jacob9706 is on a distinguished road
Re: Example of Vision Processing Avaliable Upon Request

Hey Everyone, It seems there is an overwhelming need for this. Let me specify what we did last year and what the tutorial will be like.

Last year
The main thing that set us appart form other teams what we did all our vision processing on our robot on a core i5 computer (ie. a motherboard with integrated graphics and a core i5, no screen or anything.). We used ubuntu (a version of linux). To deploy code we used git and bash scripts to deploy compile and run the code on boot.

The Tutorial
The one thing I will be covering is how to get a basic rectangle tracking system. This system will reconize a colored rectangle, find the bounding points and draw them on the image.

After seeing the above posts it seems like everyone would like to see the vision in C++.

Pros and Cons
C++
Pros
  • You know your errors on compile time (For the most part)
  • Many more tutorials (as of last year)

Cons
  • Extra scripts neded for compiling
  • Network sockets are "harder"

Python
Pros
  • Loosly typed language
  • Automatic memory allocation
  • "Easy" network sockets

Cons
  • Extra layer
  • Not as many examples
  • Not many people know Python

Because of the new documentation and that I am trying to convince my team to use Python this year all the way around (Robot and Vision) I will be doing the vision in python. Another reason for this is that the code is the same for windows and linux (C++ libraries varry a bit).

I will be posting back here when the tutorial is complete. I will not however be covering how to install python or the OpenCV libraries. When you wait for the tutorial from me about the rectangles here is how to install OpenCV (I will be using Python 2.7.3 and OpenCV 2.4.2) How to install OpenCV

At the end of the Python tutorial I will show you how to convert the code to C++
__________________
/*
* Team 3574 Alumni
*
* 2011 - Highest Seeded Rookie
* 2011 - Rookie All-Star
* 2012 - Engineering Inspiration
* 2012 - Olympic Deans List Winner
* 2013 - Engineering Inspiration
* 2013 - Judges Award (For unique circular robot and the way the team works together.)
*/

Last edited by jacob9706 : 06-01-2013 at 15:20.
  #15   Spotlight this post!  
Unread 06-01-2013, 15:30
DjMaddius's Avatar
DjMaddius DjMaddius is offline
Registered User
AKA: Matt Smith
FRC #2620 (Southgate Titans)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Southgate, Mi
Posts: 161
DjMaddius is an unknown quantity at this point
Re: Example of Vision Processing Avaliable Upon Request

Awesome! I'm a proficient Python developer outside of robotics but it's just easier to get other kids in programming in robotics with LabVIEW. Maybe if I do vision similar to yours this year we can push Python on to the rest of the team.
Closed Thread


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 02:09.

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