CN105279771A - Method for detecting moving object on basis of online dynamic background modeling in video - Google Patents

Method for detecting moving object on basis of online dynamic background modeling in video Download PDF

Info

Publication number
CN105279771A
CN105279771A CN201510696087.5A CN201510696087A CN105279771A CN 105279771 A CN105279771 A CN 105279771A CN 201510696087 A CN201510696087 A CN 201510696087A CN 105279771 A CN105279771 A CN 105279771A
Authority
CN
China
Prior art keywords
pixel
frame
background model
background
image
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.)
Granted
Application number
CN201510696087.5A
Other languages
Chinese (zh)
Other versions
CN105279771B (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.)
Institute of Automation of Chinese Academy of Science
Original Assignee
Institute of Automation of Chinese Academy of Science
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 Institute of Automation of Chinese Academy of Science filed Critical Institute of Automation of Chinese Academy of Science
Priority to CN201510696087.5A priority Critical patent/CN105279771B/en
Publication of CN105279771A publication Critical patent/CN105279771A/en
Application granted granted Critical
Publication of CN105279771B publication Critical patent/CN105279771B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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

Abstract

The invention discloses a method for detecting a moving object on the basis of online dynamic background modeling in a video. The method comprises the following steps: collecting an image and carrying out pre-processing; judging whether the image frame is the first frame, if yes, initializing a background model, or else, jumping to the next step; generating a background image by utilizing a dynamic background model; extracting matching point pairs in the current frame of image and the background image; screening the accurate matching point pair and calculating a correction parameter by utilizing RANSAC; correcting the dynamic background model to the coordinate system of the current frame of image; dividing the pixels of the current frame of image into a moving pixel and a background pixel by utilizing the corrected background model; dynamically updating the background model by using the background pixel; and carrying out morphological processing, connected component analysis and area constraint on the moving pixel. According to the method, an advanced background modeling-based moving object detection algorithm under a fixed platform can be conveniently applied to an aerial photo platform, so as to detect the moving object more accurately.

Description

Based on the moving target detecting method of online dynamic background modeling in a kind of video
Technical field
The present invention relates to technical field of computer vision, particularly relate to a kind of moving target detecting method of taking photo by plane in video.
Background technology
At present, traditional moving target detecting method mainly contains the method based on inter-frame difference, the method based on background modeling and the method based on light stream.For the moving object detection under static platform, background modeling method is due to its robustness and extract the accuracy of movable information and be most widely used.But for the moving object detection under motion platform, the background of motion adds the difficulty of background modeling, and calculate the method [H.Yalcin of dense optical flow, M.Hebert, R.Collins, andM.Black.Aflowbasedapproachtovehicledetectionandbackgr oundmosaickinginairbornevideo.InProceedingsofComputerVis ionandPatternRecognition, volume2, page1202.IEEEComputerSociety, 2005] requirement reaching real-time is difficult to when not having hardware-accelerated, the moving object detection major part work of therefore taking photo by plane at present in video is all based on inter-frame difference.Even if be a lot of work [S.Bhattacharya in inter-frame difference, H.Idrees, I.Saleemi, S.Ali, andM.Shah.Movingobjectdetectionandtrackinginforwardlooki nginfraredaerialimagery, volume1, chapter10, pages221-252.SpringerBerlinHeidelberg, 2011; Z.YinandR.Collins.Movingobjectlocalizationinthermalimage rybyforward-backwardmotionhistoryimages, pages271-291.SpringerLondon, 2009; H.Shen, S.Li, J.Zhang, andH.Chang.Tracking-basedmovingobjectdetection.InProceed ingsofInternationalConferenceonImageProcessing, pages3093-3097.IEEE, 2013.], the method based on inter-frame difference still not can solve ghost and empty problem.
Ratheesh [A.Colombari, A.Fusiello, V.Murino, Segmentationandtrackingofmultiplevideoobjects, PatternRecognition, 40 (4) (2007), 1307-1317] etc. utilize the color average of corresponding point that whole video information is spliced into global context image.These class methods need whole video information, are therefore used for processed offline, and need whole video to correct in cascaded fashion under the same coordinate system, easily produce cumulative errors.
Chang [Y.Chang, G.Medioni, K.Jinman, I.Cohen, Detectingmotionregionsinthepresenceofastrongparallaxfrom amovingcamerabymultiviewgeometricconstraints, IEEETransactiononPatternAnalysisandMachineIntelligence, 29 (9) (2007), 1627-1641] etc. 45 sub-pictures before and after current time are corrected to the coordinate system of current time image to set up background model, if calculate one by one, computation complexity is too high can not be real-time, if calculate in cascaded fashion, easily produce cumulative errors.
Summary of the invention
In view of this, the object of the invention is to overcome prior art deficiency, propose the moving object detection that a kind of new background modeling method carries out more accurately to take photo by plane under video.
For achieving the above object, the present invention proposes the moving target detecting method based on online dynamic background modeling in a kind of video, it is characterized in that, the method comprising the steps of:
Step 1: read in frame of video, carries out pre-service to it;
Step 2: judge whether present frame is the first frame, if it is utilizes described first frame or utilizes the N frame initialization formative dynamics background model of reading in after continuing to read in N frame; If not then directly forwarding step 3 to; Wherein, N be greater than 1 integer;
Step 3: utilize described dynamic background model generation background image;
Step 4: extract matching double points from present frame and background image;
Step 5: the radiation utilizing described matching double points to calculate between present frame and background image converts parameter;
Step 6: utilize described affine transformation parameter, calculate position under present frame coordinate system of each pixel model in dynamic background model and adjust the position of each pixel model in described dynamic background model, with by described dynamic background model tuning under the coordinate system of present frame;
Step 7: utilize the described dynamic background model after correcting that the set of pixels of present frame is divided into motion set of pixels and background pixel collection;
Step 8: utilize dynamic background model described in described background pixel set pair to upgrade;
Step 9: aftertreatment is carried out to described motion set of pixels and obtains moving target.
The invention has the beneficial effects as follows: on the one hand do not need whole video information to set up back of the body model, therefore can be online carry out moving object detection; Before and after not needing on the other hand to utilize each moment, N frame is to re-establish background model, but utilizes current time image to upgrade background model dynamically, therefore can process in real time and avoid the accumulation of correction error.Utilize the present invention, by the moving object detection of moving object detection algorithm easily on platform of taking photo by plane based on background modeling advanced under stationary platform, thus movable information and target can be extracted more accurately.
Accompanying drawing explanation
Below in conjunction with drawings and Examples, the present invention is further described.
Fig. 1 is technical scheme process flow diagram of the present invention; Fig. 2 is the exemplary plot gathering image in the present invention;
Fig. 3 is the exemplary plot of the background image generated by background model in the present invention;
Fig. 4 is through moving image exemplary plot that aftertreatment obtains in the present invention;
Fig. 5 is the exemplary plot of final target detection result in the present invention;
Embodiment
Below with reference to accompanying drawings the present invention is done and describe in detail further.Background modeling method we select Vibe to be exemplarily described.It is emphasized that following explanation is only exemplary, instead of in order to limit the scope of the invention and apply.
As shown in Figure 1, the present invention proposes the moving target detecting method based on online dynamic background modeling in a kind of video of taking photo by plane, the method comprising the steps of:
Step 1, read in frame of video, and do corresponding pre-service.Described pre-service can be selected according to the application of reality; Such as, if application relates to gray level image, then carry out image being converted to the corresponding pre-service such as gray level image; Fig. 2 is the example of the video frame image of taking photo by plane read in;
Step 2, judge whether picture frame is the first frame, if it is continue to read in N frame or utilize this frame to set up initial dynamic background model, specifically select different strategies according to different background modeling methods; Otherwise directly jump to step 3.If such as by the method for Vibe modeling as a setting, for a pixel, its neighbours of random selecting put pixel value and fill sample set as the sample value of model;
Step 3, utilize dynamic background model generation background image.Such as Vibe model, get the mean value of pixel in each model sample set or intermediate value to generate background image, Fig. 3 is the background image example generated with the mean value of pixel in Vibe model sample set;
Step 4, between current frame image and background image, extract matching double points.First in present image, extract the unique point (Fast or Harris etc.) of some, then utilize Kande-Lucas-TomasiFeatureTracker (KLT) to trace into background image to find matching double points.KLT can adopt PyramidKLT to promote effect;
Step 5, screen accurate matching double points and utilize RANSAC to calculate the affine transformation parameter between present frame and background image.First screening process can try to achieve the offset distance between matching double points, and then find the offset distance that great majority point is right, the point removed not in this offset distance certain limit is right.Due to for video of taking photo by plane, the distance of target range camera, much larger than camera focus, is come correct image so RANSAC can be utilized to calculate the affine model with 6 parameters; If matching double points is crossed think that it fails to match at least, present frame is set to the first frame and forwards step 2 pair background model initializing to, otherwise forward step 6 to and continue;
Step 6, the affine transformation parameter utilizing step 5 to obtain, calculate each pixel model in dynamic background model in the position of current image frame coordinate system and adjust the position of pixel model, by the coordinate system of dynamic background model tuning to current image frame.C++/C language realizes background model to be corrected in current image frame coordinate system process, if directly correct the position of each pixel background model, assignment operation can be very consuming time, and the position that the present invention adopts the position that corrects the pointer pointing to each pixel background model and directly do not correct each pixel background model is to accelerate correction rate.Such as in position (0,0) what the pixel background model on calculated through affine transformation parameter is (1 in the position of current image frame coordinate system, 1), then the pointer pointing to this pixel background model is put into (1,1) position, instead of whole pixel background model is copied to (1,1) position, the operation copying a pointer (4 byte) will far away faster than the operation copying whole pixel background model (usually much larger than 4 bytes).;
Step 7, with correct after dynamic background model each pixel in current frame image is divided into moving target or background.For Vibe background model, pixel relatively in present image and the distance of pixel in color space in corresponding background model set of pixels, if there is the distance of pixel in 2 pixels and present image to be all less than a certain threshold value in set of pixels, then judge that this pixel is as background pixel, otherwise this pixel is classified as foreground pixel, i.e. motion pixel;
Step 8, by the pixel classifying as background in present image, dynamic background model to be dynamically updated.For Vibe modeling method, to the pixel being labeled as background, with probability go the element replaced in this pixel background model sample set to upgrade, the element be wherein replaced random selecting in sample set, simultaneously in the same way with probability go to upgrade the background model sample value of its neighbours point, usually 16 are set to;
Step 9, aftertreatment is carried out to the pixel classifying as moving target in present image obtain moving target.First use the closed operation in morphology to process, obtain moving image, as shown in Figure 4; Then connected domain analysis is carried out to the moving image after process, finally utilize the area-constrained region removing the excessive and area of area too small to promote testing result further, obtain final moving target.Fig. 5 is the exemplary plot of the final moving target obtained, the testing result that rectangle frame represents.Wherein area-constrained areal extent used is constantly upgraded by the average area of the final moving target obtained.
Although show and describe the present invention with reference to certain preferred embodiment of the present invention, but those skilled in the art should be understood that, various change can be made to technological thought of the present invention and correlation technique in the form and details, and not depart from the spirit and scope of the present invention that appended claims limits.

Claims (10)

1. in video based on a moving target detecting method for online dynamic background modeling, it is characterized in that, the method comprising the steps of:
Step 1: read in frame of video, carries out pre-service to it;
Step 2: judge whether present frame is the first frame, if it is utilizes described first frame or utilizes the N frame initialization formative dynamics background model of reading in after continuing to read in N frame; If not then directly forwarding step 3 to; Wherein, N be greater than 1 integer;
Step 3: utilize described dynamic background model generation background image;
Step 4: extract matching double points from present frame and background image;
Step 5: the radiation utilizing described matching double points to calculate between present frame and background image converts parameter;
Step 6: utilize described affine transformation parameter, calculate position under present frame coordinate system of each pixel model in dynamic background model and adjust the position of each pixel model in described dynamic background model, with by described dynamic background model tuning under the coordinate system of present frame;
Step 7: utilize the described dynamic background model after correcting that the set of pixels of present frame is divided into motion set of pixels and background pixel collection;
Step 8: utilize dynamic background model described in described background pixel set pair to upgrade;
Step 9: aftertreatment is carried out to described motion set of pixels and obtains moving target.
2. moving target detecting method according to claim 1, wherein, described video is video of taking photo by plane.
3. moving target detecting method according to claim 1, wherein, the background image of dynamic generation and present image registration, wherein, Vibe initialization dynamic background model is utilized in step 2, specifically comprise for each pixel in picture frame, its neighbours of random selecting put pixel value and fill the sample set in described dynamic background model as the sample value of described dynamic background model.
4. moving target detecting method according to claim 1, wherein, step 4 specifically comprises:
The unique point of predetermined quantity is extracted from present frame;
Utilize KLT to follow the tracks of match point that described background image obtains described unique point, forms matching double points.
5. moving target detecting method according to claim 1, wherein, in step 5 before calculating institute affine transformation parameter, also comprises:
Calculate the offset distance between matching double points, determine the offset distance scope of most matching double points;
Screen out the matching double points of offset distance not within described offset distance scope.
6. moving target detecting method according to claim 5, wherein, in step 5, if screen out the matching double points obtained to be less than predetermined value, is then set to the first frame by present frame, and goes to step 2.
7. moving target detecting method according to claim 1, wherein, by in the process under described dynamic background model tuning to current coordinate system in step 6, adopt the mode of the pointed correction position by pointing to each pixel model in described dynamic background model.
8. moving target detecting method according to claim 1, wherein, by comparing the distance of pixel in color space in the pixel of present frame and described dynamic background model in step 7, the current frame pixel being less than predetermined threshold is judged to be background pixel, otherwise is motion pixel.
9. moving target detecting method according to claim 1, is characterized in that, the pixel model by replacing random selecting in described dynamic background model with predetermined probability in step 8 realizes the renewal of described dynamic background model.
10. moving target detecting method according to claim 1, wherein, comprises closing operation of mathematical morphology, connected domain analysis and area-constrained to the aftertreatment of motion pixel in step 9.
CN201510696087.5A 2015-10-23 2015-10-23 A kind of moving target detecting method based on the modeling of online dynamic background in video Active CN105279771B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510696087.5A CN105279771B (en) 2015-10-23 2015-10-23 A kind of moving target detecting method based on the modeling of online dynamic background in video

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510696087.5A CN105279771B (en) 2015-10-23 2015-10-23 A kind of moving target detecting method based on the modeling of online dynamic background in video

Publications (2)

Publication Number Publication Date
CN105279771A true CN105279771A (en) 2016-01-27
CN105279771B CN105279771B (en) 2018-04-10

Family

ID=55148722

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510696087.5A Active CN105279771B (en) 2015-10-23 2015-10-23 A kind of moving target detecting method based on the modeling of online dynamic background in video

Country Status (1)

Country Link
CN (1) CN105279771B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107392932A (en) * 2016-05-16 2017-11-24 安讯士有限公司 Update the method and apparatus of the background model of the background subtraction for image
CN109102530A (en) * 2018-08-21 2018-12-28 北京字节跳动网络技术有限公司 Motion profile method for drafting, device, equipment and storage medium
CN109325962A (en) * 2017-07-31 2019-02-12 株式会社理光 Information processing method, device, equipment and computer readable storage medium
CN109983469A (en) * 2016-11-23 2019-07-05 Lg伊诺特有限公司 Use the image analysis method of vehicle drive information, device, the system and program and storage medium
CN110060278A (en) * 2019-04-22 2019-07-26 新疆大学 The detection method and device of moving target based on background subtraction
CN110798634A (en) * 2019-11-28 2020-02-14 东北大学 Image self-adaptive synthesis method and device and computer readable storage medium
CN112734791A (en) * 2021-01-18 2021-04-30 烟台南山学院 On-line video foreground and background separation method based on regular error modeling
CN115442668A (en) * 2022-07-21 2022-12-06 浙江大华技术股份有限公司 Target state recognition method, apparatus and computer-readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101621615A (en) * 2009-07-24 2010-01-06 南京邮电大学 Self-adaptive background modeling and moving target detecting method
CN103700116A (en) * 2012-09-27 2014-04-02 中国航天科工集团第二研究院二O七所 Background modeling method for movement target detection
CN104835179A (en) * 2015-03-30 2015-08-12 复旦大学 Improved ViBe background modeling algorithm based on dynamic background self-adaption

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101621615A (en) * 2009-07-24 2010-01-06 南京邮电大学 Self-adaptive background modeling and moving target detecting method
CN103700116A (en) * 2012-09-27 2014-04-02 中国航天科工集团第二研究院二O七所 Background modeling method for movement target detection
CN104835179A (en) * 2015-03-30 2015-08-12 复旦大学 Improved ViBe background modeling algorithm based on dynamic background self-adaption

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
DONGXIANG ZHOU ET AL: "《Detection of Moving Targets with a Moving Camera》", 《PROCEEDINGS OF THE 2009 IEEE INTERNATIONAL CONFERENCE ON ROBOTICS AND BIOMIMETICS》 *
YASER SHEIKH ET AL: "《Bayesian Modeling of Dynamic Scenes for Object Detection》", 《IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE》 *
王亮芬等: "《基于SIFT 特征匹配和动态更新背景模型的运动目标检测算法》", 《计算机应用与软件》 *

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107392932A (en) * 2016-05-16 2017-11-24 安讯士有限公司 Update the method and apparatus of the background model of the background subtraction for image
US10152645B2 (en) 2016-05-16 2018-12-11 Axis Ab Method and apparatus for updating a background model used for background subtraction of an image
CN107392932B (en) * 2016-05-16 2019-02-05 安讯士有限公司 Update the method and apparatus of the background model of the background subtraction for image
CN109983469B (en) * 2016-11-23 2023-08-08 Lg伊诺特有限公司 Image analysis method, device, system, and program using vehicle driving information, and storage medium
CN109983469A (en) * 2016-11-23 2019-07-05 Lg伊诺特有限公司 Use the image analysis method of vehicle drive information, device, the system and program and storage medium
CN109325962A (en) * 2017-07-31 2019-02-12 株式会社理光 Information processing method, device, equipment and computer readable storage medium
CN109325962B (en) * 2017-07-31 2022-04-12 株式会社理光 Information processing method, device, equipment and computer readable storage medium
CN109102530B (en) * 2018-08-21 2020-09-04 北京字节跳动网络技术有限公司 Motion trail drawing method, device, equipment and storage medium
US11514625B2 (en) 2018-08-21 2022-11-29 Beijing Bytedance Network Technology Co., Ltd. Motion trajectory drawing method and apparatus, and device and storage medium
CN109102530A (en) * 2018-08-21 2018-12-28 北京字节跳动网络技术有限公司 Motion profile method for drafting, device, equipment and storage medium
CN110060278A (en) * 2019-04-22 2019-07-26 新疆大学 The detection method and device of moving target based on background subtraction
CN110060278B (en) * 2019-04-22 2023-05-12 新疆大学 Method and device for detecting moving target based on background subtraction
CN110798634A (en) * 2019-11-28 2020-02-14 东北大学 Image self-adaptive synthesis method and device and computer readable storage medium
CN110798634B (en) * 2019-11-28 2020-10-09 东北大学 Image self-adaptive synthesis method and device and computer readable storage medium
CN112734791A (en) * 2021-01-18 2021-04-30 烟台南山学院 On-line video foreground and background separation method based on regular error modeling
CN112734791B (en) * 2021-01-18 2022-11-29 烟台南山学院 On-line video foreground and background separation method based on regular error modeling
CN115442668A (en) * 2022-07-21 2022-12-06 浙江大华技术股份有限公司 Target state recognition method, apparatus and computer-readable storage medium
CN115442668B (en) * 2022-07-21 2024-04-12 浙江大华技术股份有限公司 Target state identification method, device and computer readable storage medium

Also Published As

Publication number Publication date
CN105279771B (en) 2018-04-10

Similar Documents

Publication Publication Date Title
CN105279771A (en) Method for detecting moving object on basis of online dynamic background modeling in video
US9916646B2 (en) System and method for processing input images before generating a high dynamic range image
CN107633526B (en) Image tracking point acquisition method and device and storage medium
US10327045B2 (en) Image processing method, image processing device and monitoring system
US9070042B2 (en) Image processing apparatus, image processing method, and program thereof
US20160155241A1 (en) Target Detection Method and Apparatus Based On Online Training
KR100996897B1 (en) correction method of Radial Distortion Based on a Line-Fitting
CN103886107A (en) Robot locating and map building system based on ceiling image information
CN110310305B (en) Target tracking method and device based on BSSD detection and Kalman filtering
CN109859104B (en) Method for generating picture by video, computer readable medium and conversion system
US9712744B2 (en) Image quality compensation system and method
KR20190044814A (en) Generate training data for deep learning
CN115953483A (en) Parameter calibration method and device, computer equipment and storage medium
CN113191469A (en) Logistics management method, system, server and storage medium based on two-dimension code
CN113052019A (en) Target tracking method and device, intelligent equipment and computer storage medium
CN110111341B (en) Image foreground obtaining method, device and equipment
CN112802112B (en) Visual positioning method, device, server and storage medium
US8417019B2 (en) Image correction system and method
CN106934818B (en) Hand motion tracking method and system
TW201413214A (en) Optical detection system for inclination angle and laying position and detection method thereof
CN113674319A (en) Target tracking method, system, equipment and computer storage medium
US20220224872A1 (en) Video generation apparatus, method and program
CN109064485B (en) Feature library maintenance method based on CMT algorithm
JP5838112B2 (en) Method, program and apparatus for separating a plurality of subject areas
Naixin et al. Monocular semidirect visual odometry for large-scale outdoor localization

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Lan Xiaosong

Inventor after: Chang Hongxing

Inventor after: Li Shuxiao

Inventor after: Zhu Chengfei

Inventor before: Chang Hongxing

Inventor before: Lan Xiaosong

Inventor before: Li Shuxiao

Inventor before: Zhu Chengfei