Summary of the invention
The embodiment of the present invention provides a kind of method for early warning and video camera, can effectively solve video camera in prior art and can not carry out to the event of crossing the border the problem of early warning.
The method for early warning that the embodiment of the present invention provides, comprising:
The background model that the conservative modeling method of the random sampling of video camera utilization based on pixel builds is extracted all foreground blocks in current t two field picture;
The cascade sort model that described video camera utilization sets in advance judges in described all foreground blocks whether comprise target prospect piece, and described target prospect piece refers to that the matching degree of feature and the suspicious pedestrian's that sets in advance feature is higher than the foreground blocks of the threshold value setting in advance;
If comprise target prospect piece in described all foreground blocks, the Target Acquisition Model of described video camera utilization based on histogram intersection core HIK matching algorithm predicted the route of described target prospect piece;
If the route of the target prospect piece of prediction is pointed to warning region, described video camera sends early warning alarm to control and monitor console.
The video camera that the embodiment of the present invention provides, comprising:
Extraction module, the background model building for the conservative modeling method of random sampling of utilizing based on pixel is extracted all foreground blocks of current t two field picture;
Judge module, for after described extraction module obtains described all foreground blocks, the cascade sort model that utilization sets in advance judges in described all foreground blocks whether comprise target prospect piece, and described target prospect piece refers to that the matching degree of feature and the suspicious pedestrian's that sets in advance feature is higher than the foreground blocks of the threshold value setting in advance;
Determination module, if determine that for described judge module described all foreground blocks comprise target prospect piece, the Target Acquisition Model based on histogram intersection core HIK matching algorithm is predicted the route of described target prospect piece;
Sending module, if the route of the target prospect piece of predicting for described determination module is pointed to warning region, machine sends early warning alarm to control and monitor console.
As can be seen from the above technical solutions, the embodiment of the present invention has the following advantages: the background model that the conservative modeling method of the random sampling of video camera utilization based on pixel builds is extracted all foreground blocks in current t two field picture, the cascade sort model that utilization sets in advance judges in these all foreground blocks whether comprise target prospect piece, wherein, target prospect piece refers to that the matching degree of feature and the suspicious pedestrian's that sets in advance feature is higher than the foreground blocks of the threshold value setting in advance, if comprise target prospect piece in these all foreground blocks, based on histogram intersection core (Histogram Intersection Kernel, HIK) Target Acquisition Model of matching algorithm is predicted the route of described target prospect piece, if and the route of definite target prospect piece is pointed to warning region, to control and monitor console, send early warning warning, by the route of target of prediction foreground blocks, the effective real-time follow-up of realize target foreground blocks and can effectively carry out early warning.
Term " first " in instructions of the present invention and claims and above-mentioned accompanying drawing, " second ", " the 3rd " " 4th " etc. (if existence) are for distinguishing similar object, and needn't be for describing specific order or precedence.The data that should be appreciated that such use suitably can exchanged in situation, so as embodiments of the invention described herein for example can with except diagram here or describe those order enforcement.In addition, term " comprises " and " having " and their any distortion, intention is to cover not exclusive comprising, for example, those steps or unit that the process that has comprised series of steps or unit, method, system, product or equipment are not necessarily limited to clearly list, but can comprise clearly do not list or for these processes, method, product or equipment intrinsic other step or unit.
In embodiments of the present invention, method for early warning is applied on the video camera of supervisory system, video camera can be processed and the contingent event of crossing the border is carried out to early warning video data, can be for Security Personnel processes and races against time the event of crossing the border, and can stop in time the generation of some events of crossing the border.And a plurality of video cameras of supervisory system have linkage function, a video camera is after suspicious pedestrian being detected, this suspicious pedestrian's feature can be shared by mode and other the video camera in high in the clouds, in addition, supervisory system also can link with gate control system,, after entering the monitoring field of supervisory system by gate control system pedestrian, gate control system is carried out the detection and tracking of target by notice video camera.
Referring to Fig. 1, is a kind of method for early warning in the embodiment of the present invention, and the method comprises:
101, the background model of utilizing the conservative modeling method of random sampling based on pixel to build is extracted all foreground blocks in t two field picture;
In embodiments of the present invention, method for early warning is applied on the video camera of supervisory system, video camera can be processed and the contingent event of crossing the border is carried out to early warning video data, can be for Security Personnel processes and races against time the event of crossing the border, and can stop in time the generation of some events of crossing the border.
In embodiments of the present invention, the background model that video camera can utilize the conservative modeling method of the random sampling based on pixel to build, utilizes this background model can from two field picture, extract foreground blocks.
Wherein, in background model, comprise the set of the historical pixel value that each pixel of the two field picture that video camera takes randomly draws, common, the position of the video camera of installing in supervisory system is fixed, and the region of taking is also fixed, video camera can build background model by randomly drawing the pixel value of the pixel on the multiple image of shooting.For example, M (x)={ V
1, V
2..., V
n, wherein, x represents pixel, V
irefer to i the historical pixel value of pixel x, and the sample in the sets of pixel values M of pixel x (x) is not continuous, but randomly draw.And the sample in the sets of pixel values M of the background model building neither be continuous, also randomly draws.
In embodiments of the present invention, video camera can utilize background model to extract all foreground blocks in t two field picture, wherein, foreground blocks generally refers to the Pedestrians and vehicles in the shooting area of video camera etc., in addition, background piece in two field picture generally refers to the interior fixing physics existing of the shooting area of video camera, for example buildings, trees etc.
It should be noted that, background model is that the conservative modeling method of the random sampling based on pixel builds, and utilizes this background model to extract foreground blocks, can effectively solve the too high problem of time complexity causing due to global search.
102, utilize the cascade sort model set in advance to judge whether to comprise in all foreground blocks target prospect piece, target prospect piece refer to feature with the matching degree of the suspicious pedestrian's who sets in advance feature higher than the threshold value setting in advance;
In embodiments of the present invention, in video camera, set in advance cascade sort model, wherein, cascade sort model is for distinguishing whether the foreground blocks of extraction is whether pedestrian and definite pedestrian are suspicious pedestrian, and video camera will carry out real-time follow-up to suspicious pedestrian, in the situation that suspicious pedestrian has the trend of the warning region of entering, to control and monitor console, send early warning warning.
In embodiments of the present invention, video camera, after extracting all foreground blocks, can utilize the cascade sort model judgement setting in advance whether to comprise target prospect piece in these all foreground blocks, and target prospect piece refers to the feature that comprises suspicious pedestrian in feature.
If comprise target prospect piece in 103 all foreground blocks, the route of the Target Acquisition Model target of prediction foreground blocks of video camera utilization based on HIK matching algorithm;
In embodiments of the present invention, if video camera is determined in the foreground blocks of extracting, comprise target prospect piece, utilize the route of the Target Acquisition Model target of prediction foreground blocks based on HIK matching algorithm.
If the route of 104 definite target prospect pieces is pointed to warning region, to control and monitor console, send early warning alarm.
In embodiments of the present invention, if the route of the target prospect piece that video camera is definite is pointed to warning region, this video camera sends early warning alarm to control and monitor console, wherein in early warning warning, at least comprise target prospect piece, early warning place etc., the Security Personnel who makes control and monitor console can be in time after seeing early warning alarm correct this alarm is processed.
It should be noted that.If the route of the target prospect piece that video camera is definite is pointed to non-warning region, video camera sends to control and monitor console by the route of this target prospect piece, makes control and monitor console can draw the movement track of this target prospect piece, to realize real-time follow-up.
In embodiments of the present invention, the background model that the conservative modeling method of the random sampling of video camera utilization based on pixel builds is extracted all foreground blocks in t two field picture, the cascade sort model that utilization sets in advance judges in these all foreground blocks whether comprise target prospect piece, wherein, target prospect piece refers to that the matching degree of feature and the suspicious pedestrian's that sets in advance feature is higher than the foreground blocks of the threshold value setting in advance, if comprise target prospect piece in these all foreground blocks, the route of the Target Acquisition Model target of prediction foreground blocks based on HIK matching algorithm, if and the route of definite target prospect piece is pointed to warning region, to control and monitor console, send early warning warning, by the route of real-time estimate target prospect piece, the effective real-time follow-up of realize target foreground blocks and can effectively carry out early warning.
Technical scheme in embodiment, refers to Fig. 2 for a better understanding of the present invention, and another embodiment for the method for early warning in the embodiment of the present invention, comprising:
201, according to the set of the historical pixel value of the pixel comprising in background model, determine that each pixel in t two field picture is foreground blocks pixel or background piece pixel;
In embodiments of the present invention, video camera will determine that according to the set of the historical pixel value of the pixel comprising in background model each pixel in t two field picture is foreground blocks pixel or background piece pixel, concrete, video camera will be carried out following step to each pixel: determine in pixel i several historical pixel values in background model, the number of the pixel value in the current European round region of pixel i, European round region refers to by pixel i centered by the pixel value in t two field picture, the arest neighbors radius setting in advance is the pixel value region that radius forms, if the historical pixel value number in the current European round region of pixel i is less than or equal to the threshold value setting in advance, pixel i is foreground blocks pixel, if the historical pixel value number in the current European round region of pixel i is greater than the threshold value setting in advance, pixel i is background piece pixel.
Wherein, this t frame refers to present frame.
202, foreground blocks pixel definite in t two field picture is divided into foreground blocks;
In embodiments of the present invention, after video camera each pixel in determining t two field picture is foreground blocks pixel or background piece pixel, definite foreground blocks pixel is divided into foreground blocks, wherein, if the mode of dividing refers to a pixel and any one pixel being adjacent and be foreground blocks pixel, these two pixels are divided in same foreground blocks.
In embodiments of the present invention, video camera is after being divided into foreground blocks by foreground pixel point, the cascade sort model that utilization is set in advance judges in these all foreground blocks whether comprise target prospect piece, wherein, cascade sort model is conversion histogram (Census Transform Histogram, CENTRIST) feature-forward direction feature selecting (Forward Feat Selection, FFS) disaggregated model that-cascade (Cascade) forms, wherein, CENTRIST feature is a kind of Feature Descriptor based on profile, there is computing simple, take into account the advantage of the ability of local and global feature, and illumination and rotational transform are had to robustness.
Wherein, FFS is a kind of strong classification based training algorithm, based on iterating and greedy algorithm thought, is characterized in that the weight of sample needn't be upgraded after each iteration, and each Weak Classifier has identical voting right to final classification results.And using FFS and Cascade to build disaggregated model is because the two has very large advantage in raising detection rates, can guarantee on certain verification and measurement ratio, reduces to greatest extent the time complexity of classification.
In embodiments of the present invention, above-mentioned cascade sort model comprises pedestrian's disaggregated model and HIK matching algorithm, wherein, wherein, pedestrian's classification mode is to adopt the mode of off-line to train to obtain, the multitude of video data according to the camera acquisition in the supervisory system of this video camera, extract the different attitudes of pedestrian under various background environment, dressing and there is the positive sample of the pedestrian of blocking, extract the negative sample do not contain pedestrian, the method for learning (Boost Learning) by enhancing is determined suspicious pedestrian's feature simultaneously.
Wherein, pedestrian's disaggregated model is CENTRIST special medical treatment and the FFS feature based on above-mentioned, and adopts the mode of cascade to classify.
Technical scheme in embodiment, will introduce the training process of pedestrian's disaggregated model below in detail for a better understanding of the present invention, comprising:
Step 1, gather a large amount of monitor video data, therefrom extract pedestrian's sample of various attitudes, dressing, and the unified positive sample that is normalized to preset size, for example: sample size is 36*72 size.Choose street, square, the background piece that building etc. does not contain any pedestrian, as sample, is normalized to the sample of preset size equally, for example, can be also 36*72 size.Choose the negative sample that does not strengthen study containing pedestrian's large figure (480*720) conduct.The positive negative sample of pre-service, extracts the CENTRIST feature of each sample, forms positive and negative training sample feature set.The current cascade classifier of initialization is empty.
Step 2, based on positive and negative sample characteristics collection, utilize FFS Algorithm for Training to go out a strong classifier with certain classification capacity, and joined in current cascade classifier.
Step 3, utilize current cascade classifier to process negative training sample set, reject judicious negative sample.With current cascade classifier, process again the negative sample of above-mentioned enhancing study, the negative sample of misclassification is inserted to negative training sample and concentrate, with this, upgrade the negative sample of training use.Then continue executable operations 2. until cascade classifier arrives certain accuracy of detection.
In order better to understand the cascade sort model that video camera utilization sets in advance, judge the technical scheme that whether comprises target prospect piece in foreground blocks, refer to step 203 and step 204:
Utilize pedestrian's disaggregated model from all foreground blocks, to extract the foreground blocks that is characterized as pedestrian;
In embodiments of the present invention, video camera will utilize pedestrian's disaggregated model from all foreground blocks, to extract the foreground blocks that is characterized as pedestrian.
Refer to Fig. 3, in the embodiment of the present invention, the schematic diagram of pedestrian's disaggregated model, in this pedestrian's disaggregated model, H1, H2 ..., Hr represents the category level of pedestrian's disaggregated model to foreground blocks, and be more and more for the judgement of details from the judgement of H1 to Hr, for example: the judgement of H1 be the profile of foreground blocks, by profile, determine that pedestrian is also non-pedestrian, the judgement of H2 is in foreground blocks, whether to comprise head meeting conventional size and shape etc.D (1), f (1), d (2), f (2), d (r), the sign of the feature that f (r) is foreground blocks, for example: the feature of a foreground blocks is through being defined as inhuman (non-human) after H1, this foreground blocks does not need to continue to determine whether pedestrian again, if the feature of this foreground blocks may be pedestrian through determining after H1, by by the feature d of this foreground blocks (1), f (1) inputs H2, if and be judged as inhuman, stop the judgement to this foreground blocks, otherwise this foreground blocks may be pedestrian, continuation is judged by next stage H, until finally export from pedestrian's disaggregated model, determine whether this foreground blocks is pedestrian.
The matching degree of the feature of the foreground blocks that is 204, pedestrian according to HIK matching algorithm calculated characteristics and the suspicious pedestrian's who sets in advance feature, if comprise the foreground blocks that matching degree is greater than the threshold value setting in advance, the foreground blocks that definite matching degree is greater than the threshold value setting in advance is target prospect piece;
In embodiments of the present invention, video camera is after extraction is characterized as pedestrian's foreground blocks, matching degree by the feature of the foreground blocks that is pedestrian according to HIK matching algorithm calculated characteristics with the suspicious pedestrian who sets in advance, if comprise the foreground blocks that matching degree is greater than the threshold value setting in advance, the foreground blocks that definite matching degree is greater than the threshold value setting in advance is target prospect piece.
It should be noted that, in embodiments of the present invention, in video camera, preserved suspicious pedestrian's feature, and this suspicious pedestrian's feature can be that video camera is analyzed and obtained from a large amount of video datas, also can be that the server of control and monitor console is by the linkage function between video camera, the suspicious pedestrian's who is inputted by monitor staff feature is shared in video camera, by video camera, preserved.
Wherein, the server of control and monitor console determines that the mode of suspicious pedestrian's feature is: monitor staff opens the monitor video of video camera A, the Data Enter button that click system provides, the query time section of set information (query time section refers to the time period that comprises commit a crime course), system will the form with single frames present the video of this query time section, set up the current time of choosing and be 15:00 to 15:05 during this period of time, system can be sampled and be provided the image of video camera A feedback during this period of time, approximately 50 frames, monitor staff only need to by mouse, by target, with rectangle frame mark, (the mark number of a suspect's sample be determined by monitor staff having on a suspect's image, but must be more than or equal to 1, mark number will exert an influence to the accuracy detecting and follow the trail of), click and confirm in typing, system will generate the feature of suspicious object.
Monitor staff also can arrange the scope of the camera of the feature of sharing this suspicious pedestrian, for example, according to suspect's area size that the current time roughly estimates that it may be escaped from of runing away, the region representation of system default is in a border circular areas centered by the three unities of appointment, system provides the slider bar of zone radius, monitor staff can come elasticity to select area size by sliding button, after determining, all video cameras of this district inclusion will receive the suspicious pedestrian's of server end transmission feature by video camera linkage function, and start to carry out target detection at guarded region separately.
In embodiments of the present invention, the matching degree of the feature of the foreground blocks that video camera is pedestrian according to HIK matching algorithm calculated characteristics and the suspicious pedestrian's who sets in advance feature, determine that matching degree is that target prospect piece is specifically as follows higher than the foreground blocks of the threshold value setting in advance: video camera is determined the histogram of the foreground blocks that is characterized as pedestrian, according to HIK matching algorithm, calculate the histogrammic matching degree of the histogram of this foreground blocks and suspicious pedestrian's feature, determine that matching degree is target prospect piece higher than the foreground blocks of the threshold value setting in advance.
205, determine that the pixel in target prospect piece center is as the first central pixel point in t two field picture;
In embodiments of the present invention, if comprise target prospect piece in the foreground blocks that video camera extracts, to follow the tracks of this target prospect piece, and contingent crossing the border predicted.And if comprise target prospect piece in the foreground blocks of video camera extraction, video camera first will determine that the pixel in target prospect piece center is as the first central pixel point in t two field picture.
206, in t+1 two field picture, take the first central pixel point as the center of circle, presetting length is in the foreground blocks pixel in the border circular areas of radius, the CENTRIST feature of extraction corresponding segment centered by foreground blocks pixel, utilize HIK matching algorithm that the CENTRIST feature of segment and the suspicious pedestrian's who sets in advance CENTRIST feature corresponding centered by foreground blocks pixel are mated, determine that the foreground blocks pixel that matching degree is the highest is the second central pixel point;
In embodiments of the present invention, after video camera is determined first central pixel point of target prospect piece in t two field picture, to in t+1 two field picture, take the first central pixel point as the center of circle, the length setting in advance is that radius obtains in the foreground blocks pixel in region, the center of circle, the CENTRIST feature of extraction corresponding segment centered by foreground blocks pixel, utilize HIK matching algorithm that the CENTRIST feature of this segment is mated with the suspicious pedestrian's who sets in advance CENTRIST feature, determine that the foreground blocks pixel that matching degree is the highest is the second central pixel point; Refer to Fig. 4, in the embodiment of the present invention, the search model of the second central pixel point, wherein, the circular center of circle represents the first central pixel point Pt, and radius of a circle is R, and stain represents foreground blocks pixel.
It should be noted that, according to aforesaid way, video camera can be determined in the manner described above the 3rd central pixel point on t+2 two field picture, by that analogy, video camera can obtain a plurality of central pixel point, and the route of the variation prediction target prospect piece of the position by the plurality of central pixel point.
Wherein, video camera is definite take the first central pixel point as the center of circle, presetting length is that the mode of which thing foreground blocks pixel in the pixel in the region, the center of circle of radius is: video camera is determined in pixel i in this region several historical pixel values in background model, the number of the historical pixel value in the current European round region of this pixel i, if and the number of the historical pixel value in the current European round region of this pixel i is less than or equal to the threshold value setting in advance, pixel i is foreground blocks pixel, if the number of the historical pixel value in the current European round region of this pixel i is greater than the threshold value that this sets in advance, this pixel i is background piece pixel.
In embodiments of the present invention, by utilizing the first central pixel point to limit match search scope, can when improving matching accuracy rate, reduce time complexity.
207, the route of the position prediction target prospect piece in two field picture according to the first central pixel point and the second central pixel point;
In embodiments of the present invention, the route of video camera position prediction target prospect piece in two field picture according to the first central pixel point and the second central pixel point.Wherein, by the first central pixel point, can determine position of this target prospect piece, by the second central pixel point, can be determined another position of this target prospect piece, the direction of pointing to the definite position of the second central pixel point by the definite position of the first central pixel point is the route of this target prospect piece.
It should be noted that, in step 207, be only to take the route of two central pixel point target of prediction foreground blocks to describe as example, in actual applications, also can be by the mode of describing in step 207, definite central pixel point in an above two field picture, determine the central pixel point in present frame, the route of the change in location target of prediction foreground blocks by a plurality of pixels.
If the route of 208 definite target prospect pieces is pointed to warning region, video camera sends early warning alarm to control and monitor console.
In embodiments of the present invention, if the route of definite target prospect piece is pointed to warning region, video camera sends early warning alarm to control and monitor console, wherein, route is pointed to warning region and is referred to that warning region is in the region of the route indication of target prospect piece, and in this action direction the nearest region of this target prospect piece of distance.
It should be noted that, in embodiments of the present invention, also can be according to the first central pixel point and the second central pixel point the translational speed of the position calculation target prospect piece in two field picture, for example, determine distance between the first central pixel point and the position of the second central pixel point in two field picture, according to the ratio setting in advance, this distance transform is become to the actual mobile distance of target prospect piece, the distance of the actual movement of this target prospect piece and the business of the mistiming between two frames are the target piece that advances and move translational speed.
In embodiments of the present invention, in early warning alarm, at least comprise the feature of target prospect piece, route, position etc., can comprise the translational speed of this target prospect piece in addition.
It should be noted that, if the route of definite target prospect piece is pointed to non-warning region, and be that the video camera that this video camera is adjacent is shared this target prospect piece, and other video camera also can be followed the tracks of this target prospect piece under real-time monitoring scene.The video camera that gets the feature of target prospect piece will check at video joining place, find to follow the tracks of after target prospect piece, make to realize the free of discontinuities of target prospect piece is followed the tracks of.
It should be noted that, if determine, the developing direction of sidelong glance mark foreground blocks points to non-warning region, video camera also can send to the route of this target prospect piece the server of control and monitor console, the movement track that makes server to draw this target prospect piece according to the route of the target prospect piece of a plurality of video cameras transmissions.
Wherein, video camera can select some features to follow the tracks of from the feature of target prospect piece, conventional feature has: color, edge, local description and many Fusion Features etc., feature based on color, it has good resistance screen rotation, the ability of non-rigid deformation and partial occlusion, and in algorithm, the normal hue histogram feature of target area that adopts is as descriptor, advantage is that computation complexity is low, and local matching accuracy rate is high.
In step 205 to step 207, what describe is the route of the Target Acquisition Model target of prediction foreground blocks based on HIK matching algorithm, be different from Mean Shift algorithm of the prior art and Particle Filter algorithm, by characteristic matching search, obtain the change in location of target prospect piece under most frame frequencies, can solve the drifting problem that in prior art, target following brings, also can reduce because every frame all carries out the too high time complexity that pedestrian detection causes.
The Target Acquisition Model of above-mentioned HIK matching algorithm determines that the position of target prospect piece in each frame is a kind of algorithm idea based on local optimum, the prerequisite that based target moving range between consecutive frame is limited, by local optimum, replace global optimum, to obtain higher conevying efficiency.But, mode based on search is a kind of algorithm for estimating, have the defect of the accumulation of error, in t+1 frame, the position of target is the location estimation of target in t frame, itself just has certain error, then estimates that by the position of target in t+1 frame the position of target in t+2 frame will come in error accumulation, after multiframe, the track of target will produce very large deviation, and the accuracy of early warning is exerted an influence.In order to address this problem, can adopt the mode of detection to proofread and correct the position of target prospect piece, to reduce or to avoid error, be specifically as follows: in t+x*n two field picture, Target Acquisition Model based on HIK matching algorithm is determined the position of target prospect piece, and x and n are positive integer; Utilize background model and cascade classifier to determine and correct target prospect piece, and utilize the position of correcting target prospect piece to correct the position of target prospect piece.
Wherein, step 201 is to utilize background model and cascade classifier to determine the mode of correction target foreground blocks to what describe in 204, and step 205 is the mode that Target Acquisition Model based on matching algorithm is determined the position of target prospect piece to what describe in 207.
Wherein, utilize correction target foreground blocks to proofread and correct target prospect piece can be: between the number j of the correction target foreground blocks of obtaining by detection and the number i of the current existing target prospect piece of search, have following relation, wherein, the number of correcting target prospect piece is the suspicious pedestrian's who detects number, the number of the current existing target prospect piece of search is the existing chain number of following the tracks of, and has different matching strategies under different situations:
1) i==j; The suspicious pedestrian's who now detects number equates with the existing chain number of following the tracks of, by position and hue histogram, mates to realize to following the tracks of the renewal of chain.
2) i>j; The suspicious pedestrian's who now detects number is less than the existing chain number of following the tracks of, and first to following the tracks of chain position, judges whether surpass range of video, exceeds and deletes this tracking chain.To matching the tracking chain of detection block, by the updating location information searching, do not follow the tracks of chain.
3) i<j; The suspicious pedestrian's who now detects number is greater than the existing number of following the tracks of, by mating rear remaining detected object for newly to enter the target of video, for it creates new tracking chain.
The method combining by above search and detection can reduce the offset amplitude of target, the movement locus of at utmost matching target.
In embodiments of the present invention, video camera each pixel in determining t two field picture according to the set of the historical pixel value of the pixel comprising in background model is after foreground blocks pixel or background piece pixel, foreground blocks pixel definite in t two field picture is divided into foreground blocks, the cascade sort model that the CENTRIST feature that utilization sets in advance-FFS-Cascade forms judges in foreground blocks, whether to comprise target prospect piece, if comprise target prospect piece in the foreground blocks of extracting, determine that the pixel in target prospect piece center is as the first central pixel point in t two field picture, in t+1 two field picture, take the first central pixel point as the center of circle, presetting length is in the foreground blocks pixel in the region, the center of circle of radius, shift to an earlier date the CENTRIST feature of segment corresponding centered by foreground blocks pixel, utilize HIK matching algorithm that the CENTRIST feature of the segment obtaining is mated with the suspicious pedestrian's who sets in advance CENTRIST feature, determine that the foreground blocks pixel that matching degree is the highest is the second central pixel point, utilize the route of the first central pixel point and the second central pixel point position prediction target prospect piece in two field picture, if and the moving direction of the feelings of definite target prospect piece is pointed to warning region, video camera sends early warning report to control and monitor console, make video camera can effectively realize the tracking of target prospect piece and realize the prediction to the event of crossing the border, reduce the probability that the event of crossing the border occurs.
And in embodiments of the present invention, video camera can complete the prediction to the event of crossing the border, avoid sending data to the time waste that control and monitor console brings, greatly promoted early warning efficiency.
It should be noted that, in embodiments of the present invention, video camera in supervisory system can also link with gate control system, when pedestrian enters the monitoring range of supervisory system by gate control system, the video camera that gate control system notice sets in advance carries out detection and the tracking of target, and video camera can carry out early warning to the event of crossing the border according to the method for early warning of describing in the embodiment of the present invention.
It should be noted that, the early warning scheme of describing in the embodiment of the present invention also can be used in public security supervisory system, and can be applied to the real-time follow-up of crime one's share of expenses for a joint undertaking and follow the trail of afterwards.Technical scheme in embodiment for a better understanding of the present invention, concrete application scenarios will be described below:
Monitor staff suspects that crime one's share of expenses for a joint undertaking A appears at B district, the feature of the control and monitor console input crime one's share of expenses for a joint undertaking A in Ze B district, and the server of control and monitor console shares to the feature of crime one's share of expenses for a joint undertaking A on all video cameras in B district, and video camera is preserved the feature of this crime one's share of expenses for a joint undertaking A.
The background model that video camera D utilizes the conservative modeling method of the random sampling based on pixel to build shifts to an earlier date all foreground blocks in current t two field picture, the matching degree of the feature of the foreground blocks that is pedestrian according to HIK matching algorithm calculated characteristics and the suspicious pedestrian's who sets in advance feature, wherein, in suspicious pedestrian, comprise crime one's share of expenses for a joint undertaking A, determine that matching degree is greater than the target prospect piece E of the foreground blocks of the threshold value setting in advance, and the matching degree of the feature of this target prospect piece E and crime one's share of expenses for a joint undertaking A is the highest.
Video camera D determines that the pixel of the center in target prospect piece E in t two field picture is as the first central pixel point, in ground t+1 two field picture, take the first central pixel point as the center of circle, presetting length is in the foreground blocks pixel in the border circular areas of radius, shift to an earlier date segment CENTRIST feature corresponding centered by foreground blocks pixel, utilize HIK matching algorithm that the CENTRIST feature of this segment is mated with the feature of crime one's share of expenses for a joint undertaking A, determine that the pixel that matching degree is the highest is the second central pixel point, the route of the location positioning target prospect piece E in two field picture according to this first central pixel point and the second central pixel point.
And if the route of target prospect piece E is pointed to warning region, to control and monitor console, send early warning alarm, in case crime one's share of expenses for a joint undertaking A enters warning region, if and the non-warning region of route of target prospect piece E, the route of crime one's share of expenses for a joint undertaking A is fed back to control and monitor console, make control and monitor console can utilize the route of the crime one's share of expenses for a joint undertaking A of video camera feedback to determine the movement track of crime one's share of expenses for a joint undertaking A.
Refer to Fig. 5, the schematic diagram for the structure of video camera in the embodiment of the present invention, comprising:
Extraction module 501, the background model building for the conservative modeling method of random sampling of utilizing based on pixel is extracted all foreground blocks of t two field picture;
Judge module 502, for after described extraction module 501 obtains described all foreground blocks, the cascade sort model that utilization sets in advance and pedestrian's disaggregated model judge in described all foreground blocks whether comprise target prospect piece, and described target prospect piece refers to that the matching degree of feature and the suspicious pedestrian's that sets in advance feature is higher than the foreground blocks of the threshold value setting in advance;
Prediction module 503, if determine that for described judge module 502 described all foreground blocks comprise target prospect piece,, based on searching for and detecting the mode combining, the change in location according to described target prospect piece in described t two field picture and t+1 two field picture is predicted the route of described target prospect piece;
Sending module 504, if the route of the target prospect piece of predicting for described prediction module 503 is pointed to warning region, sends early warning alarm to control and monitor console.
In embodiments of the present invention, the background model that extraction module 501 utilizes the conservative modeling method of the random sampling based on pixel to build is extracted all foreground blocks in t two field picture, the cascade sort model that then judge module 502 sets in advance utilization and pedestrian's disaggregated model judge in all foreground blocks, whether to comprise target prospect piece, wherein, target prospect piece refers to that the matching degree of feature and the suspicious pedestrian's that sets in advance feature is higher than the foreground blocks of the threshold value setting in advance, if and comprise target prospect piece in the definite all foreground blocks of judge module 502, the Target Acquisition Model based on histogram intersection core HIK matching algorithm is predicted the route of described target prospect piece, finally, if the route of the target prospect piece that determination module 503 is definite is pointed to warning region, sending module 504 sends early warning warning to control and monitor console.
In embodiments of the present invention, the background model that the conservative modeling method of the random sampling of video camera utilization based on pixel builds is extracted all foreground blocks in t two field picture, the cascade sort model that utilization sets in advance judges in these all foreground blocks whether comprise target prospect piece, wherein, target prospect piece refers to that the matching degree of feature and the suspicious pedestrian's that sets in advance feature is higher than the foreground blocks of the threshold value setting in advance, if comprise target prospect piece in these all foreground blocks, the Target Acquisition Model based on histogram intersection core HIK matching algorithm is predicted the route of described target prospect piece, if and the route of definite target prospect piece is pointed to warning region, to control and monitor console, send early warning warning, by the route of target prospect piece is predicted, the effective real-time follow-up of realize target foreground blocks and can effectively carry out early warning.
Referring to Fig. 6 is another embodiment of the structure of video camera in the embodiment of the present invention, comprising:
The extraction module 501 of describing in embodiment as shown in Figure 6, judge module 502, prediction module 503 and sending module 504, and similar to the content of middle description embodiment illustrated in fig. 5, repeat no more herein.
In embodiments of the present invention, in described background model, comprise the set of the historical pixel value that each pixel of the two field picture that described video camera takes randomly draws;
Described extraction module 501 comprises:
The first determination module 601, determines that for the set of the historical pixel value of the pixel that comprises according to described background model each pixel in described t two field picture is foreground blocks pixel or background piece pixel;
The second determination module 602, for after described the first determination module 601 determines that each pixel of described t two field picture is foreground blocks pixel or background piece pixel, is divided into foreground blocks by foreground blocks pixel definite in described t two field picture.
Wherein, described the first determination module 601 is specifically for determining in pixel i several historical pixel values in described background model, the number of the historical pixel value in the current European round region of described pixel i, described European round region refers to by described pixel i centered by the pixel value in described t two field picture, and the arest neighbors radius setting in advance is the pixel value region that radius forms; If described number is less than or equal to the threshold value setting in advance, described pixel i is foreground blocks pixel; The threshold value setting in advance described in if described number is greater than, described pixel i is background piece pixel.
In embodiments of the present invention, described cascade sort model is: the cascade sort model that CENTRIST feature-FFS-Cascade forms, and in cascade sort model, comprise pedestrian's disaggregated model and described HIK matching algorithm;
Described judge module 502 comprises:
Cascade sort module 603, for after described extraction module 501 obtains described all foreground blocks, utilizes pedestrian's disaggregated model from described all foreground blocks, to extract the foreground blocks that is characterized as pedestrian;
Object judgement module 604, for after described cascade sort module 603 extractions are characterized as pedestrian's foreground blocks, described in calculating according to described HIK matching algorithm, be characterized as pedestrian's the feature of foreground blocks and the matching degree of the suspicious pedestrian's who sets in advance feature, if comprise the foreground blocks that matching degree is greater than the threshold value setting in advance, the foreground blocks that definite matching degree is greater than the threshold value setting in advance is target prospect piece.
In embodiments of the present invention, described prediction module 503 comprises:
The 3rd determination module 605, for being characterized as pedestrian's foreground blocks described in determining in described object judgement module 604, comprise described target prospect piece, determine that the pixel in described target prospect piece center is as the first central pixel point in described t two field picture;
Matching module 606, after determining described the first central pixel point for described the 3rd determination module 605, described the first central pixel point of take in t+1 two field picture is the center of circle, presetting length is in the foreground blocks pixel in the border circular areas of radius, the CENTRIST feature of extraction corresponding segment centered by described foreground blocks pixel, utilize described HIK matching algorithm by the CENTRIST feature of segment corresponding centered by described foreground blocks pixel with described in the suspicious pedestrian's that sets in advance CENTRIST feature mate, determine that the foreground blocks pixel that matching degree is the highest is the second central pixel point,
Direction prediction module 607, for after described matching module 606 obtains described the second central pixel point, the route of target prospect piece described in the position prediction in two field picture according to described the first central pixel point and described the second central pixel point.
In embodiments of the present invention, described video camera also comprises:
Rectification module 608, at t+x*n two field picture, the Target Acquisition Model based on described HIK matching algorithm is determined the position of described target prospect piece, described x and n are positive integer;
Detection module 609, corrects target prospect piece for utilizing described background model and described cascade classifier to determine, and utilizes the position of described rectification target prospect piece to correct the position of described target prospect piece.
In embodiments of the present invention, the first determination module 601 in extraction module 501 determines that according to the set of the historical pixel value of the pixel comprising in background model each pixel in described t two field picture is foreground blocks pixel or background piece pixel, and by the second determination module 602, foreground blocks pixel definite in described t two field picture is divided into foreground blocks, cascade sort module 603 in judge module 502 utilizes pedestrian's disaggregated model in advance from described all foreground blocks, to extract the foreground blocks that is characterized as pedestrian, and described in being calculated according to HIK matching algorithm by object judgement module 604, be characterized as pedestrian's the feature of foreground blocks and the matching degree of the suspicious pedestrian's who sets in advance feature, if comprise the foreground blocks that matching degree is greater than the threshold value setting in advance, the foreground blocks that definite matching degree is greater than the threshold value setting in advance is target prospect piece, if being characterized as described in determining in pedestrian's foreground blocks, object judgement module 604 comprises described target prospect piece, the 3rd determination module in determination module 503 determines that the pixel in this target prospect piece center is as the first central pixel point in this t two field picture, and by matching module 606, to take this first central pixel point in t+1 two field picture be the center of circle, presetting length is in the foreground blocks pixel in the border circular areas of radius, the CENTRIST feature of extraction corresponding segment centered by this foreground blocks pixel, utilize the CENTRIST feature of this HIK matching algorithm sets in advance the CENTRIST feature of segment corresponding centered by this foreground blocks pixel suspicious pedestrian with this to mate, determine that the foreground blocks pixel that matching degree is the highest is the second central pixel point, by direction prediction module 607 according to this first central pixel point and described the second central pixel point the route of target prospect piece described in the position prediction in two field picture.In embodiments of the present invention, in t+x*n two field picture, the Target Acquisition Model of rectification module 608 based on described HIK matching algorithm determined the position of described target prospect piece, described x and n are positive integer, and by detection module 609, utilize this background model and this cascade classifier to determine and correct target prospect piece, and utilize the position of this rectification target prospect piece to correct the position of this target prospect piece.
In embodiments of the present invention, video camera each pixel in determining t two field picture according to the set of the historical pixel value of the pixel comprising in background model is after foreground blocks pixel or background piece pixel, foreground blocks pixel definite in t two field picture is divided into foreground blocks, the cascade sort model that the CENTRIST feature that utilization sets in advance-FFS-Cascade forms judges in all foreground blocks, whether to comprise target prospect piece, if comprise target prospect piece in the foreground blocks of extracting, determine that the pixel in target prospect piece center is as the first central pixel point in t two field picture, in t+1 two field picture, take the first central pixel point as the center of circle, presetting length is in the foreground blocks pixel in the region, the center of circle of radius, the CENTRIST feature of extraction corresponding segment centered by described foreground blocks pixel, utilize described HIK matching algorithm by the CENTRIST feature of segment corresponding centered by described foreground blocks pixel with described in the suspicious pedestrian's that sets in advance CENTRIST feature mate, determine that the foreground blocks pixel that matching degree is the highest is the second central pixel point.And according to the first central pixel point and the second central pixel point the route of the position prediction target prospect piece in two field picture, if and the moving direction of the feelings of definite target prospect piece is pointed to warning region, video camera sends early warning report to control and monitor console, make video camera can effectively realize the tracking of target prospect piece and realize the determining of the event of crossing the border, reduce the probability that the event of crossing the border occurs.
It will be appreciated by those skilled in the art that all or part of step realizing in above-described embodiment method is to come the hardware that instruction is relevant to complete by program, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium of mentioning can be ROM (read-only memory), disk or CD etc.
Above a kind of method for early warning provided by the present invention and video camera are described in detail, for one of ordinary skill in the art, thought according to the embodiment of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.