Relying on the research hotspots in this era of unmanned driving,this paper proposes a tracking system based on OpenCV moving target detection.This system consists of two subsystems,namely the fixed distance tracking system and the direction tracking system.In order to facilitate the detection of the tracking performance of the two subsystems,two sets of hardware platforms were also developed during the research process,the fixed-range tracking system hardware platform and the direction tracking system hardware platform.The two sets of hardware platforms respectively limit the direction and distance between the camera and the moving target,thereby testing the real-time performance and operating accuracy of the system’s constant distance tracking performance and direction tracking performance.The main research content of this topic is divided into three parts,the research content is as follows:(1)a set of hardware platform for fixed-range tracking system was developed.On this hardware platform,the operating accuracy and real-time performance of the distance tracking system based on ultrasonic sensor ranging and the distance measurement system based on computer vision technology are tested respectively.Research has found that the distance tracking system based on ultrasonic sensor ranging has a higher measurement frequency and better real-time motion response with an operating error of 2.4%,while the distance tracking system based on computer vision ranging technology has poor realtime performance.The operating error is about 0.13%.In addition,the real-time distance measured by ultrasonic sensors and computer vision ranging technology can be monitored and recorded in real time through the Node-red IoT platform.(2)a set of hardware platform of the direction tracking system was also designed and developed during the research process of the subject.Two concentric arc-shaped grooves are designed and processed on the platform,and the target object can slide along the groove to keep the distance between the target object and the camera constant.When the position of the target object changes,the stepper motor will drive the camera to rotate,thereby adjusting the position of the target object in the camera’s field of view.In addition,the system also has an automatic search function,that is,when the target object is not within the camera’s field of view,the system can automatically rotate the camera to search for the target.The test results show that the stopping accuracy of the direction tracking system is about 0.25-0.75mm.Finally,a PID control algorithm is added to the direction tracking system to adjust the number of pulses sent by the control board to the stepper motor.The test data curve shows that the PID control algorithm can improve the real-time movement of the direction tracking system.(3)Propose a color and multi-digit recognition system.Taking the MNIST handwriting data set as the training set of the deep learning model,a CNN model that may be used for digit recognition is trained based on the TensorFlow deep learning framework.After 3000 times of training,the recognition accuracy of the model can reach more than 98%.Subsequently,the different numbers in the picture are individually identified by numbers and colors by means of connected area marking,and the order of the numbers in the picture is obtained according to the centroid of the numbers.As a result,the system realizes the recognition of multiple digital pictures containing colors.The color and number recognition system developed is tested through the hardware platform of the fixed distance tracking system.The test results show that the system can accurately identify the digital color and its value in the control instruction card fixed on the motion board,and use the recognition result to control the motion of the hardware platform. |