CN105488542A - Method and device for foreground object detection - Google Patents

Method and device for foreground object detection Download PDF

Info

Publication number
CN105488542A
CN105488542A CN201510982581.8A CN201510982581A CN105488542A CN 105488542 A CN105488542 A CN 105488542A CN 201510982581 A CN201510982581 A CN 201510982581A CN 105488542 A CN105488542 A CN 105488542A
Authority
CN
China
Prior art keywords
foreground
img2
picture frame
img1
scenery
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
CN201510982581.8A
Other languages
Chinese (zh)
Other versions
CN105488542B (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.)
FUJIAN STAR-NET SECURITY TECHNOLOGY Co Ltd
Original Assignee
FUJIAN STAR-NET SECURITY TECHNOLOGY Co Ltd
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 FUJIAN STAR-NET SECURITY TECHNOLOGY Co Ltd filed Critical FUJIAN STAR-NET SECURITY TECHNOLOGY Co Ltd
Priority to CN201510982581.8A priority Critical patent/CN105488542B/en
Publication of CN105488542A publication Critical patent/CN105488542A/en
Application granted granted Critical
Publication of CN105488542B publication Critical patent/CN105488542B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/29Graphical models, e.g. Bayesian networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides a method and a device for foreground object detection. The device comprises a foreground area detection module, a foreground contour module, a gradient calculation module, and a foreground detection control module. The invention relates to the object identification field and particularly relates to the identification of the foreground object which moves irregularly. The method for the foreground object detection is performed according to the gradient change in the foreground contour masking area. In the prior art, the object moving in a single background Gaussian model is easy to identify as a background, and the object which has stopped for a while and then begins to move is usually identified as another object. The method disclosed by the invention improves the identification efficiency of the foreground object and the identification consistency.

Description

A kind of foreground object detection method and equipment
Technical field
The present invention relates to object identification field, relate generally to the identification of the foreground object of irregular motion.
Background technology
Background object just refers to object that is static or slowly movement, and foreground object is with regard to the object of relative movement.So we can find out a classification problem object detection, namely determine whether a pixel belongs to background dot.But at the foreground object of irregular motion, the foreground object that the interval particularly between twice motion is static for a long time, is easily identified as background object in static process.
Realizing in process of the present invention, inventor finds that in prior art, there are the following problems, and the detection method based on single background model often needs the track algorithm (as meanshift algorithm) that computation complexity is higher.Simultaneously these class methods cannot confirm the state before target following, and such as, after object rest reciprocating cutter, is easily identified as another object; And the algorithm calculated amount of double-background model is the twice of single background model, the method for double-background model its roughly flow process is as follows:
Set up the Gaussian Background model that two renewal speed are different.Can have two kinds of implementations, one is identical renewal frequency/cycle, different update speed; Two is identical renewal speed, different update frequency/period.Here use the second way, what renewal frequency was high is designated as MOG_fast, and what renewal frequency was low is designated as MOG_slow.
Inputted video image in two Gauss models, and starts to calculate with respective frequency, and background also splits prospect.Prospect is designated as FG_fast and FG_slow respectively.
When FG_fast detects target prospect, but FG_slow does not detect, then judge the target that FG_fast detects.
Distinguishing target prospect is legacy or lost-and-found object to use extra method to confirm, and reports to the police after the threshold time of setting.
Summary of the invention
Below provide and the simplification of one or more aspect is summarized to try hard to provide the basic comprehension to this type of aspect.Detailed the combining of this not all aspect contemplated of general introduction is look at, and both not intended to be pointed out out the scope of key or decisive any or all aspect of elements nor delineate of all aspects.Its unique object is some concepts that will provide one or more aspect in simplified form using as the more specifically bright sequence provided after a while.
Inventor provides a kind of foreground object detection method, comprises step:
Obtain a two field picture IMG1, described image IMG1 is input in background model and calculates, upgrade background image data, and mark foreground area;
If there is not the region being marked as foreground area in described image IMG1, then continue to obtain next frame image, and based on the next frame image update background image data got and mark foreground area, if there is the region being marked as foreground area in image IMG1, then according to described foreground area mark prospect profile, calculate prospect profile masks area according to described prospect profile;
Calculate the Grad G_B1 of described background image data at described prospect profile masks area, and described image IMG1 is at the Grad G_IMG1 of described prospect profile masks area;
Whether the object judged in foreground area by G_B1 and G_IMG1 is front scenery.
Further, described prospect profile masks area is made up of the region of expanding between profile and erosion profile; Described expansion profile calculates according to prospect profile and expansion formula; Described erosion profile obtains according to prospect profile and corrosion formulae discovery.
Further, described background model is Gaussian Background model.
Further, whether the described object judged in foreground area by G_B1 and G_IMG1 is that front scenery comprises step:
Judge whether the value of G_IMG1-G_B1 is less than the first preset value, if be less than, judge that the object in foreground area is front scenery, and before mark, scenery is lost-and-found object, otherwise judge that current foreground area is without foreground object.
Further, described foreground object detection method scenery before mark is after lost-and-found object, also comprises step:
Obtain the picture frame IMG2 after IMG1, described picture frame IMG2 is input in described background model and calculates the background image data after renewal;
Calculate the Grad G_B2 of the background data after upgrading at described prospect profile masks area;
Judge whether the value of described G_B2-G_B1 is less than the second preset value, if be more than or equal to, cancelling the front scenery of mark is lost-and-found object, if be less than, and the picture frame IMGx after continuing to obtain; The picture frame IMGx of acquisition is input in described background model and upgrades background image data, and calculate the Grad G_Bx of background image at prospect profile masks area, until the time T through setting, if the difference of G_Bx-G_B1 is all less than the second preset value in T time, then trigger lost-and-found object actuation of an alarm.
Further, described foreground object detection method scenery before mark is after lost-and-found object, also comprises step:
Obtain the picture frame IMG2 after IMG1, described picture frame IMG2 is input in described background model and calculates the background image data after renewal; Calculating chart picture frame IMG2 is at the Grad G_IMG2 of described prospect profile masks area;
Judge whether the value of described G_IMG2-G_B1 is less than the second preset value, if be more than or equal to, cancelling the front scenery of mark is lost-and-found object, if be less than, and the picture frame after continuing to obtain; By the picture frame IMGx obtained, and calculating chart picture frame IMGx is at the Grad G_IMGx of prospect profile masks area, until the time T through setting, if the difference of G_IMGx-G_B1 is all less than the second preset value in T time, then triggers lost-and-found object actuation of an alarm.
Further, described foreground object detection method scenery before mark is after lost-and-found object, also comprises step:
Obtain the picture frame after IMG1, described picture frame is input in described background model and calculates the background image data after renewal;
Be lost-and-found object at scenery before mark and after the time of setting, obtain next frame image IMG2, upgrade background image data with IMG2, calculating the Grad G_B2 of the background data after upgrading at described prospect profile masks area;
Judge whether the value of described G_B2-G_B1 is less than the second preset value, if be more than or equal to, cancelling the front scenery of mark is lost-and-found object, if be less than, triggers lost-and-found object actuation of an alarm.
Further, described foreground object detection method scenery before mark is after lost-and-found object, also comprises step:
Obtain the picture frame after IMG1, described picture frame is input in described background model and calculates the background image data after renewal;
Be lost-and-found object at scenery before mark and after the time of setting, obtain next frame image IMG2, calculating the Grad G_IMG2 of IMG2 at described prospect profile masks area;
Judge whether the value of described G_IMG2-G_B1 is less than the second preset value, if be more than or equal to, cancelling the front scenery of mark is lost-and-found object, if be less than, triggers lost-and-found object actuation of an alarm.
Further, described " whether the object judged in foreground area by G_B1 and G_IMG1 is front scenery " comprises step:
Judge whether the difference of G_IMG1-G_B1 is greater than the 3rd preset value, is, judge that the object in foreground area is front scenery, before mark, scenery is legacy, otherwise judges the unmatched scenery of current foreground area.
Further, described foreground object detection method scenery before mark is after legacy, also comprises step,
Obtain the picture frame IMG2 after IMG1, described picture frame IMG2 is input in described background model and calculates the background image data after renewal;
Calculate the Grad G_B2 of the background data after upgrading at described prospect profile masks area;
Judge whether the value of described G_B2-G_B1 is less than the 4th preset value, if be less than, cancelling the front scenery of mark is legacy, otherwise the picture frame after continuing to obtain; The picture frame IMGx of acquisition is input in described background model and upgrades background image data, and calculate the Grad G_Bx of background image at prospect profile masks area, until through the time of setting, if the difference of G_Bx-G_B1 is all greater than the 4th preset value, then trigger legacy actuation of an alarm.
Further, described foreground object detection method scenery before mark is after legacy, also comprises step:
Obtain the picture frame after IMG1, described picture frame is input in described background model and calculates the background image data after renewal;
Be legacy at scenery before mark and after the time of setting, obtain next frame image IMG2, upgrade background image data with IMG2, calculating the Grad G_B2 of the background data after upgrading at described prospect profile masks area;
Judge whether the value of described G_B2-G_B1 is less than the 4th preset value, if be less than, cancelling the front scenery of mark is legacy, otherwise triggers legacy actuation of an alarm.
Further, described foreground object detection method scenery before mark is after legacy, also comprises step:
Obtain the picture frame after IMG1, described picture frame is input in described background model and calculates the background image data after renewal;
Be after legacy at scenery before mark and after the time of setting, obtain next frame image IMG2, calculate the Grad G_IMG2 of IMG2 at described prospect profile masks area;
Judge whether the value of described G_IMG2-G_B1 is less than the 4th preset value, if be less than, cancelling the front scenery of mark is legacy, otherwise triggers legacy actuation of an alarm.
Further, described foreground object detection method scenery before mark is after legacy, also comprises step:
Obtain the picture frame IMG2 after IMG1, described picture frame IMG2 is input in described background model and calculates the background image data after renewal;
Calculating chart picture frame IMG2 is at the Grad G_IMG2 of described prospect profile masks area;
Judge whether the value of described G_IMG2-G_B1 is less than the 4th preset value, if be less than, cancelling the front scenery of mark is lost-and-found object, if be more than or equal to, and the picture frame after continuing to obtain; By the picture frame IMGx obtained, and the true IMGx of computed image is at the Grad G_IMGx of prospect profile masks area, until the time T through setting, if the difference of G_IMGx-G_B1 is all less than in T time, cancelling the front scenery of mark is legacy, otherwise triggers legacy actuation of an alarm.
Inventor also provides a kind of foreground detection equipment, comprises foreground area detection module, prospect profile module, gradient calculation module, prospect quality testing survey control module;
Described image IMG1, for obtaining a two field picture IMG1, is input in background model and calculates by described foreground area detection module, upgrades background image data, and marks foreground area;
If described prospect profile module is for judging there is not the region being marked as foreground area in described image IMG1, then continue to obtain next frame image, and based on the next frame image update background image data got and mark foreground area, if there is the region being marked as foreground area in image IMG1, then according to described foreground area mark prospect profile, calculate prospect profile masks area according to described prospect profile;
Described gradient calculation module is for calculating the Grad G_B1 of described background image data at described prospect profile masks area, and described image IMG1 is at the Grad G_IMG1 of described prospect profile masks area;
Whether described prospect quality testing surveys control module for the object judged in foreground area by G_B1 and G_IMG1 is front scenery.
Further, also comprise prospect profile masks area and obtain module, it is for obtaining prospect profile masks area, and described prospect profile masks area is made up of the region of expanding between profile and erosion profile; Described expansion profile calculates according to prospect profile and expansion formula; Described erosion profile obtains according to prospect profile and corrosion formulae discovery.
Further, described prospect quality testing surveys control module specifically for judging whether the difference of G_IMG1-G_B1 is less than the first preset value, if be less than, judge that the object in foreground area is front scenery, before mark, scenery is lost-and-found object, otherwise judges that current foreground area is without foreground object.
Further, described prospect quality testing surveys control module for the picture frame IMG2 after obtaining IMG1, is input in described background model by described picture frame IMG2 and calculates the background image data after renewal; Calculate the Grad G_B2 of the background data after upgrading at described prospect profile masks area; Judge whether the value of described G_B2-G_B1 is less than the second preset value, if be more than or equal to, cancelling the front scenery of mark is lost-and-found object, if be less than, and the picture frame IMGx after continuing to obtain; The picture frame IMGx of acquisition is input in described background model and upgrades background image data, and calculate the Grad G_Bx of background image at prospect profile masks area, until the time T through setting, if the difference of G_Bx-G_B1 is all less than the second preset value in T time, then trigger lost-and-found object actuation of an alarm.
Further, described prospect quality testing surveys control module for the picture frame after obtaining IMG1, is input in described background model by described picture frame and calculates the background image data after renewal; Be lost-and-found object at scenery before mark and after the time T of setting, obtain next frame image IMG2, upgrade background image data with IMG2, calculating the Grad G_B2 of the background data after upgrading at described prospect profile masks area; Judge whether the value of described G_B2-G_B1 is less than the second preset value, if be more than or equal to, cancelling the front scenery of mark is lost-and-found object, if be less than, triggers lost-and-found object actuation of an alarm.
Further, described prospect quality testing is surveyed control module and is judged whether the difference of G_IMG1-G_B1 is greater than the 3rd preset value, is, judges that the object in foreground area is front scenery, and before mark, scenery is legacy, otherwise judges the unmatched scenery of current foreground area.
Further, described prospect quality testing surveys control module for the picture frame IMG2 after obtaining IMG1, is input in described background model by described picture frame IMG2 and calculates the background image data after renewal; Calculate the Grad G_B2 of the background data after upgrading at described prospect profile masks area; Judge whether the value of described G_B2-G_B1 is less than the 4th preset value, if be less than, cancelling the front scenery of mark is legacy, otherwise the picture frame after continuing to obtain; The picture frame IMGx of acquisition is input in described background model and upgrades background image data, and calculate the Grad G_Bx of background image at prospect profile masks area, until the time T through setting, if the difference of G_Bx-G_B1 is all greater than the 4th preset value in T time, then trigger legacy actuation of an alarm.
Further, described prospect quality testing surveys control module for the picture frame after obtaining IMG1, is input in described background model by described picture frame and calculates the background image data after renewal; Be after legacy at scenery before mark and after the time T of setting, obtain next frame image IMG2, upgrade background image data with IMG2, calculate the Grad G_B2 of the background data after upgrading at described prospect profile masks area; Judge whether the value of described G_B2-G_B1 is less than the 4th preset value, if be less than, cancelling the front scenery of mark is legacy, otherwise triggers legacy actuation of an alarm.
In addition, additional aspect can comprise a kind of first code collection for realizing describing a kind of foreground object detection method herein.Further aspect in this regard can comprise: at least one processor comprising execution; Comprise the computer program of computer-readable medium, this computer-readable medium comprises and can perform with the instruction of detection and response foreground object by computing machine; Or the equipment of the device comprised for detection and response foreground object or assembly.Before reaching, address relevant object, this one or more aspect is included in and hereinafter fully describes and the feature particularly pointed out in the following claims.The following description and drawings illustrate some illustrative aspects of this one or more aspect.But these features are only indicate that can to adopt in the various modes of the principle of various aspect several, and this description is intended to contain this type of aspects all and equivalent aspect thereof.
Be different from prior art, this method, according to the change of the Grad at prospect profile masks area, detects the object of foreground object to reach.Easily be identified as background after comparing the object rest moved in single background Gauss model, and can be identified as another object when moving after the static long period, this method improves the recognition efficiency of foreground object and the consistance of identification.Again because in foreground object Tracking Recognition process, extra computation is only needed to follow the tracks of the graded of prospect profile masks area, the foreground object identification comparing double-background model needs with different frequencies or the different Background From Layer data of periodic maintenance two, and this method reduces the calculating scale of data significantly.And this method just can detect foreground object by less calculating, do not need the Background From Layer by calculating multiple weighting and detect the foreground object (start time that usual weighted background moves at foreground object, weighted background can not have greatly changed), reduce the time delay that foreground object detects.
Accompanying drawing explanation
Describe disclosed aspect below with reference to accompanying drawing, provide accompanying drawing to be non-limiting disclosed aspect in order to illustrate, label similar in accompanying drawing indicates similar elements, and wherein:
Fig. 1 is foreground object detection method process flow diagram described in embodiment;
Fig. 2 is the detection method process flow diagram again of foreground area described in embodiment;
Fig. 3 is lost-and-found object detection method process flow diagram described in embodiment;
Fig. 4 is the detection method process flow diagram again of lost-and-found object described in embodiment;
Fig. 5 is remnant object detection method process flow diagram described in embodiment;
Fig. 6 is the detection method process flow diagram again of legacy described in embodiment;
Fig. 7 is reference time axle;
Fig. 8 is the example of the image IMG1 inputted in the t1 moment;
Fig. 9 is the example of background image data in t1 moment model;
Figure 10 is the foreground area example that t1 moment Model Identification goes out;
Figure 11 is the example of the foreground area profile described in embodiment;
Figure 12 is the example of the prospect profile masks area described in embodiment;
Figure 13 is for the prospect profile masks area described in embodiment is in conjunction with the example of background image data in t1 moment model;
Figure 14 is for the prospect profile masks area described in embodiment is in conjunction with the image IMG1 example of the input in t1 moment;
Figure 15 leaves standstill the t2 moment after a period of time for foreground object described in embodiment, and prospect profile masks area is in conjunction with the example of background image data in t2 moment model;
Figure 16 is the example of the image IMG1 that another embodiment t1 moment inputs;
Figure 17 is the example of background image data in another embodiment t1 moment model;
Figure 18 is the foreground area example that another embodiment t1 moment Model Identification goes out;
Figure 19 is for the prospect profile masks area described in another embodiment is in conjunction with the example of background image data in t1 moment model;
Figure 20 is for the prospect profile masks area described in another embodiment is in conjunction with the image IMG1 example of the input in t1 moment;
Figure 21 leaves standstill the t2 moment after a period of time for foreground object described in another embodiment, and prospect profile masks area is in conjunction with the example of background image data in t2 moment model;
Figure 22, be EM equipment module figure described in another embodiment;
Figure 23, be prospect profile masks area schematic diagram.
Reference numeral:
20, equipment;
201, foreground area detection module;
203, prospect profile module;
205, gradient calculation module;
207, foreground detection control module;
301, erosion profile;
302, prospect profile;
303, expansion profile.
Embodiment
By describe in detail technical scheme technology contents, structural attitude, realized object and effect, coordinate accompanying drawing to be explained in detail below in conjunction with specific embodiment.In the following description, numerous details is set forth for explanatory purposes providing the thorough understanding to one or more aspect.But it is evident that do not have these details also can put into practice this type of aspect.
Image Frame sequence described in the present invention, mainly refers to the sequence that picture frame is arranged according to time sequencing, the sequence that the video pictures that such as common video monitoring is recorded is formed.Namely sequence of image frames can make video file, also can be video flowing.It should be noted that, picture frame is also referred to as image sometimes.
Inventors herein propose and a kind of calculate contour of object mask, then by the gradient of calculating chart picture frame at contour of object masks area, and then identify foreground object and judge the method for motion state of foreground object.May be used for searching following the trail of and finding and long-time geo-stationary object occurs.
Refer to Fig. 1, described a kind ofly identify that the method step of foreground object comprises:
The image sequence of S101 to input carries out modeling process, obtains background image data;
S102 obtains next frame image IMG1, is input in above-mentioned model by described image IMG1 and calculates, for upgrading background image data and mark foreground area;
If do not have region to be noted as foreground area in the described image IMG1 of S103, then return step S102;
If have, then S104 is according to described foreground area mark prospect profile, calculates prospect profile masks area according to described prospect profile;
S105 calculates the Grad G_B1 of described background image data at described prospect profile masks area, and calculates the Grad G_IMG1 of described image IMG1 at described prospect profile masks area;
S106 judges whether G_B1 and G_IMG1 reaches the trigger condition of the determination foreground object of setting, if reach, triggers and is defined as front scenery.
Background image data in model after the corresponding input picture IMG1 of preferred G_B1, at the Grad of described prospect profile masks area, also can be the Grad of the background image data before corresponding input IMG1 at described prospect profile masks area in further embodiments.Preferably, G_IMG1 can be the Grad of correspondence image IMG1 at described prospect profile masks area, also can be the Grad of corresponding input IMG1 rear backdrop view data at described prospect profile masks area in further embodiments.
In said method step, step S101 ~ S103 Main Function is identify background image data and foreground area in the image sequence of input by modeling.Background Recognition model is set up in described being modeled as, and this model is used for identifying background and prospect, can be the model set up based on the foreground detection of moving object, also can be the model set up based on moving object and color detection.It is generally according to the background image data in the image update model of input and foreground area.In different models, described background image data is generally different.Such as, in Gaussian Background model, described background image data is the background image data of Weighted Coefficients.Weights in certain embodiments in background image data are represented by article transparency in the picture, and namely get over the object of transparency, weights are less, and static background object is opaque.Preferred described model is Gaussian Background model.Described Gaussian Background model can be the model based on single background, also can be the model based on two background, alternatively mix the model of additive method, such as color or Iamge Segmentation etc.Sequence of image frames is input in Gaussian Background model, produces the background image data of weighting according to the picture frame of input.In the background image data of weighting, the region that weights are larger, it is that the possibility of background is larger; Preferred Gaussian Background Model Background view data can be produced by following method.
B G ( x , y ) = Σ i = 1 n ( G M M _ weight n × G M M _ mean n ( x , y ) ) (formula 1)
Wherein, (x, y) is image pixel coordinates, and BG (x, y) represents that in background image data, pixel coordinate is the pixel value of the point of (x, y).N is current effective background model number, GMM_weight and GMM_mean is corresponding Model Weight and average, i.e. GMM_weight nnamely the weight of the n-th model is represented, GMM_mean n(x, y) represents the average of (x, y) pixel in 1 ~ n model.
Identify background image data and foreground area by modeling, please refer to Fig. 7 ~ 15, Fig. 7 represents the time shaft of input picture frame sequence.In the t1 moment, input next frame IMG1 is in model, and as shown in Figure 8, the region that Fig. 8 center goes out is front scenery region to IMG1.Background image data now in model is expressed as Fig. 9, and foreground area is expressed as Figure 10; White in Figure 10 and gray area represent the region that foreground object occurs, i.e. foreground area, in further embodiments, because adopt the difference of model or computing method, the foreground area obtained may be different, such as in some simple moving object foreground detection, foreground area may be represented as a rectangular area.Preferably, described prospect profile is the profile of white and gray area union.This profile delineation foreground object and its shade region under normal conditions.Should be noted that, according to actual treatment needs, the next frame described in the present invention can be the next frame in the frame sequence formed in the sampling of video sequential equal intervals.Namely record when such as original video is and waits, the frame in video is numbered 1,2,3,4,5,6,7,8,9,10 by the time sequencing that it occurs ..., interval is taken as 3, then choose Isosorbide-5-Nitrae, and 7,11 ..., namely the next frame of frame 4 is frames 7, and the next frame of frame 7 is frames 11.Also can be video sequential at equal intervals after segmentation in further embodiments, the picture frame of the random site among unit section.Such as, the time sequencing that sequence of frames of video originally occurs by it is numbered 1, and 2,3,4,5,6 ..., interval is taken as 3, be then segmented into 1 ~ 3, and 4 ~ 6,7 ~ 11 ..., select a frame as the first frame in 1 ~ 3, in 4 ~ 6 frames, select a frame as next frame.
Marking described union profile is prospect profile, and with reference to Figure 11, the profile of mark is for shown in profile A.Calculate prospect profile masks area according to the prospect profile obtained, prospect profile masks area is also referred to as prospect profile mask.In certain embodiments, as shown in figure 12, in the embodiment shown, prospect profile mask is annular region (region as in figure between profile D and profile E).Being calculated the method for prospect profile mask by prospect profile, can be different in various embodiments, and the prospect profile mask produced by distinct methods may be differentiated.Preferred described prospect profile mask can be produced by following method:
FG_mask=dilate (FG) & (~ erode (FG)) ... (formula 2)
Wherein, FG is two-value prospect, and represent prospect profile, dilate represents morphological dilations, and erode represents morphological erosion, ~ represent two-value negate, & represent two-value ask with, FG_mask represents prospect prospect profile masks area.Please refer to Figure 12, in figure, profile D is calculated according to Expanded Operators by prospect profile, and in figure, profile is that E is calculated according to erosion operator by prospect profile.Contours mask region is the region between profile D and profile E.
Dilation and erosion is to morphologic operation, be the basis of Morphological scale-space, more introductions calculated about erosion operator, corrosion calculating or expansion please refer to by Electronic Industry Press, Paul Gonzales work, the chapter 9 content of " Digital Image Processing " that Ruan Qiuqi, Ruan Yuzhi etc. translate.Please refer to Figure 23, prospect profile 302 obtains expansion profile 303 after expanding and calculating formulae discovery; Prospect profile 302 calculates after formulae discovery through corrosion and obtains erosion profile 301; Region between expansion profile 303 and erosion profile 301 and prospect profile masks area.More introductions about erosion operator please refer to the chapter 9 content of " Digital Image Processing " that Paul Gonzales is shown.
Prospect profile masks area comprises the border of foreground object, after foreground object occurs, complicated before the pictorial element in this region occurs relatively, the Grad of computed image in prospect profile masks area, the Grad before foreground object occurs be less than this object occur after Grad; Or foreground object disappear before Grad be greater than this object disappear after Grad.
Please refer to shown in Figure 13 ~ Figure 15, Figure 12 is the view of background image data in conjunction with prospect profile masks area, Figure 14 is the view of IMG1 in conjunction with prospect profile masks area, and Figure 15 is that front scenery leaves standstill the view of the background image data after a period of time in conjunction with prospect profile masks area.
Image gradient can regard two-dimensional discrete function as image, and image gradient is exactly the differentiate of this two-dimensional discrete function in fact.According to the change at the Grad of prospect profile masks area in Figure 13 ~ Figure 15, the object detecting foreground object can be reached.Due to the background mask region of different objects, and the Grad in background mask region has very large probability to be different, thus can be improved the recognition efficiency of different objects by this method, and the consistance that same object identifies in time sequencing.
Easily be identified as background after the object rest moved in single background Gauss model compared to existing technology, and can be identified as another object when moving after the static long period, this method improves the recognition efficiency of foreground object and the consistance of identification.Again because in foreground object Tracking Recognition process, extra computation is only needed to follow the tracks of the graded of prospect profile masks area, the foreground object identification comparing double-background model needs with different frequencies or the different Background From Layer data of periodic maintenance two, and this method reduces the calculating scale of data significantly.And this method just can detect foreground object by less calculating, do not need the Background From Layer by calculating multiple weighting and detect the foreground object (start time that usual weighted background moves at foreground object, weighted background can not have greatly changed), reduce the time delay that foreground object detects.
In further embodiments, in order to improve the accuracy of identification of foreground object further, on the basis of above-mentioned identification foreground area, also calculating the displacement of foreground area in setting-up time, and setting displacement threshold values.In setting-up time, if the displacement of prospect identified region exceedes setting threshold values, then judge that the object of this foreground area is kept in motion, abandon the profile marking this foreground area.With reference to figure 2.Should be noted that, in different embodiments in order to detect the foreground object of different characteristic, the displacement threshold values of its setting and the time of setting are different; Such as when following the trail of doorway, supermarket the time of moving and static shopping cart time, time of its setting can be more than 15 minutes, then can arrange the shorter time following the trail of the illegal parking on road.
In further embodiments, described " S106 judges whether G_B1 and G_IMG1 reaches the trigger condition of the determination foreground object of setting " can for judging whether the difference that G_IMG1 subtracts G_B1 is less than the first preset value.In further embodiments, described " S106 judges whether G_B1 and G_IMG1 reaches the trigger condition of the determination foreground object of setting " can for judging whether the difference that G_IMG1 subtracts G_B1 is greater than the first preset value.According to different embodiments, the first preset value can be the expression formula of a band parameter, such as x*G_B1, then Rule of judgment is G_IMG1-G_B1>x*G_B1; Wherein the value of x can be 1 or 0, and such as, when x is 0, then Rule of judgment is G_IMG1>G_B1, and when such as x is 1, then Rule of judgment is G_IMG1>0.
In further embodiments, described foreground object detection method can also be applied to and lose in object detection.Namely after judging that difference that G_IMG1 subtracts G_B1 is less than the first preset value, be judged as identifying front scenery, and the object identified in foreground area is foreground object, and to mark foreground object be lost-and-found object, also comprise step S201 in further embodiments and trigger lost-and-found object early warning (lost-and-found object early warning is also referred to as the first action).Lost-and-found object early warning can be that such as LED, hummer, computer etc., namely glimmered by LED by triggering prior-warning device, and hummer rings a sound, occurs the mode early warning such as a prompting frame in the computer picture of control center.
Please refer to Fig. 7 and Figure 16 ~ Figure 21, suppose that t1 moment object is removed, the picture IMG1 that now t1 is corresponding, the picture before comparing IMG1, in IMG1, object is removed, and leaves background, and IMG1 as shown in figure 16.For the ease of understanding, in Figure 16, identify the position of the object be removed by live width.Input picture IMG1 in the t1 moment, as shown in figure 17, the foreground area now detected in model as shown in figure 18 for the background image (i.e. image BG1) now in model.T1 moment background image data (i.e. image BG1) in conjunction with prospect profile masks area view as shown in figure 19, image IMG1 in conjunction with prospect profile masks area view as shown in figure 20.Foreground object loses the t2 moment after a period of time, background image data (i.e. image BG2) looking as shown in figure 21 in conjunction with prospect profile masks area.Being understandable that background image is is constantly update in a model, and for the different t2 moment, background image is different, and namely BG2 is different.
In order to improve the accuracy of the detection of lost-and-found object further, when mark foreground object is lost-and-found object, also start a timer, timer loses object according to difference and place sets different overtime threshold.From mark foreground object is lost-and-found object, then after the time threshold values of setting, loses object if detect and return, then cancel the lost-and-found object of mark.In further embodiments, if also trigger lost-and-found object early warning after mark foreground object is lost-and-found object; After detecting that losing object returns, cancel lost-and-found object early warning, or also send the action recalling lost-and-found object early warning.
Preferably, with reference to figure 3, the method that detection lost-and-found object has returned can be: after triggering lost-and-found object early warning and after the time of setting,
S211 continues obtain next frame image IMG2 and calculate the Grad G_IMG2 of this image IMG2 at described prospect profile masks area;
S212 judges that described G_IMG2 subtracts G_B1 and whether is less than the second preset value, if be greater than, S222 cancels lost-and-found object early warning, otherwise S221 triggers lost-and-found object alarm (lost-and-found object alarm is also referred to as the second action).
Be understandable that, also can upgrade background image model with IMG2, calculate the Grad G_B2 of the background image data after upgrading at described prospect profile masks area; And judge that described G_B2 subtracts G_B1 and whether is less than the second preset value, if be greater than, cancel lost-and-found object early warning, otherwise trigger lost-and-found object alarm.
Preferably, described second preset value can be 0, when namely judging G_IMG2<G_B1, triggers lost-and-found object alarm.
Be understandable that, with reference to figure 4, the method that detection lost-and-found object has returned also can be after the early warning of triggering lost-and-found object and in the time T of setting, and continuous calculating next frame image IMGx is at the Grad G_IMGx of described prospect profile masks area; Judge whether G_IMGx-G_B1 is less than the second preset value, in the time T of setting, if G_IMGx-G_B1 is more than or equal to the second preset value, cancel lost-and-found object early warning, otherwise after the time T of described setting, trigger lost-and-found object and report to the police.Be understandable that the value of x is 2 ~ n, namely G_IMGx can be G_IMG2, G_IMG3, G_IMG4 etc., but in the method, the value of x increases progressively.
In certain embodiments, before mark, scenery is after lost-and-found object, also obtains the picture frame after IMG1, is input in described background model by described picture frame and calculates the background image data after renewal;
The method that detection lost-and-found object has returned also can be after triggering lost-and-found object early warning and within the time of setting, continuous acquisition next frame image IMGx, the picture frame IMGx of acquisition is input in described background model and upgrades background image data, and calculate the Grad G_IMGx of background image at prospect profile masks area; In the time T of setting, judge whether the value of described G_IMGx-G_B1 is greater than the second preset value, if be greater than, cancelling the front scenery of mark is lost-and-found object, otherwise after the time T of described setting, triggers the second action.
Should be noted that in described method of the present invention, picture frame is inputted in described background model always and calculate and upgrade background image data, in the process upgrading background image data, if identify foreground area, then determine that front scenery is lost-and-found object by above-mentioned steps, and confirm further.
Second action can be trigger lost-and-found object alarm device.
In further embodiments, see Fig. 5, described foreground object detection method can also be applied to be left in object detection.Namely after judging that difference that G_IMG1 subtracts G_B1 is greater than the 3rd preset value, represent that the object in foreground area is foreground object, and object is legacy before mark, in further embodiments, also comprise step S410 and trigger legacy early warning (legacy early warning is also referred to as the 3rd action).
See Fig. 5, when object is legacy before mark, can also start a timer, timer leaves over object according to difference and place sets different overtime threshold.From object before mark is legacy, again after the time threshold values of setting, object is left over removed if detect, then cancel the legacy of mark, in further embodiments, if also trigger legacy early warning after mark legacy, then cancel legacy early warning or send the action of surveying and drawing legacy early warning.
Preferably, the method detecting legacy removed can be: after triggering legacy early warning and after the time of setting,
S411 continues obtain next frame image IMG2 and calculate the Grad G_IMG2 of this image IMG2 at described prospect profile masks area;
S412 judges that described G_IMG2 subtracts G_B1 and whether is less than the 4th preset value, if be less than, S430 cancels legacy early warning, otherwise S420 triggers legacy alarm (legacy alarm is also referred to as the 4th action).
Be understandable that, also can constantly update background image model, and after triggering legacy early warning and after the time of setting, obtain image IMG2, upgrade background image model by IMG2, calculate the Grad G_B2 of the background image data after upgrading at described prospect profile masks area; And by judging that described G_B2 subtracts G_B1 and whether is less than the 4th preset value, if be less than, cancelling legacy early warning, otherwise triggering legacy alarm.
Be understandable that, see Fig. 6, detecting the removed method of legacy also can be after triggering lost-and-found object early warning and within the time of setting, constantly calculates the Grad G_IMGx of this next frame image at described prospect profile masks area; Judge whether G_IMGx-G_B1 is less than the 4th preset value, if G_IMGx-G_B1 is less than the 4th preset value, cancel legacy early warning, otherwise after the time through described setting, trigger legacy and report to the police.
Be understandable that, in one embodiment, can confirm legacy further by following step method, these steps comprise,
Obtain the picture frame after IMG1, described picture frame is input in described background model and calculates the background image data after renewal; Be lost-and-found object at scenery before mark and after the time of setting, obtain next frame image IMG2, upgrade background image data with IMG2, calculating the Grad G_B2 of the background data after upgrading at described prospect profile masks area; Judge whether the value of described G_B2-G_B1 is less than the 4th preset value, if be less than, cancelling the front scenery of mark is legacy, if the difference of G_B2-G_B1 is greater than the 4th preset value, then triggers the 4th action.
In one embodiment, legacy can be confirmed further by following step method:
These steps comprise, and obtain the picture frame IMG2 after IMG1, are input in described background model by described picture frame IMG2 and calculate the background image data after renewal; Calculate the Grad G_B2 of the background data after upgrading at described prospect profile masks area; Judge whether the value of described G_B2-G_B1 is less than the 4th preset value, if be less than, cancelling the front scenery of mark is legacy, otherwise the picture frame after continuing to obtain; The picture frame IMGx of acquisition is input in described background model and upgrades background image data, and calculate the Grad G_Bx of background image at prospect profile masks area, until through the time of setting, if the difference of G_Bx-G_B1 is all not more than the 4th preset value, then trigger the 4th action.
Also the first action can be claimed for convenience of description to be lost-and-found object early warning action, and the second action is lost-and-found object actuation of an alarm, and the 3rd action is legacy early warning action, and the 4th action is legacy actuation of an alarm.In certain embodiments such as at the sales counter of valuables, when finding that the object on cabinet face disappears, namely when judging that G_IMG1-G_B1 is less than the first preset value, lost-and-found object early warning can be triggered, first action can be warning light flicker etc., also can be the cue that related personnel knows, when after the time by presetting, such as, after 2 minutes, by comparing G_IMGx and G_B1 or determining that the object in cabinet face disappears by comparing G_Bx and G_B1 (comparison procedure is with reference to the aforementioned method mentioned), then trigger the second alarm action, second alarm action can be buzzer call etc.First action in certain embodiments and the second action can complete by same panalarm, such as, when triggering the first action, report to the police to wait and glimmer at a slow speed, and when triggering the second action, alarm lamp adopts than above-mentioned speed flicker faster of glimmering at a slow speed.Be understandable that, the 3rd action and similar first action of the 4th action and the second action.Be understandable that warning device and prior-warning device can be that such as LED, hummer, computer etc., namely glimmered by LED, hummer rings a sound, occurs mode early warning or the warnings such as a prompting frame in the computer picture of control center.
Inventor also provides a kind of foreground detection equipment, for realizing said method.Please refer to Figure 22, described equipment 20 comprises foreground area detection module 201, prospect profile module 203, gradient calculation module 205, foreground detection control module 207;
Described foreground area detection module 201, for carrying out modeling process to the image sequence of input, obtains background image data and foreground area.
Described prospect profile module 203 for marking prospect profile according to the foreground area obtained, then calculates prospect profile masks area according to described prospect profile;
Described gradient calculation module 205 is for calculating the Grad of Given Graph picture in given area;
Described foreground detection control module 207 is for judging the numerical value change of the Grad of prospect profile masks area, if numerical value change reaches setting trigger condition, then triggers and judges that the object of foreground area is foreground object.
It should be noted that, the present invention is not limited to use existing background modeling method, and what background modeling method in the future can also be used to calculate arrives background data and foreground area.
In other preferred embodiments, described foreground area detection module 201 calculates for the image sequence of input being input to Gaussian Background model, obtains background image data and foreground area.
In further embodiments, described gradient calculation module for calculating the Grad G_B1 of background image data at described prospect profile masks area, and calculates the Grad G_IMG1 of described image IMG1 at described prospect profile masks area;
Described foreground detection control module is for judging the difference of G_IMG1 and G_B1 numerical value, if difference reaches first when arranging trigger condition, triggers lost-and-found object early warning.
In further embodiments, described picture frame IMG2, for the picture frame IMG2 after obtaining IMG1, is input in described background model and calculates the background image data after renewal by described foreground detection control module; Calculate the Grad G_B2 of the background data after upgrading at described prospect profile masks area; Judge whether the value of described G_B2-G_B1 is greater than the second preset value, if be greater than, cancelling the front scenery of mark is lost-and-found object, otherwise the picture frame after continuing to obtain; The picture frame IMGx of acquisition is input in described background model and upgrades background image data, and calculate the Grad G_Bx of background image at prospect profile masks area, until through the time of setting, if the difference of G_Bx-G_B1 is all less than the second preset value, then trigger the second action.
In further embodiments, described second action is trigger alarm device.
In further embodiments, described prospect quality testing surveys control module for the picture frame after obtaining IMG1, is input in described background model by described picture frame and calculates the background image data after renewal; Be lost-and-found object at scenery before mark and after the time T of setting, obtain next frame image IMG2, upgrade background image data with IMG2, calculating the Grad G_B2 of the background data after upgrading at described prospect profile masks area; Judge whether the value of described G_B2-G_B1 is less than the second preset value, if be more than or equal to, cancelling the front scenery of mark is lost-and-found object, if the difference of G_B2-G_B1 is all less than the second preset value, then triggers the second action.In further embodiments, described picture frame, for the picture frame after obtaining IMG1, is input in described background model and calculates the background image data after renewal by described foreground detection control module; Be after lost-and-found object at scenery before mark and after the time of setting, obtain next frame image IMG2, upgrade background image data with IMG2, calculate the Grad G_B2 of the background data after upgrading at described prospect profile masks area; Judge whether the value of described G_B2-G_B1 is greater than the second preset value, if be greater than, cancelling the front scenery of mark is lost-and-found object, otherwise then triggers the second action.
In further embodiments, described picture frame, for the picture frame after obtaining IMG1, is input in described background model and calculates the background image data after renewal by described foreground detection control module; Be after lost-and-found object at scenery before mark and after the time of setting, obtain next frame image IMG2, calculate the Grad G_IMG2 of IMG2 at described prospect profile masks area; Judge whether the value of described G_IMG2-G_B1 is greater than the second preset value, if be greater than, cancelling the front scenery of mark is lost-and-found object, otherwise then triggers the second action.
In further embodiments, the second action is trigger alarm device.
In further embodiments, described foreground detection control module judges whether the difference of G_IMG1-G_B1 is greater than the 3rd preset value, be judge that the object in foreground area is front scenery, before mark, scenery is legacy, otherwise judges the unmatched scenery of current foreground area.
In further embodiments, when described foreground detection control module judges that the difference of G_IMG1-G_B1 is greater than the 3rd preset value, also trigger the 3rd action.
In further embodiments, described 3rd action is for triggering prior-warning device.
In further embodiments, described foreground object detection method scenery before mark is after lost-and-found object, also comprises step: obtain the picture frame after IMG1, be input in described background model by described picture frame and calculate the background image data after renewal; Be lost-and-found object at scenery before mark and after the time of setting, obtain next frame image IMG2, calculating the Grad G_IMG2 of IMG2 at described prospect profile masks area; Judge whether the value of described G_IMG2-G_B1 is less than the second preset value, if be more than or equal to, cancelling the front scenery of mark is lost-and-found object, if be less than, triggers lost-and-found object actuation of an alarm.
In further embodiments, described 4th action is trigger alarm device.
In further embodiments, described picture frame IMG2, for obtaining the picture frame IMG2 after IMG1, is input in described background model and calculates the background image data after renewal by described foreground detection control module; Calculate the Grad G_B2 of the background data after upgrading at described prospect profile masks area; Judge whether the value of described G_IMG2-G_B1 is less than the 4th preset value, if be less than, cancelling the front scenery of mark is legacy, otherwise the picture frame after continuing to obtain; By the picture frame IMGx obtained, and the true IMGx of computed image is at the Grad G_IMGx of prospect profile masks area, until through the time of setting, if the difference of G_IMGx-G_B1 is all not more than the 4th preset value, then triggers the 4th action.
In further embodiments, described picture frame, for the picture frame after obtaining IMG1, is input in described background model and calculates the background image data after renewal by described foreground detection control module; Be after legacy at scenery before mark and after the time of setting, obtain next frame image IMG2, upgrade background image data with IMG2, calculate the Grad G_B2 of the background data after upgrading at described prospect profile masks area; Judge that the value of described G_B2-G_B1 is less than and the 4th preset value, if be less than, cancelling the front scenery of mark is legacy, otherwise then triggers the 4th action.
In further embodiments, it is characterized in that, described 4th action is trigger alarm device.
In further embodiments, described picture frame, for the picture frame after obtaining IMG1, is input in described background model and calculates the background image data after renewal by described foreground detection control module; Be after legacy at scenery before mark and after the time of setting, obtain next frame image IMG2, calculate the Grad G_IMG2 of IMG2 at described prospect profile masks area; Judge whether the value of described G_IMG2-G_B1 is less than the 4th preset value, if be less than, cancelling the front scenery of mark is legacy, otherwise then triggers the 4th action.
It should be noted that, in this article, the such as relational terms of first and second grades and so on is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply the relation that there is any this reality between these entities or operation or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or terminal device and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or terminal device.When not more restrictions, the key element limited by statement " comprising ... " or " comprising ... ", and be not precluded within process, method, article or the terminal device comprising described key element and also there is other key element.In addition, in this article, " be greater than ", " being less than ", " exceeding " etc. be interpreted as and do not comprise this number; " more than ", " below ", " within " etc. be interpreted as and comprise this number.
Those skilled in the art should understand, the various embodiments described above can be provided as method, device or computer program.These embodiments can adopt the form of complete hardware embodiment, completely software implementation or the embodiment in conjunction with software and hardware aspect.The hardware that all or part of step in the method that the various embodiments described above relate to can carry out instruction relevant by program has come, described program can be stored in the storage medium that computer equipment can read, for performing all or part of step described in the various embodiments described above method.Described computer equipment, includes but not limited to: personal computer, server, multi-purpose computer, special purpose computer, the network equipment, embedded device, programmable device, intelligent mobile terminal, intelligent home device, wearable intelligent equipment, vehicle intelligent equipment etc.; Described storage medium, includes but not limited to: the storage of RAM, ROM, magnetic disc, tape, CD, flash memory, USB flash disk, portable hard drive, storage card, memory stick, the webserver, network cloud storage etc.
The various embodiments described above describe with reference to the process flow diagram of method, equipment (system) and computer program according to embodiment and/or block scheme.Should understand can by the combination of the flow process in each flow process in computer program instructions realization flow figure and/or block scheme and/or square frame and process flow diagram and/or block scheme and/or square frame.These computer program instructions can being provided to the processor of computer equipment to produce a machine, making the instruction performed by the processor of computer equipment produce device for realizing the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
These computer program instructions also can be stored in can in the computer equipment readable memory that works in a specific way of vectoring computer equipment, the instruction making to be stored in this computer equipment readable memory produces the manufacture comprising command device, and this command device realizes the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
These computer program instructions also can be loaded on computer equipment, make to perform sequence of operations step on a computing device to produce computer implemented process, thus the instruction performed on a computing device is provided for the step realizing the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
Although be described the various embodiments described above; but those skilled in the art are once obtain the basic creative concept of cicada; then can make other change and amendment to these embodiments; so the foregoing is only embodiments of the invention; not thereby scope of patent protection of the present invention is limited; every utilize instructions of the present invention and accompanying drawing content to do equivalent structure or equivalent flow process conversion; or be directly or indirectly used in other relevant technical fields, be all in like manner included within scope of patent protection of the present invention.

Claims (21)

1. a foreground object detection method, is characterized in that, comprises step:
Obtain a two field picture IMG1, described image IMG1 is input in background model and calculates, upgrade background image data, and mark foreground area;
If there is not the region being marked as foreground area in described image IMG1, then continue to obtain next frame image, and based on the next frame image update background image data got and mark foreground area, if there is the region being marked as foreground area in image IMG1, then according to described foreground area mark prospect profile, calculate prospect profile masks area according to described prospect profile;
Calculate the Grad G_B1 of described background image data at described prospect profile masks area, and described image IMG1 is at the Grad G_IMG1 of described prospect profile masks area;
Whether the object judged in foreground area by G_B1 and G_IMG1 is front scenery.
2. a kind of foreground object detection method according to claim 1, is characterized in that, described prospect profile masks area is made up of the region of expanding between profile and erosion profile; Described expansion profile calculates according to prospect profile and expansion formula; Described erosion profile obtains according to prospect profile and corrosion formulae discovery.
3. a kind of foreground object detection method according to claim 1, is characterized in that, described background model is Gaussian Background model.
4. a kind of foreground object detection method according to claim 1, is characterized in that, whether the described object judged in foreground area by G_B1 and G_IMG1 is that front scenery comprises step:
Judge whether the value of G_IMG1-G_B1 is less than the first preset value, if be less than, judge that the object in foreground area is front scenery, and before mark, scenery is lost-and-found object, otherwise judge that current foreground area is without foreground object.
5. a kind of foreground object detection method according to claim 4, is characterized in that, described foreground object detection method scenery before mark is after lost-and-found object, also comprises step:
Obtain the picture frame IMG2 after IMG1, described picture frame IMG2 is input in described background model and calculates the background image data after renewal;
Calculate the Grad G_B2 of the background data after upgrading at described prospect profile masks area;
Judge whether the value of described G_B2-G_B1 is less than the second preset value, if be more than or equal to, cancelling the front scenery of mark is lost-and-found object, if be less than, and the picture frame IMGx after continuing to obtain; The picture frame IMGx of acquisition is input in described background model and upgrades background image data, and calculate the Grad G_Bx of background image at prospect profile masks area, until the time T through setting, if the difference of G_Bx-G_B1 is all less than the second preset value in T time, then trigger lost-and-found object actuation of an alarm.
6. a kind of foreground object detection method according to claim 5, is characterized in that, described foreground object detection method scenery before mark is after lost-and-found object, also comprises step:
Obtain the picture frame IMG2 after IMG1, described picture frame IMG2 is input in described background model and calculates the background image data after renewal; Calculating chart picture frame IMG2 is at the Grad G_IMG2 of described prospect profile masks area;
Judge whether the value of described G_IMG2-G_B1 is less than the second preset value, if be more than or equal to, cancelling the front scenery of mark is lost-and-found object, if be less than, and the picture frame after continuing to obtain; By the picture frame IMGx obtained, and calculating chart picture frame IMGx is at the Grad G_IMGx of prospect profile masks area, until the time T through setting, if the difference of G_IMGx-G_B1 is all less than the second preset value in T time, then triggers lost-and-found object actuation of an alarm.
7. a kind of foreground object detection method according to claim 4, is characterized in that, described foreground object detection method scenery before mark is after lost-and-found object, also comprises step:
Obtain the picture frame after IMG1, described picture frame is input in described background model and calculates the background image data after renewal;
Be lost-and-found object at scenery before mark and after the time of setting, obtain next frame image IMG2, upgrade background image data with IMG2, calculating the Grad G_B2 of the background data after upgrading at described prospect profile masks area;
Judge whether the value of described G_B2-G_B1 is less than the second preset value, if be more than or equal to, cancelling the front scenery of mark is lost-and-found object, if be less than, triggers lost-and-found object actuation of an alarm.
8. a kind of foreground object detection method according to claim 4 or 7, is characterized in that, described foreground object detection method scenery before mark is after lost-and-found object, also comprises step:
Obtain the picture frame after IMG1, described picture frame is input in described background model and calculates the background image data after renewal;
Be lost-and-found object at scenery before mark and after the time of setting, obtain next frame image IMG2, calculating the Grad G_IMG2 of IMG2 at described prospect profile masks area;
Judge whether the value of described G_IMG2-G_B1 is less than the second preset value, if be more than or equal to, cancelling the front scenery of mark is lost-and-found object, if be less than, triggers lost-and-found object actuation of an alarm.
9. a kind of foreground object detection method according to claim 1, is characterized in that, described " whether the object judged in foreground area by G_B1 and G_IMG1 is front scenery " comprises step:
Judge whether the difference of G_IMG1-G_B1 is greater than the 3rd preset value, is, judge that the object in foreground area is front scenery, before mark, scenery is legacy, otherwise judges the unmatched scenery of current foreground area.
10. a kind of foreground object detection method according to claim 9, is characterized in that, described foreground object detection method scenery before mark is after legacy, also comprises step,
Obtain the picture frame IMG2 after IMG1, described picture frame IMG2 is input in described background model and calculates the background image data after renewal;
Calculate the Grad G_B2 of the background data after upgrading at described prospect profile masks area;
Judge whether the value of described G_B2-G_B1 is less than the 4th preset value, if be less than, cancelling the front scenery of mark is legacy, otherwise the picture frame after continuing to obtain; The picture frame IMGx of acquisition is input in described background model and upgrades background image data, and calculate the Grad G_Bx of background image at prospect profile masks area, until through the time of setting, if the difference of G_Bx-G_B1 is all greater than the 4th preset value, then trigger legacy actuation of an alarm.
11. a kind of foreground object detection methods according to claim 9, is characterized in that, described foreground object detection method scenery before mark is after legacy, also comprises step:
Obtain the picture frame after IMG1, described picture frame is input in described background model and calculates the background image data after renewal;
Be legacy at scenery before mark and after the time of setting, obtain next frame image IMG2, upgrade background image data with IMG2, calculating the Grad G_B2 of the background data after upgrading at described prospect profile masks area;
Judge whether the value of described G_B2-G_B1 is less than the 4th preset value, if be less than, cancelling the front scenery of mark is legacy, otherwise triggers legacy actuation of an alarm.
12. a kind of foreground object detection methods according to claim 9, is characterized in that, described foreground object detection method scenery before mark is after legacy, also comprises step:
Obtain the picture frame after IMG1, described picture frame is input in described background model and calculates the background image data after renewal;
Be after legacy at scenery before mark and after the time of setting, obtain next frame image IMG2, calculate the Grad G_IMG2 of IMG2 at described prospect profile masks area;
Judge whether the value of described G_IMG2-G_B1 is less than the 4th preset value, if be less than, cancelling the front scenery of mark is legacy, otherwise triggers legacy actuation of an alarm.
13. a kind of foreground object detection methods according to claim 12, is characterized in that, described foreground object detection method scenery before mark is after legacy, also comprises step:
Obtain the picture frame IMG2 after IMG1, described picture frame IMG2 is input in described background model and calculates the background image data after renewal;
Calculating chart picture frame IMG2 is at the Grad G_IMG2 of described prospect profile masks area;
Judge whether the value of described G_IMG2-G_B1 is less than the 4th preset value, if be less than, cancelling the front scenery of mark is lost-and-found object, if be more than or equal to, and the picture frame after continuing to obtain; Obtain picture frame IMGx, and the true IMGx of computed image is at the Grad G_IMGx of prospect profile masks area, until the time T through setting, if the difference of G_IMGx-G_B1 is all less than in T time, cancelling the front scenery of mark is legacy, otherwise triggers legacy actuation of an alarm.
14. 1 kinds of foreground detection equipment, is characterized in that, comprise foreground area detection module, prospect profile module, gradient calculation module, prospect quality testing survey control module;
Described image IMG1, for obtaining a two field picture IMG1, is input in background model and calculates by described foreground area detection module, upgrades background image data, and marks foreground area;
If described prospect profile module is for judging there is not the region being marked as foreground area in described image IMG1, then continue to obtain next frame image, and based on the next frame image update background image data got and mark foreground area, if there is the region being marked as foreground area in image IMG1, then according to described foreground area mark prospect profile, calculate prospect profile masks area according to described prospect profile;
Described gradient calculation module is for calculating the Grad G_B1 of described background image data at described prospect profile masks area, and described image IMG1 is at the Grad G_IMG1 of described prospect profile masks area;
Whether described prospect quality testing surveys control module for the object judged in foreground area by G_B1 and G_IMG1 is front scenery.
15. a kind of foreground detection equipment according to claim 14, it is characterized in that, also comprise prospect profile masks area and obtain module, it is for obtaining prospect profile masks area, and described prospect profile masks area is made up of the region of expanding between profile and erosion profile; Described expansion profile calculates according to prospect profile and expansion formula; Described erosion profile obtains according to prospect profile and corrosion formulae discovery.
16. a kind of foreground detection equipment according to claim 14, it is characterized in that, described prospect quality testing surveys control module specifically for judging whether the difference of G_IMG1-G_B1 is less than the first preset value, if be less than, judge that the object in foreground area is front scenery, before mark, scenery is lost-and-found object, otherwise judges that current foreground area is without foreground object.
17. a kind of foreground detection equipment according to claim 16, it is characterized in that, described prospect quality testing surveys control module for the picture frame IMG2 after obtaining IMG1, is input in described background model by described picture frame IMG2 and calculates the background image data after renewal; Calculate the Grad G_B2 of the background data after upgrading at described prospect profile masks area; Judge whether the value of described G_B2-G_B1 is less than the second preset value, if be more than or equal to, cancelling the front scenery of mark is lost-and-found object, if be less than, and the picture frame IMGx after continuing to obtain; The picture frame IMGx of acquisition is input in described background model and upgrades background image data, and calculate the Grad G_Bx of background image at prospect profile masks area, until the time T through setting, if the difference of G_Bx-G_B1 is all less than the second preset value in T time, then trigger lost-and-found object actuation of an alarm.
18. a kind of foreground detection equipment according to claim 16, is characterized in that, described prospect quality testing surveys control module for the picture frame after obtaining IMG1, is input in described background model by described picture frame and calculates the background image data after renewal; Be lost-and-found object at scenery before mark and after the time T of setting, obtain next frame image IMG2, upgrade background image data with IMG2, calculating the Grad G_B2 of the background data after upgrading at described prospect profile masks area; Judge whether the value of described G_B2-G_B1 is less than the second preset value, if be more than or equal to, cancelling the front scenery of mark is lost-and-found object, if be less than, triggers lost-and-found object actuation of an alarm.
19. a kind of foreground detection equipment according to claim 14, it is characterized in that, described prospect quality testing is surveyed control module and is judged whether the difference of G_IMG1-G_B1 is greater than the 3rd preset value, judge that the object in foreground area is front scenery, before mark, scenery is legacy, otherwise judges the unmatched scenery of current foreground area.
20. a kind of foreground detection equipment according to claim 19, it is characterized in that, described prospect quality testing surveys control module for the picture frame IMG2 after obtaining IMG1, is input in described background model by described picture frame IMG2 and calculates the background image data after renewal; Calculate the Grad G_B2 of the background data after upgrading at described prospect profile masks area; Judge whether the value of described G_B2-G_B1 is less than the 4th preset value, if be less than, cancelling the front scenery of mark is legacy, otherwise the picture frame after continuing to obtain; The picture frame IMGx of acquisition is input in described background model and upgrades background image data, and calculate the Grad G_Bx of background image at prospect profile masks area, until the time T through setting, if the difference of G_Bx-G_B1 is all greater than the 4th preset value in T time, then trigger legacy actuation of an alarm.
21. a kind of foreground detection equipment according to claim 19, is characterized in that, described prospect quality testing surveys control module for the picture frame after obtaining IMG1, is input in described background model by described picture frame and calculates the background image data after renewal; Be after legacy at scenery before mark and after the time T of setting, obtain next frame image IMG2, upgrade background image data with IMG2, calculate the Grad G_B2 of the background data after upgrading at described prospect profile masks area; Judge whether the value of described G_B2-G_B1 is less than the 4th preset value, if be less than, cancelling the front scenery of mark is legacy, otherwise triggers legacy actuation of an alarm.
CN201510982581.8A 2015-12-24 2015-12-24 A kind of foreground object detection method and equipment Active CN105488542B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510982581.8A CN105488542B (en) 2015-12-24 2015-12-24 A kind of foreground object detection method and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510982581.8A CN105488542B (en) 2015-12-24 2015-12-24 A kind of foreground object detection method and equipment

Publications (2)

Publication Number Publication Date
CN105488542A true CN105488542A (en) 2016-04-13
CN105488542B CN105488542B (en) 2019-04-23

Family

ID=55675513

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510982581.8A Active CN105488542B (en) 2015-12-24 2015-12-24 A kind of foreground object detection method and equipment

Country Status (1)

Country Link
CN (1) CN105488542B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106128023A (en) * 2016-07-18 2016-11-16 四川君逸数码科技股份有限公司 A kind of wisdom gold eyeball identification foreign body leaves over alarm method and device
CN108062510A (en) * 2017-11-17 2018-05-22 维库(厦门)信息技术有限公司 Dynamic display method and computer equipment during a kind of multiple target tracking fructufy
CN108073930A (en) * 2017-11-17 2018-05-25 维库(厦门)信息技术有限公司 A kind of target detection and tracking based on multiple irregular ROI
CN111091097A (en) * 2019-12-20 2020-05-01 中国移动通信集团江苏有限公司 Method, device, equipment and storage medium for identifying remnants
US11250269B2 (en) 2019-04-18 2022-02-15 Fujitsu Limited Recognition method and apparatus for false detection of an abandoned object and image processing device
CN115439737A (en) * 2022-10-13 2022-12-06 哈尔滨市科佳通用机电股份有限公司 Railway box wagon window fault image identification method based on image restoration

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102509075A (en) * 2011-10-19 2012-06-20 北京国铁华晨通信信息技术有限公司 Remnant object detection method and device
CN102902960A (en) * 2012-09-25 2013-01-30 武汉烽火众智数字技术有限责任公司 Leave-behind object detection method based on Gaussian modelling and target contour
CN104063878A (en) * 2013-03-20 2014-09-24 富士通株式会社 Motion object detection device, motion object detection method and electronic device
US20140369552A1 (en) * 2013-06-14 2014-12-18 National Yunlin University Of Science And Technology Method of Establishing Adjustable-Block Background Model for Detecting Real-Time Image Object

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102509075A (en) * 2011-10-19 2012-06-20 北京国铁华晨通信信息技术有限公司 Remnant object detection method and device
CN102902960A (en) * 2012-09-25 2013-01-30 武汉烽火众智数字技术有限责任公司 Leave-behind object detection method based on Gaussian modelling and target contour
CN104063878A (en) * 2013-03-20 2014-09-24 富士通株式会社 Motion object detection device, motion object detection method and electronic device
US20140369552A1 (en) * 2013-06-14 2014-12-18 National Yunlin University Of Science And Technology Method of Establishing Adjustable-Block Background Model for Detecting Real-Time Image Object

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
PAOLO SPAGNOLO.ET.AL: "An Abandoned/Removed Objects Detection Algorithm and Its Evaluation on PETS Datasets", 《VIDEO AND SIGNAL BASED SURVEILLANCE, 2006. AVSS "06. IEEE INTERNATIONAL CONFERENCE ON》 *
高军: "基于视频分析的遗留及遗失物检测", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106128023A (en) * 2016-07-18 2016-11-16 四川君逸数码科技股份有限公司 A kind of wisdom gold eyeball identification foreign body leaves over alarm method and device
CN108062510A (en) * 2017-11-17 2018-05-22 维库(厦门)信息技术有限公司 Dynamic display method and computer equipment during a kind of multiple target tracking fructufy
CN108073930A (en) * 2017-11-17 2018-05-25 维库(厦门)信息技术有限公司 A kind of target detection and tracking based on multiple irregular ROI
CN108062510B (en) * 2017-11-17 2022-02-11 维库(厦门)信息技术有限公司 Multi-target tracking result real-time dynamic display method and computer equipment
US11250269B2 (en) 2019-04-18 2022-02-15 Fujitsu Limited Recognition method and apparatus for false detection of an abandoned object and image processing device
CN111091097A (en) * 2019-12-20 2020-05-01 中国移动通信集团江苏有限公司 Method, device, equipment and storage medium for identifying remnants
CN115439737A (en) * 2022-10-13 2022-12-06 哈尔滨市科佳通用机电股份有限公司 Railway box wagon window fault image identification method based on image restoration
CN115439737B (en) * 2022-10-13 2023-04-21 哈尔滨市科佳通用机电股份有限公司 Railway box car window fault image recognition method based on image restoration

Also Published As

Publication number Publication date
CN105488542B (en) 2019-04-23

Similar Documents

Publication Publication Date Title
CN105488542A (en) Method and device for foreground object detection
Cuevas et al. Labeled dataset for integral evaluation of moving object detection algorithms: LASIESTA
CN106875424B (en) A kind of urban environment driving vehicle Activity recognition method based on machine vision
CN106096577B (en) A kind of target tracking method in camera distribution map
Fuentes et al. People tracking in surveillance applications
CN104093001B (en) Online dynamic video compression method
CN110503108A (en) Architecture against regulations recognition methods and device, storage medium, computer equipment
CN109359563B (en) Real-time lane occupation phenomenon detection method based on digital image processing
CN107301375B (en) Video image smoke detection method based on dense optical flow
CN101286239A (en) Aerial shooting traffic video frequency vehicle rapid checking method
CN108985169A (en) Across the door operation detection method in shop based on deep learning target detection and dynamic background modeling
CN103093198B (en) A kind of crowd density monitoring method and device
CN104063885A (en) Improved movement target detecting and tracking method
KR101062225B1 (en) Intelligent video retrieval method and system using surveillance camera
Lian et al. A novel method on moving-objects detection based on background subtraction and three frames differencing
CN106296677A (en) A kind of remnant object detection method of double mask context updates based on double-background model
CN104112279A (en) Target detection method and device
CN110659546A (en) Illegal booth detection method and device
CN103049748B (en) Behavior monitoring method and device
Roy et al. A comprehensive survey on computer vision based approaches for moving object detection
Thomas et al. Fast approach for moving vehicle localization and bounding box estimation in highway traffic videos
JP2019121356A (en) Interference region detection apparatus and method, and electronic apparatus
CN110858392A (en) Monitoring target positioning method based on fusion background model
Zhang et al. Study on moving-objects detection technique in video surveillance system
CN113920733B (en) Traffic volume estimation method and system based on depth network

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 350108, No. 2, building 9, 7 hi tech Avenue, Fuzhou Town, Minhou County, Fujian, China

Applicant after: Fujian star net joint information system Co., Ltd.

Address before: 350108, No. 2, building 9, 7 hi tech Avenue, Fuzhou Town, Minhou County, Fujian, China

Applicant before: Fujian Star-Net Security Technology Co., Ltd.

GR01 Patent grant
GR01 Patent grant