CvSVM::EPS_SVR - regression. The distance between feature vectors from the training set and the fitting hyperplane must be less than p. For outliers the penalty multiplier C is used.
CvSVM::NU_SVR - regression. nu is used instead of p.
• kernel_type: The kernel type, one of the following:
CvSVM::LINEAR - no mapping is done, linear discrimination (or regression) is done in the original feature space. It is the fastest option:
d(x,y) = x•y == (x,y) (1)
CvSVM::POLY - polynomial kernel:
d(x,y) = (gamma*(x•y)+coef0)degree (2) CvSVM::RBF - radial-basis-function kernel; a good choice in most cases:
d(x,y) = exp(-gamma*|x-y|2) (3)
CvSVM::SIGMOID - sigmoid function is used as a kernel:
d(x,y) = tanh(gamma*(x•y)+coef0) (4)
• degree, gamma, coef0: Parameters of the kernel, used in the formulas above.
• C, nu, p: Parameters in the generalized SVM optimization problem.
• class_weights: Optional weights, assigned to particular classes. They are multiplied by C and thus affect the misclassification penalty for different classes. The larger the weight is, the larger the penalty on misclassification of data from the corresponding class is.
• term_crit: Termination procedure for iterative SVM training procedure, which solves a partial case of constrained quadratic optimization problem. It stops either after a certain number of iterations (term_crit.num_iter) or when the parameters change too little (no more than term_crit.epsilon) from iteration to iteration.
In experimental results (see section 7.2.3), following SVM parameters are used:
svm_type CvSVM::C_SVC kernel_type CvSVM::POLY degree 2
gamma 1
coef0 1
C 5
term_crit only term_crit.epsilon with value 0.000000001
Table 45. SVM parameters using OpenCV Machine Learning Library
The epsilon termination criterion is empirically found as a trade off between computation time and optimal results.
Skin Segmentation
Skin Segmentation procedure is implemented by means of OpenCV library image processing algorithms.
• Image preprocessing (training / test)
In image preprocessing step, the original image is smoothed to avoid compression noise and other artifacts. Therefore, a 3x3 simple blur filter from OpenCV Library is used, consisting of the sum over a pixel 3×3 neighborhood with subsequent scaling by 1/(3x3).
// image PRE processing
cvSmooth( ipl_Orig_RGB_Image, ipl_RGB_Image, CV_BLUR, 3, 3, 0, 0 );
• LUV conversion (training / test)
A function to perform LUV conversion and another one to split the 3 components are also available in OpenCV library:
// calculate Luv
cvCvtColor( ipl_RGB_Image, ipl_Luv_Image, CV_RGB2Luv );
// split
cvSplit( ipl_Luv_Image, ipl_L_Image, ipl_u_Image, ipl_v_Image, NULL);
The function cvCvtColor converts input image from one color space to another. And the parameter CV_RGB2Luv indicates that the transformation selected is from RGB to CIE LUV.
• Skin model definition (training)
After color conversion, for each pixel and taking into account a given neighborhood, u and v components mean value are calculated by mean of the following OpenCV Library function:
// mean value u & v
cvAvgSdv( ipl_u_Image, &u_mean, &u_std_dev, NULL );
cvAvgSdv( ipl_v_Image, &v_mean, &v_std_dev, NULL );
The function cvAvgSdv calculates the average value and standard deviation of array elements.
• Skin segmentation (test)
Given an image to be segmented and after preprocessing and converting to LUV color space, u and v components mean values are calculated as in training stage. Then, for each pixel and taking into account a SkinDetBoxSize region (see equation (37)), the mean value is calculated using above cvAvgSdv function.
Then, skin model thresholds are applied to determinate if the box region is skin or not resulting in a skin mask, where some morphological operations need to be applied to eliminate isolated pixels after each down-sampling step:
1st) Closing: using a 3x5 pixels ellipse structuring element.
// Create an elliptic structuring element nSize=3;
IplConvKernel* structElem1 =
cvCreateStructuringElementEx( nSize+2, // columns
nSize, // rows
floor((nSize+2)/2.0), // anchor_x floor(nSize/2.0), // anchor_y CV_SHAPE_ELLIPSE, // shape NULL); // CV_SHAPE_CUSTOM values
// Perform advanced morphological transformations - CLOSING cvMorphologyEx( iplSkinMask, // source
iplSkinMask, // destination
NULL, // temporary image (not required) structElem2, // structuring element
CV_MOP_ CLOSE, // morphological operation closing 1); // number of iterations
2nd) Opening: using a 11 pixels radius circle structuring element.
// Create a circular structuring element nSize=11;
IplConvKernel* structElem2 =
cvCreateStructuringElementEx( nSize, // columns
nSize, // rows
floor(nSize/2.0), // anchor_x floor(nSize/2.0), // anchor_y CV_SHAPE_ELLIPSE, // shape NULL); // CV_SHAPE_CUSTOM values
// Perform advanced morphological transformations - OPENING cvMorphologyEx( iplSkinMask, // source
iplSkinMask, // destination
NULL, // temporary image (not required) structElem2, // structuring element
CV_MOP_OPEN, // morphological operation opening 1); // number of iterations
Acronyms & Abbreviations List
ASA American Standards Association
DB Database
CIE International Commission on Illumination (abbreviated French name) CMU Carnegie Mellon University
DARPA Defense Advanced Research Products Agency EPFL Ecole Polytechnique Fédérale de Lausanne FERET Face Recognition Technology
FGNET Face and Gesture Recognition Working Group GIF Graphics Interchange Format
GTAV Audio Visual Technologies Group (abbreviated Catalan name) GUI Graphical User Interface
HSV color space (Hue, Saturation, Value) JPEG Joint Photographic Experts Group KLT Karhunen-Loéve Transform LBP Local Binary Patterns
MATLAB Matrix Laboratory (Mathworks, Inc.) MIT Massachusetts Institute of Technology MLL Machine Learning Library
OpenCV Open Source Computer Vision RelDiffNorm Relative Difference Normalized
PBM Portable Bit Map
PCA Principal Component Analysis
PGM Portable Gray Map
RGB color space (Red, Green, Blue) ROI Region Of Interest
SVM Support Vector Machine UCS Uniform Chromaticity Scale
UPC Universitat Politècnica de Catalunya
Bibliography
Publications:
[1] T.Ahonen, A.Hadid & M.Pietikäinen, Face Description with Local Binary Patterns:
Application to Face Recognition. Draft, 5th June 2006.
[2] A.Hadid, M.Heikkilä, T.Ahonen & M.Pietikäinen. A Novel Approach to Access Control based on Face Recognition. Machine Vision Group, InfoTech Oulu and Department of Electrical and Information Engineering. University of Oulu, Finland.
[3] T.Ahonen, M.Pietikäinen, A.Hadid & T.Mäenpaä. Face Recognition Based on the Appearance of Local Regions. Machine Vision Group, InfoTech. University of Oulu, Finland. 2004 IEEE.
[4] T.Ahonen, A.Hadid & M.Pietikäinen. Face Recognition with Local Binary Patterns.
Machine Vision Group, InfoTech. University of Oulu, Finland. T.Pajdla and J.Matas (Eds): ECCV 2004, LNCS 3021, pp.469-481, 2004. Spring-Verlag Berlin Heidelberg 2004.
[5] A.Hadid & M.Pietikäinen. A Hybrid Approach to Face Detection under Unconstrained Environments. Machine Vision Group, Dept. of Electrical and Information Engineering. University of Oulu, Finland.
[6] A.Hadid, M.Pietikäinen & T.Ahonen. A Discriminative Feature Space for Detecting and Recognizing Faces. Machine Vision Group, InfoTech Oulu and Dept. of Electrical and Information Engineering. University of Oulu, Finland.
[7] T.Ojala, M.Pietikäinen & T.Mäenpaä. Multiresolution gray-scale and rotation invariant texture classification with Local Binary Patterns. IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 24, no. 7, pp. 971-987, July 2002.
[8] G.Heusch, Y.Rodriguez & S.Marcel. Local Binary Patterns as an Image Preprocessing for Face Authentication. IDIAP Research Institute, Martigny, Switzerland. Ecole Polytechnique Fédérale de Lausanne (EPFL), Switzerland.
[9] Y.Rodriguez & S.Marcel. Face Authentication using Adapted Local Binary Pattern Histograms. IDIAP Research Institute, Martigny, Switzerland.
[10] S.Marcel, Y.Rodriguez & G.Heusch. On the Recent Use of Local Binary Patterns for Face Authentication. IDIAP Research Institute, Martigny, Switzerland. International Journal of Image and Video Processing, Special Issue on Facial Image Processing.
May 2007.
[11] E.Osuna, R.Freund & F.Girosi. Training Support Vector Machine: an Application to Face Detection. In Proc. Computer Vision and Pattern Recognition, pages 130-136, June 1997.
[12] Josep R. Casas, F. Marqués & P.Salembier. Apunts de l’assignatura: Processament d’Imatge. Image Processing Group, Signal Theory & Comm. Dept, UPC. Barcelona, Fall 2004.
[13] Lindsay I Smith. A tutorial on Principal Components Analysis. February 26, 2002.
[14] K.-K. Sung, Learning and Example Selection for Object and Pattern Detection, PhD thesis, MIT AI Lab, Jan. 1996. Available as AI Technical Report 1572.
[15] G.Yang & T.S.Huang. Human Face Detection in Complex Background, Pattern Recognition, vol. 27, no. 1, pp. 53-63, 1994.
[16] K.C.Yow & R.Cipolla. Feature-based human face detection, Image and Vision Computing, vol. 15, no. 9, pp. 713 – 735, 1997.
[17] A.L.Yuille, P.W.Hallinan & D.S.Cohen. Feature extraction from faces using deformable templates, International Journal of Computer Vision vol. 8, no. 2, 99–111, 1992.
[18] P.Juell & R.Marsh. A hierarchical neural network for human face detection, Pattern Recog. 29, 1996, 781–787.
[19] E.Viennet & F.Fogelman Soulié. Connectionist methods for human face processing, in Face Recognition: From Theory to Application, Springer-Verlag, Berlin/New York, 1998.
[20] M.Schulze, K.Scheffler, & K.W.Omlin. Recognizing Facial Actions with Support Vector Machines, In Proc. PRASA, pp. 93-96, 2002.
[21] L.R.Rabiner. A tutorial on Hidden Markov Models and Selected Applications in Speech Recognition, Proceedings IEEE, vol. 77, no. 2, Feb 1989.
[22] M.A.Turk & A.P.Pentland. Face recognition using eigenfaces, Proceedings of the IEEE Computer Society Conf. on Computer Vision and Pattern Recognition, pp. 586-591, Maui, Hawaii 1991.
[23] B.Zarit, B.J.Super & F.Quek. Comparison of five color models in skin pixel classification, ICCV’99 Int’l Workshop on Recognition, Analysis and Tracking of Faces and Gestures in Real-Time Systems, pp. 58–63, Corfu, Greece, September 1999.
[24] P.Viola & M.Jones. Rapid Object Detection using a Boosted Cascade of Simple Features, Computer Vision and Pattern Recognition, 2001.
[25] C.H.Lee, J.S.Kim & K.H.Park. Automatic human face location in a complex background, Pattern Recognition Letters, 29, 1877–1889, 1996.
[26] R.J.Qian, M.I.Sezan & K.E.Matthews. A Robust Real-Time Face Tracking Algorithm, ICIP (1) 1998: 131-135.
[27] M.Lades, J.C.Vorbruggen, J.Buhmann, J.Lange, C.von der Malsburg, R.P.Wurtz &
W.Konen. Distortion Invariant Object Recognition in the Dynamic Link Architecture IEEE Transactions on Computers archive Volume 42 , Issue 3 Pages: 300 – 311.
1993.
[28] P.Sinha, B.Balas, Y.Ostrovsky, R.Russell. Face recognition by humans: 20 results all computer vision researchers should know about. Proceedings of the IEEE, 94, 1948–
1962. 2006.
[29] M.S.Keil. “I Look in Your Eyes, Honey”: Internal Face Features Induce Spatial Frequency Preference for Human Face Processing. PLoS Computational Biology 5(3):
e1000329. doi:10.1371/journal.pcbi.1000329. 2009
Books:
[30] Richard O. Duda, Peter E.Hart, David Stork. Pattern Classification, 2nd Edition Wiley.