Go to Post For some people FRC is an introduction into STEM and just a way to open someones eyes to a world they might not know exist. To other it is a lifestyle that makes crossfit look casual. - IronicDeadBird [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
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
  #5   Spotlight this post!  
Unread 15-01-2014, 20:58
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 430
otherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to behold
Re: How to make Axis Follow a color

Quote:
Originally Posted by CalTran View Post
Given he wants to track a robot of a certain color...
The OP said they wanted a robot to track a color, not track a robots color. Maybe he wants to track a ball...


There are quite a few different options depending on what it is you want to do.

Some places to start...
If you are programming in C++ or Java, when you installed wpilib you should have gotten a few different sample projects.
There's a sample project from 2009 called TrackerDemoProject. This program tracked targets based on color, and turned the robot to keep the target in the center of the camera frame.
There's another sample project, from 2010 called CircleTrackerDemoProject. This program looks for a circular target and rotates the chassis to center the target in the cameras view.
If you are programming in Java, these sample projects are accessed from File --> New Project --> Samples --> FRC Java.

Roborealm is a piece of software you get for free (there's a code in the KOP). They have a long list of guides for filtering images in different ways.
This program can run on your driver station to offload some of the processing required (so it doesn't slow down your cRIO).
If you're trying to track a ball you could threshold the image based on known ball colors, then try to detect an ellipse.

OpenCV can be used, you'll need to run this on your driverstation laptop. One way is as a widget in the smart dashboard. See the vision paper that 341 posted here on CD. Another option is to run a co-processor (like a beaglebone on board your robot) on board your robot, which connects to the camera and sends processed data to the cRIO over ethernet.

If you couldn't tell, there's lots of options. If you give us more information about your setup (what language you're programming in, where you want to do your image processing, what software you want to use, etc.) we can help narrow things down. Info on what you're trying to detect would be helpful to in describing what algorithm you might be able to use to detect the colored object.
__________________
http://team2168.org

Last edited by otherguy : 15-01-2014 at 21:00.
Reply With Quote
 


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:13.

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