Matlab simulation of video target tracking algorithm - comparison and analysis of two-frame difference method, three-frame difference method, mixed Gaussian method and Vibe algorithm

Matlab simulation of video target tracking algorithm - comparison and analysis of two-frame difference method, three-frame difference method, mixed Gaussian method and Vibe algorithm

I. Introduction

Video object tracking is an important research field in computer vision, and it has a wide range of applications, such as intelligent surveillance, vehicle systems, robots, etc. Video target tracking needs to process the video image sequence, identify the target of interest, and realize the tracking of the target. This article will introduce four video target tracking algorithms: two-frame difference method, three-frame difference method, mixed Gaussian method and Vibe algorithm, and use Matlab software for simulation experiment comparison and analysis.

2. Algorithm overview

  1. two frame difference

This method judges the position and state of the target by calculating the variation of the pixel value between two adjacent frames. If the difference between pixels exceeds the set threshold, it is regarded as the target pixel.

  1. three frame difference method

This method is based on the two-frame difference method, and then adds the third frame image as a reference. Comparing the difference between the 3rd frame image and the previous 2 frames can separate the target object more accurately.

  1. Mixed Gaussian method

The method is to model the background first, and then model the Gaussian distribution of the observed pixels. For each pixel, maintain a Gaussian model to calculate whether the pixel is the background in the current frame.

  1. Vibe algorithm

This method is similar to the Mixed Gaussian method, but uses a simpler and faster algorithm. The Vibe algorithm uses a technique based on random sampling, using the difference between adjacent pixels to classify, so as to determine which pixels are target pixels.

3. Matlab simulation experiment

We use Matlab software to conduct simulation experiments to compare the effects of these four algorithms on target tracking.

  1. Realization of two frame difference method

clear;
clc;
% read in two images
I1=imread('test1.jpg');
I2=imread('test2.jpg');
% convert to grayscale

Guess you like

Origin blog.csdn.net/Jack_user/article/details/131795746