Frontiers in Computing and Intelligent Systems ISSN: 2832-6024 | Vol. 5, No. 2, 2023 19 Research on Object Trajectory Detection System Based on Computer Vision Daiji Liu Jinan Thomas School, Jinan, China Abstract: The main task of object trajectory detection is to collect and synthesize all kinds of information generated in the process of object motion, and get the displacement information of object in 3D space. Vision is one of the important ways for human beings to perceive the external environment and the cognitive world, and it plays a very important role in human life. With the development of computer technology and signal processing technology, a computer vision discipline based on the principle of simulating human eyes has gradually formed. In this paper, an object trajectory detection system based on computer vision is studied to realize object trajectory detection. In this paper, an improved particle filter algorithm is used to track moving objects. The research results show that the improved particle filter algorithm effectively reduces the influence of calculation error and nonlinear error on the measurement system and improves its accuracy. The practical application results show that the measurement error of the system can be controlled at about 5% when considering various error factors, which can meet the needs of practical application. Keywords: Computer Vision; Object Trajectory Detection; Particle Filtering. 1. Introduction With the arrival of the intelligent era of industry 4. 0, the space trajectory tracking system is more and more widely used in the field of human-computer interaction. With the continuous development of sensor technology, MEMS (micro electro mechanical system) acceleration sensor appears, which has the advantages of small size, low power consumption, high accuracy and sensitivity, good linearity and so on [1-2], and is widely used in system positioning, displacement detection and mechanical measurement. At present, binocular vision system is mainly used in mobile robot navigation system, national defense, biomedicine, industry, video monitoring, human-computer interaction, military, traffic monitoring and other fields. The extraction of 3D motion trajectory of objects based on binocular vision mainly involves two aspects: on the one hand, binocular stereo vision technology; On the other hand, the detection and tracking of moving objects [3-4]. In order to obtain the spatial 3D data of an object, the 3D reconstruction technology is introduced, while the 3D reconstruction technology based on binocular vision is a non-contact measurement method, which does not need a lot of hardware support and is convenient and accurate, so the 3D reconstruction based on binocular vision has been paid more and more attention. In this paper, an object trajectory detection system based on computer vision is studied to realize object trajectory detection. 2. System Structure Design The most basic modules to complete the above requirements are acceleration sensor data acquisition driver and displacement calculation module [5]. For the flexibility of the system, a control module with clear interface and low coupling with other modules is needed. Among them, the control part of the system is divided into two parts: the control interface of the application layer and the core driver layer. A good system design is very important for the performance, safety and stability of the system. The acceleration sensor is used to measure the acceleration of an object as the original data for calculating the speed and displacement. Because the coordinate axis of the acceleration sensor will change with the direction of the object when moving in 3D space, the gyro is used to measure the angular velocity of the moving object, and the acceleration value measured in the moving coordinate system is converted into the static reference coordinate system as a parameter for operation. This paper presents an object trajectory detection system based on computer vision. The space tracking system of MEMS accelerometer mainly includes two parts [6-7], one is the mobile terminal and the other is the base station. Among them, the main functions of accelerating signal acquisition, A/D conversion, digital filtering and signal transmission are completed. The main function of a base station is to receive and process signals. The overall framework of the system is described in Figure 1: Figure 1. Overall system architecture 20 Among them, the detection module is mainly composed of an acceleration sensor and a gyro, which is used to detect the acceleration generated by the moving object, and a gyro; Among them, the control module mainly completes the functions of signal acquisition, circuit control, data transmission and so on; The upper computer processing module is responsible for realizing the core functions of the wood system, including error processing, acceleration integration and other functions. Gyroscope is an instrument used to measure the selected speed or rotation angle of an object. Because the system works in 3D space environment, it is necessary to filter the gravity acceleration component and transform the coordinates according to the acceleration output component of the gyroscope, so the three-axis gyroscope is selected for this system. Embedded 8051 compatible microcontroller, RF transceiver and 9-channel 10-bit A/D converter [8]. It has stable working frequency, few peripheral circuit devices, low power consumption and high system stability. The optimal monopole microstrip printed board antenna with a quarter wavelength is connected to ANT1 and ANT2 terminals, and the receiving terminal sends data. The circuit is powered by two voltage stabilizing circuits, 3V and 5V respectively. 3. Key Technology Realization The determination of acceleration is based on the second law of Newtonian mechanics [9]: the acceleration of an object is proportional to the force it receives, to its own mass, and the direction of its acceleration is proportional to the force it receives. This method is to change the current on the accelerometer by using the position of the moving contact point on the potentiometer, so as to convert the acceleration signal into an electronic signal and then output it. Dampers are used to improve the dynamic characteristics of the vibration system, and supports are used to make the measured object move on the sensitive axis, thus ensuring the acceleration to be consistent in different directions [10]. In this paper, a new MEMS acceleration sensor is proposed, which uses a new silicon-based cantilever beam and a flexible shafting to replace the traditional spring. Inductive force can be divided into two types, one is piezoresistive induction, and the other is capacitive induction. In the process of moving, due to the tension of the spring, the sensitive capacitor is displaced, so that its capacitance value changes, and then it outputs current. Vision is one of the important ways for human beings to perceive the external environment and the cognitive world, and it plays a very important role in human life. With the development of computer technology and signal processing technology, a computer vision discipline based on the principle of simulating human eyes has gradually formed. The research based on binocular vision is the main research content in the field of computer vision. Its essence is to use binocular cameras to imitate human eyes to capture external information, and to obtain sequence images of the same scene from different perspectives through two cameras, and then input the captured information into the computer, so that the computer can perceive the structure and motion information of 3D objects from two-dimensional images, and recognize and understand the objects [11-12]. In the process of moving object tracking, in order to enhance the robustness and real-time tracking under occlusion, the trajectory prediction step of moving object is often added to reduce the search feature area. At present, the common prediction algorithms of moving target trajectory include linear prediction algorithm, Kalman filter algorithm and its extended algorithm, particle filter algorithm and various improved algorithms. In this paper, particle filter algorithm is used to track moving objects. Particle filter is a filtering method for nonlinear and non- Gaussian systems based on Monte Carlo idea. It has no restrictions on the process noise and measurement noise of the system. By predicting and updating the sampling set from the probability density function of the system, it can approximate the Bayesian estimation of the nonlinear system and give the approximate optimal suggested distribution. The problems existing in traditional particle filtering will lead to the loss or inaccurate tracking of moving targets. Aiming at the above problems, this paper improves the particle filter. Background modeling is to build a background image without moving targets. It is an analysis process of sequence images, and the background and targets are separated from continuous multi-frame images. Take the continuous N - frame image sequence, and the average value obtained by accumulating it is used as the background image. It can be expressed by the following formula:    NkkkNkkkk FF N BFFF N B   11 111  (1) Where kB is the background image and kF is the current image. Parameter N is the key to correct the background image by statistical average method. For moving objects that do not appear frequently in the scene, choosing an appropriate parameter N will make the estimated background image more realistic. Particle filter is a statistical filtering method based on Monte Carlo method and recursive Bayesian estimation, which uses Monte Carlo method to solve the integral operation in Bayesian estimation according to the theorem of large numbers. The color histogram construction method is as follows:        N i i uxfkuh 1 0  (2) Where  is a Kronecker function;  ixf is the indicator function of the number of segments divided by the pixel point ix in the image at 8*8*4; u is the index value of histogram segment number; S is a histogram normalization constant; k is the total number of pixels in the target area. Whether the moving object suddenly accelerates or changes direction, the essence of its improved adaptive model is to spread particles around to increase the diversity and distribution range of particles. Considering the possibility of the object moving around at the following place, the particle state is transferred in the four directions of yx, , so as to expand the diversity of particles while keeping the number of particles unchanged. Whether the moving object is blocked or suddenly accelerates or changes direction, the similarity value  can be used to adaptively adjust the coefficients of the state prediction model to update its model. Then the improved second-order adaptive state prediction model is described as follows. 121   kkkk CwBsAss (3) 21 Among them,  kkk yxs , ,   11 eA ,   1eB , 1 ,C , C is selected according to the need of noise level. 4. Experimental Test Results The object trajectory detection system uses an acceleration sensor to measure the movement displacement of the object, thus obtaining the movement trajectory, converting the voltage output by the sensor into acceleration, and then filtering, correcting and calculating the displacement. In this paper, the sampling frequency of 50Hz is used to collect data for about 10 seconds, and a total of 510 groups of data are collected. After the acceleration signal is filtered, it is sampled randomly, and then the error is compensated, so that the corresponding velocity and displacement values are obtained, which is the final processing result. Without using the particle filtering algorithm, the displacement of 1.3m along the x axis is obtained, and the displacement of 0.74m is obtained. After using the two error processing methods, the displacement obtained by integration is 0.86 meters when the actual utilization rate of CPU is 15.36%, which is closer to the actual distance, as shown in Figure 2. Figure 2. Relationship between CPU utilization rate and measurement accuracy It can be seen that when the average CPU utilization rate is 67.69%, the actual measured value of the sensor is 0.825 meters after moving for 1 meter, and the error is about 17.28%. Running programs such as music playing and word editing software in the background of the system makes the load rate of the processor change differently. With the decrease of the utilization rate of the processor, the accuracy is obviously improved. When the CPU utilization rate is below 20%, the accuracy of the motion trajectory detection system reaches the highest, and the error rate is about 5%. It shows that the system can accurately calculate the motion displacement of the object and realize the accurate measurement of the motion trajectory of the object. 5. Conclusion In order to obtain the spatial 3D data of an object, the 3D reconstruction technology is introduced, while the 3D reconstruction technology based on binocular vision is a non- contact measurement method, which does not need a lot of hardware support and is convenient and accurate, so the 3D reconstruction based on binocular vision has been paid more and more attention. In this paper, an object trajectory detection system based on computer vision is studied to realize object trajectory detection. When the improved particle filter algorithm is used and the actual utilization rate of CPU is 15.36%, the displacement obtained by integration is 0.86 meters. With the decrease of the utilization rate of the processor, the accuracy has been obviously improved. When the CPU utilization rate is below 20%, the accuracy of the motion trajectory detection system reaches the highest, and the error rate is about 5%. It shows that the system can accurately calculate the motion displacement of the object and realize the accurate measurement of the motion trajectory of the object. References [1] M., Archana, M., Kalaisevi, & Geetha. Object detection and tracking based on trajectory in broadcast tennis video - sciencedirect [J]. Procedia Computer Science,2015, 58, 225- 232. [2] Yang, T., Li, D. , Bai, Y. , Zhang, F. , & Li, J. Multiple-object- tracking algorithm based on dense trajectory voting in aerial videos [J]. Remote Sensing,2019, 11(19), 2278. [3] Chen, Y., Wang, C. , & Lou, S. Edge artificial intelligence camera network: an efficient object detection and tracking framework [J]. Journal of electronic imaging,2022, (3), 31. [4] Yazdi, M., & Bouwmans, T. . (2018). New trends on moving object detection in video images captured by a moving camera: a survey [J]. Computer science review, 28(8), 157-177. [5] Fragkiadaki, K. , Arbelaez, P. , Felsen, P. , & Malik, J. Spatio- temporal moving object proposals [J]. physics procedia, 2014, 70(4), 1100-1103. [6] Kim, & Hyung, B. Hierarchical spatiotemporal modeling for dynamic video trajectory analysis [J]. Optical Engineering, 2011, 50(10), 475-480. [7] Shahraki, F. F., Yazdanpanah, A. P. , Regentova, E. E. , & Muthukumar, V. A trajectory based method of automatic 22 counting of cyclist in traffic video data [J]. International Journal of Artificial Intelligence Tools, 2017, 26(04), 1750015. [8] Nguyen, V. H. , & Pyun, J. Y. Location detection and tracking of moving targets by a 2d ir-uwb radar system [J]. Sensors, 2015, 15(3), 6740-6762. [9] Duan, S. , Meng, L. , Ma, D. , & Mi, L. Application research on roller skater detection, tracking, and trajectory prediction based on video stream [J]. Scientific programming, 2021,(12),1. [10] Ha, Bui, & Hong. Nonlinear control for autonomous trajectory tracking while considering collision avoidance of uavs based on geometric relations [J]. Energies, 2019, 12(8), 1551. [11] Ahmed, S. A. , Dogra, D. P. , Kar, S. , & Roy, P. P. Surveillance scene representation and trajectory abnormality detection using aggregation of multiple concepts [J]. Expert Systems with Applications,2018, 101(10), 43-55. [12] Chatzidakis, S., Liu, Z. , Hayward, J. P. , & Scaglione, J. M. A generalized muon trajectory estimation algorithm with energy loss for application to muon tomography [J]. Journal of Applied Physics,2018, 123(12), 124903.