Go to Post Most of all, I long to give others a chance to experience what I did with FIRST, to give people from my home town that opportunity, because FIRST really is that once in a lifetime opportunity that so many people dont get a chance to be a part of. It shouldnt be that way. - Jacqui Sutton [more]
Home
Go Back   Chief Delphi > ChiefDelphi.com Website > Extra Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 12 votes, 5.00 average. Display Modes
  #31   Spotlight this post!  
Unread 08-12-2012, 10:48 PM
divixsoft's Avatar
divixsoft divixsoft is offline
Registered User
FRC #0835
 
Join Date: Feb 2011
Location: MI
Posts: 29
divixsoft is an unknown quantity at this point
Re: paper: Team 341 Vision System Code

I fixed the errors, but I still don't know what the code does.

Thanks,
Dimitri
Reply With Quote
  #32   Spotlight this post!  
Unread 09-24-2012, 07:00 PM
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,069
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: paper: Team 341 Vision System Code

Sorry for the (very) late reply, but it has come to my attention that I erroneously included the default WPIlib vision tutorial sample images in this project (which light the target in red) instead of the green-lit test images we actually used for tuning. I will upload the correct test images when I get onto the right laptop.

Of course, you can also re-tune the color segmentation algorithm to look for red instead of green

EDIT: I have uploaded some sample images that should work with the default tuning.

Last edited by Jared Russell : 09-24-2012 at 07:06 PM.
Reply With Quote
  #33   Spotlight this post!  
Unread 01-10-2013, 08:17 PM
Shawstek's Avatar
Shawstek Shawstek is offline
Registered User
FRC #0365
 
Join Date: Apr 2012
Location: Wilmington, DE
Posts: 2
Shawstek is an unknown quantity at this point
Re: paper: Team 341 Vision System Code

Thanks for uploading this!
Reply With Quote
  #34   Spotlight this post!  
Unread 01-14-2013, 09:21 AM
carterh062 carterh062 is offline
Registered User
FRC #3929
 
Join Date: Nov 2011
Location: Philly
Posts: 5
carterh062 is an unknown quantity at this point
Re: paper: Team 341 Vision System Code

3929 was extremely grateful when you posted this code last year. Thanks for posting this extension to setting it up.
Reply With Quote
  #35   Spotlight this post!  
Unread 02-02-2013, 04:12 PM
twiggzee twiggzee is offline
Registered User
FRC #3502 (Octo-(PI)-Rates)
Team Role: Mentor
 
Join Date: Mar 2011
Rookie Year: 2011
Location: Tallahassee, FL
Posts: 55
twiggzee is an unknown quantity at this point
Re: paper: Team 341 Vision System Code

thanks so much for posting this! just got it up and running and it is amazing!! this is our first year doing vision processing so this will help us alot in getting ready for this years competition.
__________________
Wendy
Team 3502
Reply With Quote
  #36   Spotlight this post!  
Unread 02-06-2013, 01:45 AM
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,033
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: paper: Team 341 Vision System Code

If anyone is interested, I ported the image processing portion of this code to Python. http://www.chiefdelphi.com/forums/sh...d.php?t=112866
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
  #37   Spotlight this post!  
Unread 02-07-2013, 09:55 PM
twiggzee twiggzee is offline
Registered User
FRC #3502 (Octo-(PI)-Rates)
Team Role: Mentor
 
Join Date: Mar 2011
Rookie Year: 2011
Location: Tallahassee, FL
Posts: 55
twiggzee is an unknown quantity at this point
Re: paper: Team 341 Vision System Code

if it's not too much to ask, could someone please walk me through how to run the code with test images? I put the argument (a string with the path to my test image) in the arguments field of the project properties, run window. but when i run it in netbeans, i get the following errors in the netbeans output window. i guess it is trying the run the smartdashboard somehow, as it is supposed to, but how do I make this work for test images.

ant -f \\\\shs-ms10\\Students\\home\\shs.install\\NetBeansProject s\\OctoVision run
init:
Deleting: \\shs-ms10\Students\home\shs.install\NetBeansProjects\Oc toVision\build\built-jar.properties
deps-jar:
Updating property file: \\shs-ms10\Students\home\shs.install\NetBeansProjects\Oc toVision\build\built-jar.properties
Compiling 1 source file to \\shs-ms10\Students\home\shs.install\NetBeansProjects\Oc toVision\build\classes
compile:
run:
Exception in thread "main" java.lang.NullPointerException
at edu.wpi.first.smartdashboard.gui.DashboardPrefs.ge tInstance(DashboardPrefs.java:43)
at edu.wpi.first.smartdashboard.camera.WPICameraExten sion.<init>(WPICameraExtension.java:103)
at edu.octopirates.smartdashboard.octovision.OctoVisi onWidget.<init>(OctoVisionWidget.java:91)
at edu.octopirates.smartdashboard.octovision.OctoVisi onWidget.main(OctoVisionWidget.java:351)
__________________
Wendy
Team 3502
Reply With Quote
  #38   Spotlight this post!  
Unread 02-08-2013, 10:50 AM
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,069
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: paper: Team 341 Vision System Code

It looks like some of the internal changes to SmartDashboard for 2013 have broken stand-alone operation. Never fear, here is how to fix it:

Add the line:
Code:
DashboardFrame frame = new DashboardFrame(false);
...inside the main method before creating the DaisyCVWidget.
Reply With Quote
  #39   Spotlight this post!  
Unread 02-08-2013, 10:55 AM
twiggzee twiggzee is offline
Registered User
FRC #3502 (Octo-(PI)-Rates)
Team Role: Mentor
 
Join Date: Mar 2011
Rookie Year: 2011
Location: Tallahassee, FL
Posts: 55
twiggzee is an unknown quantity at this point
Re: paper: Team 341 Vision System Code

that worked thanks so much!!
__________________
Wendy
Team 3502
Reply With Quote
  #40   Spotlight this post!  
Unread 03-09-2013, 10:15 PM
mrklempae mrklempae is offline
Registered User
no team
 
Join Date: Jan 2013
Location: Montana
Posts: 19
mrklempae is an unknown quantity at this point
Re: paper: Team 341 Vision System Code

Based on what I've read here in the comments, this vision tracking system is legendary. We're programming in C++, so obviously the code doesn't work for us. We've never actually tried vision processing before, and don't quite know were to start. Could you please give a brief explanation of how it works? I really appreciate it!
Reply With Quote
  #41   Spotlight this post!  
Unread 03-10-2013, 11:18 AM
bradubv bradubv is offline
Registered User
AKA: Bogdan Bradu
FRC #1635 (Technotics)
Team Role: Mentor
 
Join Date: May 2011
Rookie Year: 2011
Location: New York
Posts: 4
bradubv is an unknown quantity at this point
Re: paper: Team 341 Vision System Code

Thanks again to Team 341 for posting this code. It was an inspiration and a great learning opportunity for our programming team. Despite not being able to finish the PID Controller that used the vision code as input we reached the NYC Regional Semifinals.

All the elimination matches at the NYC Regional were played with the SmartDashboards turned off and that put us at somewhat of a disadvantage. I will follow up to see if I can get more details and if any of them are relevant to this thread, I'll post them here. One thing we didn't know going into the competition was that teams using the Java SmartDashboard need to apply the latest C++ language updates. Because we use Java on the robot side that wasn't obvious to us, so we were ignoring the notices about C++ language updates.
Reply With Quote
  #42   Spotlight this post!  
Unread 03-10-2013, 12:26 PM
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 985
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: paper: Team 341 Vision System Code

Quote:
Originally Posted by bradubv View Post
One thing we didn't know going into the competition was that teams using the Java SmartDashboard need to apply the latest C++ language updates. Because we use Java on the robot side that wasn't obvious to us, so we were ignoring the notices about C++ language updates.
This makes no sense. Whoever told you this was wrong. Running the C++ language update on a computer that is not being used to build C++ robot code will do nothing.
Reply With Quote
  #43   Spotlight this post!  
Unread 03-13-2013, 08:57 PM
bradubv bradubv is offline
Registered User
AKA: Bogdan Bradu
FRC #1635 (Technotics)
Team Role: Mentor
 
Join Date: May 2011
Rookie Year: 2011
Location: New York
Posts: 4
bradubv is an unknown quantity at this point
Re: paper: Team 341 Vision System Code

Quote:
Originally Posted by bradubv View Post
I will follow up to see if I can get more details and if any of them are relevant to this thread, I'll post them here.
The FMS White Paper explains that the default camera settings will result in a bandwidth about twice that allotted. The LabVIEW Dashboard overrides those defaults with more reasonable settings, but if your team uses the Smart Dashboard you have to set the Resolution, FPS and compression settings on your own to make sure you don't go over the bandwidth limit.
Reply With Quote
  #44   Spotlight this post!  
Unread 03-14-2013, 09:46 AM
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,069
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: paper: Team 341 Vision System Code

Changing the default camera settings is the most important thing you can do in order to obtain reliable tracking and stay underneath the bandwidth cap.

In particular, there are six settings to pay attention to:

1) Resolution. The smaller you go, the less bandwidth you use but the fewer pixels you will have on the target. If you make all of the other changes here, you should be able to stay at 640x480.

2) Frames per second. "Unlimited" results in a 25 to 30 fps rate under ideal circumstances. Depending on how you use the camera in a control loop, this may be overkill. Experiment with different caps.

3) White balance. You do NOT want automatic white balance enabled! Failing to do so makes your code more susceptible to being thrown off by background lighting in the arena. All of our Axis cameras have a white balance "hold" setting - use it.

4) Exposure time/priority. You want a very dark image, except for the illuminated regions of the reflective tape. Set the exposure time to something very short. Put the camera in a bright scene (e.g. hold up a white frisbee a foot or two in front of the lens) and then do a "hold" on exposure priority. Experiment with different settings. You want virtually all black except for a very bright reflection off of the tape. This is for two purposes: 1) it makes vision processing much easier (fewer false detections), 2) it conserves bandwidth, since dark areas of the image are very compact after JPEG compression. The camera doesn't know what you are looking for, so it will try to send you the entire scene as well as it can. But if it can't see the "background" very well, you are "tricking" the camera into only giving you the part you need!

5) Compression. As the WPI whitepaper says, this makes a huge difference in bandwidth. Use a minimum of 30, but you may be able to get away with more (we are using 50 this year). Experiment with it.

6) Brightness. You can do a lot of fine tuning of the darkness of the image with the brightness slider.
Reply With Quote
  #45   Spotlight this post!  
Unread 08-27-2013, 05:32 PM
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,069
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: paper: Team 341 Vision System Code

http://www.chiefdelphi.com/forums/sh...82&postcount=5

I posted some detailed explanation about the "magic numbers" in our code in the post above.
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 05:56 AM.

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