![]() |
Camera pointing error?
We have the camera calibrated and tracking the lightbox target using the tilt/pan mechanism. However . . . when the camera is nicely locked onto the target, it consistently points a little to the left of the target (and a little high too). This is based on an admittedly unscientific estimate of where the camera is 'boresighted'; I simply looked at the tilt/pan mechanism and where the camera appears to be aimed. It's not off by a lot, but it is most definitely off.
Being bothered by this, we ran a little experiment. We left the camera pointing exactly where it locked onto the target using the Bells & Whistles tracking code, then switched it over to the LabView GUI. When we look at the picture using that GUI, the target is dead center in the image. So it appears that the code is doing exactly what it is supposed to do. We can certainly use the camera this way, but it is very off-putting to have it lock on nice and solidly and be pointing nearly 10 degrees to the left and up (my estimate based on the geometry of the test rig we have set up). I did another little experiment and pulled up one side of the header used to connect the camera to the motherboard - so the camera is now a little cockeyed relative to the plane of the motherboard. As I expected, that corrected the panning problem, but it's not of course a satisfactory solution. It acts like an alignment error in the camera unit itself, but I think that's pretty unlikely... Has anyone else experienced this, have any ideas about what is going on or how to correct it? Thanks in advance for your advice and wisdom. |
Re: Camera pointing error?
Quote:
Good luck, -Joe |
Re: Camera pointing error?
Quote:
My advice would be to ignore it, there's nothing to correct since there's nothing "wrong". (OTOH, it's probably something in the camera optics - where it is mechanically pointed is not identical to where it is optically pointed. It is likely that all cameras are the same) Don |
Re: Camera pointing error?
Quote:
There is a fairly easy way to deal with this error and it's built into the camera software. Mount the FIRST green light such that it's center is at the same height as the camera lens and position your 'bot so that the center line of the lens extends through the center of the FIRST green light. Do this as far away from the green light as you can. Now fire up the robot controller and camera and let the camera lock onto the green light. Once it's locked on to the target, enter the tracking menu and then the interactive PWM sub-menu and type in the letter 'f' to set the new pan center position and then the letter 'm' to set the new tilt center position. Now type in the letter 'o' and write down the pan and tilt values. Once you've done that, type in 'p' to return to the main tracking menu and then 'w' to save the changes. Take the values you wrote down and plug them into the equation in terminal.c and recompile, reload the code and see if the software reports zero degrees for the pan and tilt angles when the camera re-acquires the target. I intend to release one or two more builds of the camera software in the coming weeks and I'll try to include this procedure in the documentation. I think I'll start a camera FAQ and include this information as well. -Kevin |
Re: Camera pointing error?
Yesterday I tried something similar to what Kevin outlined, but not quite that exact procedure. I'll do that tomorrow and post the results to this thread.
Thanks to everyone for your replies. |
Re: Camera pointing error?
We had that problem too, have you played with any of the gain and error settings? We reset them to default and it fixed it, points pretty straight now.
|
Re: Camera pointing error?
Quote:
The results are that, when locked onto the target, the pan now pretty consistently reads -3 (degrees) and the tilt reads 0 (degrees). This is with the target about 30 feet straight ahead of and level with the camera. The camera itself still points to the left and high of the target the same as always when locked on. So, it appears to be an optical alignment error within the camera unit itself. I'm not going to spend any more time on this. It locks on and tracks beautifully - that's good enough. Thanks to all for this input. |
Re: Camera pointing error?
We also so our camera looking a way to the side and up as well and decided to investigate a little bit. One thing we noticed is that the default Pan & Tilt values seem to be reversed. In the code we are using (I haven't checked, maybe Kevin has newer?) we see:
#define PAN_TARGET_PIXEL_DEFAULT 79 #define TILT_TARGET_PIXEL_DEFAULT 119 If I am thinking about this right the screen resolution is 240x160 where the 240 is the x-axis and 160 is the y-axis. The pixel values (if starting at 0) for the center of the screen would be (119,79). I think the x-axis correlates with 'pan' and y-axis to 'tilt'. So we changed the target defaults to: #define PAN_TARGET_PIXEL_DEFAULT 119 #define TILT_TARGET_PIXEL_DEFAULT 79 And our camera now seems to be centered in on the target once it finds it and not looking off a into the distance a little but. Note:We also used Sean Witte's 'CMUVisualizer' that he posted at this thread: http://www.chiefdelphi.com/forums/sh...ad.php?t=41240 I don't know if this works but here's a link to his attachment: http://www.chiefdelphi.com/forums/at...achmentid=3780 It now shows us locking in on the center of the screen now as well. Hope this helps! -Terry |
Re: Camera pointing error?
Quote:
-Kevin |
Re: Camera pointing error?
Quote:
0-239 x-axis, 'pan' 0-159 y-axis, 'tilt' (By veritcal mounting I mean we are using the camera mounting hardware included in the kit and the overall leangth of the CMUcam2 module is going up and down). Looking at the OV7620 datasheet we may be off a little bit, instead of 240 it may be 255 but we haven't checked over all the CMUcam2's registers that might relate to resolution. -Terry |
Re: Camera pointing error?
Here's a related note from the CMUCAM2 FAQ.
Quote:
|
Re: Camera pointing error?
Quote:
Code:
void setDefaultWindow()I know it's fun to play the let's-publicly-flog-the-NASA-rocket-scientist-when-he-makes-a-mistake game, but keep in mind that spreading half-baked information around, at the very least, just adds to the noise level of the forums. Frankly, I would have preferred that you'd sent me a PM or e-mail to inform me of your suspicions. If you had, I would have given you the above information. -Kevin |
Re: Camera pointing error?
Kevin,
I did not intend any disrespect with my comment and I’m sorry that you took it that way. I would like to continue this topic with you directly and not add to people’s confusion with this; however, I would like to keep this topic open for the moment as we discuss this topic. I have some information that I will pass along to you. I’m sorry everyone if I’ve caused confusion, I did not intend to create confusion, rather I wanted to see if anyone else had encountered what we were seeing and if the way we have looked at the situation is the same as others. -Terry |
Re: Camera pointing error?
Kevin,
We investigated again last night and we proved that the resolution was indeed 160x240. Your default values are correct. So we went back to your proper defaults of pan_target 79 and tilt_target 119. We based trying the rotation of the aspect ratio off the utilities that give us a screen shot of the image. We made an incorrect assumption that the image aspect ratio that the utilities used was the same as the CMUcam2 analysis. As it turns out it, the utilities don't display the decimated data of the CMUcam2 and thus represent the aspect ratio of the imaging module (640x480) rather than the CMUcam2 module (160x240). Thanks for the support. -Terry |
Re: Camera pointing error?
Quote:
I'm not aware of an application that displays it at 640x480. Cheers! -Joe |
| All times are GMT -5. The time now is 07:30. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi