Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Tower Tracker 1.0 (http://www.chiefdelphi.com/forums/showthread.php?t=142173)

Fauge7 10-03-2016 00:19

Re: Tower Tracker 1.0
 
Quote:

Originally Posted by alexpell00 (Post 1554505)
Thanks for the code, really helped! If anyone is having trouble with the thresh holds you can take the HSV image to http://html-color-codes.info/colors-from-image/ to pull the hex colors of the target. Once you have 3-5 hex colors simply convert them to bgr and find the range from high to low (add/subtract 10% on either end to make it work better).

Yay! Glad it helped! Any link to your code to find how its implemented?

Honestly, my team just used grip to find the values, its easy to use and with the sliders.

Zaque 13-03-2016 13:44

Re: Tower Tracker 1.0
 
First, thanks for posting this. We have been struggling with vision code for some time now. However, I am having difficulty figuring out how to install the networktables. I can't figure out how to find the correct files and download them by following the instructions on this page.

Thanks again for all these resources!

lethc 13-03-2016 23:52

Re: Tower Tracker 1.0
 
Just wanted to post and say we ran a modified version of TowerTracker on a Jetson TK1 at the Greater Kansas City regional this weekend with great success. Thank you Fauge and team 3019 for sharing your work. :)

Fauge7 14-03-2016 23:06

Re: Tower Tracker 1.0
 
Quote:

Originally Posted by lethc (Post 1556621)
Just wanted to post and say we ran a modified version of TowerTracker on a Jetson TK1 at the Greater Kansas City regional this weekend with great success. Thank you Fauge and team 3019 for sharing your work. :)

No problem, Even if my team got last im proud to say that a team got to the finals with it :) Congrats one being able to use it succesfully!

Fauge7 28-03-2016 04:32

Re: Tower Tracker 1.0
 
Tower tracker is now award winning! Shout out to team 1806 Swat! Congrats on going 15-0 at this week's regional! Proof the program can change robots. If anybody needs help with implementing it I am more then happy to help. Pm me with questions.

alexpell00 31-03-2016 14:15

Re: Tower Tracker 1.0
 
Hello. We are having trouble running it on a raspberry Pi. We I try to run the exported jar I get an no opencv_java310 in Java.library.path. Would love to be able to use it for this regions just having some trouble getting it to work. Opencv 310 is installed and compiled on the Pi.

axton900 31-03-2016 15:55

Re: Tower Tracker 1.0
 
Hey!
when you are building the java file, make sure to include the opencv jar file in your class path. An easy way to do this is to using the -cp command while building.
Doing this will work:
java -cp /home/pi/opencv/build/bin/opencv-310.jar TowerTracker.jar
This configures the class path to include the jar for OpenCV which is the error that you are facing. /home/pi/opencv/build/bin is the default location for the jar.
If you need any more help with this.
Feel free to PM me!
I went through this same process last week :)

axton900 06-04-2016 18:38

Re: Tower Tracker 1.0
 
Hey guys!
How do you calibrate the camera, exactly...
I have opened up GRIP and got the RGB values of a setup in which the goal is clear and then took those values and edited the Lower and Upper bounds respectively but have been getting 0 contours..

Thanks!

jreneew2 06-04-2016 18:41

Re: Tower Tracker 1.0
 
Quote:

Originally Posted by axton900 (Post 1568831)
Hey guys!
How do you calibrate the camera, exactly...
I have opened up GRIP and got the RGB values of a setup in which the goal is clear and then took those values and edited the Lower and Upper bounds respectively but have been getting 0 contours..

Thanks!

Do you have a link to your code? Also you might want to check that the lower and upper bounds are in BGR order instead of RGB. It took me a while to figure that out.

axton900 06-04-2016 19:11

Re: Tower Tracker 1.0
 
I am using an untouched version of TowerTracker and I found RGB values on GRIP and I put them as the Upper and Lower Bounds in BGR order and I still am detecting nothing. Any suggestions? Thanks!

jreneew2 06-04-2016 19:14

Re: Tower Tracker 1.0
 
Can you use imshow to display a window of what your original, resize, and threshold Mat's look like? That might help.

axton900 06-04-2016 19:20

Re: Tower Tracker 1.0
 
I am not sure how to do so. I am running the Java code provided. I remember your team discussing this on another thread. How exactly do you guys calibrate because that seems to be the problem.
Thanks!

jreneew2 06-04-2016 19:29

Re: Tower Tracker 1.0
 
To calibrate the camera, what we did was save the first image it grabbed and then downloaded it onto our pc. Then we brought it into GRIP and found the right RGB values. Then we just plugged it into lower and upper bounds arguments. It worked for us. We did have an issue where we had a really bright image right when the camera started. My best guess is because the camera lens is still adjusting its white balance or something like that. But when just ran the code again after the camera was on for a second. This wasn't a problem in competition because your robot is on a while before the match starts.

axton900 06-04-2016 19:32

Re: Tower Tracker 1.0
 
1 Attachment(s)
Elaborate on the finding the perfect RGB values. Would you find these to be good?

Woolly 06-04-2016 19:33

Re: Tower Tracker 1.0
 
I would actually recommend doing your calibration in the HSB/HSV color space, as it separates color(H) from brightness(B/V) which means you can get a more robust calibration that will working in many different lighting environments (as the color your LEDs output shouldn't change) provided you turn your camera's exposure down.


All times are GMT -5. The time now is 22:01.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi