The main research and design of the system is based on the STM32 series microcontroller as the main control chip.The internal configuration of the STM32 microcontroller is carried out,and video data is collected through the camera of the upper computer.Then,image processing technology is used to match the color of the object.When the color meets the requirements,it is said that there is a high possibility of being the target object,and the camera will lock,recognize,and track it,The data in the lower computer is sent to the computer through a serial port for debugging.The debugged data is used as control data to control the speed and direction of the motor.This achieves automatic tracking by sending instructions from the upper computer to the lower computer after target recognition.Through experiments,the car can recognize and track the target object based on color.