Summary of the invention
In view of this, provide a kind of detection method of moving fixed target among the present invention on the one hand, a kind of detection system of moving fixed target is provided on the other hand, to improve the sensitivity that detects.
The detection method of moving fixed target provided by the present invention comprises:
Constantly gather the present image of monitoring area;
According to the background model of the described monitoring area of having set up that comprises fixed target, from the present image of being gathered, extract foreground target;
The foreground target that is extracted in each image is carried out real-time statistics at the number of times that same position repeats continuously, with continuous frequency of occurrence greater than the foreground target of setting threshold as the couple candidate detection zone;
To the couple candidate detection zone after the N continuous two field picture in carry out motion analysis, according to analysis result, judge whether the fixed target in the described couple candidate detection zone is removed, N is the integer greater than 1;
Described to the couple candidate detection zone after the N continuous two field picture in carry out motion analysis, according to analysis result, judge whether fixed target in this zone is removed to comprise:
To the couple candidate detection zone after the N continuous two field picture in carry out motion analysis, determine whether described couple candidate detection zone has motion to take place, if motion does not take place, then the characteristics of image in couple candidate detection zone described in the described N two field picture and the characteristics of image of background model corresponding region are compared, if the texture information dissmilarity of the two characteristics of image determines that then the fixed target in the described couple candidate detection zone is removed.
Preferably, the described number of times that the foreground target that is extracted in each image is repeated continuously at same position carries out real-time statistics and comprises:
If present image is the 1st two field picture in the present image sequence, then all foreground targets in the described present image are stored in the storage area, and the occurrence number of the described foreground target of corresponding record is 1;
If present image is not the 1st two field picture in the current sequence, then utilize shape information and/or half-tone information that the foreground target that is extracted in the foreground target that extracted in the present image and the former frame image is carried out location matches, to the position foreground target that the match is successful in former frame image and the present image, the occurrence number of described foreground target is added 1; Same position in present image in the former frame image is mated unsuccessful foreground target, described foreground target of deletion and corresponding occurrence number record from storage area; Same position in the former frame image in the present image is mated unsuccessful foreground target, described foreground target is stored in the storage area, and the occurrence number of the described foreground target of corresponding record is 1.
Preferably, described to the couple candidate detection zone after the N continuous two field picture in carry out motion analysis, according to analysis result, judge whether fixed target in this zone is removed to comprise:
Preferably, described to the couple candidate detection zone after the N continuous two field picture in carry out motion analysis, determine described couple candidate detection zone whether have the motion comprise:
Inter frame image is carried out in couple candidate detection zone corresponding in the N continuous two field picture afterwards subtract each other,, determine that then described couple candidate detection zone has motion to take place if foreground target occurred in the described zone; Otherwise, determine the generation of not moving of described couple candidate detection zone.
Preferably, described to the couple candidate detection zone after the N continuous two field picture in carry out motion analysis, determine described couple candidate detection zone whether have the motion comprise:
To after the N continuous two field picture in the grey scale change in corresponding couple candidate detection zone analyze, if intensity profile concentrates near certain value, the generation of not moving of then definite described couple candidate detection zone.
The detection system of moving fixed target provided by the present invention comprises:
Image acquisition units is used for constantly gathering the present image of monitoring area;
The foreground target extraction unit is used for the background model according to the described monitoring area of having set up that comprises fixed target, extracts foreground target from the present image of being gathered;
The candidate region determining unit, the foreground target that is used for each image is extracted carries out real-time statistics at the number of times that same position repeats continuously, with continuous frequency of occurrence greater than the foreground target of setting threshold as the couple candidate detection zone;
Target is removed judging unit, be used for to the couple candidate detection zone after the N continuous two field picture in carry out motion analysis, according to analysis result, judge whether the fixed target in this zone is removed.
Preferably, described target is removed judging unit and is comprised:
The motion analysis module, be used for to the couple candidate detection zone after the N continuous two field picture in carry out motion analysis, determine whether this couple candidate detection zone has motion to take place;
Judge module is used for determining that the fixed target in the current couple candidate detection zone is removed when the motion analysis module determines that generation is not moved in the couple candidate detection zone.
Preferably, described target is removed judging unit and is further comprised:
The characteristics of image comparison module, be used for when the motion analysis module determines that generation is not moved in the couple candidate detection zone, the characteristics of image in the zone of couple candidate detection described in the image and the characteristics of image of background model corresponding region are compared, judge whether the texture information of the two characteristics of image is similar;
When described judge module is determined the texture information dissmilarity of the two characteristics of image at described characteristics of image comparison module, determine that the fixed target in the current couple candidate detection zone is removed.
Preferably, described motion analysis module adopt frame difference method or image sequence statistic law to the couple candidate detection zone after the N continuous two field picture in carry out motion analysis.
From such scheme as can be seen, the present invention constantly gathers the present image of monitoring area, according to the background model of the described monitoring area of having set up that comprises fixed target, extracts foreground target from the present image of being gathered then; The foreground target that is extracted in each image is carried out real-time statistics at the number of times that same position repeats continuously, with continuous frequency of occurrence greater than the foreground target of setting threshold as the couple candidate detection zone, thereby finish fixed target and may be removed roughly selecting of zone, improve detection speed; Afterwards to the couple candidate detection zone after nearest tens two field pictures in carry out motion analysis and texture analysis, according to analysis result, judge whether the fixed target in this zone is removed, thereby only need to finish fixed target and may be removed the selected of zone, thereby improved the detection sensitivity whether fixed target is removed according to tens current two field pictures.
Embodiment
In the embodiment of the invention,, set up the background model that comprises fixed target according to the thought of background modeling.When fixed target was removed, present image and background model are subtracted each other a target area will occur.Therefore by detection and Identification are carried out in possible target area, and add up the number of times that repeats possible target area etc. and just can judge whether this fixed target is removed.
For making the purpose, technical solutions and advantages of the present invention clearer, below in conjunction with embodiment and accompanying drawing, the present invention is described in more detail.
Fig. 1 is the exemplary process diagram of the detection method of moving fixed target in the embodiment of the invention.As shown in Figure 1, this flow process comprises the steps:
Step 101 is constantly gathered the present image of monitoring area, obtains the image sequence of monitoring area.
Wherein, the image sequence of monitoring area can be a series of images of periodically gathering according to the time interval of setting, and gather 25 two field pictures as per second, or per second is gathered 10 two field pictures etc.
For example, Fig. 2 a to Fig. 2 d shows 4 two field pictures in the image sequence in the example, wherein, the image of the corresponding fixed target of Fig. 2 a (leaning on a potted flower of wall displacement among the figure) when not being removed, there is other moving target in image after the corresponding fixed target of Fig. 2 b to Fig. 2 d is removed among its Fig. 2 b and Fig. 2 d.
Step 102 according to the background model of this monitoring area of having set up that comprises fixed target, is extracted foreground target from the present image of being gathered.
Wherein, the extraction of the foundation of background model and foreground target can be adopted prior art or other technology.For example, the foundation of background model can be adopted methods such as Density Estimator, mixed Gauss model; The extraction of foreground target can be adopted present image and background model difference and carry out binary conversion treatment, adopts the connected domain analytic approach to obtain each foreground target afterwards.
Further, consider that the variation of surrounding environment to the influence of background model (for example, in difference constantly, the intensity of illumination possibility is different, shade length may be not equal yet), background model can be brought in constant renewal in according to environmental change, and wherein, update method also can adopt prior art.For example, can utilize the method for moving average or mixed Gauss model updating method.
For example, if set up background model based on the image shown in Fig. 2 a, after then Fig. 2 a, Fig. 2 b, Fig. 2 c and Fig. 2 d being carried out difference and binary conversion treatment with background model respectively, because Fig. 2 a is the same with background model, therefore for Fig. 2 a, can obtain a monochrome image that does not have foreground target, as all black picture (not shown); Can obtain three binary images shown in Fig. 3 a, Fig. 3 b and Fig. 3 c respectively for Fig. 2 b, Fig. 2 c and Fig. 2 d.As seen, because the background model of the relative Fig. 2 a of Fig. 2 b correspondence, be removed and many people (tentatively claiming the first) by that potted flower of wall displacement, therefore comprise two foreground targets among Fig. 3 a, promptly lean on foreground target and the corresponding the first foreground target of that potted flower of wall displacement among the corresponding diagram 2a; Because the background model of the relative Fig. 2 a of Fig. 2 c correspondence, just that potted flower by wall displacement has been removed, so includes only a foreground target among Fig. 3 b, promptly leans on the foreground target of that potted flower of wall displacement among the corresponding diagram 2a; Because the background model of the relative Fig. 2 a of Fig. 2 d correspondence, be removed and many another person (tentatively claiming second people) by that potted flower of wall displacement, therefore comprise two foreground targets among Fig. 3 c, promptly among the corresponding diagram 2a by foreground target of that potted flower of wall displacement and corresponding second people's foreground target.
Step 103 is carried out real-time statistics to the foreground target that is extracted in each two field picture at the number of times that same position repeats continuously, with continuous frequency of occurrence greater than the foreground target of setting threshold as the couple candidate detection zone.
Because after fixed target is removed, current frame image and background model are subtracted each other the back foreground area will occur in the zone that target is removed, white portion as left side among Fig. 3 a to Fig. 3 c, and should the zone can be repeatedly appearance, so can carry out real-time statistics at the number of times that same position repeats continuously to the foreground target that is extracted in each two field picture in the present embodiment.
During specific implementation, the method that the number of times that the foreground target that is extracted is repeated is continuously added up can have multiple.For example, can set in advance a database (or other storage area), if present image is the 1st two field picture in the present image sequence, then all foreground targets in the present image can be stored in the database (or other storage area), and its occurrence number of corresponding record is 1.As: suppose that above-mentioned Fig. 2 a is the 1st two field picture in the present image sequence, because it is the same with background model, therefore the foreground target that extracts from Fig. 2 a is a zero, still is empty in database this moment (or other storage area); If the above-mentioned Fig. 2 b of hypothesis is the 1st two field picture in the present image sequence, two foreground targets among Fig. 3 a then, be to lean on foreground target and the corresponding the first foreground target of that potted flower of wall displacement to be stored in the database (or other storage area) among the corresponding diagram 2a, and its occurrence number of corresponding record is 1.
If present image is not the 1st two field picture in the current sequence, then can utilize shape information and/or half-tone information that the foreground target (foreground target of being stored) that is extracted in the foreground target that extracted in the present image and the former frame image is carried out location matches, to the position foreground target that the match is successful in former frame image and the present image, its occurrence number that adds up is about to its occurrence number and adds 1; Same position in present image in the former frame image is mated unsuccessful foreground target, this foreground target of deletion and corresponding occurrence number record thereof from database (or other storage area); Same position in the former frame image in the present image is mated unsuccessful foreground target, this foreground target is stored in the database (or other storage area), and its occurrence number of corresponding record is 1.Afterwards, constantly with occurrence number greater than the foreground target of setting threshold surveyed area as the candidate.As: suppose that above-mentioned Fig. 2 b is the 1st two field picture in the present image sequence, then according to aforementioned analysis, comprise two foreground targets in database this moment (or other storage area), promptly lean on foreground target and the corresponding the first foreground target of that potted flower of wall displacement among the corresponding diagram 2a.This moment is if hypothesis Fig. 2 c is the 2nd two field picture in the present image sequence, it is non-the 1st two field picture, then with the foreground target that is extracted in the present image, it is the foreground target that leans on that potted flower of wall displacement among the corresponding diagram 2a, with the foreground target that is extracted in the former frame image, when promptly carrying out location matches by the foreground target of that potted flower of wall displacement and corresponding the first foreground target among the corresponding diagram 2a that is stored, obtain leaning among the corresponding diagram 2a that the match is successful of position in former frame image and the present image foreground target of that potted flower of wall displacement, therefore will add 1 to occurrence number that should foreground target, obtain 2; Because there is not corresponding the first foreground target in the foreground target in the present image, and this foreground target of existence in the former frame image, make that the location matches of this foreground target is unsuccessful, therefore foreground target corresponding the first in the database and occurrence number record thereof are deleted.Promptly only there is a foreground target in the database this moment, promptly lean on the foreground target of that potted flower of wall displacement among the corresponding diagram 2a, and its occurrence number is 2.At this moment, suppose that Fig. 2 d is the 2nd two field picture in the present image sequence, it is non-the 1st two field picture, then with the foreground target that is extracted in the present image, be by foreground target of that potted flower of wall displacement and corresponding second people's foreground target among the corresponding diagram 2a, with the foreground target that is extracted in the former frame image, when promptly carrying out location matches by the foreground target of that potted flower of wall displacement among the corresponding diagram 2a that is stored, obtain leaning among the corresponding diagram 2a that the match is successful of position in former frame image and the present image foreground target of that potted flower of wall displacement, therefore will add 1 to occurrence number that should foreground target, obtain 3; Again because also there is corresponding second people's foreground target in the foreground target in the present image, and there is not this foreground target in the former frame image, make that the location matches of this foreground target is unsuccessful, therefore the foreground target with second people of the correspondence in the present image stores in the database (or other storage area), and its occurrence number of corresponding record is 1.The foreground target of the storage foreground target of corresponding former frame always in the recursion successively, database (or other storage area), and the foreground target of corresponding fixed target can occur continuously, makes its occurrence number to add up successively.Therefore, can be with continuous frequency of occurrence greater than the foreground target of setting threshold as the couple candidate detection zone.
Step 104, to the couple candidate detection zone after the N continuous two field picture in carry out motion analysis, according to analysis result, judge whether the fixed target in this zone is removed.Wherein, N is the integer greater than 1.
During specific implementation, can determine that whether this couple candidate detection zone has motion to take place, if motion does not take place, can determine that then the fixed target in this zone is removed according to analysis result.
In this step, the method for the couple candidate detection zone being carried out motion analysis can have multiple.For example, can adopt frame difference method or image sequence statistic law etc.
Wherein, frame difference method is about to two adjacent two field pictures and subtracts each other, there is the zone of a large amount of motions because significant change takes place in the position, significant change will appear in its gray scale, will become new foreground target after subtracting each other, be the target that the gray scale difference is formed greater than the pixel of certain threshold value, promptly the zone that moves has just been represented in the foreground target zone.In this step, can carry out inter frame image to couple candidate detection zone corresponding in the ensuing N two field picture and subtract each other,, determine that then this couple candidate detection zone has motion to take place if should foreground target occur in the zone; Otherwise, determine the generation of not moving of this couple candidate detection zone.
The image sequence statistic law is that the grey scale change of appointed area in one section image sequence is analyzed, if should not move in the zone, the distribution of gray scale is concentrated near certain value so, otherwise will present the distribution of dispersion.In this step, can analyze the grey scale change that obtains corresponding couple candidate detection zone in ensuing one section image sequence behind the couple candidate detection zone (image sequence of forming as image sequence or every N two field picture of per second correspondence), whether judge has motion to take place in this zone, if should all there not be motion zone most of the time in a period of time, then determine the generation of not moving of this couple candidate detection zone; Otherwise, determine that this couple candidate detection zone has motion to take place.
During specific implementation, because may appearring with the variation of environment in image, whole brightness changes, the situation that some zones that do not have fixed target to be removed are set to the couple candidate detection zone may appear in this moment, therefore in the present embodiment, when motion does not take place in definite couple candidate detection zone in the step 104, can compare the characteristics of image in this couple candidate detection zone in the image and the characteristics of image of background model corresponding region further, if the texture information of the two characteristics of image is similar, then exclude this couple candidate detection zone; If the texture information dissmilarity of the two characteristics of image can determine that then the fixed target in this zone is removed.
More than the detection method of moving fixed target in the embodiment of the invention is described in detail, again the detection system of moving fixed target in the embodiment of the invention is described in detail below.
Fig. 4 is the exemplary block diagram of the detection system of moving fixed target in the embodiment of the invention.As shown in Figure 4, this system comprises: image acquisition units, foreground target extraction unit, candidate region determining unit and target are removed judging unit.
Wherein, image acquisition units is used for constantly gathering the present image of monitoring area, obtains the image sequence of monitoring area.
The foreground target extraction unit is used for the background model according to this monitoring area of having set up that comprises fixed target, extracts foreground target from the present image that image acquisition units is gathered.
The foreground target that the candidate region determining unit is used for each two field picture is extracted carries out real-time statistics at the number of times that same position repeats continuously, with continuous frequency of occurrence greater than the foreground target of setting threshold as the couple candidate detection zone.
Target remove judging unit be used for to the couple candidate detection zone after the N continuous two field picture in carry out motion analysis, according to analysis result, judge whether the fixed target in this zone is removed.
During specific implementation, the inner structure that target is removed judging unit can have multiple way of realization, and wherein a kind of inner structure synoptic diagram can comprise as shown in Figure 5: motion analysis module and judge module.
Wherein, the motion analysis module be used for to the couple candidate detection zone after the N continuous two field picture in carry out motion analysis, determine whether this couple candidate detection zone has motion to take place.
Judge module is used for determining that the fixed target in the current couple candidate detection zone is removed when the motion analysis module determines that generation is not moved in the couple candidate detection zone.
In addition, target another inner structure synoptic diagram of removing judging unit can comprise as shown in Figure 6: motion analysis module, characteristics of image comparison module and judge module.
Wherein, the motion analysis module be used for to the couple candidate detection zone after the N continuous two field picture in carry out motion analysis, determine whether this couple candidate detection zone has motion to take place.
The characteristics of image comparison module is used for when the motion analysis module determines that generation is not moved in the couple candidate detection zone, the characteristics of image in this couple candidate detection zone in the image and the characteristics of image of background model corresponding region are compared, judge whether the texture information of the two characteristics of image is similar.
Judge module is used for determining that the fixed target in the current couple candidate detection zone is removed when the characteristics of image comparison module is determined the texture information dissmilarity of the two characteristics of image.
Wherein, consistent with the description in the method shown in Figure 1, when the motion analysis module is carried out motion analysis to the couple candidate detection zone, also can adopt methods such as frame difference method or image sequence statistic law to carry out.
Above-described specific embodiment; purpose of the present invention, technical scheme and beneficial effect are further described; institute is understood that; the above only is preferred embodiment of the present invention; be not to be used to limit protection scope of the present invention; within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.