|
Image Coordinate to Real Word Coordinate Trung from Vietnam [4 posts] |
15 year
|
In obstacle avoidance tutorial,after getting the highest point in the image,the robot need to be controlled to reach that highest point.However,the transformation from image coordinate to real world coordinate need to be calculated for corrected angle control?Does anyone know such kind of that transformation? Please help me.Thanks
|
|
|
Anonymous from United Kingdom [99 posts] |
15 year
|
I think there are two ways to look at this problem. If you are trying to do real time navigation, you simply look at the highest point relative to the center of gravity. IE Error = Highest point_x - Center_x.
Then just move the robot right or left based on this error. IE if the error is positive move the error right an amount based on this error. Since you are updating at 20-30hz, your robot will only have moved a bit before you have a new error value to feed to the motors.
If you are actually trying to map the space, then things are more complicated. Still, you can measure the straightline distance from your camera to the furthest point it can see and the vertical height of the camera from the ground. Now with the Y component of the highest point and a bit of trig you can figure out the distance to the highest point. Now to get the approximate distance to each of the other points you should be able to use the sample line module on your processed image to get an array of values to determine the distance to each object in the frame (based on the same math from before.)
I will have to play with the sample line to see how well this works for VSLAM. (Just starting on this myself. )
have fun!
|
|
|
Trung from Vietnam [4 posts] |
15 year
|
Hi profmason,
I got your comment.Since I'm dealing with real-time navigation, I would choose the first one for good operation.Thanks for your help.
|
|