Summary of the invention
The object of this invention is to provide a kind of face feature extraction method for human face analysis system, to overcome currently available technology above shortcomings.
The object of the invention is to be achieved through the following technical solutions:
A face feature extraction method for human face analysis system, comprises the following steps:
1) reading video data stream, and the video data stream reading is carried out to pre-service;
2) detect people's face, the video data stream after step 1) is processed is carried out to the detection of people's face: if people's face detected, accurately locate people's face face region, facial image is intercepted out separately; If people's face do not detected, get back to step 1);
3) face image processing, to step 2) in intercepting facial image be normalized;
4) generate Gabor face, the facial image after normalized is sent into human face analysis server, and facial image obtains Gabor face through Gabor transform filter;
5) generate first order difference Gabor face and second order difference Gabor face, Gabor face is carried out to difference analysis, obtain first order difference Gabor face and second order difference Gabor face;
6) Gabor face, first order difference Gabor face and second order difference Gabor face are carried out respectively to neighborhood binaryzation weighting summation, obtain eigenface;
7) obtain primitive character description vectors, the face region of eigenface is analyzed, histogram analysis is carried out separately in each region, obtain local feature description's vector, each local feature description's vector is coupled together, obtain primitive character description vectors;
8) obtain feature description vectors, primitive character description vectors is carried out to pivot analysis, linear discriminant analysis, dimensionality reduction and obtain feature description vectors;
9) feature description vectors is compared and classified in facial feature database; And
10) show classification results.
Further, in described step 1), the pre-service of video data stream comprises noise reduction process, video format normalized.
In described step 3), face image processing comprises anti-photo-irradiation treatment, form, size normalization processing.
In described step 6), the method formula of neighborhood binaryzation is:
In described step 7), obtain feature description vectors step and comprise:
A) in eigenface, use the rectangle frame of different sizes to extract the face region of people's face, and be equipped with larger weights, other face areas are equipped with less weights; And
B) each region is carried out to the Gabor conversion of different scale and direction, then do the statistics with histogram in this region, and the statistics with histogram result in each region is stitched together, obtain original feature descriptor.
Beneficial effect of the present invention is: the present invention is based on the method that Gabor conversion, pivot analysis, linear discriminant analysis and local feature description combine, the impact of the situation such as can filter out to a certain extent illumination, block, in dimensionality reduction, original data are not lost effective information after Weighted Fusion, still can keep high comparison accuracy; Obtain after facial image, while carrying out primitive character extraction, choose cleverly the important area for comparing, when guaranteeing robustness, also reduced data processing amount.
Embodiment
As shown in Figure 1-2, a kind of face feature extraction method for human face analysis system described in the embodiment of the present invention, comprises the following steps:
1) read video sequence, and raw data is carried out to simple pre-service, include, but are not limited to noise reduction process, video format normalized etc.
2), for the normal video data stream getting, whether monitoring has people's face to exist, if had, accurately locates people's face, and facial image is intercepted out separately.
3) facial image image is processed, and includes, but are not limited to anti-photo-irradiation treatment, form, size normalization processing etc.
4) facial image after normalization is admitted to human face analysis server, and facial image obtains Gabor face through Gabor transform filter.Gabor conversion is a kind of Fourier conversion of window type, is the local conversion of a time and frequency domain, can information extraction from signal effectively, by calculation functions such as flexible and translations, function or signal are carried out to multiscale analysis.Gabor face after Gabor filters, can strengthen face's local feature, and makes feature can adapt to the requirement of different scale, increases the robustness of recognizer.
5) Gabor face is carried out to difference analysis, obtain first order difference Gabor face and second order difference Gabor face.Suppose Gabor face
size be M * N, so at the first order difference Gabor of x direction face:
(1)
In formula (1),
numerical value on Gabor face matrix (i, j) position,
numerical value on directions X first order difference Gabor face matrix (i, j) position
At the first order difference Gabor of y direction face:
(2)
In formula (2),
numerical value on Gabor face matrix (i, j) position,
numerical value on Y-direction first order difference Gabor face matrix (i, j) position
At the second order difference Gaobr of x direction face:
(3)
In formula (3),
numerical value on directions X first order difference Gabor face matrix (i, j) position,
numerical value on directions X second order difference Gabor face matrix (i, j) position
At the second order difference Gabor of y direction face:
(4)
In formula (4),
numerical value on Y-direction first order difference Gabor face matrix (i, j) position,
numerical value on Y-direction second order difference Gabor face matrix (i, j) position.
6) Gabor face, first order difference Gabor face and second order difference Gabor face are carried out respectively to binaryzation weighting summation, obtain final eigenface.General binarization method is the mean value of obtaining image, then compares the size of each member and mean value.With Gabor face two-value, turn to example, suppose Gabor face
size be M * N,
each single former value be
, their mean value is
:
(5)
(6)
In formula (6),
the numerical value after binaryzation on Gabor face matrix (i, j) position,
the numerical value before binaryzation on Gabor face matrix (i, j) position,
the mean value that Gabor face matrix has the front numerical value of a binaryzation.The method of this average binaryzation has been lost too many image information, at this, the present invention adopts be a kind of neighborhood binaryzation method as shown in Figure 2:
A) the non-zero point that the present invention be take in scheming is reference point, and the value that the present invention establishes this point is 1;
B) 8 neighbours of the value of this point and this point are put to comparison, if neighbours' point is more than or equal to this point, neighbours' point equals 1, otherwise is 0;
C) by the neighborhood of binaryzation point, be called neighborhood basis on schedule, observe neighborhood basis on schedule all not by the subneighborhood of binaryzation point around, the value of ordering as fruit neighbours is more than or equal to neighborhood basis on schedule not by the value before binaryzation, and the value that sub-neighbours are ordered is 1, otherwise is 0;
D) by that analogy, until all points by binaryzation.
(7)
As shown in formula above, the method for this neighborhood binaryzation is the variation tendency of Description Image pixel effectively, for retaining effective information in image, has good effect.
Make to use the same method, the present invention can be
with
binaryzation successively, and according to actual conditions, use different parameter weightings to be added, obtain eigenface
:
(8)
If use method of weighting above, eigenface is one
matrix, each unit is an integer between [0,32].
7), in step 2, the important areas such as the left eye on human face photo, right eye, nose and mouth are accurately positioned, and each important area is carried out separately to histogram analysis, obtain local feature description's vector.Each local feature description's vector is coupled together, obtain primitive character description vectors.In practical operation, the present invention uses the rectangle frames of different sizes to extract the key areas such as people's left eye and right eye, left eyebrow and right eyebrow, nose and face in eigenface, and is equipped with larger weights, and other face areas are equipped with less weights.For each region, under the Gabor of different scale and direction wave conversion, do the statistics with histogram in this region, and the statistics with histogram result in each region is stitched together, obtain original feature descriptor.
8) primitive character descriptor is carried out to pivot analysis, linear discriminant analysis dimensionality reduction obtains final feature description vectors.
9) feature after extracting is compared and classified in facial feature database.
10) show final classification results.
In hotel, restaurant and public place of entertainment entrance or hall etc. locate to install a fixing video camera.Choose after video monitoring scene, can get real-time video flow data after being connected to video camera.In front-end processor monitor video, whether have people's face to occur, if there is people's face to occur, by facial image intercepting and normalization, and by people on the face the positional information of vitals mail to together Analysis server.Analysis server is resolved facial image, and selects as required important human face region to carry out face characteristic extraction.Next the people's face data in the feature extracting and face database are compared and classified.Finally by the result output of comparison.
Application scenarios of the present invention belongs to intelligent video monitoring field, for the people's face of a suspect under public arena, detects or for relevant department, unknown personnel's identity validation is used.The deficiency of existing feature extracting method is mainly the deficiency of selecting owing to extracting characteristic area, thereby causes final tagsort error to strengthen; Or the intrinsic dimensionality extracting is too high, cause data volume excessive etc.The present invention proposes a kind of face feature extraction method for human face analysis system, the method converts based on Gabor, the method that pivot analysis, linear discriminant analysis and local feature description combine.The impact of the situations such as this character description method can filter out illumination to a certain extent, block, under the prerequisite of more accurate tagsort result, is controlled at feature descriptor in acceptable dimension guaranteeing.
In step 6, the method for Gabor face, first order difference Gabor face and second order difference Gabor face binaryzation, in dimensionality reduction, original data are not lost effective information after Weighted Fusion, still can keep high comparison accuracy.In step 7, obtain after facial image, while carrying out primitive character extraction, choose cleverly the important area for comparing, when guaranteeing robustness, also reduced data processing amount.
The present invention is not limited to above-mentioned preferred forms; anyone can draw other various forms of products under enlightenment of the present invention; no matter but do any variation in its shape or structure; every have identical with a application or akin technical scheme, within all dropping on protection scope of the present invention.