CN103136534A - Method and device of self-adapting regional pedestrian counting - Google Patents

Method and device of self-adapting regional pedestrian counting Download PDF

Info

Publication number
CN103136534A
CN103136534A CN2011103870031A CN201110387003A CN103136534A CN 103136534 A CN103136534 A CN 103136534A CN 2011103870031 A CN2011103870031 A CN 2011103870031A CN 201110387003 A CN201110387003 A CN 201110387003A CN 103136534 A CN103136534 A CN 103136534A
Authority
CN
China
Prior art keywords
pedestrian
sample
counting
model
video image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2011103870031A
Other languages
Chinese (zh)
Inventor
黄磊
李静雯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hanwang Technology Co Ltd
Original Assignee
Hanwang 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 Hanwang Technology Co Ltd filed Critical Hanwang Technology Co Ltd
Priority to CN2011103870031A priority Critical patent/CN103136534A/en
Publication of CN103136534A publication Critical patent/CN103136534A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides a method and a device of self-adapting regional pedestrian counting, wherein the method and the device are used for counting pedestrians in images. The method comprises a classifier training step, a pedestrian counting step, a sample extracting step and a parameter updating step, wherein the classifier training step is used for training a counting model based on video images which are collected in advance and are used for pedestrian samples and non-pedestrian samples, and a classifier used for pedestrian counting and based on the counting model is obtained; the pedestrian counting step is used for obtaining a current video image frame, and the classifier is adopted for counting pedestrians in the current video image frame; the sample extracting step is used for extracting the pedestrian samples and the non-pedestrian samples in the current video image frame, and pedestrian samples meeting predetermined conditions and non-pedestrian samples meeting the predetermined conditions in the extracted pedestrian samples and the extracted non-pedestrian samples are cached; and the parameter updating step is used for updating the counting model by means of the cached pedestrian samples and the cached non-pedestrian samples when updating conditions are met. The method and the device of self-adapting regional pedestrian counting can adjust parameters of the classifier in real time, effectively improves system adaptability, and avoids repeated off-line training.

Description

Adaptive regional pedestrian counting method and device
Technical field
The present invention relates to Digital Image Processing and based on the area of pattern recognition of computer vision, particularly a kind of adaptive regional pedestrian counting method and device.
Background technology
People counting system based on computer vision can process the video data of magnanimity by computer automatic analysis, greatly reduced staff's workload, realizes the crowd's traffic statistics to the public place.
Existing video pedestrian number system is all without the online adaptive learning functionality.Mainly be divided into two kinds of main stream approach: 1) based on the people counting algorithm of pedestrian detection and tracking.For example: can pass through the off-line training sorter, in the detection video image, pedestrian head or head shoulder are realized people counting; Or for crowded crowd, follow the tracks of the crowd with the method that group is followed the tracks of, solve and block with the infull problem of motion segmentation to realize people counting.2) based on the people counting algorithm of function regression.For example: utilize dynamic texture model to cut apart the moving region, and utilize Gaussian process match number, can process simultaneously the crowd of a plurality of direction of motion; Or extract image edge direction feature and foreground blocks histogram feature, and the relation between off-line learning feature and pedestrian's number, the neural network classifier that obtains supervision is realized people counting.
But, the existing method that mostly adopts statistical learning based on the number counting algorithm of video, the collected offline great amount of samples adopts training classifier to realize pedestrian or crowd's detection, perhaps adopts Regression Model Simulator pedestrian number.In the quality of such algorithm performance and training process, whether sample is complete closely bound up.Yet in reality, monitoring scene is different, and the pedestrian in scene varies, and can not collect complete sample set, and when larger, the accuracy of counting also reduces greatly when training set and test set difference.
Summary of the invention
For improving video population number meter number system to the adaptive faculty of many scenes, improve the accuracy of counting, the invention provides a kind of regional pedestrian counting method and device that possesses the online adaptive learning functionality, adopt the method to carry out regional people counting, scene is adaptable, and it is more accurate to count.
The invention provides a kind of adaptive regional pedestrian counting method, be used for the pedestrian of video image is counted, comprise: the sorter training step, be used for the video image as pedestrian's sample and non-pedestrian's sample that gathers based in advance, training counting model obtains the sorter that is used for people counting based on this counting model; The people counting step is used for obtaining the current video image frame, and adopts described sorter that the pedestrian in the current video image frame is counted; The sample extraction step is used for extracting pedestrian's sample and non-pedestrian's sample in the current video image frame, and satisfies pedestrian's sample and non-pedestrian's sample of predetermined condition in pedestrian's sample of extracting of buffer memory and non-pedestrian's sample; The parameter step of updating is used for adopting pedestrian's sample and the described counting model of non-pedestrian's Sample Refreshment of buffer memory when satisfying update condition, and upgrades the sorter based on the counting model after upgrading, and jumps to the people counting step.
The present invention also provides a kind of adaptive regional people counting device, be used for the pedestrian of video image is counted, comprise: the sorter training unit, be used for the video image as pedestrian's sample and non-pedestrian's sample that gathers based in advance, training counting model obtains the sorter that is used for people counting based on this counting model; The people counting unit is used for obtaining the current video image frame, and adopts described sorter that the pedestrian in the current video image frame is counted; The sample extraction unit is used for extracting pedestrian's sample and non-pedestrian's sample in the current video image frame, and satisfies pedestrian's sample and non-pedestrian's sample of predetermined condition in pedestrian's sample of extracting of buffer memory and non-pedestrian's sample; The parameter updating block is used for adopting pedestrian's sample and the described counting model of non-pedestrian's Sample Refreshment of buffer memory when satisfying update condition, and upgrades the sorter based on the counting model after upgrading.
The present invention adopts and counts in conjunction with pedestrian's movable information feasible region pedestrian detection based on the Bayes classifier of gauss hybrid models, on-line automatic collection high confidence level sample of while, adjust in real time classifier parameters, effectively improved the adaptability of system to scene, improved the accuracy of counting.
Description of drawings
Fig. 1 is the process flow diagram of the adaptive regional pedestrian counting method of the embodiment of the present invention.
Fig. 2 illustrates the system flowchart of the application region pedestrian counting method of the embodiment of the present invention.
Fig. 3 is the LBP textural characteristics computing method of the embodiment of the present invention.
Fig. 4 is the schematic diagram of the perspective model of the embodiment of the present invention.
Fig. 5 is the high confidence level pedestrian of the embodiment of the present invention and the figure of non-pedestrian's sample instance.
Fig. 6 is the gauss hybrid models parameter online adaptive learning process figure of the embodiment of the present invention.
Fig. 7 is the schematic diagram of the adaptive regional people counting device of the embodiment of the present invention.
Embodiment
The present invention adopts based on the Bayes classifier of gauss hybrid models (Gaussian Mixture Model, GMM) and detects pedestrian target in video image as the basic classification device.At first extract a large amount of pedestrian's samples that gather in advance and the gradient local binary pattern feature (Gradient-Local Binary Patterns, G-LBP) of non-pedestrian's sample, training obtains initial Bayes classifier.In conjunction with pedestrian's movable information, this sorter can be realized preliminary pedestrian detection tally function; Simultaneously, according to pedestrian and non-pedestrian's characteristic, set corresponding rule at line drawing high confidence level sample; When carrying out regional people counting for special scenes, feature in conjunction with the high confidence level sample of Real-time Collection, the present invention has designed the parameter of a cover update scheme real-time update gauss hybrid models, and the raising system adaptive ability to special scenes further improves the people counting accuracy.
Fig. 1 is the process flow diagram of the adaptive regional pedestrian counting method of the embodiment of the present invention.Adaptive regional pedestrian counting method of the present invention is used for the pedestrian of image is counted, as shown in Figure 1, sorter training step (step S1), be used for the video image as pedestrian's sample and non-pedestrian's sample that gathers based in advance, training counting model obtains the sorter that is used for people counting based on this counting model; People counting step (step S2) is used for obtaining the current video image frame, and adopts described sorter that the pedestrian in the current video image frame is counted; Sample extraction step (step S3) is used for extracting pedestrian's sample and non-pedestrian's sample in the current video image frame, and satisfies pedestrian's sample and non-pedestrian's sample of predetermined condition in pedestrian's sample of extracting of buffer memory and non-pedestrian's sample; Parameter step of updating (step S4) is for adopt pedestrian's sample and the described counting model of non-pedestrian's Sample Refreshment of buffer memory when satisfying update condition.
For describing the technical scheme in Fig. 1 in detail, existing system flowchart in conjunction with the application regional pedestrian counting method of the present invention shown in Fig. 2 is set forth from the training of preliminary classification device, real-time people counting, online adaptive study three parts.The partial content of the following stated is for the understanding that is beneficial to technical scheme and integrality and describe; be not that the technical matters institute that solves that the present invention proposes is essential; and; the part embodiment of the following stated and the formula that wherein relates to, algorithm etc. are not for limiting the present invention; those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
In an embodiment of the present invention, the training of preliminary classification device comprises sample collection, feature extraction and three steps of sorter training.
Relate to sample collection, in an embodiment of the present invention, choose pedestrian's number of samples more than or equal to 10000, non-pedestrian's number of samples is 5~10 times of pedestrian's number of samples, and with the size normalization to 32 of samples pictures * 80.
Relate to feature extraction, one embodiment of the invention is extracted gradient local binary pattern feature (the Gradient-Local Binary Patterns of pedestrian's sample and non-pedestrian's sample, G-LBP), this feature calculation Simple fast can satisfy basic classification demand and real-time demand.Feature class seemingly for G-LBP feature extracting method and existing LBP (Local Binary Patterns), difference is that at first this feature extract the gradient map of image, extract again the LBP feature of this gradient map, thereby can obtain better sample classification effect.
The present invention adopts the gradient image that obtains of Sobel gradient operator, and computing formula is:
Δxf(x,y)=f(x-1,y+1)+2f(x,y+1)+f(x+1,y+1)-f(x-1,y-1)-2f(x,y-1)-f(x+1,y-1)
(1)
Δyf(x,y)=f(x-1,y-1)+2f(x-1,y)+f(x-1,y+1)-f(x+1,y-1)-2f(x+1,y)-f(x+1,y+1)
(2)
G[f(x,y)]=|Δxf(x,y)|+|Δyf(x,y)| (3)
Wherein, G[f (x, y)] be the gradient expression formula, f (x, y) is that in image, coordinate is the pixel gray-scale value of (x, y).
The LBP feature utilizes binary mode to represent comparative result by the size of grey scale pixel value in each pixel in movement images and its neighborhood, and then the texture of Description Image.The advantage that the LBP feature is outstanding is insensitive to the target grey scale change and calculates simply rapidly, satisfies the requirement of real-time of Video processing.LBP textural characteristics computing method as shown in Figure 3.
Wherein, the regional area of pixel is described with (P, R), and centered by R, pixel is adjacent the distance of pixel, has reflected texture resolution spatially, and P is the number of neighborhood territory pixel.Can obtain the texture description of target by different P, see formula (4):
LBP P , R ( y c ) = Σ p = 0 p - 1 s ( g p - g c ) 2 p ( 4 )
s ( x ) = 1 x &GreaterEqual; th 0 x < th
G in formula cExpression central point y cGray-scale value, g pExpression is with y cCentered by point, radius be the gray-scale value of p Along ent on the annulus of R.Th is the threshold value that arranges in order to alleviate noise and local gray level variable effect.The present invention selects P=8, R=1, and th=1 calculates the G-LBP feature on gradient map.
Relate to the sorter training, one embodiment of the invention adopts the Bayes classifier based on gauss hybrid models to detect the pedestrian in video image, and after pedestrian's sample that this sorter utilization is collected and non-pedestrian's sample extraction G-LBP feature, the training mixed Gauss model obtains.Bayes classifier of the present invention is not limited to adopt gauss hybrid models, also can be based on the Bayes classifier of single Gauss model; And the feature of training Gauss model also is not limited to the G-LBP feature, also can be by LBP feature or other the suitable features of training Gauss models of extracting pedestrian's sample and non-pedestrian's sample.
Gaussian density function is a kind of very important continuous probability distribution function, can be divided into single Gauss model and gauss hybrid models (Gaussian Mixture Model, GMM) two classes.Gauss hybrid models possesses a plurality of single Gaussian distribution characterized clarifications of objective, can be similar to smoothly the Density Distribution of arbitrary shape.If GMM is comprised of M single Gaussian distribution, these Gaussian distribution linearities add and have just formed together the probability density function of GMM, the GMM probability density function of formula (5) expression data x:
p ( x | &mu; , &Sigma; ) = &Sigma; i = 1 M &pi; i N i ( x | &mu; i , &Sigma; i ) - - - ( 5 )
Wherein, μ, ∑ are the parameters (average, variance) of GMM, N i(x| μ i, ∑ i) represent i Gaussian distribution in GMM, specifically suc as formula shown in (6), d is the dimension of x, μ i, ∑ iRespectively average and the variance of this Gaussian distribution, π iIt is this gaussian density shared weight in GMM.Pedestrian's sample that will calculate by formula (1) to (4) and the G-LBP feature of non-pedestrian's sample be as in x substitution formula (5), can obtain corresponding to described pedestrian's sample and non-pedestrian's sample GMM probability density distribution situation.
N i ( x | &mu; i , &Sigma; i ) = 1 ( 2 &pi; ) d | &Sigma; i | exp [ - 1 2 ( x - &mu; i ) T &Sigma; i - 1 ( x - &mu; i ) ] - - - ( 6 )
In the sorter training stage, extract the G-LBP feature of all pedestrian's samples and non-pedestrian's sample, all pedestrian's samples are used for the GMM of training pedestrian sample, establish to comprise N posIndividual Gaussian distribution; In like manner, training comprises N negThe GMM of non-pedestrian's sample of individual Gaussian distribution.Those skilled in the art can arrange above-mentioned N voluntarily according to actual conditions posAnd N negSize.Training GMM is mainly the parameter that obtains the model of Bayes classifier, and maximum (Expectation Maximum, the EM) algorithm of existing expectation is a kind of algorithm of estimating the GMM parameter.The EM algorithm is initiation parameter at first, usually adopts the K means clustering algorithm to sample clustering, obtains average and the variance of initial GMM Gaussian distribution; E-step calculates the expectation of recessive variable according to the model parameter of initial model parameter or back, M-step maximizes the log likelihood function to the expectation of recessive variable, recomputate model parameter, and repeat this two steps, until the objective function convergence, the parameter μ of each single Gauss model in the final like this GMM that obtains i, ∑ i
Bayes classifier discrimination formula based on gauss hybrid models is as follows:
When Bayes classifier satisfies p (x| μ pos, ∑ pos)>p (x| μ neg, ∑ neg) time, namely sample is expert at the mankind's posterior probability density greater than the posterior probability density of non-pedestrian's class, and sample belongs to pedestrian's sample;
When Bayes classifier satisfies p (x| μ pos, ∑ pos)≤p (x| μ neg, ∑ neg) time, namely the be expert at mankind's posterior probability density of sample is less than or equal to sample in the posterior probability density of non-pedestrian's class, and sample belongs to non-pedestrian's sample;
μ wherein pos, ∑ pos, μ neg, ∑ negRespectively the GMM parameter of pedestrian's sample class and the GMM parameter of non-pedestrian's sample class, p (x| μ pos, ∑ pos), p (x| μ neg, ∑ neg) see formula (5).
The present invention adopts based on the Bayes classifier of gauss hybrid models and realizes video line people detection counting.In an embodiment of the present invention, in real time people counting comprises that foreground extraction and sliding window search for this two steps.
Relate to foreground extraction, at first, one embodiment of the invention adopt the Gaussian Mixture background modeling to obtain the background area, and obtaining of background area can be passed through existing techniques in realizing, repeats no more herein; Next, background area and present frame are compared, as shown in formula (7), obtain the present frame foreground area to obtain pedestrian's movable information.
I fore ( x , y ) = 1 | I ( x , y ) - I back ( x , y ) | &GreaterEqual; TH 2 0 | I ( x , y ) - I back ( x , y ) | < Th 2 - - - ( 7 )
Wherein, I Fore(x, y) is the pixel value of (x, y) position foreground image in image, and this point of 1 expression is foreground pixel, and this point of 0 expression is background pixel, and I (x, y) is the pixel value of (x, y) position current frame image in image, I Back(x, y) is the pixel value of (x, y) location context image in image, and TH2 is setting threshold, and those skilled in the art can be according to the actual conditions of the residing scene of image this setting threshold of condition voluntarily.
In one embodiment of this invention, the people counting process adopts sliding window searching and detecting pedestrian zone.At first, selection comprises the search window of certain foreground area, extract the G-LBP feature in these windows, obtain again the differentiation result of current Bayes classifier by aforementioned discriminant approach, whether belong to pedestrian target to differentiate this search box, the pedestrian target number in the area-of-interest that final statistics is determined voluntarily by the user is to realize tally function.GMM parameter in the Bayes classifier here is initial GMM parameter at system's initial operating stage, adopts the parameter after following real-time online adaptive learning after study for the first time.In one embodiment, every operation 50~100 frames of define system carry out adaptive learning one time.Wherein, in video image, the diverse location search box size is calculated according to the perspective model with higher searching effect, but the invention is not restricted to this, and the search box size that adopts other suitable modes to calculate can realize technical scheme of the present invention equally.Also can carry out a self study after initialization system operation certain hour, as 10 minutes.
Fig. 4 is the schematic diagram of a perspective model.As can see from Figure 4, because the camera pedestal setting tool has certain angle of inclination, so the road in video is no longer parallel wide, and this causes from video camera pedestrian far away less than the pedestrian close to video camera.The present invention adopts perspective model to address this problem.So-called perspective model obtains the relation between search box size corresponding to positions different in image-region and this position exactly, and namely the height of search window is near big and far smaller.As shown in Figure 3, to each scene, the manual Road L that demarcates 1And L 2, demarcate simultaneously the height H of certain pedestrian in scene ab, and do a horizontal linear by this pedestrian's mid point, hand over L 1And L 2Respectively at an a and b, the line segment length of intercepting is | ab|.So, in figure, other optional position such as the mid point pedestrian's search window height on straight line cd can calculate by through type (8):
H cd = | cd | | ab | &times; H ab - - - ( 8 )
Wherein, the cd horizontal linear is handed over L 1And L 2In a c and d, the line segment length of intercepting is H cdWhen the straight line by the search window mid point can't intersect at the displayable Road L of image 1And L 2The time, meet at L 1And L 2Extended line.The method can be determined the height of diverse location search window in figure, and the ratio of width to height of fixing search window simultaneously can obtain the width of this location finding window.
In an embodiment of the present invention, online adaptive study comprises that further the automatic extraction of high confidence level sample and gauss hybrid models parameter online adaptive learn this two steps.
For a people counting system based on video, its adaptive learning function is mainly reflected in the characteristic of automatically catching pedestrian and non-pedestrian's sample in this section video.Pedestrian target in people counting system applies scene mostly is in and walks upright or stationary state, but not the pedestrian is regional, mostly is road surface, road sign, fence, trees etc.Therefore, catch the two different characteristics most important.The present invention selects the high confidence level sample according to following predetermined condition:
(1) basic classification condition.At first the high confidence level sample needs to satisfy the pacing items of aforesaid sample classification: pedestrian's sample satisfies condition: p (x| μ pos, ∑ pos)>p (x| μ neg, ∑ neg), namely under Bayes classifier, sample be expert at the mankind posterior probability density greater than the posterior probability density of non-pedestrian's class this sample belong to the pedestrian; Non-pedestrian's sample satisfies condition: p (x| μ pos, ∑ pos)≤p (x| μ neg, ∑ neg), namely under Bayes classifier, sample be expert at the mankind's posterior probability density be less than or equal to sample the posterior probability density of non-pedestrian's class this sample belong to non-pedestrian.
(2) foreground classification condition.In most cases the pedestrian is in walking, so in foreground image, and when the user adopted search window to carry out sample collection, the foreground area proportion that belongs in the search window of pedestrian's sample was larger; In like manner, in the search window of non-pedestrian's sample the foreground area ratio very little be even zero.Therefore, count out by foreground pixel in the statistics search window, and setting threshold is to determine whether this search window belongs to the pedestrian; When foreground pixel in search window was counted out more than or equal to setting threshold, the sample that is judged as in this search window was the pedestrian, otherwise is judged as non-pedestrian.
(3) marginal classification condition.As shown in the right side of Fig. 5, search window laterally is equally divided into 3 parts, vertically be equally divided into 2 parts, obtain simultaneously the edge image of each picture frame.Because the pedestrian mostly is erectility, therefore, marginal distribution is more even, and has symmetry, be that each part has marginal point, described edge is the edge pixel point of the gradient image of each part after the Sobel operator extraction, and the number of edge points difference of horizontal 3 parts is little, and the number of edge points difference of vertical 2 parts is also little; Non-pedestrian's edges of regions is put often skewness, and the number of edge points of some part is a lot, and some does not seldom even have.Therefore, by statistics each several part number of edge points, and setting threshold is to determine whether this search window belongs to the pedestrian; During greater than setting threshold, the sample that is judged as in this search window is the pedestrian, otherwise is judged as non-pedestrian when each several part number of edge points sum.Wherein, the statistics of number of edge points can realize by existing method, not give unnecessary details at this; And those skilled in the art can set herein threshold value according to actual conditions.
(4) if search window satisfies above condition, the present invention correspondingly is classified as this class sample pedestrian or non-pedestrian's sample of high confidence level, above-mentioned pedestrian or non-pedestrian's sample is counted, and be used for adaptive learning; Do not meet testing conditions in preliminary classification device training as long as meet the sample of above-mentioned condition, will only be counted as the pedestrian, the present invention is attributed to non-high confidence level pedestrian sample to this class sample, is not used in adaptive learning.
Gauss hybrid models parameter online adaptive process of the present invention comprises the renewal with model parameter chosen of model to be updated, as shown in Figure 6.
In one embodiment, real-time update classifier parameters of the present invention embodies higher degree of confidence when making sample that sorter can be in determining current scene for pedestrian or non-pedestrian.
The high confidence level pedestrian that at first, will collect according to above-mentioned predetermined condition/non-pedestrian's sample by formula (9) finds single Gauss model in the pedestrian of optimum matching/non-pedestrian's sample class.Optimum matching is apart from adopting mahalanobis distance or Euclidean distance to calculate, and the present embodiment is take Euclidean distance as example:
d ( x , y ) = &Sigma; i = 1 dim ( x i - y i ) 2 - - - ( 9 )
Wherein, high confidence level sample characteristics to be matched is { x i, i=1 ..., dim}, single Gauss model average is { y i, i=1 ..., dim}, dim are intrinsic dimensionalities.After coupling finishes, find that to comprise pedestrian's sample maximum
Figure BDA0000113840540000112
Single Gauss model of individual pedestrian's sample class and to comprise non-pedestrian's sample maximum
Figure BDA0000113840540000113
Single Gauss model of individual non-pedestrian's sample class is seen Fig. 6, and gauss hybrid models parameter renewal process is only upgraded and selected
Figure BDA0000113840540000114
Individual single Gauss model, other single Gauss models are constant.Those skilled in the art can set up on their own according to actual conditions above-mentioned
Figure BDA0000113840540000115
With
Figure BDA0000113840540000116
Size.At NEW BEGINNING more, need dispensed to arrive the high confidence level pedestrian under single Gauss model to be updated, the average of non-pedestrian's sample And variance
Figure BDA0000113840540000118
Wherein,
Figure BDA0000113840540000119
Figure BDA00001138405400001110
Computing formula is as follows:
&mu; = 1 N &Sigma; i = 1 N f i - - - ( 10 )
&Sigma; = 1 N &Sigma; i = 1 N ( f i - &mu; ) - - - ( 11 )
Wherein, f iBe the eigenwert of N sample, μ, ∑ are average and the variances of N sample of this group.
In one embodiment, the present invention can adopt existing gauss hybrid models parameter updating method to carry out model parameter to upgrade, with the gauss hybrid models parameter renewal in the situation of the sample data of carrying out known master mould parameter and newly adding.Simultaneously, the present invention introduces learning rate α and is used for adjusting the sample data that newly adds shared weight in learning process.Formula (12)~(14) have shown the gauss hybrid models parameter updating method:
&mu; = N &pi; ori &mu; ori + &alpha; N new &mu; new N&pi; ori + &alpha; N new - - - ( 12 )
&Sigma; = N &pi; ori &Sigma; ori + &alpha; N new &Sigma; new N&pi; ori + &alpha; N new + N &pi; ori &mu; ori &mu; ori T + &alpha; N new &mu; new &mu; new T N&pi; ori + &alpha; N new - &mu;&mu; T - - - ( 13 )
&pi; = N&pi; ori + &alpha;N new N + &alpha;N new - - - ( 14 )
Wherein, μ ori, ∑ ori, π oriRespectively average, variance and the shared weight in GMM of upgrading single Gaussian distribution in front GMM.N new, μ new, ∑ newRespectively number, average and the variance with the high confidence level sample of this list Gaussian distribution coupling.μ, ∑, π are respectively average, variance and the weights of single Gaussian distribution after upgrading, and will be with π normalization after all single Gaussian distribution to be updated are upgraded end.N is the training sample number that is used for training GMM before upgrading.α is learning rate, thinks that when learning rate is high this group sample is large to the influence degree of model, 0≤α≤1.This system carries out a gauss hybrid models parameter every certain frame number and upgrades, and afterwards, the high confidence level sample list of using empties.Then adopt based on the sorter of the model parameter after upgrading and proceed people counting, and before upgrading next time one group of high confidence level sample of Resurvey, can adapt to better like this characteristic of each time period pedestrian sample and non-pedestrian's sample.In addition, system update gauss hybrid models parameter also is not limited to the situation every certain frame number, also can upgrade when collecting the high confidence level sample of some, or upgrade after the certain hour of interval.
Fig. 7 is the schematic diagram of the adaptive regional people counting device of the embodiment of the present invention.This adaptive regional people counting device comprises sorter training unit 701, people counting unit 702, sample extraction unit 703 and parameter updating block 704; Wherein, sorter training unit 701 for based on the video image as pedestrian's sample and non-pedestrian's sample that gathers in advance, is trained the counting model with reference to the step S1 shown in figure 1, obtains the sorter that is used for people counting based on this counting model; People counting unit 702 is used for obtaining the current video image frame, and adopts described sorter that the pedestrian in the current video image frame is counted with reference to the step S2 shown in figure 1; Sample extraction unit 703 is with reference to the step S3 shown in figure 1, is used for extracting pedestrian's sample and non-pedestrian's sample in the current video image frame, and satisfies pedestrian's sample and non-pedestrian's sample of predetermined condition in pedestrian's sample of extracting of buffer memory and non-pedestrian's sample; Parameter updating block 704 is used for adopting pedestrian's sample and the described counting model of non-pedestrian's Sample Refreshment of buffer memory with reference to the step S4 shown in figure 1 when satisfying update condition, and upgrades the sorter based on the counting model after upgrading.
Above-mentioned pedestrian's counting unit 702 comprises counting unit, and described counting unit is used for the pedestrian's sample that described sorter carries out the class condition of pedestrian determination that satisfies that extracts from the current video image frame is counted, to obtain pedestrian's quantity.Above-mentioned sorter training unit 701 comprises extraction unit, described extraction unit be used for to extract pedestrian's sample of gathering and the gradient local binary pattern feature of non-pedestrian's sample, to train described counting model, wherein, when training pattern is gauss hybrid models, can adopt formula (1)-(5) to count the training of model.
The present invention catches the characteristic of pedestrian and non-pedestrian's sample in application scenarios, effectively automatically extracts pedestrian and the non-pedestrian zone of the high confidence level in video image; In addition, the present invention can adjust the Bayes classifier parameter based on gauss hybrid models in real time, makes system can adapt to different application scenarioss, realizes people counting accurately.
One of ordinary skill in the art will appreciate that all or part of flow process that realizes in above-described embodiment method, to come the relevant hardware of instruction to complete by computer program, described program can be stored in computer read/write memory medium, this program can comprise the flow process as the embodiment of above-mentioned each side method when carrying out.Wherein, described storage medium can be disk, CD, ROM (read-only memory) or random access memory etc.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited to this, anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; can expect easily changing or replacing, within all should being encompassed in protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of claim.

Claims (14)

1. an adaptive regional pedestrian counting method, be used for the pedestrian of video image is counted, and it is characterized in that, comprising:
The sorter training step for based on the video image as pedestrian's sample and non-pedestrian's sample that gathers in advance, is trained the counting model, obtains the sorter that is used for people counting based on this counting model;
The people counting step is used for obtaining the current video image frame, and adopts described sorter that the pedestrian in the current video image frame is counted;
The sample extraction step is used for extracting pedestrian's sample and non-pedestrian's sample in the current video image frame, and satisfies pedestrian's sample and non-pedestrian's sample of predetermined condition in pedestrian's sample of extracting of buffer memory and non-pedestrian's sample; And
The parameter step of updating is used for adopting pedestrian's sample and the described counting model of non-pedestrian's Sample Refreshment of buffer memory when satisfying update condition, and upgrades the sorter based on the counting model after upgrading, and jumps to the people counting step.
2. adaptive regional pedestrian counting method according to claim 1, is characterized in that, described counting model is the gauss hybrid models that is comprised of a plurality of single Gauss models.
3. adaptive regional pedestrian counting method according to claim 2, is characterized in that, described predetermined condition comprises:
The pedestrian's sample that extracts satisfies that described sorter carries out the class condition of pedestrian determination or non-pedestrian's sample of extracting satisfies the class condition that described sorter carries out non-pedestrian determination;
The interior pixel number of search window that is used for extraction pedestrian's sample or non-pedestrian's sample surpasses first threshold; And
In the situation that described search window is divided at least two parts, connects pixel number included on the edge of adjacent part and surpass Second Threshold.
4. adaptive regional pedestrian counting method according to claim 3, it is characterized in that, described people counting step comprises: the pedestrian's sample that described sorter carries out the class condition of pedestrian determination that satisfies that extracts from the current video image frame is counted, to obtain pedestrian's quantity.
5. adaptive regional pedestrian counting method according to claim 3, it is characterized in that, in described parameter step of updating, every the video image of predetermined frame number or when the sum of the pedestrian's sample that satisfies predetermined condition and non-pedestrian's sample reaches predetermined value, upgrade described counting model.
6. adaptive regional pedestrian counting method according to claim 1, is characterized in that, described sorter training step comprises: pedestrian's sample that extraction gathers and the gradient local binary pattern feature of non-pedestrian's sample, and to train described counting model.
7. adaptive regional pedestrian counting method according to claim 1, it is characterized in that, in the situation that described counting model is the gauss hybrid models that is comprised of a plurality of single Gauss models, only upgrade the single Gauss model of part in described a plurality of single Gauss model in described parameter step of updating.
8. an adaptive regional people counting device, be used for the pedestrian of video image is counted, and it is characterized in that, comprising:
The sorter training unit for based on the video image as pedestrian's sample and non-pedestrian's sample that gathers in advance, is trained the counting model, obtains the sorter that is used for people counting based on this counting model;
The people counting unit is used for obtaining the current video image frame, and adopts described sorter that the pedestrian in the current video image frame is counted;
The sample extraction unit is used for extracting pedestrian's sample and non-pedestrian's sample in the current video image frame, and satisfies pedestrian's sample and non-pedestrian's sample of predetermined condition in pedestrian's sample of extracting of buffer memory and non-pedestrian's sample; And
The parameter updating block is used for adopting pedestrian's sample and the described counting model of non-pedestrian's Sample Refreshment of buffer memory when satisfying update condition, and upgrades the sorter based on the counting model after upgrading.
9. adaptive regional people counting device according to claim 8, is characterized in that, described counting model is single Gauss model or the gauss hybrid models that is comprised of a plurality of single Gauss models.
10. adaptive regional people counting device according to claim 9, is characterized in that, described predetermined condition comprises:
The pedestrian's sample that extracts satisfies that described sorter carries out the class condition of pedestrian determination or non-pedestrian's sample of extracting satisfies the class condition that described sorter carries out non-pedestrian determination;
The interior pixel number of search window that is used for extraction pedestrian's sample or non-pedestrian's sample surpasses first threshold; And
In the situation that described search window is divided at least two parts, connects pixel number included on the edge of adjacent part and surpass Second Threshold.
11. adaptive regional people counting device according to claim 10, it is characterized in that, described people counting unit comprises counting unit, described counting unit is used for the pedestrian's sample that described sorter carries out the class condition of pedestrian determination that satisfies that extracts from the current video image frame is counted, to obtain pedestrian's quantity.
12. adaptive regional people counting device according to claim 10, it is characterized in that, described parameter updating block upgrades described counting model every the video image of predetermined frame number or when the sum of the pedestrian's sample that satisfies predetermined condition and non-pedestrian's sample reaches predetermined value.
13. adaptive regional people counting device according to claim 8, it is characterized in that, described sorter training unit comprises extraction unit, described extraction unit be used for to extract pedestrian's sample of gathering and the gradient local binary pattern feature of non-pedestrian's sample, to train described counting model.
14. adaptive regional people counting device according to claim 8, it is characterized in that, in the situation that described counting model is the gauss hybrid models that is comprised of a plurality of single Gauss models, only upgrade the single Gauss model of part in described a plurality of single Gauss model in described parameter step of updating.
CN2011103870031A 2011-11-29 2011-11-29 Method and device of self-adapting regional pedestrian counting Pending CN103136534A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011103870031A CN103136534A (en) 2011-11-29 2011-11-29 Method and device of self-adapting regional pedestrian counting

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011103870031A CN103136534A (en) 2011-11-29 2011-11-29 Method and device of self-adapting regional pedestrian counting

Publications (1)

Publication Number Publication Date
CN103136534A true CN103136534A (en) 2013-06-05

Family

ID=48496341

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011103870031A Pending CN103136534A (en) 2011-11-29 2011-11-29 Method and device of self-adapting regional pedestrian counting

Country Status (1)

Country Link
CN (1) CN103136534A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104517127A (en) * 2013-09-27 2015-04-15 汉王科技股份有限公司 Self-learning pedestrian counting method and apparatus based on Bag-of-features model
CN104952090A (en) * 2014-03-26 2015-09-30 富士通株式会社 Flow displaying method and flow displaying equipment
CN106250828A (en) * 2016-07-22 2016-12-21 中山大学 A kind of people counting method based on the LBP operator improved
CN106780348A (en) * 2016-11-14 2017-05-31 吉林大学 The lower crossing width of signal control determines method
CN106919889A (en) * 2015-12-25 2017-07-04 株式会社日立制作所 The method and apparatus detected to the number of people in video image
CN108280251A (en) * 2017-12-20 2018-07-13 同济大学 It is a kind of based on street width than T-shaped road junction high risk zone scaling method
CN108416284A (en) * 2018-03-02 2018-08-17 北京航空航天大学 A kind of dividing method of traffic lights
CN109657564A (en) * 2018-11-28 2019-04-19 深圳市中电数通智慧安全科技股份有限公司 A kind of personnel detection method, device, storage medium and terminal device on duty
CN110033430A (en) * 2019-02-20 2019-07-19 阿里巴巴集团控股有限公司 A kind of pedestrian's quantity statistics method and device
CN116662794A (en) * 2023-08-02 2023-08-29 成都凯天电子股份有限公司 Vibration anomaly monitoring method considering data distribution update

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060147108A1 (en) * 2005-01-04 2006-07-06 Samsung Electronics Co., Ltd. Apparatus and method for detecting heads in input image
US20070098222A1 (en) * 2005-10-31 2007-05-03 Sony United Kingdom Limited Scene analysis
US20080008360A1 (en) * 2005-11-05 2008-01-10 Ram Pattikonda System and method for counting people
CN101200252A (en) * 2007-12-10 2008-06-18 中国科学院计算技术研究所 Target place optimized dispatching method and system
CN102169543A (en) * 2011-04-15 2011-08-31 苏州市慧视通讯科技有限公司 People counting method based on multiple source information fusion and on-line learning

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060147108A1 (en) * 2005-01-04 2006-07-06 Samsung Electronics Co., Ltd. Apparatus and method for detecting heads in input image
US20070098222A1 (en) * 2005-10-31 2007-05-03 Sony United Kingdom Limited Scene analysis
US20080008360A1 (en) * 2005-11-05 2008-01-10 Ram Pattikonda System and method for counting people
CN101200252A (en) * 2007-12-10 2008-06-18 中国科学院计算技术研究所 Target place optimized dispatching method and system
CN102169543A (en) * 2011-04-15 2011-08-31 苏州市慧视通讯科技有限公司 People counting method based on multiple source information fusion and on-line learning

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
HE YONGGANG 等: "Robust Illumination Invariant Texture Classification Using Gradient Local Binary Patterns", 《2011 INTERNATIONAL WORKSHOP ON MULTI-PLATFORM/MULTI-SENSOR REMOTE SENSING AND MAPPING (M2RSM)》 *
LI JINGWEN 等: "An efficient self-learning people counting system", 《2011 FIRST ASIAN CONFERENCE ON PATTERN RECOGNITION (ACPR)》 *
LI JINGWEN 等: "An efficient self-learning people counting system", 《2011 FIRST ASIAN CONFERENCE ON PATTERN RECOGNITION (ACPR)》, 28 November 2011 (2011-11-28) *

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104517127A (en) * 2013-09-27 2015-04-15 汉王科技股份有限公司 Self-learning pedestrian counting method and apparatus based on Bag-of-features model
CN104952090A (en) * 2014-03-26 2015-09-30 富士通株式会社 Flow displaying method and flow displaying equipment
CN104952090B (en) * 2014-03-26 2017-09-15 富士通株式会社 Flow indication method and flow indication equipment
CN106919889A (en) * 2015-12-25 2017-07-04 株式会社日立制作所 The method and apparatus detected to the number of people in video image
CN106250828B (en) * 2016-07-22 2019-06-04 中山大学 A kind of people counting method based on improved LBP operator
CN106250828A (en) * 2016-07-22 2016-12-21 中山大学 A kind of people counting method based on the LBP operator improved
CN106780348A (en) * 2016-11-14 2017-05-31 吉林大学 The lower crossing width of signal control determines method
CN108280251A (en) * 2017-12-20 2018-07-13 同济大学 It is a kind of based on street width than T-shaped road junction high risk zone scaling method
CN108280251B (en) * 2017-12-20 2021-07-20 同济大学 T-shaped intersection high risk area calibration method based on street width ratio
CN108416284A (en) * 2018-03-02 2018-08-17 北京航空航天大学 A kind of dividing method of traffic lights
CN109657564A (en) * 2018-11-28 2019-04-19 深圳市中电数通智慧安全科技股份有限公司 A kind of personnel detection method, device, storage medium and terminal device on duty
CN110033430A (en) * 2019-02-20 2019-07-19 阿里巴巴集团控股有限公司 A kind of pedestrian's quantity statistics method and device
CN110033430B (en) * 2019-02-20 2023-06-20 创新先进技术有限公司 Pedestrian number statistics method and device
CN116662794A (en) * 2023-08-02 2023-08-29 成都凯天电子股份有限公司 Vibration anomaly monitoring method considering data distribution update
CN116662794B (en) * 2023-08-02 2023-11-10 成都凯天电子股份有限公司 Vibration anomaly monitoring method considering data distribution update

Similar Documents

Publication Publication Date Title
CN103136534A (en) Method and device of self-adapting regional pedestrian counting
CN101729872B (en) Video monitoring image based method for automatically distinguishing traffic states of roads
CN101814149B (en) Self-adaptive cascade classifier training method based on online learning
CN101800890B (en) Multiple vehicle video tracking method in expressway monitoring scene
CN102542289B (en) Pedestrian volume statistical method based on plurality of Gaussian counting models
CN108921083B (en) Illegal mobile vendor identification method based on deep learning target detection
CN104574445B (en) A kind of method for tracking target
US20230289979A1 (en) A method for video moving object detection based on relative statistical characteristics of image pixels
CN102289948B (en) Multi-characteristic fusion multi-vehicle video tracking method under highway scene
CN104050481B (en) Multi-template infrared image real-time pedestrian detection method combining contour feature and gray level
CN101794382B (en) Method for counting passenger flow of buses in real time
US20220164965A1 (en) System and method for transforming video data into directional object count
CN104978567B (en) Vehicle checking method based on scene classification
CN102156983A (en) Pattern recognition and target tracking based method for detecting abnormal pedestrian positions
CN107491749A (en) Global and local anomaly detection method in a kind of crowd&#39;s scene
CN102044151A (en) Night vehicle video detection method based on illumination visibility identification
CN104850865A (en) Real-time compression tracking method of multi-characteristic transfer learning
CN104268528A (en) Method and device for detecting crowd gathered region
CN105046259B (en) Coronal mass ejection detection method based on multi-feature fusion
CN108647649A (en) The detection method of abnormal behaviour in a kind of video
CN103455820A (en) Method and system for detecting and tracking vehicle based on machine vision technology
CN115995063A (en) Work vehicle detection and tracking method and system
CN104268596A (en) License plate recognizer and license plate detection method and system thereof
CN113327248B (en) Tunnel traffic flow statistical method based on video
CN104063692A (en) Method and system for pedestrian positioning detection

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20130605