View Single Post
  #62   Spotlight this post!  
Unread 18-03-2013, 00:31
faust1706's Avatar
faust1706 faust1706 is offline
Registered User
FRC #1706 (Ratchet Rockers)
Team Role: College Student
 
Join Date: Apr 2012
Rookie Year: 2011
Location: St Louis
Posts: 498
faust1706 is infamous around these partsfaust1706 is infamous around these parts
Re: Full Court Target Detection

I admit, I was scared publishing it-making all the other teams better, but my mentor and I agreed to put my paper for the public, not the code. I dont want people just using the code and not understanding it. The final copy is on here now, finally found that thumbdrive. I used object pose to track distance. I defined the field target in 3D coordinates, with the center of the top hoop being the origin, then the outer 4 corners of the 4 targets being the points of interest. I called those my object points. it was a 16 by 3 array, x, y, z, where z is zero because it is on the same plane in the z dimension(not protruding into the field).

For my image points, I defined at 16 by 2 array, the 4 outer corners. X and y where it's pixel coordinates, with the center being the center of the screen.

Now, there exists a rotation and translation matrix between my image and object points. Linear Algebra is used to find that. This website, though I didn't use and just found, provides a good explaination of the math http://www.fastgraph.com/makegames/3drotation/, that's the part i am not allowed to share, I do apologize.

And you are right about the color of the light. I doesnt matter as long as you have a method to threshold your target of interest. I use IR because I asked teams in the past how using green or white leds are, and they say they are good, but they have trouble in different environments. The only thing that my camera doesnt like being outside and stage light.

And yes, other cameras can be used, we used the microsoft kinect because it was already available thanks to first, and we had a decent amount of extra weight last year. It caught little kids' attention and got them interested when the saw us do presentations around town. To prove it works with other cameras, I began this year with a webcam and removed the IR filter (which was a pain), and then got a filter that filters everything except IR, and had an IR illuminator to see. The frame rate was poor but I am willing to bet money on it being because the webcam costed maybe 5 dollars.

The year, I rewrote a function I had already adjusted the in OpenCV libraries that approximates a polygon around a contour. If you look at the final image, the squares drawn around the inside and outside of the target arent perfect. That is really bad because I used those corners as my image points! Now, I use the_actual_corners of the target.
__________________
"You're a gentleman," they used to say to him. "You shouldn't have gone murdering people with a hatchet; that's no occupation for a gentleman."