loading
 
Eliminate Distortion When Tracking Targets With Axis Cam
Jacob Nazarenko from United States  [1 posts]
8 year
I've been working on this issue for a long time, but just can't seem to get it fixed. When our Axis camera (model m1013) is mounted on our robot at a 45 degree angle (from the ground, pointing upwards) and our robot turns to the side, the target height (calculated with RING_CORNER data) increases by some small amount of pixels, depending on how far the robot is positioned from the target - usually between 3 and 6 pixels. Although 3 to 6 pixels doesn't sound like much, this heavily affects the way distance from the target is calculated, as our distance function uses the target's height in pixels for the calculation. I've tried many things - the radial distortion module, the perspective module, the rotate module, and the spherical distortion module (which helped a bit, but still didn't fix the issue completely), but none of them fixed the issue completely. The problem, I've determined, is that the camera is rotated at a 45 degree angle, rather than being perpendicular to the ground. This causes a kind of 'keystone effect' that is very difficult to eliminate completely, and varies in strength based on how far away the robot is from the target. Unfortunately, as the shooting targets are fairly high up in this year's FRC season, positioning the camera perpendicular to the ground would cause the target to be out of the shot unless the robot is very far away. Is there any other way I could try to fix this issue??

Please find attached a zipped folder of filtered field images both at 10 ft and 15 ft from the base of the target, with the robot facing towards the target as well as 25 degrees to either side. Also please find attached several projects in which I have tried to approach this issue.
field_images.zip
TargetTracking2.robo
program.robo
Peter Estelle from United States  [6 posts] 8 year
I am not an expert, but in the spirit of FIRST "gracious professionalism", have you looked at the Affine Transform module?  Perhaps with the perspective compensation option enabled.

See:  http://www.roborealm.com/help/Affine.php

Curiously, one example shows a tower taken from a low angle...

This is a mathematical transform and not terribly obvious exactly how to use it for your case.

I would love to see a response from Steven on applicability of this technique or your own feedback if you are able to try it.  Good luck.

Mentor Pete
FRC Team 1683
from United States  [3 posts] 8 year
*crickets*...

Well, despite also not being able to solve this issue, Vision Tracking was quite on point at our last regional.

Pete, thanks for the lead on the Affine Transform module. We don't have a spare Axis cam to test with, but I'll try it out at champs.

----
Mr. E.
Team 1796

 
Peter Estelle from United States  [6 posts] 8 year
Good luck!

I think it will help with the problem of looking up at the target from below if you are not far off axis side to side, but I don't think it will help if you are too far off axis to the side.  I meant to say that in my first post.  I realize you were looking for an overall solution.

Pete
Team 1683

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index