|
Re: Robot Position Tracking, Gyro, Alignment help needed
After you acquired an image from the camera and processed the image to find some targets, the target will give you center_mass_x and center_mass_y. By comparing center_mass_x to the screen_center_x (160 if your resolution is 320x240), then you can calculate the angle you need to turn the robot to bring center_mass_x to be aligned with screen_center_x. Once you did that, your target is dead ahead.
__________________
|