QT+Opencv particle filter algorithm for video target tracking——(2) Filter algorithm analysis and testing

In the previous blog, the related principles of machine vision and particle filter algorithm have been introduced. In the early stage of particle filter algorithm based on 410c platform, we applied QT and Opencv on the host computer to complete the particle filter algorithm implementation and test. The implementation and testing process is as follows:

First, the construction of QT and Opencv host computer environment

At the time of testing, we mainly use QT to realize the interface interaction design of particle filter target tracking. At the same time, through the various algorithm functions provided by Opencv to achieve related image processing, and finally combined with particle filter algorithm to achieve the tracking of the entire video target. The QT and Opencv environments are built as follows:

1) Construction of QT environment

In this paper, the host computer uses the 32-bit win7 platform. For the specific installation process, refer to the method provided in http://.

2) Installation of OpenCv

Opencv uses version 2.4. The specific installation of Opencv in QT environment can refer to http://Jacky_Liu.html.

Second, the realization of particle filter algorithm based on C++ language

After the relevant environment is built, the programming of the particle filter algorithm can be started. The basic principle of the particle filter algorithm has been introduced in the selection of the target tracking algorithm. This section will be based on the previous article. The specific implementation of the code is briefly introduced. The complete code can be downloaded from Baidu Cloud Disk. The link is http://pan.baidu.com/s/1bp3dyLT.

The architectural design of the above code is shown in Figure 1.

Figure 1 particle filter video target tracking algorithm implementation architecture

The whole system consists of DirectShow-based video acquisition and pre-processing module, user target selection module, target feature model building module, video motion model building module, adaptive particle filter, target coordinate generation module, trajectory stream processing module and DirectShow display interface module. composition. The DirectShow video acquisition and pre-processing module mainly realizes the acquisition of the RGB image of the camera, and performs preliminary processing on the collected RGB image to obtain the pixel image used in the system video processing. The user target selection module is mainly before the program runs. The system enters the user target selection, and the user can select the target to be tracked through the mouse frame. After the selection is completed, the system enters the video tracking. In the video tracking process, the system first calls the target feature module to generate the target feature set, and then constructs the video motion model pair video based on the video frame. The frame is processed, and then the adaptive particle filter is used to adaptively filter the image frame to achieve target prediction and tracking. The predicted tracking result is input into the target coordinate generation module to generate a fixed format target coordinate and added to the coordinate stream processing queue. The stream processing module generates a video stream with a track according to the coordinate stream in the queue and outputs it to the DirectShow display interface for display, so that the target position and track information marked by the rectangular frame can be finally displayed on the display in real time. The related algorithms and particle filter algorithms in the implementation process are all designed by OpenCv.

Third, particle filter algorithm test and analysis

The above is the implementation framework of the video target tracking of the whole particle filter algorithm. After downloading the code according to the above-mentioned connection, the video target tracking algorithm implemented by the particle filter algorithm can be run and tested. The test result is shown in Figure 2 below.

Figure 2 test run effect

From the test results, the particle filter algorithm implemented on the PC side of 4G memory handles the frame rate and the system resources occupied during the processing is very small, while the 419c development board provides 1G of running memory and 4 cores of 64. The bit processing architecture, it is very feasible to run the algorithm on it. In the next section, we will continue to teach you how to implement the program on the 410c development platform. As shown in Figure 3 below, connect the USB camera through the USB interface provided by 410c. Implement particle filter video target tracking.

Figure 3 DragonBoard 410c platform

ATV71 Series Inverter

Frequency inverters for 3-phase asynchronous motors from 1 to 700 HP, constant torque applications for 575-690V applications. For 230V and 460V drive applications consider the new Altivar Process ATV900 drive family.

Inverter 3 Phase,Electric Frequency Converter,High Power Electric Inverter,Schneider Inverter 3 Phase

Wuxi Trenty Machinery & Equipment Co., Ltd. , https://www.elec-inverter.com