Abstract:To overcome cavities and false targets in moving target detection, a novel moving target detection algorithm based on difference between frames and optical flow is presented. Firstly, image preprocessing, difference, gray-scale transformation and binarization are carried out on seven successive images. And the first and the last three frames among the obtained binary images are summed respectively, then logic operation is done on the two accumulations to get rough area of the moving target in the intermediate frame. Then, difference is done between intermediate frame and background frame, and image edge extraction, binarization and arithmetic operations of pixels are operated on the processed frame to obtain accurate area of the moving target in the intermediate frame. Based on what is said, the moving target accurate information is obtained by the improved optical flow method. Finally, threshold segmentation and morphological processing is completed to extract the target. Comparative experiments indicate that the proposed method can detect and segment the moving target accurately and fastly.