Embodiment
Below with reference to the accompanying drawings and in conjunction with the embodiments, describe the present invention in detail.Referring to Fig. 1, the step of embodiment comprises:
S11: detect the human body image in the video image;
S12: detect a plurality of area of skin color in the described human body image;
S13: detect a plurality of unique points in each area of skin color, determine the proper vector of each unique point;
S14: a plurality of reference vector of the regional that proper vector that each zone is determined is corresponding with everyone volume image in the database of in advance collection are mated;
S15: according to the result of coupling, determine the human body image that the match is successful.
By above-mentioned step, can in database, determine human body image, with the human body image determined as the human body image that detects.Thereby can in a plurality of human body images of video, determine unique human body image.
Preferably, among the embodiment, the step of human body image comprises: use the Gaussian Background modeling to detect the moving region in video.In the moving region that detects, use based on histograms of oriented gradients (HOG) with the object detecting method of the support vector machine (latent SVM) of implicit parameter, on different scale, the human body image in the video is detected.
Preferably, among the embodiment, the process of a plurality of area of skin color of described detection comprises:
Described human body image is converted to the YCrCb form; Can change according to following formula:
Y=0.299R+0.587G+0.114B
Cr=0.500R-0.419G-0.081B+128
Cb=-0.169R-0.331G+0.500B+128
In the human body image of YCrCb form, detect and satisfy the pixel that meets 133≤Cr≤173,77≤Cb≤127;
The zone that the pixel that will meet forms is area of skin color.Specifically referring to the human body image among Fig. 2, through after the above-mentioned steps, obtain at last human body image as shown in Figure 3.
The image of this area of skin color carries out first the morphology opening operation and gets rid of isolated point, noise, burr and foot bridge.Make again the human region of fracture up by closing operation of mathematical morphology.Then output image is as subsequent treatment.
Preferably, among the embodiment, described zone comprises facial skin zone and hand skin zone.
Preferably, among the embodiment, described proper vector or reference vector are determined by following steps:
1, uses the unique point of each area of skin color of fast operator human body image; These unique points are the non-flat forms zone of skin often, and for example the outline position of position, canthus, nose, oral area is pointed gap position etc.
2, by the computing of following moment square, detect the principal direction of principal direction unique point in the described unique point in 1;
·Moments:
·Corner?orientation:
Principal direction is C
Ori
I(x, y) be that the position is pixel intensity or the gray scale of the unique point of (x, y).
X, y are respectively unique point level and vertical coordinate.
I, j sets according to the needs of back formula.For example calculate M
10The time i be that 1, j is 0.
M
IjPhysical significance identical with the meaning of general square.
3, on this principal direction, extract the BRIEF descriptor as proper vector or the reference vector of a unique point.
Preferably, among the embodiment, described matching process is as follows:
Adopt hamming apart from calculating the described proper vector number different with the numerical value of reference vector correspondence position, when the number of different numerical value less than 20% the time, the match is successful to determine this proper vector;
Determine the quantity of the regional proper vector that the match is successful, when the regional quantity that the match is successful during greater than threshold value, determine that the match is successful.
For example: threshold value is 10, and the unique point quantity that the match is successful in each zone>12 think that then the match is successful.
When there being a plurality of human body images that the match is successful, also comprise: the human body image of the unique point that the selection proper vector that the match is successful and reference vector are maximum is as the human body image of identification.
In addition, can be that skin of face or hand skin arrange weight according to different scenes also, to eliminate the impact of environmental factor, for example, in the situation of outdoor well lighted, the ratio of the weight of the image of skin of face and image hand skin is set to 3:2; In the bad situation of indoor light, the ratio of the weight of just image of skin of face and image hand skin is set to 4:5.Increase the weight of hand skin, to eliminate the impact of ambient light.
Preferably, in an embodiment, also comprise, with RANSAC algorithm eliminating error coupling.
The input of RANSAC algorithm is one group of observation data (often containing larger noise or Null Spot), parameterized model and some believable parameter that is used for explaining observation data.RANSAC is by repeatedly selecting one group of random subset in the data to reach target.The subset that is selected is assumed to be the intra-office point, and verifies with following method:
1, the intra-office point that has a model to be adapted to suppose, namely all unknown parameters can both calculate from the intra-office point of hypothesis.
2, go to test other all data with the model that obtains in 1, if the model that certain point is applicable to estimate thinks that it also is the intra-office point.
If 3 have abundant point to be classified as the intra-office point of hypothesis, the model of estimating so is just enough reasonable.
4, then, remove to reappraise model (for example using least square method) with the intra-office point of all hypothesis, because it is only by initial hypothesis intra-office point estimation.
5, last, come assessment models by estimating intra-office point and the error rate of model.
Said process is repeated to carry out fixing number of times, each model that produces or because intra-office point is rejected very little, or because of better and selected than existing model.
Preferably, among the embodiment, also comprise:
The match is successful if do not have, and then the proper vector with the regional of described detected human body image joins described database as new reference vector.
Preferably, among the embodiment, also comprise:
Current frame image and before video image in, adopt and minimum to state this human body image that detects with color receptacle frame residence.
Obviously, those skilled in the art should be understood that, above-mentioned each module of the present invention or each step can realize with general calculation element, they can concentrate on the single calculation element, perhaps be distributed on the network that a plurality of calculation elements form, alternatively, they can be realized with the executable program code of calculation element, thereby, they can be stored in the memory storage and be carried out by calculation element, perhaps they are made into respectively each integrated circuit modules, perhaps a plurality of modules in them or step are made into the single integrated circuit module and realize.Like this, the present invention is not restricted to any specific hardware and software combination.
The above is the preferred embodiments of the present invention only, is not limited to the present invention, and for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.