CN101561932B - Method and device for detecting real-time movement target under dynamic and complicated background - Google Patents
Method and device for detecting real-time movement target under dynamic and complicated background Download PDFInfo
- Publication number
- CN101561932B CN101561932B CN2009100840075A CN200910084007A CN101561932B CN 101561932 B CN101561932 B CN 101561932B CN 2009100840075 A CN2009100840075 A CN 2009100840075A CN 200910084007 A CN200910084007 A CN 200910084007A CN 101561932 B CN101561932 B CN 101561932B
- Authority
- CN
- China
- Prior art keywords
- pixel
- point
- frame image
- value
- covariance
- 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
Links
Images
Landscapes
- Image Analysis (AREA)
Abstract
The invention relates to a method and a device for detecting a real-time movement target under a dynamic and complicated background. The method comprises the following proposal: acquiring a frame image from a video, determining a covariance of colors in the current frame image, and acquiring a gray image of the frame image; and acquiring a gray value and a gradient value of a pixel point in the gray image, determining a pixel point value according to the gray value, the gradient value and preset parameters of the pixel point, judging whether the pixel point value is less than a preset multipleof the covariance of the colors determined in the last frame image, if so, taking the pixel point as a background point, otherwise, taking the pixel point as a foreground point, and taking collection of foreground points as the real-time movement target. The method and the device restrain the influence of the sudden change of light on a detection result by converting the video image into the gray image so as to more precisely detect the movement target.
Description
Technical field
The present invention relates to video analysis and monitoring technology, be specifically related to method for detecting real-time moving object and device under a kind of DYNAMIC COMPLEX background.
Background technology
Motion target detection is the basis of digital video analysis and video monitoring system, and the accurate detection of moving target can bring very useful effect for follow-up work.At present the motion target detection method mainly contains three kinds of frame difference method, optical flow method and background subtraction methods; Wherein the background subtraction method is the most general at present also effective method, and it is to utilize scene information, sets up a background model that does not have moving target; Thereby and itself and present frame compared detect moving target; It can not adapt to the unexpected variation of illumination, if background illumination changes suddenly, thereby then the color of most of background dot can change and is identified as the foreground point; It also can't be discerned like irregular background motion targets such as branch that waves or current.
Summary of the invention
The embodiment of the invention provides method for detecting real-time moving object and the device under a kind of DYNAMIC COMPLEX background, and it can adapt to the unexpected variation of illumination, can detect moving target more accurately.
Method for detecting real-time moving object under a kind of DYNAMIC COMPLEX background that the embodiment of the invention provides comprises:
From video, obtain two field picture, confirm the covariance of color in the current frame image, and obtain the gray level image of said two field picture;
Obtain gray values of pixel points and Grad in the said gray level image; Said gray values of pixel points, Grad and preset parameter according to obtaining are confirmed the pixel point value, judge said pixel point value whether less than the prearranged multiple of the covariance of the color of confirming in the former frame image, if; Confirm that then said pixel is a background dot; If not, confirm that then said pixel is the foreground point, the set of said foreground point is the real time kinematics target.
Real time kinematics object detecting device under a kind of DYNAMIC COMPLEX background that the embodiment of the invention provides comprises:
The covariance acquisition module is used for obtaining two field picture from video, confirms the covariance of color in the current frame image;
The pixel acquisition module; Be used for converting two field picture described in the covariance acquisition module into gray level image; And obtain gray values of pixel points and Grad in the said gray level image; Gray values of pixel points and Grad in the gray level image described in the gray level image acquisition module, and confirm the pixel point value according to the said gray values of pixel points, Grad and the preset parameter that obtain;
The first dynamic object determination module; Be used for judging the prearranged multiple of the covariance of the color whether determined said pixel point value of pixel acquisition module is confirmed less than former frame image covariance acquisition module; If confirm that then said pixel is a background dot, if not; Confirm that then said pixel is the foreground point, the set of said foreground point is the real time kinematics target.
Method for detecting real-time moving object and device under a kind of DYNAMIC COMPLEX background that the embodiment of the invention provides, it suppresses the influence of the unexpected variation of illumination to testing result through video image being converted into gray level image, can detect moving target more accurately.
Description of drawings
Fig. 1 is the structural representation of the real time kinematics object detecting device under described a kind of DYNAMIC COMPLEX background of providing of the embodiment of the invention;
Fig. 2 is the structural representation that the real time kinematics object detecting device under described a kind of DYNAMIC COMPLEX background of providing of the embodiment of the invention further describes in an embodiment.
Embodiment
In the scheme of the method for detecting real-time moving object under a kind of DYNAMIC COMPLEX background that the embodiment of the invention provides, at first, from video, obtain two field picture, confirm the covariance of color in the current frame image, and obtain the gray level image of said two field picture; Then, obtain gray values of pixel points and Grad in the said gray level image, confirm the pixel point value according to the said gray values of pixel points, Grad and the preset parameter that obtain; Judge that said pixel point value is whether less than the prearranged multiple of the covariance of the color of confirming in the former frame image; If confirm that then said pixel is a background dot, if not; Confirm that then said pixel is the foreground point, the set of said foreground point is the real time kinematics target.
In such scheme; Further can comprise according to the foreground point of confirming in the former frame image foreground point of confirming in the present frame is adjusted; Concrete adjustment process can for: extract in the former frame image pixel point value for the present frame of foreground point; Confirm that according to pixel neighborhood of a point point described in the pixel point value of the said present frame that extracts and the former frame image pixel of present frame is the probability of real foreground point, if determined probability less than designated value, then is adjusted into background dot with the foreground point of confirming in the said present frame; If determined probability more than or equal to designated value, is not then adjusted the foreground point of confirming.
Comprehensive such scheme, concrete process can for:
Step S1, from video, obtain two field picture;
Step S2, confirm the weight w of color k in the said two field picture
k, average μ
kAnd covariance sigma
k 2, wherein k generally chooses 5 or 3 for preset natural number;
Step S3, convert said two field picture into gray level image, obtain gray values of pixel points A in the said gray level image
Ij, according to gray values of pixel points A in the said gray level image that obtains
IjObtain the Grad of pixel
And gradient direction R
Ij=ac tan 2 (A
Ij-A
I+1, j, A
Ij-A
I, j+1), wherein i is a horizontal ordinate, j is an ordinate, and according to the said gray values of pixel points A that obtains
Ij, Grad M
IjConfirm pixel point value X with preset parameter λ
Ij=(λ A
Ij, (1-λ) M
Ij), wherein preset parameter λ is the value in [0,1], it is to confirm according to the colouring information of image.Set up mixed Gauss model according to above-mentioned data:
∑ wherein
kIt is the standard covariance sigma
kMultiply each other with unit matrix and to obtain (X
Ij-μ
k)
TExpression (X
Ij-μ
k) transposition;
Step S4, the said current frame pixel point value X of judgement
T+1Whether with the mixed Gauss model coupling of former frame image, if, execution in step S5 then, if not, execution in step S6 then;
Step S5, confirm that said pixel is a background dot, and according to the weight w of color k in the former frame image
t, average μ
tAnd covariance sigma
t 2And the Grad M of present frame
T+1With pixel point value X
T+1Upgrade the weight w of color k in the current frame image
T+1, average μ
T+1And covariance sigma
T+1 2, concrete renewal process can comprise:
Wherein α is a predetermined value, and it is to confirm ρ=α/w according to the intensity of variation of former frame image and current frame image
T+1, and according to above-mentioned Data Update mixed Gauss model P (X
T+1);
Step S6, confirm that said pixel is the foreground point, and upgrade the weight w of color k in the current frame image according to predetermined value
T+1', average μ
T+1' and the standard covariance sigma
T+1', detailed process can comprise: make weight w
T+1' the value that equals to be scheduled to generally chooses 0.05, makes the standard covariance sigma
T+1' the value that equals to be scheduled to generally chooses 30, makes average μ
T+1'=X
T+1, and according to above-mentioned Data Update mixed Gauss model P (X
T+1);
Step S7, according to foreground point and background dot that step S5 in the former frame image and step S6 confirm, the foreground point of confirming in the present frame is adjusted, concrete adjustment process comprises: extract that pixel is the pixel X of the present frame of foreground point in the former frame image
T+1, according to pixel neighborhood of a point point Y in the former frame image
IjConfirm the pixel X of present frame
T+1Probability for real foreground point
Wherein a is a positive number, and f and 1 is respectively the variable quantity of horizontal ordinate, and f and l are taken as integer; D gets odd number, the expression width neighborhood, and b is the distance between pixel described in the former frame image and the said pixel neighborhood of a point point; It can replace with Gauss's template of the symmetric matrix of a d * d; The element value of said symmetric matrix meets Gaussian distribution, can calculate with gaussian kernel function, and for example Gauss's template of n=3 is:
If with the color of 256 grades gray-scale value remarked pixels, so
Can be one is 256 array in advance by the good size of calculating, if determined probability
Less than designated value, if execution in step S8 then is determined probability
More than or equal to designated value, execution in step S9 then, described designated value is to confirm according to the scene of video image, if scene is complicated, then designated value can be chosen the value in [0.5,0.7], if scene is simple, then designated value can be chosen the value in [0.3,0.5];
Step S8, the foreground point of confirming in the said present frame is adjusted into background dot, and execution in step S10;
Step S9, the foreground point of confirming is not adjusted, and execution in step S10;
Step S10, current frame image data replacement former frame view data, and the last frame image of execution in step S1 in video again.
The embodiment of the invention also provides the real time kinematics object detecting device under a kind of DYNAMIC COMPLEX background, and is as shown in Figure 1, comprising:
The first dynamic object determination module 3; Be used to judge pixel acquisition module 2 determined said pixel point values whether with the mixed Gauss model coupling of former frame image; If confirm that then said pixel is a background dot, if not; Confirm that then said pixel is the foreground point, the set of said foreground point is the real time kinematics target.
In the said apparatus, confirm that according to the said gray values of pixel points, Grad and the preset parameter that obtain the process of pixel point value can comprise in the pixel acquisition module 2:
Pixel point value X
Ij=(λ A
Ij, (1-λ) M
Ij), wherein, A
IjAnd M
IjBe respectively said gray values of pixel points and Grad, wherein i is a horizontal ordinate, and j is an ordinate, and λ is a preset parameter.
Set up mixed Gauss model according to above-mentioned data:
∑ wherein
kIt is the standard covariance sigma
kMultiply each other with unit matrix and to obtain (X
Ij-μ
k)
TExpression (X
Ij-μ
k) transposition, the weight table of color k is shown w in the two field picture
k, average is expressed as μ
kAnd covariance is expressed as σ
k 2
In the said apparatus, the first dynamic object determination module 3 can also comprise:
The first covariance update module, be used for confirming that said pixel is background dot after, upgrade the covariance of color in the current frame image, detailed process can comprise:
Said covariance sigma
T+1 2=(1-ρ) σ
t 2+ ρ (X
T+1-μ
T+1)
T(X
T+1-μ
T+1), wherein α is a predetermined value, ρ=α/w
T+1, w
T+1And μ
T+1Be respectively weight and the average of color k in the current frame image.
The second covariance update module, be used for confirming that said pixel is the foreground point after, upgrade the standard covariance sigma of color k in the current frame image
T+1' the value that equals to be scheduled to.
Based on the foreground point of confirming in the former frame image foreground point of confirming in the present frame is adjusted, as shown in Figure 2, in the said apparatus, can also be comprised:
The second dynamic object determination module; Be used for determined probability of probability generation module
and designated value are compared; If determined probability
is less than designated value; Then the foreground point of confirming in the said present frame is adjusted into background dot; If determined probability
is more than or equal to designated value; Then the foreground point of confirming is not adjusted; If scene is complicated; Then designated value can be chosen the value in [0.5,0.7], if scene is simple; Then designated value can be chosen the value in [0.3,0.5].
The method and apparatus that the embodiment of the invention provides; Suppress the influence of the unexpected variation of illumination through video image being converted into gray level image to testing result; And through extracting foreground point and the background dot that present frame is further confirmed in the foreground point of confirming in the former frame image; Some irregular background motion targets can be removed, thereby moving target can be detected more accurately.
The above; Be merely the preferable embodiment of the present invention, but protection scope of the present invention is not limited thereto, any technician who is familiar with the present technique field is in the technical scope that the present invention discloses; The variation that can expect easily or replacement all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of claims.
Claims (8)
1. the method for detecting real-time moving object under the DYNAMIC COMPLEX background is characterized in that, comprise,
From video, obtain two field picture, confirm the weight w of color k in the said two field picture
k, average μ
kAnd covariance sigma
k 2, wherein k chooses 5 or 3, and obtains the gray level image of said two field picture for preset natural number;
Obtain gray values of pixel points and Grad in the said gray level image; Said gray values of pixel points, Grad and predefined parameter based on obtaining are confirmed the pixel point value, judge said pixel point value whether with the mixed Gauss model coupling of former frame image, if; Confirm that then said pixel is a background dot; If not, confirm that then said pixel is the foreground point, the set of said foreground point is the real time kinematics target;
Said gray values of pixel points, Grad and the preset parameter that said basis obtains confirms that the process of pixel point value comprises:
Pixel point value X
Ij=(λ A
Ij, (1-λ) M
Ij), wherein, A
IjAnd M
IjBe respectively said gray values of pixel points and Grad, wherein i is a horizontal ordinate, and j is an ordinate, and λ is a preset parameter,
Said mixed Gauss model is:
∑ wherein
kIt is the standard covariance sigma
kMultiply each other with unit matrix and to obtain (X
Ij-μ
k)
TExpression (X
Ij-μ
k) transposition.
2. method according to claim 1 is characterized in that, confirm that said pixel is background dot after, upgrade the covariance of color in the current frame image, detailed process comprises:
Said covariance sigma
T+1 2=(1-ρ) σ
t 2+ ρ (X
T+1-μ
T+1)
T(X
T+1-μ
T+1), wherein α is a predetermined value, ρ=α/w
T+1, w
T+1And μ
T+1Be respectively the weight and the average of color in the current frame image, σ
t 2The covariance of color in the expression former frame image, X
T+1Expression current frame pixel point value.
3. method according to claim 1 is characterized in that, confirm that said pixel is the foreground point after, upgrade the standard covariance sigma of color in the current frame image
T+1' the value that equals to be scheduled to.
4. according to each described method in the claim 1 to 3, it is characterized in that, comprise also according to the foreground point of confirming in the former frame image foreground point of confirming in the present frame is adjusted that concrete adjustment process comprises:
Extract in the former frame image is the pixel point value X of the present frame of foreground point
T+1', according to the pixel point value X of the said present frame that extracts
T+1' with the former frame image described in prospect neighborhood of a point point Y
IjThe pixel of confirming present frame is the probability of real foreground point:
wherein a is positive number; F and 1 is respectively the variable quantity of horizontal ordinate; D is a width neighborhood; B is the distance between foreground point described in the former frame image and the said prospect neighborhood of a point point; If determined probability
is less than designated value; Then the foreground point of confirming in the said present frame is adjusted into background dot; If determined probability
more than or equal to designated value, is not then adjusted the foreground point of confirming.
5. the real time kinematics object detecting device under the DYNAMIC COMPLEX background is characterized in that, comprising:
The covariance acquisition module is used for obtaining two field picture from video, confirms the weight w of color k in the said two field picture
k, average μ
kAnd covariance sigma
k 2, wherein k chooses 5 or 3 for preset natural number;
The pixel acquisition module; Be used for converting two field picture described in the covariance acquisition module into gray level image; And obtain gray values of pixel points and Grad in the said gray level image, and confirm the pixel point value according to the said gray values of pixel points, Grad and the preset parameter that obtain; Said gray values of pixel points, Grad and the preset parameter that said basis obtains confirms that the process of pixel point value comprises:
Pixel point value X
Ij=(λ A
Ij, (1-λ) M
Ij), wherein, A
IjAnd M
IjBe respectively said gray values of pixel points and Grad, wherein i is a horizontal ordinate, and j is an ordinate, and λ is a preset parameter,
Said mixed Gauss model is:
∑ wherein
kIt is the standard covariance sigma
kMultiply each other with unit matrix and to obtain (X
Ij-μ
k)
TExpression (X
Ij-μ
k) transposition;
The first dynamic object determination module; Be used to judge the determined said pixel point value of pixel acquisition module whether with the mixed Gauss model coupling of former frame image; If confirm that then said pixel is a background dot, if not; Confirm that then said pixel is the foreground point, the set of said foreground point is the real time kinematics target.
6. device according to claim 5; It is characterized in that the said first dynamic object determination module also comprises: the first covariance update module, be used for confirming that said pixel is background dot after; Upgrade the covariance of color in the current frame image, detailed process comprises:
Said covariance sigma
T+1 2=(1-ρ) σ
t 2+ ρ (X
T+1-μ
T+1)
T(X
T+1-μ
T+1), wherein α is a predetermined value, ρ=α/w
T+1, w
T+1And μ
T+1Be respectively the weight and the average of color in the current frame image, σ
t 2The covariance of color in the expression former frame image, X
T+1Expression current frame pixel point value.
7. device according to claim 5 is characterized in that, the said first dynamic object determination module also comprises: the second covariance update module, be used for confirming that said pixel is the foreground point after, upgrade the standard covariance sigma of color in the current frame image
T+1' the value that equals to be scheduled to.
8. according to each described device in the claim 5 to 7, it is characterized in that, also comprise
Extraction module is used for the foreground point definite according to the former frame image first dynamic object determination module, and extracting in the former frame image is the pixel point value X of the present frame of foreground point
T+1';
The probability generation module, the pixel point value X of the said present frame that is used for obtaining according to extraction module
T+1' with the former frame image described in prospect neighborhood of a point point Y
IjThe pixel of confirming present frame is the probability of real foreground point
Wherein a is a positive number, and f and 1 is respectively the variable quantity of horizontal ordinate, and d is a width neighborhood, and b is the distance between foreground point described in the former frame image and the said prospect neighborhood of a point point;
The second dynamic object determination module; Be used for determined probability of probability generation module
and designated value are compared; If determined probability
is less than designated value; Then the foreground point of confirming in the said present frame is adjusted into background dot; If determined probability
more than or equal to designated value, is not then adjusted the foreground point of confirming.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009100840075A CN101561932B (en) | 2009-05-12 | 2009-05-12 | Method and device for detecting real-time movement target under dynamic and complicated background |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2009100840075A CN101561932B (en) | 2009-05-12 | 2009-05-12 | Method and device for detecting real-time movement target under dynamic and complicated background |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101561932A CN101561932A (en) | 2009-10-21 |
CN101561932B true CN101561932B (en) | 2012-01-11 |
Family
ID=41220719
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2009100840075A Expired - Fee Related CN101561932B (en) | 2009-05-12 | 2009-05-12 | Method and device for detecting real-time movement target under dynamic and complicated background |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101561932B (en) |
Families Citing this family (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101751670B (en) * | 2009-12-17 | 2014-09-10 | 北京中星微电子有限公司 | Method and device for detecting foreground object |
CN101799434B (en) * | 2010-03-15 | 2011-06-29 | 深圳市中钞科信金融科技有限公司 | Printing image defect detection method |
CN101908214B (en) * | 2010-08-10 | 2012-05-23 | 长安大学 | Moving object detection method with background reconstruction based on neighborhood correlation |
CN101976439A (en) * | 2010-11-02 | 2011-02-16 | 上海海事大学 | Visual attention model with combination of motion information in visual system of maritime search and rescue machine |
CN103150739A (en) * | 2013-03-04 | 2013-06-12 | 上海大学 | Video moving object partitioning algorithm based on multi-feature steady main component analysis |
CN103824297B (en) * | 2014-03-07 | 2016-08-24 | 电子科技大学 | In complicated high dynamic environment, background and the method for prospect is quickly updated based on multithreading |
CN103971386B (en) * | 2014-05-30 | 2017-03-15 | 南京大学 | A kind of foreground detection method under dynamic background scene |
CN106572387B (en) * | 2016-11-09 | 2019-09-17 | 广州视源电子科技股份有限公司 | video sequence alignment method and system |
CN110166851B (en) | 2018-08-21 | 2022-01-04 | 腾讯科技(深圳)有限公司 | Video abstract generation method and device and storage medium |
CN110276788B (en) * | 2019-06-12 | 2021-08-24 | 北京轩宇空间科技有限公司 | Method and apparatus for infrared imaging seeker target tracking |
CN112166435A (en) * | 2019-12-23 | 2021-01-01 | 商汤国际私人有限公司 | Target tracking method and device, electronic equipment and storage medium |
CN111369591A (en) * | 2020-03-05 | 2020-07-03 | 杭州晨鹰军泰科技有限公司 | Method, device and equipment for tracking moving object |
-
2009
- 2009-05-12 CN CN2009100840075A patent/CN101561932B/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN101561932A (en) | 2009-10-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101561932B (en) | Method and device for detecting real-time movement target under dynamic and complicated background | |
CN101727662B (en) | SAR image nonlocal mean value speckle filtering method | |
CN108052980B (en) | Image-based air quality grade detection method | |
CN107123111B (en) | Deep residual error network construction method for mobile phone screen defect detection | |
EP3206185B1 (en) | Image processing method, image processing device and display device | |
CN102421007B (en) | Image quality evaluating method based on multi-scale structure similarity weighted aggregate | |
CN112257605B (en) | Three-dimensional target detection method, system and device based on self-labeling training sample | |
CN111209876A (en) | Oil leakage defect detection method and system | |
CN104599292A (en) | Noise-resistant moving target detection algorithm based on low rank matrix | |
CN106096610A (en) | A kind of file and picture binary coding method based on support vector machine | |
CN102297822A (en) | Method for predicting ash content of coal particles by utilizing image analysis | |
CN104197900A (en) | Meter pointer scale recognizing method for automobile | |
CN102214290B (en) | License plate positioning method and license plate positioning template training method | |
CN105678735A (en) | Target salience detection method for fog images | |
CN105184804A (en) | Sea surface small target detection method based on airborne infrared camera aerially-photographed image | |
CN110020658A (en) | A kind of well-marked target detection method based on multitask deep learning | |
CN109472790A (en) | A kind of machine components defect inspection method and system | |
CN111950457A (en) | Oil field safety production image identification method and system | |
CN104282019A (en) | Blind image quality evaluation method based on natural scene statistics and perceived quality propagation | |
CN109272484B (en) | Rainfall detection method based on video image | |
CN117237736A (en) | Daqu quality detection method based on machine vision and deep learning | |
CN103077514B (en) | A kind of visual perception image quality evaluation method based on full variation | |
CN102831621A (en) | Video significance processing method based on spectral analysis | |
CN115830514B (en) | Whole river reach surface flow velocity calculation method and system suitable for curved river channel | |
CN106023166A (en) | Method and device for detecting dangerous objects hidden by human bodies based on microwave images |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
C17 | Cessation of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20120111 Termination date: 20120512 |