Summary of the invention
For this reason, the present invention extracts the act of violence method for quick based on sports ground, solves the low and slow-footed problem of act of violence accuracy of detection in the complicated monitoring scene.
The act of violence detection method that the present invention proposes mainly comprises four step: ROI (Region of Interest), and the zone obtains, sports ground calculating, feature extraction and tagsort, and as shown in Figure 1, details are as follows:
One, the ROI zone obtains
The zone that act of violence takes place must be the zone that compound movement is arranged, and obtains the ROI zone (MR) of compound movement, can reduce the calculated amount of subsequent process, reduces the flase drop phenomenon simultaneously.
(1), target detection
The adjacent N frame difference algorithm of target detection that the present invention's proposition is cut apart based on adaptive threshold, this algorithm noiseproof feature is strong, speed is fast, efficient is high, can reduce false alarm rate effectively, and its detailed process is (situation with N=5 is an example):
Step1 gets adjacent five two field picture I
K-2, I
K-1, I
k, I
K+1, I
K+2, calculate frame difference data Erro.
Wherein, α is weights, and initial value is made as 0.5.
Step2 confirms adaptive threshold T.Calculate frame difference data average, and it multiply by a weighting coefficient, with as adaptive threshold.
T=β×m
Wherein, M * N is a picture size, and β is a weighting coefficient, gets β=10 here.
Step3 upgrades α, extracts moving region M
k
α=e
-2/m
(2), ROI area identification
The present invention proposes the regional blending algorithm of ROI that combines based on medium filtering and mathematical morphology, and the target area that detects is merged and identifies, and step is following:
Step1 uses 3 * 3 medium filtering templates to eliminate isolated motor point;
The merging of step2 target area
Adopt expansion and corrosion operation in the mathematical morphology, remove " hole " of image;
Step3 ROI area identification
Adopt 8-in abutting connection with connection method, the bianry image of the moving target that detects is identified; Owing to only just act of violence possibly take place, therefore use a fixed threshold T in big zone
AreaReject the very few moving region of motion number of pixels.
Wherein, MR
i jExpression t j moving region constantly, Num
i jRepresent the number of motion pixel in this moving region, T
Area=55.
Two, sports ground calculates
As key property, therefore, the sports ground of asking for act of violence place ROI zone is the basis that act of violence detects with the complexity of motion in act of violence.
The present invention adopts the ROI regional movement field computing method based on many rhombuses template, and the acquisition process of ROI regional movement field is following:
Step1 searches for 17 " 1. " points (as shown in Figure 2), the position of asking for least error MBD.If the MBD point is at the center of search window, then algorithm finishes; If the MBD point then carries out step2, otherwise carries out step3 on big rhombus template.
Step2 is the center with the MBD point of step1, reuses little rhombus template and searches for, and is positioned at the search window center up to the MBD point.
Step3 reduces by half step-size in search, and confirms new MBD point, equals 1 up to step-length, and algorithm finishes.
Because it is different that target range video camera distance not simultaneously, is asked for the yardstick of sports ground, for this reason, need carry out normalization to the sports ground of asking for.
The present invention proposes the sports ground method for normalizing based on pinhole camera modeling, and concrete method for normalizing is described below:
The projection of real-world object on the video camera imaging plane, the pinhole camera modeling that is widely used, as shown in Figure 3, be inverted at imaging plane for avoiding real-world object, we have been placed on imaging plane and real-world object the homonymy of focus.Wherein, F is the focal length of camera lens, and C is a focus, highly is respectively h
1, h
2Target T
1, T
2Picture altitude on imaging plane is respectively h
1', h
2', can know h by geometric relationship
1', h
2' exist as follows to concern:
If the pinhole camera modeling field angle is β, its focal length is F, and imaging plane is positioned at the camera focus place, and the imaging size is m * n, and is as shown in Figure 4.By the geometric relationship between them, can easily derive following relation:
Central point with imaging plane is former heart O, sets up cartesian coordinate system, can know that by the related properties of camera lens optical axis OC is perpendicular to imaging plane, and is as shown in Figure 5.If the coordinate of target reference point T ' be (x, y), its projection on u, v axle is respectively α, γ with the angle that the formed line of focus C is become with optical axis, by relevant trigonometric function knowledge, can know:
In the formula, (x is a true origin with the image lower left corner y) to the coordinate of target reference point T ', and F is a focal length.
Shown in Figure 6 is the geometric representation that a camera is positioned at the supervisory system of guarded region oblique upper.Wherein, C is a focus, itself and floor level CA=H, the angle on optical axis and ground is θ, T is an impact point, its position on imaging plane be T ' (x, y), wherein, TB ⊥ OA can be concerned through geometric relationship as follows:
So can get both form images the size ratio k
n:
For the ratio of the imaging size of same object on different distance, h
t/ h
0=1, and D
0/ H is the zoom factor η that is asked just.Therefore, following formula can be reduced to:
Wherein, η=D
0/ H is the ratio of camera height and reference altitude.
Here k
nBe called zoom factor, the sports ground for each the ROI zone that obtains multiply by corresponding zoom factor with it, can realize that the normalization of sports ground is handled.
Three, feature extraction
See that from the angle of statistics when containing act of violence in the scene, the sports ground mould value in corresponding ROI zone is big, direction is disorderly, extracts the act of violence characteristic with this characteristic here.
(1), stable factor f
U
When act of violence takes place, stop each other and antagonism that owing to interpersonal the variation of moving target centroid position is comparatively slow.This phenomenon is reacted on the sports ground, and promptly the average of sports ground is less.The present invention proposes stable factor f
UDescribe this phenomenon, its computing method are following:
For ease of statement, establish certain moving region through the piece matching criterior, obtain M motion amplitude altogether and be not 0 sports ground, wherein the sports ground of i macro block is (Vx
i, Vy
i).Calculate the average
that sports ground makes progress at x, y respectively
Through following formula calculation stability factor f
U:
Wherein, λ is a fixed coefficient, can confirm through experiment, gets λ=0.5 here.
(2), sports ground average energy M
RThe peace meansquaredeviation
R
When act of violence took place, some position of moving region (like arm, weapon and pin etc.) were inevitable with the fast speeds motion, and the movement velocity at some other position is relatively slow.Be reacted on the sports ground, i.e. sports ground energy hunting is bigger.The present invention proposes sports ground average energy M
RThe peace meansquaredeviation
RThis phenomenon is described.Its computing method are following:
Use following formula to calculate the energy R of each sports ground earlier
i:
Calculate the average energy M of sports ground then
RThe peace meansquaredeviation
R:
(3), normalization direction entropy E
oWith direction deviation M
o
When act of violence takes place,, must cause sports ground on direction, to seem and be in a mess owing to confront with each other and behavior such as hide.The present invention proposes normalization direction entropy E
oWith direction deviation M
oCharacterize this phenomenon.Its implementation is following:
Step1 is divided into N direction with 0~360 degree, and N is a positive integer, and (experiment is found; The value of N is advisable between should being taken at 10~30), carry out mark with 0~N-1 respectively, the direction of sports ground is carried out normalization; The probability that sports ground occurs on the statistics all directions; Be called normalization direction of motion histogram H (θ), as shown in Figure 7, N is taken as 16 in Fig. 7.
Step2 calculates the entropy E of normalization direction histogram H (θ)
o:
In the formula, p
iBe the probability of sports ground on i direction.
Step3 calculated direction deviation M
o: for i direction among the histogram H (θ), the relative direction θ of it and arbitrary direction j
IjAvailable following formula calculates:
Then the relative direction average of i direction
is:
Choose wherein minimum
As direction deviation M
o:
Four, tagsort
Generally, when having act of violence to take place in the moving region, the f that calculates
U, σ
R, E
oAnd M
oBe worth bigger, and M
RCan be in the metastable scope.This statistical property is not then satisfied in other behavior,, though some slow motions such as for example walking, chat are its f
U, M
RValue might be close with act of violence, but σ
R, E
oAnd M
oValue can be obviously less than normal; And move its f faster for the running uniform velocity
UIt is very little that value can become, E
oAnd M
oValue less than normal, M
RValue can be obviously bigger than normal.According to above-mentioned statistical property, the present invention adopts associating Gaussian membership function that characteristic parameter is carried out normalization and handles, to reduce the difference of each characteristic parameter on number change:
Wherein, f
i=σ
R, E
o, M
o, M
Rc
1, c
2Be respectively the average of two Gaussian functions, σ
1, σ
2Be respectively the mean square deviation of two Gaussian functions, can confirm through experiment.
After experiment showed, that normalization is handled, characteristic parameter has good statistical property: when the moving region had act of violence to take place, each characteristic parameter all can obtain bigger value; Otherwise, when different normal behaviours takes place, have the different character parameter value less.Therefore, algorithm is lower to the requirement of Feature Fusion, and the present invention adopts weighted sum mode efficiently that the characteristic parameter of asking for is merged, and proposes the notion of violence progression RVI:
In the formula, 0≤w
i≤1, represent the weights of i characteristic parameter, can confirm through experiment.f
i=f
U、M
R、σ
R、E
o、M
o。
Violence progression RVI is the situation of change to movement locus, speed, direction in the moving region, and the concentrated expression of confusion degree, and the act of violence in the scene is had stronger sign ability.Because have a plurality of moving regions in every two field picture usually, the present invention chooses wherein maximum RVI and characterizes present frame, is defined as maximum violence progression MVI:
MVI=max{RVI
i}
Because polytrope and some other unpredictable factors of people's behavior in the true environment are used single frames MVI to carry out act of violence and are detected the alert rate of the higher mistake of appearance easily.The present invention proposes the notion of average maximum violence progression AMVI, uses the average of multiframe MVI to characterize the possibility that act of violence is taking place in the supervision scene:
The use fixed threshold is judged the AMVI of present frame:
If flag=1, judging has act of violence to take place in the scene, and present frame is the violence frame, can give the alarm or carries out other processing.
The advantage of method of the present invention is: the acts of violence such as having a fist fight, break, run that (1) exists in can the Intelligent Measurement video, and detection efficiency is high, and loss and false drop rate are low; (2) do not need to carry out the behavior differentiation according to the colouring information of human body, adaptive capacity to environment is strong, can adapt to non-stop run round the clock; (3) need not rely on the accurate profile information of human body to carry out the behavior differentiation, can adapt to the crowd of different crowded programs; (4) carry out characteristic normalization automatically according to pinhole camera modeling and handle, to video camera to set up conditional request little.
Embodiment
The act of violence detection method that the present invention proposes mainly comprises four steps:
One, the ROI zone obtains;
Two, sports ground calculates;
Three, feature extraction;
Four, tagsort.
Wherein,
One, the ROI zone obtains and comprises:
(1), target detection, its detailed process is:
Step1 gets adjacent five two field picture I
K-2, I
K-1, I
k, I
K+1, I
K+2, calculate frame difference data Erro;
Step2 confirms adaptive threshold T; Calculate frame difference data average, and it multiply by a weighting coefficient, with as adaptive threshold;
Step3 upgrades α, extracts moving region M
k
(2), the ROI area identification, step is following:
Step1 uses 3 * 3 medium filtering templates to eliminate isolated motor point;
The merging of step2 target area;
Adopt expansion and corrosion operation in the mathematical morphology, remove " hole " of image;
Step3 ROI area identification;
Adopt 8-in abutting connection with connection method, the bianry image of the moving target that detects is identified.
Two, sports ground calculates, and the acquisition process of ROI regional movement field is following:
Step1 searches for 17 " 1. " points, the position of asking for least error MBD, and at the center of search window, then algorithm finishes as if the MBD point; If the MBD point then carries out step2, otherwise carries out step3 on big rhombus template;
Step2 is the center with the MBD point of step1, reuses little rhombus template and searches for, and is positioned at the search window center up to the MBD point;
Step3 reduces by half step-size in search, and confirms new MBD point, equals 1 up to step-length, and algorithm finishes.
Method for normalizing is specially: k
nBe zoom factor, the sports ground for each the ROI zone that obtains multiply by corresponding zoom factor with it, can realize that the normalization of sports ground is handled;
Wherein, η=D
0/ H is the ratio of camera height and reference altitude.
Three, feature extraction comprises:
(1), stable factor f
U, its concrete computing method are:
Wherein, λ is a fixed coefficient; Can confirm through experiment; Here get λ=0.5,
representes the average of sports ground on x, y direction respectively;
(2), sports ground average energy M
RThe peace meansquaredeviation
R
Wherein: R
iEnergy for each sports ground:
(Vx
i, Vy
i) expression i macro block sports ground;
(3), normalization direction entropy E
oWith direction deviation M
o, its implementation is following:
Step1 is divided into N direction with 0~360 degree, and N does;
Step2 calculates the entropy E of normalization direction histogram H (θ)
o
Four, tagsort
Adopt associating Gaussian membership function that characteristic parameter is carried out normalization and handle, to reduce the difference of each characteristic parameter on number change:
Wherein, f
i=σ
R, E
o, M
o, M
Rc
1, c
2Be respectively the average of two Gaussian functions, σ
1, σ
2Be respectively the mean square deviation of two Gaussian functions, can confirm through experiment.