CN108734050A - Moving object detection and valid frame extracting method in a kind of monitor video - Google Patents

Moving object detection and valid frame extracting method in a kind of monitor video Download PDF

Info

Publication number
CN108734050A
CN108734050A CN201710238731.3A CN201710238731A CN108734050A CN 108734050 A CN108734050 A CN 108734050A CN 201710238731 A CN201710238731 A CN 201710238731A CN 108734050 A CN108734050 A CN 108734050A
Authority
CN
China
Prior art keywords
frame
picture
pixel
value
binary
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.)
Pending
Application number
CN201710238731.3A
Other languages
Chinese (zh)
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.)
NANJING CLIMBING INFORMATION TECHNOLOGY Co Ltd
Nanjing University of Finance and Economics
Original Assignee
NANJING CLIMBING INFORMATION TECHNOLOGY Co Ltd
Nanjing University of Finance and Economics
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 NANJING CLIMBING INFORMATION TECHNOLOGY Co Ltd, Nanjing University of Finance and Economics filed Critical NANJING CLIMBING INFORMATION TECHNOLOGY Co Ltd
Priority to CN201710238731.3A priority Critical patent/CN108734050A/en
Publication of CN108734050A publication Critical patent/CN108734050A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/46Extracting features or characteristics from the video content, e.g. video fingerprints, representative shots or key frames
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/30Noise filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30232Surveillance

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses moving object detection in a kind of monitor video and valid frame extracting methods, press the video that frame reads web camera shooting first;The parameter that Gauss model is initialized when reading the first frame of video is established mixture Gaussian background model, and is used as with reference to two-value picture after first frame is carried out binary conversion treatment;When continuing each frame after reading, present frame and background model are subtracted each other to obtain only include the two-value picture of foreground, while updating Gauss model parameter;The foreground two-value picture of each frame is handled with the thought of inter-frame difference, subtract each other the foreground two-value picture of each frame and reference binary picture to obtain difference two-value picture, and judged to whether there is moving target in present frame according to the pixel distribution in difference two-value picture, and decide whether to preserve present frame, whether update reference binary picture.This method can preferably overcome the interference of the factors such as disturbance, the DE Camera Shake in illumination variation, background, valid frame of the extraction in the presence of the target of movement from monitor video.

Description

Moving object detection and valid frame extracting method in a kind of monitor video
Technical field
The present invention relates to field of video image processing, the valid frame extracting method in specifically a kind of monitor video.
Background technology
With popularizing for network monitoring video camera, the network monitoring video camera quantity of public place installation increasingly increases Add.One network monitoring video camera can collect GB grades even TB grades of monitoring data for one day.But in these enormous amounts Monitoring data in, we are only interested in the frame that those of changes of target in monitoring scene;And those there is no target or The static frame of target is then that we are not concerned with.Therefore it is to storage resource monitoring data all the time all to be preserved Huge waste.
Target detection is exactly the target of the movement in current monitoring scene to be found by image processing techniques, and will monitor These frames that there is the target of movement in video extract, i.e., the mesh that there is movement is found from the video monitoring data of magnanimity Target data.The data volume of storage not only can be reduced and processing needed for succeeding target identification work can be substantially reduced Data volume.
Frame differential method and background subtraction method are to commonly use two kinds of object detection methods at present.Frame differential method passes through to video In adjacent two frame subtract each other, to find changed frame in video flowing, but this method is easy by illumination variation, background Tree the rocking of branches and leaves, blow caused by Outdoor Network monitor camera the noises such as shake influence, to cause flase drop. Background subtraction method is by subtracting each other present frame and background model, to extract the target in present frame, due to the update of background model Need the time, cannot judge whether the target in present frame is moved well in this way.
Invention content
The purpose of the present invention is overcoming the problems, such as to exist in background subtraction technique, a kind of valid frame small by noise jamming is provided Extracting method extracts the frame for the target that there is movement in monitor video.
This method combines technology used in frame differential method and mixed Gaussian background modeling method, extracts video It is middle that there are the valid frames of moving target.Background model is established using mixed Gaussian background modeling method, it will be each in video flowing Frame picture subtracts background model and obtains the foreground picture of every frame.Then the foreground picture in consecutive frame being subtracted each other can find to regard There are the frames of moving target in frequency, and these frames are preserved.This method can overcome disturbing in illumination variation, background Dynamic, even Outdoor Network monitor camera such as disturbs at the influence of disturbing factors caused by not fixing, realize monitoring and regard Moving object detection and the purpose of valid frame extraction in frequency.
The technical scheme is that:Moving object detection and valid frame extracting method in a kind of monitor video, step Including:
Step 1:Video flowing is obtained, and video is read by frame;
Step 2:The background in picture is simulated with mixed Gauss model, as current background model;
Step 3:The each frame picture read is subtracted each other with current background model, obtains foreground;
Step 4:Binary conversion treatment is carried out to the picture after subtracting each other, the two-value picture of foreground is obtained, is denoted as binary (i); The picture that 1st frame is obtained after binary conversion treatment is denoted as ref as two-value picture is referred to;
Step 5:Sequentially each frame foreground two-value picture binary (i) and reference binary picture ref are subtracted each other, judged whether There are moving targets.It is as follows:
Step 501:Each frame two-value picture binary (i) and reference binary picture ref are subtracted each other, obtain differentiated two It is worth picture del (i);Steps are as follows:
By the pixel value binary (i) (x, y) and reference binary picture ref of each position in two-value picture binary (i) The pixel value ref (x, y) of middle corresponding position subtracts each other:
As binary (i) (x, y)-ref (x, y) >=0, del (i) (x, y)=binary (i) (x, y)-ref (x, y);
As binary (i) (x, y)-ref (x, y)<When 0, del (i) (x, y)=0;
Wherein del (i) (x, y) is the pixel value for being located at the position (x, y) in difference two-value picture del (i), binary (i) (x, y) is the pixel value for being located at the position (x, y) in two-value picture binary (i), and ref (x, y) is to be located in reference picture ref The pixel value of the position (x, y).
Step 502:To the processing of differentiated two-value picture shaping state;
Step 503:The number of white pixel point in the difference two-value picture del (i) of statistics after treatment, that is, belong to The pixel number of the foreground target of movement;
Step 504:Moving target is judged whether according to the pixel number for belonging to moving target, if belonging to movement mesh Target pixel number is more than given threshold value and then illustrates the target that there is movement in monitor video, preserves present frame;Otherwise it does not protect Deposit present frame;
Step 505:Update reference binary picture, return to step 1.
The beneficial effects of the invention are as follows:Each frame picture in monitoring video flow is subtracted each other with mixture Gaussian background model, The disturbance in background can be preferably eliminated, the two-value picture for only including foreground is obtained;Then the binary map of foreground will only be included Piece subtracts each other with reference binary picture, can further filter out the noise not filtered out in background subtraction method, reduce illumination variation Interference, and according to whether there are moving targets to decide whether to update reference binary picture;And occurred according to the target extracted The pixel number of movement decides whether to preserve present frame.Existing object detection method can be overcome real-time in this way The problem of being easy by noise jamming in video monitoring, the Detection accuracy and detection efficiency of raising.Only retain monitor video to deposit In the valid frame of moving target, the amount of storage of monitoring data can be greatly reduced.
Description of the drawings
Fig. 1 hardware device connected mode schematic diagrams
Fig. 2 is the main program flow chart of the detection method of moving target in monitor video
Fig. 3 is mixed Gauss model training subroutine flow chart
Fig. 4 is two-value picture inter-frame difference subroutine flow chart
Specific implementation mode
The present invention monitor video in moving object detection and valid frame extracting method, main program flow chart as shown in Fig. 2, It is as follows:
Step 1, video flowing is obtained, the hardware device which uses includes that Haikang prestige regards web camera, network is handed over It changes planes and PC machine.Interchanger is connected depending on web camera and PC machine with cable with Haikang prestige, connection such as Fig. 1 institutes of hardware device Show.Video flowing acquisition is as follows:
Step 101, Haikang prestige is connected with interchanger, PC machine with interchanger with cable depending on web camera, such as Fig. 1 institutes Show;
Step 102, at the PC machine end of the installation above operating system of 7 versions of Windows iVMS-4200 is regarded using Haikang prestige Network Video Surveillance software configuration Haikang prestige regards web camera, and Haikang prestige is made to regard the IP of the IP address and PC machine of web camera Address is under the same network segment, such as Haikang prestige regards the IP address of web camera as 172.17.13.109, and the IP address of PC machine is 172.17.13.21;The video stream data that web camera takes is read with PC machine.
Step 2, training mixture Gaussian background model, with the background parts in mixed Gauss model analog video frame, mixing Gauss model training subroutine flow chart is as shown in figure 3, be as follows:
Step 201, it will be assumed that tri- chrominance channels image slices vegetarian refreshments R, G, B are mutual indepedent and variance having the same.For t One random pixel at moment can be expressed as img (t)=(rt,gt,bt), the Gaussian mixtures probability obeyed is close Spending function is:
Wherein, k is distribution pattern sum;η(xti,ti,t) it is i-th of Gaussian Profile of t moment, μi,tFor its mean value, τi,tFor its covariance matrix, δi,tFor its variance, I is three-dimensional unit matrix, wi,tFor the weight of i-th of Gaussian Profile of t moment.
Step 202, the parameter for initializing Gauss model, enables k=3, for t=0 moment, the mean value of k Gaussian Profile WeightWherein img (o) (i, j) is in first frame The pixel value of each point, x, y are respectively the length and width of first frame picture;Variance δi,t=1600;Covariance matrix τi,tFor three-dimensional zero Matrix.
Step 203, for follow-up each frame, judge that the pixel value img (t) (i, j) of each pixel and current k is a respectively Whether Gaussian Profile meets following formula:
|img(t)(i,j)-μi,t-1|≤2.5σi,t-1 (4)
Wherein, σI, t-1For the standard deviation of Gaussian Profile, i.e.,If satisfied, then the pixel belongs to background, into The processing of row step 204;Otherwise, which belongs to foreground, carries out step 205;
If the pixel value of pixel and k current Gaussian Profile are all unsatisfactory for above formula, replace and weighed in k Gaussian Profile The minimum Gaussian Profile of weight:Mean value is current pixel point pixel value, standard deviation σi,t=40, weight wi,t=0.1.
Step 204, the weight of each Gaussian Profile pattern is updated as follows,
wi,t=(1- α) × wi,t-1+α (5)
Wherein α is learning rate, is taken as 0.01.And updated weight is normalized.
The parameter of Gaussian Profile is updated as follows:
ρ=α × η (img (t) | μk,t-1k,t-1) (6)
μi,t=(1- ρ) × μi,t-1+ρ×img(t) (7)
δi,t=(1- ρ) δi,t-1+ρ×(img(t)-μi,t)T(img(t)-μi,t) (8)
Step 205, the weight of the Gaussian Profile pattern is updated as follows,
wi,t=(1- α) × wi,t-1 (9)
Wherein α is learning rate, is taken as 0.01.And updated weight is normalized.
Step 206, k Gaussian Profile is pressedDescending arrangement, distribution of the b Gaussian Profile as background before choosing, b It is determined by following formula:
Step 3, judge whether the pixel value img (t) (i, j) of each pixel meets with b Gaussian Profile in step 206 Following formula:
|img(t)(i,j)-μi,t-1|≤2.5σi,t-1 (11)
Wherein, σi,t-1For the standard deviation of Gaussian Profile, i.e.,If satisfied, then the pixel belongs to background, it will The pixel value of the pixel is assigned to 0;Otherwise, which belongs to foreground, and the pixel value of the pixel is assigned to 255;
A two-value picture is thus obtained, which indicates that wherein foreground is by white pixel with binary (i) The set of point is constituted, and the set of remaining black pixel point constitutes background.The two-value that first frame picture is obtained after treatment Picture, which is used as, refers to two-value picture, is denoted as ref.
Step 4, the two-value picture binary (i) of each frame obtained by ordered pair step 3 and reference binary picture ref phases Subtract, judge whether moving target, and determines whether to update reference binary picture.Subroutine flow chart is as shown in figure 4, tool Steps are as follows for body:
Step 401, by the obtained each frame two-value picture binary (i) of pre-treatment in each position pixel value The pixel value ref (x, y) of corresponding position subtracts each other in binary (i) (x, y) and reference binary picture ref, is obtained according to following formula To the difference two-value picture of two pictures, indicated with del (i);
Wherein del (i) (x, y) is the pixel value for the pixel for being located at the position (x, y) in difference two-value picture del (i); Binary (i) (x, y) is the pixel value for the pixel for being located at the position (x, y) in two-value picture binary (i);Ref (x, y) is ginseng Examine the pixel value of the pixel in two-value picture ref positioned at the position (x, y);(x, y) is the coordinate in Picture Coordinate system.
Step 402, the Morphological scale-spaces such as burn into expansion are carried out to differentiated two-value picture, eliminated two in above-mentioned steps The salt-pepper noise that value picture respective pixel value phase reducing is brought.
Step 403, the number for counting white pixel point in every difference two-value picture del (i) after treatment, that is, belong to The pixel number of the foreground target of movement.
Step 404, moving target, specific judgment method are judged whether according to the pixel number for belonging to moving target It is as follows;
The foreground that the set of white pixel in difference two-value picture del (i) just represents in adjacent two pictures is moved The set of the partial pixel point of dynamic variation.It has been more than given threshold value if the number of the white pixel in del (i), is denoted as num Tn=60, then it is assumed that foreground target is moved, this current pictures img (i) is preserved.Otherwise it is assumed that foreground target does not have It moves, return to step 1.
Step 405, judge whether to need to update reference binary picture, concrete operations are as follows:
If the number of the white pixel in del (i) has been more than given threshold value Tn=60, then it is assumed that foreground target has occurred Movement updates reference binary picture as follows.
Ref=bianry (i) (13)
If the number of the white pixel in del (i) has been not above given threshold value Tn=60, then it is assumed that foreground target does not have It is moved, then need not update reference binary picture.
Return to step 203.

Claims (3)

1. moving object detection and valid frame extracting method, feature include the following steps in a kind of monitor video:S1:Acquisition regards Frequency flows, and reads video by frame;S2:Training mixture Gaussian background model simulates the background in picture with mixed Gauss model; S3:The each frame read is made the difference with current background model, obtains foreground, the picture after subtracting each other is carried out at binaryzation Reason, obtains the binary map of foreground, is reference binary figure to the binary map obtained after first frame processing;S4:With the think of of inter-frame difference Think sequentially to handle foreground two-value picture, each frame subtracts each other with reference binary figure, judges whether moving target;
The step S2 the specific steps are:
S201:The parameter for initializing Gauss model, enables k=3, for t=0 moment, the mean value of k Gaussian Profile WeightWherein img (o) (i, j) is The pixel value of each point in first frame, x, y are respectively the length and width of first frame picture;Variance δi,t=1600;Covariance matrix τi,t For three-dimensional null matrix;
S202:For follow-up each frame, the pixel value img (t) (i, j) of each pixel and current k Gauss point are judged respectively Whether cloth meets | img (t) (i, j)-μi,t-1|≤2.5σi,t-1, wherein σi,t-1For the standard deviation of Gaussian Profile, i.e.,If satisfied, then the pixel belongs to background, step 204 processing is carried out;Otherwise, which belongs to foreground, Carry out step 205;
If the pixel value of pixel and k current Gaussian Profile are all unsatisfactory for above formula, weight is replaced in k Gaussian Profile most Small Gaussian Profile:Mean value is current pixel point pixel value, standard deviation σi,t=40, weight wi,t=0.1;
S203:The weight for updating each Gaussian Profile pattern, updates the parameter of Gaussian Profile;
S204:The weight of the Gaussian Profile pattern is updated, and updated weight is normalized;
S205:K Gaussian Profile is pressedDescending arrangement, distribution of the b Gaussian Profile as background before choosing,
2. the moving object detection side of a kind of fusion inter-frame difference and mixed Gaussian background modeling according to claim 1 Method, which is characterized in that the step S4 is as follows:
S401:By the obtained each frame two-value picture of pre-treatment made the difference with reference binary figure, obtain differentiated binary map;
S402:Morphological scale-space is done to differentiated binary map;
S403:The number of white pixel point in the difference binary map of statistics after treatment, that is, belong to the foreground target of movement Pixel number;
S404:Moving target is judged whether according to the pixel number for belonging to moving target, and decides whether to preserve current Frame;Moving target is judged whether according to the pixel number for belonging to moving target, and decides whether to preserve present frame;
S405:Judge whether to need to update reference binary picture.
3. moving object detection and valid frame extracting method, feature exist in a kind of monitor video according to claim 2 In, the step S401 the specific steps are:
By the obtained each frame two-value picture binary (i) of pre-treatment in each position pixel value binary (i) (x, y) Subtract each other with the pixel value ref (x, y) of corresponding position in reference binary picture ref, the difference of two pictures is obtained according to following formula Divide two-value picture, is indicated with del (i);
Wherein del (i) (x, y) is the pixel value for the pixel for being located at the position (x, y) in difference two-value picture del (i);binary (i) (x, y) is the pixel value for the pixel for being located at the position (x, y) in two-value picture binary (i);Ref (x, y) is reference binary Positioned at the pixel value of the pixel of the position (x, y) in picture ref;(x, y) is the coordinate in Picture Coordinate system.
CN201710238731.3A 2017-04-13 2017-04-13 Moving object detection and valid frame extracting method in a kind of monitor video Pending CN108734050A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710238731.3A CN108734050A (en) 2017-04-13 2017-04-13 Moving object detection and valid frame extracting method in a kind of monitor video

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710238731.3A CN108734050A (en) 2017-04-13 2017-04-13 Moving object detection and valid frame extracting method in a kind of monitor video

Publications (1)

Publication Number Publication Date
CN108734050A true CN108734050A (en) 2018-11-02

Family

ID=63923665

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710238731.3A Pending CN108734050A (en) 2017-04-13 2017-04-13 Moving object detection and valid frame extracting method in a kind of monitor video

Country Status (1)

Country Link
CN (1) CN108734050A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109543650A (en) * 2018-12-04 2019-03-29 钟祥博谦信息科技有限公司 Warehouse intelligent control method and system
CN114694092A (en) * 2022-03-15 2022-07-01 华南理工大学 Expressway monitoring video object-throwing detection method based on mixed background model
CN114924715A (en) * 2022-06-15 2022-08-19 泰州亚东广告传媒有限公司 System and method for accessing API function of step-counting application program

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109543650A (en) * 2018-12-04 2019-03-29 钟祥博谦信息科技有限公司 Warehouse intelligent control method and system
CN114694092A (en) * 2022-03-15 2022-07-01 华南理工大学 Expressway monitoring video object-throwing detection method based on mixed background model
CN114924715A (en) * 2022-06-15 2022-08-19 泰州亚东广告传媒有限公司 System and method for accessing API function of step-counting application program
CN114924715B (en) * 2022-06-15 2023-08-22 泰州亚东广告传媒有限公司 Step counting application program API function access system and method

Similar Documents

Publication Publication Date Title
CN102307274B (en) Motion detection method based on edge detection and frame difference
CN107256225B (en) Method and device for generating heat map based on video analysis
US20230289979A1 (en) A method for video moving object detection based on relative statistical characteristics of image pixels
CN104063883B (en) A kind of monitor video abstraction generating method being combined based on object and key frame
CN111626188B (en) Indoor uncontrollable open fire monitoring method and system
CN106096577A (en) Target tracking system in a kind of photographic head distribution map and method for tracing
CN103093198B (en) A kind of crowd density monitoring method and device
CN105261037A (en) Moving object detection method capable of automatically adapting to complex scenes
CN103646257B (en) A kind of pedestrian detection and method of counting based on video monitoring image
CN105184812B (en) A kind of pedestrian based on target following hovers detection method
CN106204586B (en) A kind of moving target detecting method under complex scene based on tracking
CN104268519B (en) Image recognition terminal and its recognition methods based on pattern match
CN103679704B (en) Video motion shadow detecting method based on lighting compensation
CN102663362B (en) Moving target detection method based on gray features
CN108734050A (en) Moving object detection and valid frame extracting method in a kind of monitor video
CN106296744A (en) A kind of combining adaptive model and the moving target detecting method of many shading attributes
CN113436229A (en) Multi-target cross-camera pedestrian trajectory path generation method
Alvarado-Robles et al. An approach for shadow detection in aerial images based on multi-channel statistics
CN103106796A (en) Vehicle detection method and device of intelligent traffic surveillance and control system
CN112489055A (en) Satellite video dynamic vehicle target extraction method fusing brightness-time sequence characteristics
CN108648210A (en) It is a kind of static state complex scene under fast multi-target detection method and device
CN103578121B (en) Method for testing motion based on shared Gauss model under disturbed motion environment
CN110163132A (en) A kind of correlation filtering tracking based on maximum response change rate more new strategy
CN104978734A (en) Foreground image extraction method and foreground image extraction device
CN105913409A (en) Image processing method based on fusion of multiple frames of images

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20181102