Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Backboard angle using vision tracking (http://www.chiefdelphi.com/forums/showthread.php?t=101227)

DallonF 26-01-2012 19:55

Backboard angle using vision tracking
 
I've been doing a ton of work on vision tracking and so far it's been going pretty well, but the main issue is that we don't want to shoot at the vision target - we want to shoot at the center of the hoop! We have the math working to adjust for that, but we need the angle of the backboard relative to the robot

We were thinking of using the apparent aspect ratio of the target to determine the angle (the target is 4:3, so if it appears to be 1:1, we should know we're at an angle). The problem with this is that A. we have no idea what direction we're facing the target at, and B. due to fisheye on the Axis 206 camera we're using, even when we're directly facing the target, if the target is toward the sides of the screen, it reports a ~20 angle.

Does anyone have any ideas on this?

Greg McKaskle 26-01-2012 20:21

Re: Backboard angle using vision tracking
 
Once you have the location of the target within the image, you can do further processing on only that local area. One approach that may work is to look for something else such as the hoop or the net. Another approach would be to use tools like the edge detection or do some processing on an given column of pixels to identify the ratio of the left and right edge. I posted in another thread on a more precise technique using law of cosines to solve for the angles of the triangle between the left edge, camera, and right edge.

Greg McKaskle

stingray27 26-01-2012 20:59

Re: Backboard angle using vision tracking
 
Quote:

Originally Posted by Greg McKaskle (Post 1114235)
I posted in another thread on a more precise technique using law of cosines to solve for the angles of the triangle between the left edge, camera, and right edge.

Greg McKaskle

Do you recall what thread that is in? Because I have been having problems finding LabVIEW threads according to Vision. In addition, I also have been having trouble determining the midpoint of the 4 targets due to the inability or inaccuracy of our lighting at the moment. Our targets keep flickering and therefore makes my code very inaccurate due to overshoot. One last thing; I am currently using pixel based processing. How accurate can I get our distance to the target when we are shooting at the target from an angle because the aspect ratio changes. Any help would be appreciated and resources or other threads would be great. Thanks :D

James Kuszmaul 26-01-2012 23:36

Re: Backboard angle using vision tracking
 
The thread
And I expect that this is the post you want, but it looks like there is good information in some of the other posts as well.

basicxman 26-01-2012 23:52

Re: Backboard angle using vision tracking
 
Quote:

Originally Posted by stingray27 (Post 1114262)
Do you recall what thread that is in?

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

Greg McKaskle 27-01-2012 07:59

Re: Backboard angle using vision tracking
 
As for the distance error. It definitely should exist, but doesn't seem that bad for what I thought were reasonable shooting positions. Your milage may vary. A somewhat bigger issue is that this is a distance and position to the center of the rectangle, and that distance and angle may not be where you want to send the ball. If you want a swish-shot, you ideally want to know the center of the hoop. It is near the target, but not at the same position. If you way to bank shot, do you want to shoot at the center of the rect always, or perhaps a bit to the left or right according to angle. I think the answers depend on your shooter.

Of course if the shooter is not super repeatable, these calculations may be overkill.

Greg McKaskle

austin1743 27-01-2012 08:43

Re: Backboard angle using vision tracking
 
Quote:

Originally Posted by DallonF (Post 1114205)
I've been doing a ton of work on vision tracking and so far it's been going pretty well, but the main issue is that we don't want to shoot at the vision target - we want to shoot at the center of the hoop! We have the math working to adjust for that, but we need the angle of the backboard relative to the robot

We were thinking of using the apparent aspect ratio of the target to determine the angle (the target is 4:3, so if it appears to be 1:1, we should know we're at an angle). The problem with this is that A. we have no idea what direction we're facing the target at, and B. due to fisheye on the Axis 206 camera we're using, even when we're directly facing the target, if the target is toward the sides of the screen, it reports a ~20 angle.

Does anyone have any ideas on this?

Would you mind sharing your code on your doing this? I just need an example to show to the other programming people on my team to show them how it could potentially work.

thanks

Team 3705 28-01-2012 13:58

Re: Backboard angle using vision tracking
 
Please share, send me a pm if yo uwant :D


All times are GMT -5. The time now is 23:26.

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