CN101819681B - Weight number adaptively adjusted weighted average background updating method - Google Patents

Weight number adaptively adjusted weighted average background updating method Download PDF

Info

Publication number
CN101819681B
CN101819681B CN2009102630832A CN200910263083A CN101819681B CN 101819681 B CN101819681 B CN 101819681B CN 2009102630832 A CN2009102630832 A CN 2009102630832A CN 200910263083 A CN200910263083 A CN 200910263083A CN 101819681 B CN101819681 B CN 101819681B
Authority
CN
China
Prior art keywords
frame
pixel
difference image
frame difference
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN2009102630832A
Other languages
Chinese (zh)
Other versions
CN101819681A (en
Inventor
路小波
朱周
曾维理
赵新勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Southeast University
Original Assignee
Southeast University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Southeast University filed Critical Southeast University
Priority to CN2009102630832A priority Critical patent/CN101819681B/en
Publication of CN101819681A publication Critical patent/CN101819681A/en
Application granted granted Critical
Publication of CN101819681B publication Critical patent/CN101819681B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

The invention discloses a weight number adaptively adjusted weighted average background updating method. The method includes that forward frame difference of the current frame image and the previous frame image is calculated and binarization is carried out, so as to obtain the forward frame difference foreground binary image, backward frame difference of the current frame image and the next frame image is calculated and binarization is carried out, so as to obtain a backward frame difference foreground binary image, execution and operation are carried out on the forward and backward frame difference foreground binary images, so as to obtain a binary image capable of accurately discriminating moving vehicle region and static background region, and finally the region where a pixel is located is judged according to the binary image, and weighted average background updating is carried out by giving adaptive weight number to each pixel. The background updating method provided by the invention can carry out adaptive response on illumination variation and vehicle stream variation and has the advantage of high accuracy.

Description

The weighted average background updating method that Weight number adaptively is adjusted
Technical field
The present invention relates to the weighted average background updating method that a kind of Weight number adaptively is adjusted, belong to the traffic monitoring technical field.
Background technology
Along with carrying out fast of constant development of economy and urbanization process, motor vehicle is possessed quantity sharply to be increased, and traffic problems are more and more outstanding, and taking place constantly such as traffic hazard, growth, traffic congestion frequently take place.In order to address these problems, since the nineties in 20th century, China begins to carry out the construction of intelligent transportation system (ITS).
An important subsystem of intelligent transportation system is exactly a traffic information acquisition system, and vehicle detection is one of critical function of this system.Traditional vehicle checking method is that toroid winding detects, and there are shortcomings such as damage easily, maintenance difficult in it.In the last few years, the video frequency vehicle detection technique became a focus in the vehicle detection technology, compared traditional toroid winding detection technique and had advantages such as surveyed area is big, detected parameters is many, convenient for installation and maintenance, had broad application prospects.
In the video frequency vehicle detection technique, often utilize the background image of traffic scene to come vehicle is detected.Because the variation of illumination, background image are also in continuous variation, background image updating is the key that guarantees the vehicle detection rate accurately and real-time.Following several by the retrieval of prior art document being found existing vehicle tracking method mainly contains: method of weighted mean, revised law and progressively based on background update method of Kalman filtering etc.These methods can accurately be upgraded background under certain environment, but can not take into account the quick response of illumination variation and the accurate recovery of road surface, vehicle process back gray scale, have certain limitation.The present invention will provide a kind of can change the background update method that carries out automated response to illumination variation and wagon flow.
Summary of the invention
The present invention seeks to provide a kind of at the defective that prior art exists can change the background update method that carries out automated response to illumination variation and wagon flow, and this method has upgrades advantage accurately.
The present invention adopts following technical scheme for achieving the above object:
The weighted average background updating method that Weight number adaptively of the present invention is adjusted is characterized in that comprising the steps:
1. calculate the forward frame difference image and to its binaryzation
The background image that obtains after the background initialization is B 0, when collecting i two field picture P iWhen (i>1), calculate i two field picture P iWith i-1 two field picture P I-1Between absolute difference, obtain i frame forward frame difference image PP I1, that is:
PP i1(x,y)=|P i(x,y)-P i-1(x,y)|,
In the formula, P i(x, y) expression i two field picture P iMiddle coordinate is (x, the gray scale of pixel y), P I-1(x, y) expression i-1 two field picture P I-1Middle coordinate is (x, the gray scale of pixel y), PP I1(x, y) expression i frame forward frame difference image PP I1(x, y) middle coordinate is that (x, y represent horizontal ordinate and ordinate respectively for x, the gray scale of pixel y), down together;
Secondly, calculate i frame forward frame difference image PP I1Optimal segmenting threshold THR I1, its step is as follows:
(1) obtains i frame forward frame difference image PP I1In minimum gradation value Z 1With maximum gradation value Z m, making iterations k=0, the initial value of segmentation threshold is T 0=(Z 1+ Z m)/2, T at this moment k=T 0
(2) according to threshold value T kTo i frame forward frame difference image PP I1Cut apart, gray scale is more than or equal to threshold value T kPixel region be split into i frame forward frame difference image PP I1In motion target area PPO Ik1, gray scale is less than threshold value T kPixel region be split into background area PPB Ik1,
PPO ik1={(x,y)|PP i1(x,y)≥T k},
PPB ik1={(x,y)|PP i1(x,y)<T k},
Calculate motion target area PPO respectively Ik1Average gray value Z K1With background area PPB Ik1Average gray value Z K2,
Z k 1 = Σ ( x , y ) ∈ PPO ik 1 PP i 1 ( x , y ) N 1 k ,
Z k 2 = Σ ( x , y ) ∈ PPB ik 1 PP i 1 ( x , y ) N 2 k ,
In the formula, N 1kAnd N 2kRepresent motion target area PPO respectively Ik1With background area PPB Ik1The number of middle pixel;
(3) obtain new threshold value T K+1=(Z K1+ Z K2)/2;
(4) if T K+1=T kThen finishing iteration makes THR I1=T k, otherwise make k=k+1, repeated for (2)-(3) step,
At last, according to optimal segmenting threshold THR I1To i frame forward frame difference image PP I1Carry out binaryzation and calculate, obtain i frame forward frame difference image PP I1Initial prospect binary map OM I1,
OM i 1 ‾ ( x , y ) = 1 , if PP i 1 ( x , y ) ≥ THR i 1 0 , else ,
In the formula, OM I1(x, y) expression i frame forward frame difference image PP I1Initial prospect binary map OM I1Middle coordinate is that (x, the value of pixel y) if 1 this pixel of expression belongs to the moving vehicle zone, if 0 this pixel of expression belongs to the static background zone, utilize se ed filling algorithm to remove initial prospect binary map OM I1In the cavity, obtain i frame forward frame difference image PP I1Final prospect binary map OM I1
2. calculate the back to frame difference image and to its binaryzation
Calculate i two field picture P iWith i+1 two field picture P I+1Between absolute difference, obtain behind the i frame to frame difference image PP I2, that is,
PP i2(x,y)=|P i(x,y)-P i+1(x,y)|,
In the formula, P i(x, y) expression i two field picture P iMiddle coordinate is (x, the gray scale of pixel y), P I+1(x, y) expression i+1 two field picture P I+1Middle coordinate is (x, the gray scale of pixel y), PP I2(x, y) behind the expression i frame to frame difference image PP I2(x, y) in coordinate be (x, the gray scale of pixel y),
Secondly, calculate behind the i frame to frame difference image PP I2Optimal segmenting threshold THR I2, its step is as follows:
(a) obtain behind the i frame to frame difference image PP I2In minimum gradation value Z 1With maximum gradation value Z m, making iterations k=0, the initial value of segmentation threshold is T 0=(Z 1+ Z m)/2, T at this moment k=T 0
(b) according to threshold value T kTo behind the i frame to frame difference image PP I2Cut apart, gray scale is more than or equal to threshold value T kPixel region be split into behind the i frame to frame difference image PP I2In motion target area PPO Ik2, gray scale is less than threshold value T kPixel region be split into background area PPB Ik2,
PPO ik2={(x,y)|PP i2(x,y)≥T k},
PPB ik2={(x,y)|PP i2(x,y)<T k},
Calculate motion target area PPO respectively Ik2Average gray value Z K1With background area PPB Ik2Average gray value Z K2,
Z k 1 = Σ ( x , y ) ∈ PPO ik 2 PP i 2 ( x , y ) N 1 k ,
Z k 2 = Σ ( x , y ) ∈ PPB ik 2 PP i 2 ( x , y ) N 2 k ,
In the formula, N 1kAnd N 2kRepresent motion target area PPO respectively Ik2With background area PPB Ik2The number of middle pixel,
(c) obtain new threshold value T K+1=(Z K1+ Z K2)/2,
(d) if T K+1=T kThen finishing iteration makes THR I2=T k, otherwise make k=k+1, repeated for (2)-(3) step,
At last, according to optimal segmenting threshold THR I2To behind the i frame to frame difference image PP I2Carry out binaryzation and calculate, obtain behind the i frame to frame difference image PP I2Initial prospect binary map OM I2,
OM i 2 ‾ ( x , y ) = 1 , if PP i 2 ( x , y ) ≥ THR i 2 0 , else ,
In the formula, OM I2(x, y) behind the expression i frame to frame difference image PP I2Initial prospect binary map OM I2In coordinate be (x, the value of pixel y), if 1 this pixel of expression belongs to the moving vehicle zone, if 0 represent that this pixel belongs to the static background zone,
Utilize se ed filling algorithm to remove initial prospect binary map OM I2In the cavity, obtain behind the i frame to frame difference image PP I2Final prospect binary map OM I2
3. calculate i two field picture P iProspect binary map OM i
OM i(x,y)=OM i1(x,y)and?OM i2(x,y),
In the formula, OM i(x, y) expression i two field picture P iProspect binary map OM iMiddle coordinate is (x, the value of pixel y), OM I1(x, y) expression i frame forward frame difference image PP I1Prospect binary map OM I1Middle coordinate is (x, the value of pixel y), OM I2(x, y) behind the expression i frame to frame difference image PP I2Prospect binary map OM I2In coordinate be (x, the value of pixel y) is if 1 this pixel of expression belongs to the moving vehicle zone, if 0 represents that this pixel belongs to the static background zone;
4. calculate i frame background image B i
According to i two field picture P iProspect binary map OM iCalculate i frame background image B i,
B i ( x , y ) = α · B i - 1 ( x , y ) + ( 1 - α ) · P i ( x , y ) , if OM i ( x , y ) = 1 ( 1 - α ) · B i - 1 ( x , y ) + α · P i ( x , y ) if OM i ( x , y ) = 0 ,
Weights α gets 0.9 in the formula.
The present invention has following beneficial effect:
1. wagon flow had good stability.Utilize two-way frame difference method to distinguish vehicle region and background area exactly, when the background of vehicle region was upgraded, the weights of giving current frame image were less, can reduce the shadow of vehicle through staying on background image.
2. illumination variation had excellent adaptability.For the background area, when illumination variation, the weights of giving current frame image are bigger, therefore can adapt to the variation of illumination.
3. has the good comprehensive performance.For existing background update method, eliminating the influence of wagon flow and the variation of adaptation illumination is a pair of contradiction.This method can accurately be distinguished vehicle region and background area, takes adaptive weights to carry out context update to the two, in the influence that reduces wagon flow illumination variation is also had excellent adaptability.
Description of drawings
Fig. 1 is the process flow diagram of context update.
Fig. 2 is the initial background image B 0
Fig. 3 is the 73rd two field picture P 73
Fig. 4 is the 74th two field picture P 74
Fig. 5 is the 75th two field picture P 75
Fig. 6 is the 74th frame forward frame difference image PP 74I
Fig. 7 is the 74th frame forward frame difference prospect bianry image OM 741
Fig. 8 handles the 74th frame forward frame difference prospect bianry image OM afterwards 741
Fig. 9 is to frame difference image PP behind the 74th frame 742
Figure 10 is to frame difference prospect bianry image OM behind the 74th frame 742
Figure 11 is to frame difference prospect bianry image OM behind processing the 74th frame afterwards 742
Figure 12 is the 74th frame prospect bianry image OM 74
Figure 13 is the 73rd frame background image B 73, Figure 14 upgrades the 74th frame background image B that obtains 74
Figure 15 is the 90th two field picture P after the illumination deepening 90
Figure 16 upgrades the 90th frame background image B that obtains 90
Embodiment
Be elaborated below in conjunction with the technical scheme of accompanying drawing to invention:
As shown in Figure 1, the inventive method process flow diagram.
Instantiation of the present invention is described as follows in conjunction with Fig. 2-14:
1. background initialization
Set up video camera, gather 15 minutes continuous sequence image at a concrete traffic scene, frequency acquisition is 30 frames/s, and the image size is 240 * 320 pixels.All are gathered the image that comes average calculating, that is:
B 0 ( x , y ) = 1 450 Σ i = 1 450 Q i ( x , y )
Wherein, B 0Expression initial background image, B 0(x, y) expression B 0Middle coordinate is (x, the gray scale of pixel y), Q iThe i two field picture that expression is gathered, Q i(x, y) expression Q iMiddle coordinate is that (x, the gray scale of pixel y) finally obtain initial background image B as shown in Figure 2 0
2. utilize the forward direction frame difference method to calculate the prospect binary map
Obtain the initial background image B 0Afterwards, acquisition sequence image again is whenever collecting i+1 two field picture P again I+1The time, calculate corresponding to i two field picture P iBackground image B i, establishing does not need background is upgraded when i=1, i.e. B 1=B 0, B 1Be the 1st two field picture P 1Background image; And when i>1, at first utilize i two field picture P iWith i-1 two field picture P I-1Carry out the forward frame difference and calculate, obtain i frame forward frame difference image PP I1, that is,
PP i1(x,y)=|P i(x,y)-P i-1(x,y)|,
In the formula, P i(x, y) expression i two field picture P iMiddle coordinate is (x, the gray scale of pixel y), P I-1(x, y) expression i-1 two field picture P I-1Middle coordinate is (x, the gray scale of pixel y), PP I1(x, y) expression i frame forward frame difference image PP I1(x, y) in coordinate be (x, the gray scale of pixel y),
Secondly, calculate i frame forward frame difference image PP I1Optimal segmenting threshold THR I1, its step is as follows,
(1) obtains i frame forward frame difference image PP I1In minimum gradation value Z 1With maximum gradation value Z m, making iterations k=0, the initial value of segmentation threshold is T 0=(Z 1+ Z m)/2, T at this moment k=T 0,
(2) according to threshold value T kTo i frame forward frame difference image PP I1Cut apart, gray scale is more than or equal to threshold value T kPixel region be split into i frame forward frame difference image PP I1In motion target area PPO Ik1, gray scale is less than threshold value T kPixel region be split into background area PPB Ik1,
PPO ik1={(x,y)|PP i1(x,y)≥T k},
PPB ik1={(x,y)|PP i1(x,y)<T k},
Calculate motion target area PPO respectively Ik1Average gray value Z K1With background area PPB Ik1Average gray value Z K2
Z k 1 = Σ ( x , y ) ∈ PPO ik 1 PP i 1 ( x , y ) N 1 k ,
Z k 2 = Σ ( x , y ) ∈ PPB ik 1 PP i 1 ( x , y ) N 2 k
In the formula, N 1kAnd N 2kRepresent motion target area PPO respectively Ik1With background area PPB Ik1The number of middle pixel,
(3) obtain new threshold value T K+1=(Z K1+ Z K2)/2,
(4) if T K+1=T kThen finishing iteration makes THR I1=T k, otherwise make k=k+1, and repeated for (2)-(3) step, last, according to optimal segmenting threshold THR I1To i frame forward frame difference image PP I1Carry out binaryzation and calculate, obtain i frame forward frame difference image PP I1Initial prospect binary map OM I1
OM i 1 ‾ ( x , y ) = 1 , if PP i 1 ( x , y ) ≥ THR i 1 0 , else ,
In the formula, OM I1(x, y) expression i frame forward frame difference image PP I1Initial prospect binary map OM I1Middle coordinate is that (x, the value of pixel y) if 1 this pixel of expression belongs to the moving vehicle zone, if 0 this pixel of expression belongs to the static background zone, utilize se ed filling algorithm to remove initial prospect binary map OM I1In the cavity, obtain i frame forward frame difference image PP I1Final prospect binary map OM I1,
Fig. 3 is the 73rd two field picture P 73, Fig. 4 is the 74th two field picture P 74, Fig. 5 is the 75th two field picture P 75, Fig. 6 is the 74th frame forward frame difference image PP 741, Fig. 7 is the initial prospect bianry image of the 74th frame forward frame difference OM 741, Fig. 8 is the final prospect bianry image of the 74th frame forward frame difference OM 741
3. utilize the back to calculate the prospect binary map to frame difference method
Calculate i two field picture P iWith i+1 two field picture P I+1Between absolute difference, obtain behind the i frame to frame difference image PP I2, that is, and PP I2(x, y)=| P i(x, y)-P I+1(x, y) |,
In the formula, P i(x, y) expression i two field picture P iMiddle coordinate is (x, the gray scale of pixel y), P I+1(x, y) expression i+1 two field picture P I+1Middle coordinate is (x, the gray scale of pixel y), PP I2(x, y) behind the expression i frame to frame difference image PP I2(x, y) in coordinate be (x, the gray scale of pixel y),
Secondly, calculate behind the i frame to frame difference image PP I2Optimal segmenting threshold THR I2, its step is as follows,
(1) obtains behind the i frame to frame difference image PP I2In minimum gradation value Z 1With maximum gradation value Z m, making iterations k=0, the initial value of segmentation threshold is T 0=(Z 1+ Z m)/2, T at this moment k=T 0,
(2) according to threshold value T kTo behind the i frame to frame difference image PP I2Cut apart, gray scale is more than or equal to threshold value T kPixel region be split into behind the i frame to frame difference image PP I2In motion target area PPO Ik2, gray scale is less than threshold value T kPixel region be split into background area PPB Ik2,
PPO ik2={(x,y)|PP i2(x,y)≥T k},
PPB ik2={(x,y)|PP i2(x,y)<T k},
Calculate motion target area PPO respectively Ik2Average gray value Z K1With background area PPB Ik2Average gray value Z K2
Z k 1 = Σ ( x , y ) ∈ PPO ik 2 PP i 2 ( x , y ) N 1 k ,
Z k 2 = Σ ( x , y ) ∈ PPB ik 2 PP i 2 ( x , y ) N 2 k
In the formula, N 1kAnd N 2kRepresent motion target area PPO respectively Ik2With background area PPB Ik2The number of middle pixel,
(3) obtain new threshold value T K+1=(Z K1+ Z K2)/2,
(4) if T K+1=T kThen finishing iteration makes THR I2=T k, otherwise make k=k+1, and repeated for (2)-(3) step, last, according to optimal segmenting threshold THR I2To behind the i frame to frame difference image PP I2Carry out binaryzation and calculate, obtain behind the i frame to frame difference image PP I2Initial prospect binary map OM I2
OM i 2 ‾ ( x , y ) = 1 , if PP i 2 ( x , y ) ≥ THR i 2 0 , else ,
In the formula, OM I2(x, y) behind the expression i frame to frame difference image PP I2Initial prospect binary map OM I2Middle coordinate is that (x, the value of pixel y) if 1 this pixel of expression belongs to the moving vehicle zone, if 0 this pixel of expression belongs to the static background zone, utilize se ed filling algorithm to remove initial prospect binary map OM I2In the cavity, obtain behind the i frame to frame difference image PP I2Final prospect binary map OM I2,
Fig. 9 is to frame difference image PP behind the 74th frame 742, Figure 10 is to the initial prospect bianry image of frame difference OM behind the 74th frame 742, Figure 11 is to the final prospect bianry image of frame difference OM behind the 74th frame 742
4. calculate i two field picture P iProspect binary map OM i
OM i(x,y)=OM i1(x,y)andOM i2(x,y)
In the formula, OM i(x, y) expression i two field picture P iProspect binary map OM iMiddle coordinate is (x, the value of pixel y), OM I1(x, y) expression i frame forward frame difference image PP I1Prospect binary map OM I1Middle coordinate is (x, the value of pixel y), OM I2(x, y) behind the expression i frame to frame difference image PP I2Prospect binary map OM I2Middle coordinate is that (if 1 this pixel of expression belongs to the moving vehicle zone, if 0 this pixel of expression belongs to the static background zone, Figure 12 is the 74th frame prospect bianry image OM for x, the value of pixel y) 74
5. calculate i frame background image B i
According to i two field picture P iProspect binary map OM iCalculate i frame background image B i,
B i ( x , y ) = α · B i - 1 ( x , y ) + ( 1 - α ) · P i ( x , y ) , if OM i ( x , y ) = 1 ( 1 - α ) · B i - 1 ( x , y ) + α · P i ( x , y ) if OM i ( x , y ) = 0 ,
Weights α gets 0.9 in the formula, and Figure 13 is the 73rd frame background image B 73, Figure 14 upgrades the 74th frame background image B that obtains 74, Figure 15 is the 90th two field picture P after the illumination deepening 90, Figure 16 upgrades the 90th frame background image B that obtains 90

Claims (1)

1. the weighted average background updating method that Weight number adaptively is adjusted is characterized in that comprising the steps:
1. calculate the forward frame difference image and to its binaryzation:
The background image that obtains after the background initialization is B 0, when collecting i two field picture P iWhen (i>1), calculate i two field picture P iWith i-1 two field picture P I-1Between absolute difference, obtain i frame forward frame difference image PP I1, that is:
PP i1(x,y)=|P i(x,y)-P i-1(x,y)|,
In the formula, P i(x, y) expression i two field picture P iMiddle coordinate is (x, the gray scale of pixel y), P I-1(x, y) expression i-1 two field picture P I-1Middle coordinate is (x, the gray scale of pixel y), PP I1(x, y) expression i frame forward frame difference image PP I1(x, y) middle coordinate is that (x, y represent horizontal ordinate and ordinate respectively for x, the gray scale of pixel y), down together;
Secondly, calculate i frame forward frame difference image PP I1Optimal segmenting threshold THR I1, its step is as follows:
(1) obtains i frame forward frame difference image PP I1In minimum gradation value Z 1With maximum gradation value Z m, making iterations k=0, the initial value of segmentation threshold is T 0=(Z 1+ Z m)/2, T at this moment k=T 0
(2) according to threshold value T kTo i frame forward frame difference image PP I1Cut apart, gray scale is more than or equal to threshold value T kPixel region be split into i frame forward frame difference image PP I1In motion target area PPO Ik1, gray scale is less than threshold value T kPixel region be split into background area PPB Ik1,
PPO ik1={(x,y)|PP i1(x,y)≥T k},
PPB ik1={(x,y)|PP i1(x,y)<T k},
Calculate motion target area PPO respectively Ik1Average gray value Z K1With background area PPB Ik1Average gray value Z K2,
Z k 1 = Σ ( x , y ) ∈ PPO ik 1 PP i 1 ( x , y ) N 1 k ,
Z k 2 = Σ ( x , y ) ∈ PPB ik 1 PP i 1 ( x , y ) N 2 k ,
In the formula, N 1kAnd N 2kRepresent motion target area PPO respectively Ik1With background area PPB Ik1The number of middle pixel;
(3) obtain new threshold value T K+1=(Z K1+ Z K2)/2;
(4) if T K+1=T kThen finishing iteration makes THR I1=T k, otherwise make k=k+1, repeated for (2)-(3) step,
At last, according to optimal segmenting threshold THR I1To i frame forward frame difference image PP I1Carry out binaryzation and calculate, obtain i frame forward frame difference image PP I1Initial prospect binary map
Figure FSB00000588424800021
OM i 1 ‾ ( x , y ) = 1 , if PP i 1 ( x , y ) ≥ THR i 1 0 , else ,
In the formula, Represent i frame forward frame difference image PP I1Initial prospect binary map Middle coordinate is that (x, the value of pixel y) if 1 this pixel of expression belongs to the moving vehicle zone, if 0 this pixel of expression belongs to the static background zone, utilize se ed filling algorithm to remove initial prospect binary map In the cavity, obtain i frame forward frame difference image PP I1Final prospect binary map OM I1
2. calculate the back to frame difference image and to its binaryzation:
Calculate i two field picture P iWith i+1 two field picture P I+1Between absolute difference, obtain behind the i frame to frame difference image PP I2, that is,
PP i2(x,y)=|P i(x,y)-P i+1(x,y)|,
In the formula, P i(x, y) expression i two field picture P iMiddle coordinate is (x, the gray scale of pixel y), P I+1(x, y) expression i+1 two field picture P I+1Middle coordinate is (x, the gray scale of pixel y), PP I2(x, y) behind the expression i frame to frame difference image PP I2(x, y) in coordinate be (x, the gray scale of pixel y),
Secondly, calculate behind the i frame to frame difference image PP I2Optimal segmenting threshold THR I2, its step is as follows:
(a) obtain behind the i frame to frame difference image PP I2In minimum gradation value Z 1With maximum gradation value Z m, making iterations k=0, the initial value of segmentation threshold is T 0=(Z 1+ Z m)/2, T at this moment k=T 0
(b) according to threshold value T kTo behind the i frame to frame difference image PP I2Cut apart, gray scale is more than or equal to threshold value T kPixel region be split into behind the i frame to frame difference image PP I2In motion target area PPO Ik2, gray scale is less than threshold value T kPixel region be split into background area PPB Ik2,
PPO ik2={(x,y)|PP i2(x,y)≥T k},
PPB ik2={(x,y)|PP i2(x,y)<T k},
Calculate motion target area PPO respectively Ik2Average gray value Z K1With background area PPB Ik2Average gray value Z K2,
Z k 1 = Σ ( x , y ) ∈ PPO ik 2 PP i 2 ( x , y ) N 1 k ,
Z k 2 = Σ ( x , y ) ∈ PPB ik 2 PP i 2 ( x , y ) N 2 k ,
In the formula, N 1kAnd N 2kRepresent motion target area PPO respectively Ik2With background area PPB Ik2The number of middle pixel,
(c) obtain new threshold value T K+1=(Z K1+ Z K2)/2,
(d) if T K+1=T kThen finishing iteration makes THR I2=T k, otherwise make k=k+1, repeat (b)-(c) step,
At last, according to optimal segmenting threshold THR I2To behind the i frame to frame difference image PP I2Carry out binaryzation and calculate, obtain behind the i frame to frame difference image PP I2Initial prospect binary map
Figure FSB00000588424800032
OM i 2 ‾ ( x , y ) = 1 , if PP i 2 ( x , y ) ≥ THR i 2 0 , else ,
In the formula,
Figure FSB00000588424800034
Represent behind the i frame to frame difference image PP I2Initial prospect binary map
Figure FSB00000588424800035
In coordinate be (x, the value of pixel y), if 1 this pixel of expression belongs to the moving vehicle zone, if 0 represent that this pixel belongs to the static background zone,
Utilize se ed filling algorithm to remove initial prospect binary map
Figure FSB00000588424800036
In the cavity, obtain behind the i frame to frame difference image PP I2Final prospect binary map OM I2
3. calculate i two field picture P iProspect binary map OM i:
OM i(x,y)=OM i1(x,y)and?OM i2(x,y),
In the formula, OM i(x, y) expression i two field picture P iProspect binary map OM iMiddle coordinate is (x, the value of pixel y), OM I1(x, y) expression i frame forward frame difference image PP I1Prospect binary map OM I1Middle coordinate is (x, the value of pixel y), OM I2(x, y) behind the expression i frame to frame difference image PP I2Prospect binary map OM I2In coordinate be (x, the value of pixel y) is if 1 this pixel of expression belongs to the moving vehicle zone, if 0 represents that this pixel belongs to the static background zone;
4. calculate i frame background image B i:
According to i two field picture P iProspect binary map OM iCalculate i frame background image B i,
B i ( x , y ) = α · B i - 1 ( x , y ) + ( 1 - α ) · P i ( x , y ) , if OM i ( x , y ) = 1 ( 1 - α ) · B i - 1 ( x , y ) + α · P i ( x , y ) , if OM i ( x , y ) = 0 ,
Weights α gets 0.9 in the formula.
CN2009102630832A 2009-12-16 2009-12-16 Weight number adaptively adjusted weighted average background updating method Expired - Fee Related CN101819681B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009102630832A CN101819681B (en) 2009-12-16 2009-12-16 Weight number adaptively adjusted weighted average background updating method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009102630832A CN101819681B (en) 2009-12-16 2009-12-16 Weight number adaptively adjusted weighted average background updating method

Publications (2)

Publication Number Publication Date
CN101819681A CN101819681A (en) 2010-09-01
CN101819681B true CN101819681B (en) 2011-11-09

Family

ID=42654768

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009102630832A Expired - Fee Related CN101819681B (en) 2009-12-16 2009-12-16 Weight number adaptively adjusted weighted average background updating method

Country Status (1)

Country Link
CN (1) CN101819681B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103236051B (en) * 2012-08-03 2017-09-08 南京理工大学 Infrared search-track system background update method
CN105740827B (en) * 2016-02-02 2019-07-19 大连楼兰科技股份有限公司 A kind of stop line detection and distance measuring method based on Fast Labeling connection
CN105740828B (en) * 2016-02-02 2019-07-19 大连楼兰科技股份有限公司 A kind of stopping line detecting method based on Fast Labeling connection
CN106203436A (en) * 2016-07-22 2016-12-07 北京小米移动软件有限公司 Image binaryzation method and device
CN106855942B (en) * 2016-12-13 2019-10-11 东南大学 A kind of video background extracting method based on weighted sample
CN109559518A (en) * 2018-12-10 2019-04-02 安徽四创电子股份有限公司 A kind of novel intelligent traffic block port based on structured image recognizer
CN109784230A (en) * 2018-12-29 2019-05-21 中国科学院重庆绿色智能技术研究院 A kind of facial video image quality optimization method, system and equipment
CN115661154B (en) * 2022-12-27 2023-03-28 长江勘测规划设计研究有限责任公司 System and method for identifying contact state of collector ring carbon brush of generator through machine vision

Also Published As

Publication number Publication date
CN101819681A (en) 2010-09-01

Similar Documents

Publication Publication Date Title
CN101819681B (en) Weight number adaptively adjusted weighted average background updating method
CN100595792C (en) Vehicle detecting and tracing method based on video technique
CN100573618C (en) A kind of traffic intersection four-phase vehicle flow detection method
CN103077520B (en) A kind of background subtraction method for mobile camera
CN104599502A (en) Method for traffic flow statistics based on video monitoring
CN110688922A (en) Deep learning-based traffic jam detection system and detection method
CN104616290A (en) Target detection algorithm in combination of statistical matrix model and adaptive threshold
CN109753949B (en) Multi-window traffic sign detection method based on deep learning
CN103206957B (en) The lane detection and tracking method of vehicular autonomous navigation
CN101739560B (en) Edge and framework information-based method for eliminating vehicle shadow
CN110309765B (en) High-efficiency detection method for video moving target
CN111582029A (en) Traffic sign identification method based on dense connection and attention mechanism
CN105632170A (en) Mean shift tracking algorithm-based traffic flow detection method
CN108734109B (en) Visual target tracking method and system for image sequence
CN102073852A (en) Multiple vehicle segmentation method based on optimum threshold values and random labeling method for multiple vehicles
CN105069441A (en) Moving vehicle detection method based on background updating and particle swarm optimization algorithm
CN103794050A (en) Real-time transport vehicle detecting and tracking method
CN106791277A (en) A kind of car tracing method in video monitoring
CN112766136A (en) Space parking space detection method based on deep learning
CN102156989B (en) Vehicle blocking detection and segmentation method in video frame
CN103473547A (en) Vehicle target recognizing algorithm used for intelligent traffic detecting system
CN107169969B (en) Highway dangerous rock collapse deposit size measurement and alarm system based on FPGA
CN103886609A (en) Vehicle tracking method based on particle filtering and LBP features
CN105023231A (en) Bus data acquisition method based on video recognition and cell phone GPS
CN103310465B (en) A kind of occlusion disposal route based on markov random file

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent for invention or patent application
CB03 Change of inventor or designer information

Inventor after: Lu Xiaobo

Inventor after: Zhu Zhou

Inventor after: Zeng Weili

Inventor after: Zhao Xinyong

Inventor before: Lu Xiaobo

Inventor before: Zhu Zhou

Inventor before: Zeng Weili

COR Change of bibliographic data

Free format text: CORRECT: INVENTOR; FROM: LU XIAOBO ZHU ZHOU ZENG WEILI TO: LU XIAOBO ZHU ZHOU ZENG WEILI ZHAO XINYONG

C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20111109

Termination date: 20151216

EXPY Termination of patent right or utility model