Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Technical Discussion (http://www.chiefdelphi.com/forums/forumdisplay.php?f=22)
-   -   Camera Image Overlay - Sniper Style (http://www.chiefdelphi.com/forums/showthread.php?t=108941)

Team3266Spencer 03-10-2012 18:14

Camera Image Overlay - Sniper Style
 
So a simple obvious idea one of my teammates came up with, during/after (can't remember) one of our regional, was to put a cross-hair on the camera feed, instead of relying on some half put together camera tracking, luck, or skill. The issue we had though was our camera is not centered to our shooter and i actually side-mounted on our turret. Creating the cross-hairs in code seemed like too much much work (seeing how an image overlay of cross-hairs didn't seem like it would be sufficient at the time), so with that in mind I put the idea to rest.

Recently I revisited the idea, with some prompting from that teammate. With some geometry I was able to calculate curved lines, that could overlay the camera feed, that represented where the robot would be aimed (In relationship to a certain destination, e.g. the top goal) on the camera image dependent upon its distance (horizontally). I was then able to place cross-hairs on certain distances of the graph that our robot had preset powers to shoot from.

This was my result: http://imgur.com/uMOnz

Have any other teams worked with this idea before? I'm sure there have been, how did concepts like this work for you?

AdamHeard 03-10-2012 18:17

Re: Camera Image Overlay - Sniper Style
 
What worked really well for us was just a single vertical line that the driver centered over the hoop. Distance wasn't adjusted for, the driver just drove to a similar spot each time.

Team3266Spencer 03-10-2012 18:23

Re: Camera Image Overlay - Sniper Style
 
Quote:

What worked really well for us was just a single vertical line that the driver centered over the hoop. Distance wasn't adjusted for, the driver just drove to a similar spot each time.
Yeah, that's essentially what we did during competition. We would draw a vertical line in the driver station, offset approximately to where we believed it lined up best. I just thought it intriguing how simple it was to take it to the next level and use math to calculate the line.

BlacksmithWoods 04-10-2012 22:23

Re: Camera Image Overlay - Sniper Style
 
Quote:

Originally Posted by AdamHeard (Post 1189019)
What worked really well for us was just a single vertical line that the driver centered over the hoop. Distance wasn't adjusted for, the driver just drove to a similar spot each time.

Same with our team!

CalTran 04-10-2012 22:27

Re: Camera Image Overlay - Sniper Style
 
I saw a couple of teams solve this issue via scotch tape on the driver station as well.

Tom Bottiglieri 04-10-2012 22:55

Re: Camera Image Overlay - Sniper Style
 
Here's the HTML we used to display the camera feed with a red line down the center. You can save this (and ui/jquery.js) to anywhere on your computer and open the file locally with Chrome. You need to change the hardcoded IP to your teams IP in the html file.

https://github.com/Team254/FRC-2012/...oofviewer.html

dellagd 05-10-2012 00:04

Re: Camera Image Overlay - Sniper Style
 
Edit the driver station Labview project, or whatever is called. Our team did it even though we use Java it was so easy. Edit it so that it just draws a line from point a to point b after it draws the camera image (Therefore the line ends up on top of the camera image every loop...)

tickspe15 05-10-2012 00:50

Re: Camera Image Overlay - Sniper Style
 
We lined up field goal post like markers with the bottom of the back board and had different one for each distance


All times are GMT -5. The time now is 13:41.

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