openmv Kalman filter multi-target tracking

openmv Kalman filter multi-target tracking

The function of Kalman filter is to keep track of the object in the case of transient loss, occlusion, and coincidence of two targets. kalman_example.py gives a simple example of tracking a circular motion and a stationary point, and the two points will coincide for a short time every revolution. But in the end I found that it is not very useful for art, because art's optimization of traditional image algorithms is too poor, resulting in a low frame rate. It may be more useful for ordinary openmv. Of course, it can also be applied to other places, as long as the call to openmv_numpy is changed to a call to numpy.

Test video .

Instructions

First, initialize A , H , Q , RA,H,Q,RA,H,Q,R matrix, create a Tracker_Manager(), whose role is to manage the tracker. Then the target of each frame image is matched with the math method, and then updated with the update method. Finally, you can use get_motion_trail_pre to get the ID and trajectory of the target.

Manager = Tracker_Manager()#定义一个管理器

Manager.match(x,y,A,H_k,Q,R)#进行匹配

Manager.update()#更新管理器

Manager.get_motion_trail_pre()#获取预测坐标轨迹

Manager.get_positions()#获取后验坐标

Manager.get_motion_trail_measure()#获取测量坐标轨迹

Guess you like

Origin blog.csdn.net/qtzbxjg/article/details/128619169