Intelligent Video Surveillance Design Based on OpenCV

Abstract: Intelligent monitoring system using intelligent video analysis technology can minimize human intervention, improve monitoring efficiency, reduce people's workload, and detect, separate, track and effectively identify target objects in dynamic scene video. The paper introduces the motion template detection method in opencv, and gives the experimental results of using this detection method to detect, track and intelligently judge moving targets.
Keywords: opencv; video surveillance; target detection; intelligent recognition

This article refers to the address: http://

O Introduction Intelligent video surveillance is based on digital and networked video surveillance, but it is different from general networked video surveillance. It is a higher-end video surveillance application. Intelligent video surveillance systems are able to identify different objects. Discovering anomalies in the surveillance screen and alerting and providing useful information in the fastest and best way can more effectively assist security personnel in dealing with crises and minimize false positives and false negatives. Moving target detection and tracking technology in intelligent video surveillance is the key technology to achieve this. At present, the commonly used moving target detection methods are the interframe difference method, the background difference method, and the optical flow method. Several target tracking algorithms that are of interest are particle filtering, edge contour based tracking, and template-based target modeling.
The motion template detection in the open source visual library (openCV) can effectively detect and track the moving targets in the video image. This paper first introduces the openCV algorithm, and then based on the algorithm, it is given to realize the intelligent video surveillance. The specific method of tracking the moving target and making corresponding intelligent judgment according to the position of the center of mass of the moving target.

1 Introduction to 0penCV OpenCV is short for "Open Source Computer Vision Library" and is an open source computer vision library for Intel. It consists of a series of C functions and a small number of C++ classes, and is a general-purpose algorithm for image processing and computer vision. OpenCV has a cross-platform middle and high-level API that includes more than 300 C functions, and it does not depend on other external libraries. Op-enCV is free for both non-commercial and commercial applications; in addition, OpenCV provides a transparent interface for Intel's IPP. This means that if there are IPP libraries optimized for a particular processor, then OpenCV will automatically load these libraries at runtime to get the best performance. The advantages of OpenCV are open source, optimized code based on Intel processor instruction set, unified structure and function definition, powerful image and matrix computing capabilities, and convenient and flexible user interface, while supporting MS-Windows and Linux platforms. .
The latest OpenCV library already contains a large number of functions and examples that can be used to deal with common problems in the field of computer vision, mainly related to the following aspects:
(1) Motion Analysis and Objection Tracking - motion analysis and target tracking;
(2) Image Analysis - image analysis;
(3) StructuralA nalysis - structural analysis;
(4) ObjectR ecognition-target recognition;
(5) 3D Reconstruction-3D reconstruction.

2 Algorithm flow The flow chart of the motion module detection algorithm is shown in Figure 1. The process firstly obtains the difference between the current frame and the previous frame, and then binarizes the difference image to remove the timeout effect, update the motion history image, and then calculate the gradient direction of the motion history image, and divide the entire motion into independent In the moving part, each motion segmentation is marked with a sequence of structures, and finally the global motion direction of the selected region is calculated, thereby obtaining the centroid position and the moving direction of the moving target.

14a.JPG


The algorithm is based on the existence of the intersection between two adjacent frames of the moving target on the screen. This algorithm can clearly display the trajectory, velocity and direction of the target without extrapolation and correlation analysis and post-trajectory processing. The specific process of detecting moving target foreground images based on moving targets using the algorithm can be described as follows:
â—‡ Store the detected target foreground image and decrement the past frame grayscale:
打 Put the timestamp overlay on the current frame to store the historical image suffix;
â—‡ forming a gradient gradient image;
梯度 The gradient gradient image obtained by the segmentation obtains the target position, and calculates the gradient gradient to obtain the speed and direction of the target, and adds the batch number mark.
The algorithm simplifies the operation of target correlation, and can implement stable tracking of the target in the initial state without understanding the target motion trend, and has good real-time performance.

3 Related Functions The motion history image can be updated by the function cvUpdateMotionHistory in the following ways:
14b.JPG
That is to say, the pixel point of the motion occurring in the MHI (motion history image) is set to the current time, and the pixel point where the motion occurs longer is cleared.
The function cvCalcMotionGradient is used to calculate the differential Dx and Dy of MHI, and then calculate the gradient direction. The formula is:
Orientation(x,y)=arcztan(Dy(x,y)/Dx(x,y))
The symbols of Dx(x, y) and Dy(x, y) should be considered. Then fill the mask to indicate which directions are correct.
The function cvCalcGlobalOrientation is used to calculate the entire direction of motion within the selected area. And return the angle value between 0 ° and 360 °. First create a motion histogram from the function and look for the basic direction as the coordinates of the maximum value of the histogram. The function then calculates the relative offset from the base direction and treats it as a weighted sum of all direction vectors (the closer the run, the greater the weight). The resulting angle is the cyclic sum of the basic direction and the offset.
The function cvSegmentMotion looks for all motion splits and identifies them in seg_mask with different individual numbers (1, 2, ...). It can also return one with CvConnected-
The sequence of the Comp structure. Each of these structures corresponds to a moving part. After that, the direction of motion of each moving part can be calculated by the function cvCalcGlobalOrientation using the mask of the extracted specific part. Furthermore, the centroid position of each moving part can also be determined by the position of the returned image ROI, whereby the position of the moving target can be determined.

4 Experimental results In the experiment, the standard video image source can be used to effectively detect and track the moving target in the image. Figure 2 is a schematic diagram of the experimental results. Which can be based on CvCon- through Figure 2(a)
The shape of the motion segmentation obtained in neetedComp is filtered to filter out the moving target that is not concerned; and for Fig. 2(b), if the threshold is set to be large. The cyclist in the video will not be tracked;

14c.JPG

In Figure 2(c), it is assumed that the right side of the vertical line is the warning area when a target enters the area. That is, when the centroid position of the moving target is a certain interval value, the target is marked to achieve the effect of intelligent judgment. The linear direction in the figure indicates the moving direction of the moving object. In the actual operating scene, it can be judged whether the object is retrograde to achieve the effect of intelligent monitoring and recognition.

5 Conclusion This paper introduces the detection method of motion template in openCV, which can effectively detect and track the moving target in the video image, and can obtain the moving direction and corresponding position of the target, thus realizing intelligent video monitoring and intelligent judgment. However, in fact, the method still has problems such as inaccurate motion background difference and different shape and size of the moving target. Therefore, further research or combination with other methods is needed to achieve better results.

we design and manufacture  Actuator For Tracking System, which is widely used for solar system.

U10 is a heavy load Linear Actuator designed for industrial  application, especially be used for solar tracking system & heliostat. U10  is a robust and powerful actuator, designed for heavy-duty applications in harsh environments like solar tracker. It features high load capability, long lifetime and low power consumption. 

Actuator For Tracking System

Electric Linear Actuator For Tracking System , Linear Actuator For Tracking System, Actuator For Tracking System

TOMUU (DONGGUAN) ACTUATOR TECHNOLOGY CO., LTD. , http://www.tomuu.com

Posted on