|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools |
Rating:
|
Display Modes |
|
#31
|
||||
|
||||
|
Re: paper: Team 341 Vision System Code
I fixed the errors, but I still don't know what the code does.
Thanks, Dimitri |
|
#32
|
|||||
|
|||||
|
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. |
|
#33
|
||||
|
||||
|
Re: paper: Team 341 Vision System Code
Thanks for uploading this!
|
|
#34
|
|||
|
|||
|
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.
|
|
#35
|
|||
|
|||
|
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.
|
|
#36
|
||||
|
||||
|
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
|
|
#37
|
|||
|
|||
|
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) |
|
#38
|
|||||
|
|||||
|
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); |
|
#39
|
|||
|
|||
|
Re: paper: Team 341 Vision System Code
that worked thanks so much!!
|
|
#40
|
|||
|
|||
|
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!
|
|
#41
|
|||
|
|||
|
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. |
|
#42
|
|||
|
|||
|
Re: paper: Team 341 Vision System Code
Quote:
|
|
#43
|
|||
|
|||
|
Re: paper: Team 341 Vision System Code
Quote:
|
|
#44
|
|||||
|
|||||
|
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. |
|
#45
|
|||||
|
|||||
|
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. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|