November 20, 2019 Development Notes

Two movements detection algorithm description:

Frame difference method:

The Frame moving target detection is the most commonly used algorithms. Based on the principle of frame difference method is: when there is a moving object in the video, between adjacent frames (or three adjacent) have difference in gray scale, gray scale image is obtained two absolute values ​​of differences, the stationary objects manifested in the difference image are all 0, and the contour of the moving objects, in particular moving object changes due to the presence of non-zero gradation, when the absolute value exceeds a certain threshold, the moving object can be determined that, in order to achieve detection targets.

Dimensional frequency domain moving object detection:

By decomposing the ranks of the moving image, the motion detection problem is transformed into a three-dimensional frequency domain for the two-dimensional frequency domain, thereby reducing the difficulty of filter design. It gives the primary adaptive filtering algorithm for extracting kinetic energy, and by eliminating the background noise frequency component effectively detect moving targets.

 

Complexity analysis:

Performed for the frame difference analysis, code complexity and concentrated in absdiff findContours portion, wherein the number of iterations is absdiff 500 * 2 * 500 = 50000, time is 88.46ms (taking the average of two hundred time calculation)

 

Moving target detection algorithm for two-dimensional frequency domain, there are two versions of the code:

For py-new-fuliye.py, code complexity mainly in two parts: the Fourier transform, and traversing, in py-new-fuliye.py, totally twice traversed twice with Fourier transform , the number of iterations that can traverse the 50 * 30 * 2 = 300, time: 54.175ms

 

Analyzed for pepoplefft.py (improved version), used twice Fourier transform (positive once again reverse), conducted a nested traversal, traverse the number of times: 50 * 10 = 500 times, time: ms

 

Optimized parameter adjustment for pepoplefft.py:

Search noise:

To find the noise, it is necessary to know, after Fourier transformation high pass filter, the performance of the remaining edge portion regularity in the array, using the drawing represented numpy:

 

After thresholding, the effect is as:

 

Found that the face of complex environmental performance is not satisfactory in subsequent video test, this time to consider options to draw more rectangular marquee to mark multiple targets candidates, not to consider the use of other filtering de-noising due to 1, will occupation had not much processing time, 2, do not think that after a high-pass filter has not been filtered out of the noise will be filtered out other filter function, but the possibility of a greater objective is filtered.

Guess you like

Origin www.cnblogs.com/lvfengkun/p/11901359.html