Summary of the invention
The present invention is directed to solve at least some of the technical problems in related technologies.
For this purpose, an object of the present invention is to provide a kind of skin detection guard method based on complex matrix,
This method is based on image local variance map and two-dimensional principal component analysis, can protect the privacy of facial image and the peace of data
Quan Xing.
It is another object of the present invention to propose a kind of skin detection protection system based on complex matrix.
In order to achieve the above objectives, one aspect of the present invention embodiment proposes a kind of skin detection based on complex matrix
Guard method, comprising: S1 obtains several Gray Face images, calculates the corresponding local variance figure of each width Gray Face image
Spectrum;S2, according to several described Gray Face images and multiple multiple complex matrixs of local variance map construction;S3, according to described
Training image and the multiple complex matrix in several Gray Face images calculate covariance matrix, according to the covariance square
Battle array generates eigenvectors matrix;S4 carries out scramble to described eigenvector matrix and generates Scrambling Matrix, utilizes the Scrambling Matrix
Projection is carried out to the multiple complex matrix and generates the corresponding feature of facial image;S5, will be in several described Gray Face images
Test image be compared with training image, and the corresponding feature of the facial image is identified by classifier.
The skin detection guard method based on complex matrix of the embodiment of the present invention, not only used facial image
Grayscale information, while the detailed information of facial image is taken full advantage of, effectively raise accuracy of identification.Simultaneously to eigenmatrix
Disorder processing is carried out, has fully considered safety and the privacy of facial image.When facial image feature templates are under attack or
When threat, new feature templates can be issued again by modifying Scrambling Matrix, replacement is original under fire or the template that threatens, can
Applied to identification and field of authentication.
In addition, the skin detection guard method according to the above embodiment of the present invention based on complex matrix can also have
There is following additional technical characteristic:
Further, in one embodiment of the invention, the corresponding local variance of each width Gray Face image
The calculation formula of map are as follows:
Wherein, fi V(x, y) is the local variance map of Gray Face image, and i=1,2 ..., M, M is Gray Face image
Width number, the size of Gray Face image is W1×W2, L indicate neighborhood in pixel sum,Indicate neighborhood
Average gray value.
Further, in one embodiment of the invention, the S2 further comprises:
By the Gray Face image fi(x, y) is used as real component, the local variance map fi V(x, y) is used as imaginary part
Component constructs the multiple complex matrix fi c(x, y) is embodied as:
fi c(x, y)=fi(x,y)+fi V(x,y)i
Wherein, fi(x, y) is Gray Face image, fi V(x, y) is the local variance map of Gray Face image.
Further, in one embodiment of the invention, the S3 is specifically included:
S31 calculates the average value of the training image in several described Gray Face imagesAccording to the average value
With the multiple complex matrix fi cGenerate the covariance matrix, the covariance matrix are as follows:
Wherein,For the average value of the training image in several Gray Face images, the transposition of T representing matrix;
S32 carries out Eigenvalues Decomposition to the covariance matrix, the corresponding feature vector of d maximum eigenvalue before choosing
Generate described eigenvector matrix W=[X1,X2,…,Xd]。
Further, in one embodiment of the invention, described that the progress scramble generation of described eigenvector matrix is set
Random matrix specifically includes:
It obtains having a size of W2×W2Unit matrix go forward side by side every trade transformation and/or rank transformation, generate new matrix R;
Described eigenvector matrix W and the new matrix R are converted to obtain the Scrambling Matrix, the scramble square
Battle array W' are as follows:
W'=RTW。
In order to achieve the above objectives, another aspect of the present invention embodiment proposes a kind of face characteristic mould based on complex matrix
Plate protects system, comprising:
Computing module calculates the corresponding part side of each width Gray Face image for obtaining several Gray Face images
Poor map;
Module is constructed, for according to the multiple plural squares of several described Gray Face images and multiple local variance map constructions
Battle array;
Generation module, based on according to the training image and the multiple complex matrix in several described Gray Face images
Covariance matrix is calculated, eigenvectors matrix is generated according to the covariance matrix;
Projection module generates Scrambling Matrix for carrying out scramble to described eigenvector matrix, utilizes the Scrambling Matrix
Projection is carried out to the multiple complex matrix and generates the corresponding feature of facial image;
Identification protecting module, for comparing the test image in several described Gray Face images with training image
Compared with, and the corresponding feature of the facial image is identified by classifier.
The skin detection based on complex matrix of the embodiment of the present invention protects system, not only used facial image
Grayscale information, while the detailed information of facial image is taken full advantage of, effectively raise accuracy of identification.Simultaneously to eigenmatrix
Disorder processing is carried out, has fully considered safety and the privacy of facial image.When facial image feature templates are under attack or
When threat, new feature templates can be issued again by modifying Scrambling Matrix, replacement is original under fire or the template that threatens, can
Applied to identification and field of authentication.
In addition, the skin detection protection system according to the above embodiment of the present invention based on complex matrix can also have
There is following additional technical characteristic:
Further, in one embodiment of the invention, the corresponding local variance of each width Gray Face image
The calculation formula of map are as follows:
Wherein, fi V(x, y) is the local variance map of Gray Face image, and i=1,2 ..., M, M is Gray Face image
Width number, the size of Gray Face image is W1×W2, L indicate neighborhood in pixel sum,Indicate neighborhood
Average gray value.
Further, in one embodiment of the invention, the building module, is specifically used for,
By the Gray Face image fi(x, y) is used as real component, the local variance map fi V(x, y) is used as imaginary part
Component constructs the multiple complex matrix fi c(x, y) is embodied as:
fi c(x, y)=fi(x,y)+fi V(x,y)i
Wherein, fi(x, y) is Gray Face image, fi V(x, y) is the local variance map of Gray Face image.
Further, in one embodiment of the invention, the generation module further comprises: the first generation unit
And decomposition unit;
First generation unit, for calculating the average value of the training image in several described Gray Face images
According to the average valueWith the multiple complex matrix fi cGenerate the covariance matrix, the covariance matrix are as follows:
Wherein,For the average value of the training image in several Gray Face images, the transposition of T representing matrix;
The decomposition unit, for carrying out Eigenvalues Decomposition to the covariance matrix, d maximum eigenvalue pair before choosing
The feature vector answered generates described eigenvector matrix W=[X1,X2,…,Xd]。
Further, in one embodiment of the invention, described that the progress scramble generation of described eigenvector matrix is set
Random matrix specifically includes:
It obtains having a size of W2×W2Unit matrix go forward side by side every trade transformation and/or rank transformation, generate new matrix R;
Described eigenvector matrix W and the new matrix R are converted to obtain the Scrambling Matrix, the scramble square
Battle array W' are as follows:
W'=RTW。
The additional aspect of the present invention and advantage will be set forth in part in the description, and will partially become from the following description
Obviously, or practice through the invention is recognized.
Specific embodiment
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end
Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached
The embodiment of figure description is exemplary, it is intended to is used to explain the present invention, and is not considered as limiting the invention.
The skin detection protection based on complex matrix proposed according to embodiments of the present invention is described with reference to the accompanying drawings
Method and system.
The skin detection based on complex matrix for describing to propose according to embodiments of the present invention with reference to the accompanying drawings first is protected
Maintaining method.
Fig. 1 is the skin detection guard method flow chart based on complex matrix according to one embodiment of the invention.
As shown in Figure 1, should skin detection guard method based on complex matrix the following steps are included:
In step sl, several Gray Face images are obtained, the corresponding local variance of each width Gray Face image is calculated
Map.
Specifically, it is assumed that having M width Gray Face image is fi(x, y) (i=1,2 ..., M), having a size of W1×W2, first
Calculate M corresponding local variance map of M width Gray Face image, wherein the Size of Neighborhood for enabling pixel is m × m, then office
Portion's variance calculation formula are as follows:
Wherein, L=m2Indicate the sum of pixel in neighborhood,Indicate the average gray value of neighborhood.It needs
It is bright, symmetrical polishing mode is taken for the pixel of image boundary to seek its brightness local variance.
In step s 2, according to several Gray Face images and multiple multiple complex matrixs of local variance map construction.
Further, S2 further comprises: by Gray Face image fi(x, y) is used as real component, local variance map
fi V(x, y) is used as imaginary, constructs multiple complex matrix fi c(x, y) is embodied as:
fi c(x, y)=fi(x,y)+fi V(x,y)i
Wherein, fi(x, y) is Gray Face image, fi V(x, y) is the local variance map of Gray Face image.
Specifically, former gray level image is constructed into complex matrix as real component, local variance map as imaginary
fi c(x, y) is embodied as:
fi c(x, y)=fi(x,y)+fi V(x,y)i
In step s3, according to the training image and multiple complex matrixs calculating covariance square in several Gray Face images
Battle array generates eigenvectors matrix according to covariance matrix.
Further, S3 further comprises:
S31 calculates the average value of the training image in several Gray Face imagesAccording to average valueWith it is multiple multiple
Matrix number fi cGenerate covariance matrix, covariance matrix are as follows:
Wherein,For the average value of the training image in several Gray Face images, the transposition of T representing matrix;
S32 carries out Eigenvalues Decomposition to covariance matrix, and the corresponding feature vector of d maximum eigenvalue generates before choosing
Eigenvectors matrix W=[X1,X2,…,Xd]。
Specifically, firstly, calculating the average value of training set imageThen covariance matrix are as follows:
Then, Eigenvalues Decomposition is carried out to covariance matrix, the corresponding feature vector of d maximum eigenvalue obtains before choosing
Eigenvectors matrix W=[X1,X2,…,Xd]。
In step s 4, scramble is carried out to eigenvectors matrix and generates Scrambling Matrix, using Scrambling Matrix to multiple plural numbers
Matrix carries out projection and generates the corresponding feature of facial image.
Further, scramble generation Scrambling Matrix is carried out to eigenvectors matrix to specifically include:
It obtains having a size of W2×W2Unit matrix go forward side by side every trade transformation and/or rank transformation, generate new matrix R;
'
Eigenvectors matrix W and new matrix R are converted to obtain Scrambling Matrix, Scrambling Matrix W are as follows:
W'=RTW。
Specifically, a W is generated2×W2The unit matrix of size carries out in capable transformation or rank transformation unit matrix
It is one or more, a new matrix R is obtained, then the eigenvectors matrix W that previous step obtains is converted, transformation is public
Formula are as follows:
W'=RTW,
Permutation matrix W' is generated by transformation, using permutation matrix W' to complex matrix fi c(x, y) is projected to obtain people
The corresponding feature of face image.
In step s 5, the test image in several Gray Face images is compared with training image, and by dividing
Class device identifies the corresponding feature of facial image.
Specifically, test image is compared with training image, is classified using the arest neighbors based on Euclidean distance
Device is classified to obtain discrimination.
Principal Component Analysis has been used successfully to recognition of face, but the face identification method based on principal component analysis does not have
Defeasibility.Based on the biological feather recognition method of scramble principal component analysis, when not influencing accuracy of identification while life is protected
The safety of object feature and privacy;When facial image feature templates are under attack or threaten, new spy can be issued again
Levy template.Human eye is usually more sensitive to high-frequency information, because the high frequency section of image usually reflects the structural information of image,
And the local variance of image can preferably characterize the structural information of image.
The method of the embodiment of the present invention is based on image local variance map and two-dimensional principal component analysis, not only used face
The grayscale information of image, while the detailed information of facial image is taken full advantage of, effectively raise accuracy of identification.Simultaneously to spy
It levies matrix and carries out disorder processing, fully considered safety and the privacy of facial image.When facial image feature templates by
Attack or when threatening, can issue new feature templates by modifying Scrambling Matrix again, and replacement is original under fire or to be threatened
Template can be applied to identification and field of authentication.
Illustrate the skin detection based on complex matrix of the embodiment of the present invention below by a specific embodiment
Guard method.
Using RadfD facial image database, totally 67 people, everyone 8 width.Wherein, select 6 width images as training, 2 width images
As test;Image size is 64 × 64, and Size of Neighborhood is 3 × 3,5 × 5,7 × 7.
After through the above steps, as shown in Fig. 2, Fig. 2 (a) is an original Gray Face image, Fig. 2 (b) is neighbour
The local variance figure in domain 3 × 3, Fig. 2 (c) are the local variance figure of neighborhood 5 × 5, and Fig. 2 (d) is the local variance figure of neighborhood 7 × 7,
Meanwhile table 1 is discrimination (%) comparison sheet, giving the present invention is embodiment method and based on scramble two-dimensional principal component analysis
(RP-2DPCA) recognition result of method, it can be seen that using discrimination can be effectively improved after image local variogram.
Table 1
The skin detection guard method based on complex matrix proposed according to embodiments of the present invention, it is more traditional it is main at
Divide analysis method, image structure information is dissolved into principal component analysis, increases the information content of carrying, further improves identification
Precision;Due to matrix R have randomness, when registration biological attribute data occur lose or it is stolen when can issue spy again
Levy template.
The skin detection protection based on complex matrix proposed according to embodiments of the present invention referring next to attached drawing description
System.
Fig. 3 is to protect system structure signal according to the skin detection based on complex matrix of one embodiment of the invention
Figure.
As shown in figure 3, the protection system includes: computing module 100, building module 200, generation module 300, projection module
400 and identification protecting module 500.
Wherein, it is corresponding to calculate each width Gray Face image for obtaining several Gray Face images for computing module 100
Local variance map.
Module 200 is constructed to be used for according to the multiple plural squares of several Gray Face images and multiple local variance map constructions
Battle array.
Generation module 300 be used for according in several Gray Face images training image and multiple complex matrixs calculate association side
Poor matrix generates eigenvectors matrix according to covariance matrix.
Projection module 400 is used to carry out scramble to eigenvectors matrix to generate Scrambling Matrix, using Scrambling Matrix to multiple
Complex matrix carries out projection and generates the corresponding feature of facial image.
Identification protecting module 500 is used to for the test image in several Gray Face images being compared with training image,
And the corresponding feature of facial image is identified by classifier.
The protection identifying system 10 can protect the privacy of facial image and the safety of data.
Further, in one embodiment of the invention, the corresponding local variance map of each width Gray Face image
Calculation formula are as follows:
Wherein, fi V(x, y) is the local variance map of Gray Face image, and i=1,2 ..., M, M is Gray Face image
Width number, the size of Gray Face image is W1×W2, L indicate neighborhood in pixel sum,Indicate neighborhood
Average gray value.
Further, in one embodiment of the invention, module is constructed, is specifically used for,
By Gray Face image fi(x, y) is used as real component, local variance map fi V(x, y) is used as imaginary, structure
Build multiple complex matrix fi c(x, y) is embodied as:
fi c(x, y)=fi(x,y)+fi V(x,y)i
Wherein, fi(x, y) is Gray Face image, fi V(x, y) is the local variance map of Gray Face image.
Further, in one embodiment of the invention, generation module further comprises: the first generation unit and point
Solve unit;
First generation unit, for calculating the average value of the training image in several Gray Face imagesAccording to average
ValueWith multiple complex matrix fi cGenerate covariance matrix, covariance matrix are as follows:
Wherein,For the average value of the training image in several Gray Face images, the transposition of T representing matrix;
Decomposition unit, for carrying out Eigenvalues Decomposition to covariance matrix, the corresponding feature of d maximum eigenvalue before choosing
Vector generates eigenvectors matrix W=[X1,X2,…,Xd]。
Further, in one embodiment of the invention, scramble is carried out to eigenvectors matrix and generates Scrambling Matrix tool
Body includes:
It obtains having a size of W2×W2Unit matrix go forward side by side every trade transformation and/or rank transformation, generate new matrix R;
Eigenvectors matrix W and new matrix R are converted to obtain Scrambling Matrix, Scrambling Matrix W' are as follows:
W'=RTW。
It should be noted that the aforementioned explanation to the skin detection guard method embodiment based on complex matrix
It is also applied for the device of the embodiment, details are not described herein again.
The skin detection protection system based on complex matrix proposed according to embodiments of the present invention, not only used people
The grayscale information of face image, while the detailed information of facial image is taken full advantage of, effectively raise accuracy of identification.It is right simultaneously
Eigenmatrix carries out disorder processing, has fully considered safety and the privacy of facial image.When facial image feature templates by
To when attack or threat, new feature templates can be issued again by modifying Scrambling Matrix, replacement originally under fire or threatened
Template, can be applied to identification and field of authentication.
In addition, term " first ", " second " are used for descriptive purposes only and cannot be understood as indicating or suggesting relative importance
Or implicitly indicate the quantity of indicated technical characteristic.Define " first " as a result, the feature of " second " can be expressed or
Implicitly include at least one this feature.In the description of the present invention, the meaning of " plurality " is at least two, such as two, three
It is a etc., unless otherwise specifically defined.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show
The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example
Point is included at least one embodiment or example of the invention.In the present specification, schematic expression of the above terms are not
It must be directed to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be in office
It can be combined in any suitable manner in one or more embodiment or examples.In addition, without conflicting with each other, the skill of this field
Art personnel can tie the feature of different embodiments or examples described in this specification and different embodiments or examples
It closes and combines.
Although the embodiments of the present invention has been shown and described above, it is to be understood that above-described embodiment is example
Property, it is not considered as limiting the invention, those skilled in the art within the scope of the invention can be to above-mentioned
Embodiment is changed, modifies, replacement and variant.