//
// Feature configuration file guidelines:
//     1. // to comment the current line.
//     2. Patches and features are labeled by symbolic strings. Numbers are treated as symbolic labels.
//     3. Do not use ; in labels
//     4. TimeSeriesFeatures can use a FeatureExtractor type name to include all features of that type.
//     5. For any labels referred to, if they are not defined or commented out, they will be ignored.
//     6. If all patch/feature labels a feature refers to are commented out or non-exist, make sure that feature is commented out as well.
//     7. No two different patches or features can use the same label.
//     8. Spaces are treated as part of the label.
//

// ImagePatch format: 'ImagePatch =' <label>,
//                     <Index for centerY of patch>,
//                     <Percent of eyewidth to offset the centerY of patch>,
//                     <Index for centerX of patch>,
//                     <Percent of eyewidth to offset the centerX of patch>,
//                     <height of patch as percent of eye width (will enforce an odd size, min of 1)>,
//                     <width of patch as percent of eye width (will enforce an odd size, min of 1)>,
//                     <type of stream that the patch applies to>
//                     <enablePitchCorrection for enabling the correction of the patches or boxes based on the pitch value (Optional: default is false; put EnablePitchCorrection to enable the pitch correction)>
//          Index parameters must be one of: LeftEye, RightEye, MidEye, Nose, LeftMouth, RightMouth, MidMouth, LeftMidEyeMouth, RightMidEyeMouth
//          Values supported by the stream type: IR, Color, Depth, NormalizedIR, EyesOnlyRotatedAndContrastAdjustedColorLum

// CHEEK PATCHES
ImagePatchSet CheekPatches =
{
    cLeftUpOut = LeftEye,0.4,LeftEye,0.08,0,0,IR,EnablePitchCorrection
    cLeftMidIn = LeftEye,0.6,LeftEye,-0.08,0,0,IR,EnablePitchCorrection
    cLeftLowIn = LeftEye,0.8,LeftEye,-0.08,0,0,IR,EnablePitchCorrection
    cLeftLowOut = LeftEye,0.8,LeftEye,0.08,0,0,IR,EnablePitchCorrection
    cRightUpOut = RightEye,0.4,RightEye,0.08,0,0,IR,EnablePitchCorrection
    cRightMidIn = RightEye,0.6,RightEye,-0.08,0,0,IR,EnablePitchCorrection
    cRightLowIn = RightEye,0.8,RightEye,-0.08,0,0,IR,EnablePitchCorrection
    cRightLowOut = RightEye,0.8,RightEye,0.08,0,0,IR,EnablePitchCorrection
}

// GLASSES PATCHES
ImagePatchSet GlassesPoints =
{
    GlassBridgeUpper = MidEye,-.2,MidEye,0,0,0,IR,EnablePitchCorrection
    GlassBridgeMid = MidEye,0,MidEye,0,0,0,IR,EnablePitchCorrection

    GlassLeftLowerRimInner = LeftEye,.3,LeftEye,.2,0,0,IR,EnablePitchCorrection
    GlassLeftLowerRimMid = LeftEye,.3,LeftEye,0,0,0,IR,EnablePitchCorrection
    GlassLeftLowerRimOuter = LeftEye,.3,LeftEye,-.2,0,0,IR,EnablePitchCorrection

    GlassRightLowerRimInner = RightEye,.3,RightEye,.2,0,0,IR,EnablePitchCorrection
    GlassRightLowerRimMid = RightEye,.3,RightEye,0,0,0,IR,EnablePitchCorrection
    GlassRightLowerRimOuter = RightEye,.3,RightEye,-.2,0,0,IR,EnablePitchCorrection

    GlassLeftOuterRimUpper = LeftEye,-.125,LeftEye,.3,0,0,IR,EnablePitchCorrection
    GlassLeftOuterRimMid = LeftEye,.0,LeftEye,.35,0,0,IR,EnablePitchCorrection
    GlassLeftOuterRimLower = LeftEye,.125,LeftEye,.3,0,0,IR,EnablePitchCorrection

    GlassRightOuterRimUpper = RightEye,-.125,RightEye,-.3,0,0,IR,EnablePitchCorrection
    GlassRightOuterRimMid = RightEye,.0,RightEye,-.35,0,0,IR,EnablePitchCorrection
    GlassRightOuterRimLower = RightEye,.125,RightEye,-.3,0,0,IR,EnablePitchCorrection
}

// GLASSES BOXES
ImagePatchSet GlassesBoxes =
{
    GlassBridgeBox = MidEye,0,MidEye,0,.4,.2,IR,EnablePitchCorrection

    GlassLeftLowerRimInnerBox = LeftEye,.3,LeftEye,.2,.2,.2,IR,EnablePitchCorrection
    GlassLeftLowerRimMidBox = LeftEye,.3,LeftEye,0,.2,.2,IR,EnablePitchCorrection
    GlassLeftLowerRimOuterBox = LeftEye,.3,LeftEye,-.2,.2,.2,IR,EnablePitchCorrection

    GlassRightLowerRimInnerBox = RightEye,.3,RightEye,.2,.2,.2,IR,EnablePitchCorrection
    GlassRightLowerRimMidBox = RightEye,.3,RightEye,0,.2,.2,IR,EnablePitchCorrection
    GlassRightLowerRimOuterBox = RightEye,.3,RightEye,-.2,.2,.2,IR,EnablePitchCorrection

    GlassLeftOuterRimUpperBox = LeftEye,-.125,LeftEye,.3,.2,.2,IR,EnablePitchCorrection
    GlassLeftOuterRimMidBox = LeftEye,.0,LeftEye,.35,.2,.2,IR,EnablePitchCorrection
    GlassLeftOuterRimLowerBox = LeftEye,.125,LeftEye,.3,.2,.2,IR,EnablePitchCorrection

    GlassRightOuterRimUpperBox = RightEye,-.125,RightEye,-.3,.2,.2,IR,EnablePitchCorrection
    GlassRightOuterRimMidBox = RightEye,.0,RightEye,-.35,.2,.2,IR,EnablePitchCorrection
    GlassRightOuterRimLowerBox = RightEye,.125,RightEye,-.3,.2,.2,IR,EnablePitchCorrection
}

// FACIALHAIR PATCHES
ImagePatchSet GoateePoints = 
{
    SoulPatch = LowerLipFromDepth,0.2,MidMouth,0.0,0,0,IR
    GoateeUp = LowerLipFromDepth,0.4,MidMouth,0.0,0,0,IR
    GoateeDown = LowerLipFromDepth,0.6,MidMouth,0.0,0,0,IR
    SoulPatchLeft = LowerLipFromDepth,0.2,MidMouth,0.3,0,0,IR
    GoateeUpLeft = LowerLipFromDepth,0.4,MidMouth,0.3,0,0,IR
    GoateeDownLeft = LowerLipFromDepth,0.6,MidMouth,0.3,0,0,IR
    SoulPatchRight = LowerLipFromDepth,0.2,MidMouth,-0.3,0,0,IR
    GoateeUpRight = LowerLipFromDepth,0.4,MidMouth,-0.3,0,0,IR
    GoateeDownRight = LowerLipFromDepth,0.6,MidMouth,-0.3,0,0,IR
}

ImagePatchSet GoateeBoxes = 
{
    SoulPatchBox = LowerLipFromDepth,0.2,MidMouth,0.0,0.3,0.3,IR
    GoateeUpBox = LowerLipFromDepth,0.4,MidMouth,0.0,0.3,0.3,IR
    GoateeDownBox = LowerLipFromDepth,0.6,MidMouth,0.0,0.2,0.2,IR    
}

ImagePatchSet MuttonPoints = 
{
    MuttonLeftDownIn = LeftMouth,0.4,LeftMouth,0.2,0,0,IR
    MuttonLeftDownOut = LeftMouth,0.4,LeftMouth,0.5,0,0,IR
    MuttonLeftDown = LeftMouth,0.4,LeftMouth,0.3,0,0,IR
    MuttonRightDownIn = RightMouth,0.4,RightMouth,-0.2,0,0,IR
    MuttonRightDownOut = RightMouth,0.4,RightMouth,-0.5,0,0,IR
    MuttonRightDown = RightMouth,0.4,RightMouth,-0.3,0,0,IR

    MuttonLeftIn = LeftMouth,0.2,LeftMouth,0.2,0.0,0.0,IR
    MuttonLeftOut = LeftMouth,0.2,LeftMouth,0.5,0.0,0.0,IR
    MuttonLeft = LeftMouth,0.2,LeftMouth,0.3,0.0,0.0,IR
    MuttonRightIn = RightMouth,0.2,RightMouth,-0.2,0.0,0.0,IR
    MuttonRightOut = RightMouth,0.2,RightMouth,-0.5,0.0,0.0,IR
    MuttonRight = RightMouth,0.2,RightMouth,-0.3,0.0,0.0,IR

    MuttonLeftUpIn = LeftMouth,0.0,LeftMouth,0.2,0,0,IR
    MuttonLeftUpOut = LeftMouth,0.0,LeftMouth,0.5,0,0,IR
    MuttonLeftUp = LeftMouth,0.0,LeftMouth,0.3,0.0,0.0,IR
    MuttonRightUpIn = RightMouth,0.0,RightMouth,-0.2,0,0,IR
    MuttonRightUpOut = RightMouth,0.0,RightMouth,-0.5,0,0,IR
    MuttonRightUp = RightMouth,0.0,RightMouth,-0.3,0.0,0.0,IR
}

ImagePatchSet MuttonBoxes = 
{
    MuttonLeftDownInBox = LeftMouth,0.4,LeftMouth,0.2,0.2,0.2,IR
    MuttonLeftDownOutBox = LeftMouth,0.4,LeftMouth,0.5,0.2,0.2,IR
    MuttonRightDownInBox = RightMouth,0.4,RightMouth,-0.2,0.2,0.2,IR
    MuttonRightDownOutBox = RightMouth,0.4,RightMouth,-0.5,0.2,0.2,IR

    MuttonLeftUpInBox = LeftMouth,0.0,LeftMouth,0.2,0.2,0.2,IR
    MuttonLeftUpOutBox = LeftMouth,0.0,LeftMouth,0.5,0.2,0.2,IR
    MuttonRightUpInBox = RightMouth,0.0,RightMouth,-0.2,0.2,0.2,IR
    MuttonRightUpOutBox = RightMouth,0.0,RightMouth,-0.5,0.2,0.2,IR
}

ImagePatchSet MustachePoints = 
{
    MustacheLeftIn = UpperLipFromDepth,-0.2,LeftMouth,-0.2,0,0,IR
    MustacheLeftOut = LeftMouth,-0.2,LeftMouth,0.2,0,0,IR
    MustacheRightIn = UpperLipFromDepth,-0.2,RightMouth,0.2,0,0,IR
    MustacheRightOut = RightMouth,-0.2,RightMouth,-0.2,0,0,IR
    MustacheLeft = LeftMouth,0,LeftMouth,0,0.0,0.0,IR
    MustacheLeftUp = LeftMouth,-.15,LeftMouth,0,0.0,0.0,IR
    MustacheLeftUpper = LeftMouth,-0.3,LeftMouth,0.0,0.0,0.0,IR
    MustacheRight = RightMouth,0,RightMouth,0,0.0,0.0,IR
    MustacheRightUp = RightMouth,-.15,RightMouth,0,0.0,0.0,IR
    MustacheRightUpper = RightMouth,-0.3,RightMouth,0.0,0.0,0.0,IR
}

ImagePatchSet MustacheBoxes = 
{
    MustacheLeftInBox = UpperLipFromDepth,-0.2,LeftMouth,-0.2,0.2,0.2,IR
    MustacheLeftOutBox = LeftMouth,-0.2,LeftMouth,0.2,0.2,0.2,IR
    MustacheRightInBox = UpperLipFromDepth,-0.2,RightMouth,0.2,0.2,0.2,IR
    MustacheRightOutBox = RightMouth,-0.2,RightMouth,-0.2,0.2,0.2,IR
    MustacheLeftBox = LeftMouth,-.15,LeftMouth,0,0.2,0.2,IR
    MustacheRightBox = RightMouth,-.15,RightMouth,0,0.2,0.2,IR
}

// MOUTH PATCHES
ImagePatchSet IRMouthPoints =
{
    LeftUpMouthPoint = LeftMouth,-.1,LeftMouth,0,0,0,IR,EnablePitchCorrection
    LeftMouthPoint = LeftMouth,0,LeftMouth,0,0,0,IR,EnablePitchCorrection
    LeftDownMouthPoint = LeftMouth,.1,LeftMouth,0,0,0,IR,EnablePitchCorrection

    MidUpMouthPoint = MidMouth,-.1,MidMouth,0,0,0,IR,EnablePitchCorrection
    MidMouthPoint = MidMouth,0,MidMouth,0,0,0,IR,EnablePitchCorrection
    MidDownMouthPoint = MidMouth,.1,MidMouth,0,0,0,IR,EnablePitchCorrection

    RightUpMouthPoint = RightMouth,-.1,RightMouth,0,0,0,IR,EnablePitchCorrection
    RightMouthPoint = RightMouth,0,RightMouth,0,0,0,IR,EnablePitchCorrection
    RightDownMouthPoint = RightMouth,.1,RightMouth,0,0,0,IR,EnablePitchCorrection
}

ImagePatchSet IRMouthBoxes =
{
    BigMouthBox = MidMouth, -0.045, MidMouth, 0,.6,1.2,IR,EnablePitchCorrection

    LeftCoarseMouthBox = LeftMouth,-0.045,LeftMouth,0,0.45,0.4,IR,EnablePitchCorrection
    MidCoarseMouthBox = MidMouth,-0.045,MidMouth,0,0.45,0.4,IR,EnablePitchCorrection
    RightCoarseMouthBox = RightMouth,-0.045,RightMouth,0,0.45,0.4,IR,EnablePitchCorrection
}

ImagePatchSet ColorMouthBoxes =
{
    ColorBigMouthBox = MidMouth, -0.045, MidMouth, 0,.6,1.2,Color,EnablePitchCorrection

    ColorLeftCoarseMouthBox = LeftMouth,-0.045,LeftMouth,0,0.45,0.4,Color,EnablePitchCorrection
    ColorMidCoarseMouthBox = MidMouth,-0.045,MidMouth,0,0.45,0.4,Color,EnablePitchCorrection
    ColorRightCoarseMouthBox = RightMouth,-0.045,RightMouth,0,0.45,0.4,Color,EnablePitchCorrection
}

// Custom Filter format "Filter <label> = File(<filename>)"
// The convention is to name the files with an flt extension.
//
// Filter MyCustomFilter = File(custom.flt)
//

// GaborFilter format "Filter <label> = Gabor("
//                                   <wavelength, in pixel>;
//                                   <orientation, [-3.14, 3.14]>;
//                                   <phaseOffset, in pixel>;
//                                   <bandwidth, in pixel>;
//                                   <aspectRatio, [0.0,infty)>;)
//
Filter 0 = Gabor(3,0,0,1,0.5)
Filter 1 = Gabor(3,0,1.5707963,1,0.5)
Filter 2 = Gabor(3,0.5235988,0,1,0.5)
Filter 3 = Gabor(3,0.5235988,1.5707963,1,0.5)
Filter 4 = Gabor(3,1.0471976,0,1,0.5)
Filter 5 = Gabor(3,1.0471976,1.5707963,1,0.5)
Filter 6 = Gabor(3,1.5707963,0,1,0.5)
Filter 7 = Gabor(3,1.5707963,1.5707963,1,0.5)
Filter 8 = Gabor(3,2.0943951,0,1,0.5)
Filter 9 = Gabor(3,2.0943951,1.5707963,1,0.5)
Filter 10 = Gabor(3,2.6179939,0,1,0.5)
Filter 11 = Gabor(3,2.6179939,1.5707963,1,0.5)
Filter 12 = Gabor(4,0,0,1,0.5)
Filter 13 = Gabor(4,0,1.5707963,1,0.5)
Filter 14 = Gabor(4,0.5235988,0,1,0.5)
Filter 15 = Gabor(4,0.5235988,1.5707963,1,0.5)
Filter 16 = Gabor(4,1.0471976,0,1,0.5)
Filter 17 = Gabor(4,1.0471976,1.5707963,1,0.5)
Filter 18 = Gabor(4,1.5707963,0,1,0.5)
Filter 19 = Gabor(4,1.5707963,1.5707963,1,0.5)
Filter 20 = Gabor(4,2.0943951,0,1,0.5)
Filter 21 = Gabor(4,2.0943951,1.5707963,1,0.5)
Filter 22 = Gabor(4,2.6179939,0,1,0.5)
Filter 23 = Gabor(4,2.6179939,1.5707963,1,0.5)
Filter 24 = Gabor(5,0,0,1,0.5)
Filter 25 = Gabor(5,0,1.5707963,1,0.5)
Filter 26 = Gabor(5,0.5235988,0,1,0.5)
Filter 27 = Gabor(5,0.5235988,1.5707963,1,0.5)
Filter 28 = Gabor(5,1.0471976,0,1,0.5)
Filter 29 = Gabor(5,1.0471976,1.5707963,1,0.5)
Filter 30 = Gabor(5,1.5707963,0,1,0.5)
Filter 31 = Gabor(5,1.5707963,1.5707963,1,0.5)
Filter 32 = Gabor(5,2.0943951,0,1,0.5)
Filter 33 = Gabor(5,2.0943951,1.5707963,1,0.5)
Filter 34 = Gabor(5,2.6179939,0,1,0.5)
Filter 35 = Gabor(5,2.6179939,1.5707963,1,0.5)

Filter 36 = Gabor(2,0,0,1,0.5)
Filter 37 = Gabor(2,0.3927,0,1,0.5)
Filter 38 = Gabor(2,0.7854,0,1,0.5)
Filter 39 = Gabor(2,1.1781,0,1,0.5)
Filter 40 = Gabor(2,1.5708,0,1,0.5)
Filter 41 = Gabor(2,1.9635,0,1,0.5)
Filter 42 = Gabor(2,2.3562,0,1,0.5)
Filter 43 = Gabor(2,2.7489,0,1,0.5)
Filter 44 = Gabor(4,0,0,1,0.5)
Filter 45 = Gabor(4,0.3927,0,1,0.5)
Filter 46 = Gabor(4,0.7854,0,1,0.5)
Filter 47 = Gabor(4,1.1781,0,1,0.5)
Filter 48 = Gabor(4,1.5708,0,1,0.5)
Filter 49 = Gabor(4,1.9635,0,1,0.5)
Filter 50 = Gabor(4,2.3562,0,1,0.5)
Filter 51 = Gabor(4,2.7489,0,1,0.5)
Filter 52 = Gabor(6,0,0,1,0.5)
Filter 53 = Gabor(6,0.3927,0,1,0.5)
Filter 54 = Gabor(6,0.7854,0,1,0.5)
Filter 55 = Gabor(6,1.1781,0,1,0.5)
Filter 56 = Gabor(6,1.5708,0,1,0.5)
Filter 57 = Gabor(6,1.9635,0,1,0.5)
Filter 58 = Gabor(6,2.3562,0,1,0.5)
Filter 59 = Gabor(6,2.7489,0,1,0.5)

// FeatureExtractor definition section format 'GenerateFeatures ' <label> =
//                                            <comma separated list of model names>;
//                                            <extractor definition>
//
// FaceDepthFeatureExtractor format : 'FaceDepthFeatureExtractor';
//                               <outlier threshold: threshold for ratio between the outlier depth pixels count and the mouth area>
//
// SuperKernelFeatureExtractor format : 'SuperKernelFeatureExtractor';
//                               <comma separated list of *single pixel* patches to run on>;
//                               <comma separated labels of *1-4* filters sharing the *same kernel size*>
//
// ConvolutionSuperKernelFeatureExtractor format : 'ConvolutionSuperKernelFeatureExtractor';
//                               <comma separated list of *single pixel* patches to run on>;
//                               <comma separated labels of *1-4* filters sharing the *same kernel size*>
//                                <convolution radius: the radius of the convolution to take place in number of steps; valid values: { 0, 1, 2, 3, 4 }>
//                                <stepSize: the step size relative to the eye width; valid values: (0, 0.1)>
//
// HOGFeatureExtractorV2 format: 'HOGFeatureExtractorV2' ;
//                               <comma separated list of patches to run on> ;
//                               <filter to use: 'Gradient'> ;
//                               <nonoverlappingBinsCountForHalfPlane: the number of regular bins in half plane (-pi/2 :pi/2), N = 2,4,8,16> ,
//                               <shouldUseHalfPlane: should output half plane only or full plane (half plane N' = N, full plane N' = N x 2), valid input: 1 or 0 (TRUE / FLASE)> ,
//                               <shouldCalculateOverlappingBins: should output overlapping bins or regular bins (overlapping bins N'' = N' x 2, regular bins N'' = N'), valid input: 1 or 0 (TRUE / FALSE) >
//                               <shouldApplyGaussianMask: apply gaussian weights when accumulating the gradient magnitudes, valid input: 1 or 0 (TRUE / FALSE)>
//
// HeadOrientationFeatureExtractor
//
// ImageDescriptorChangeFeatureExtractor format : 'ImageDescriptorChangeFeatureExtractor';
//                                                               <comma separated list of patches to run on>;
//                                                               <comma separated list of descriptor names, {'Intensity', 'Gradient', 'Depth'}> ('Depth' is not working currently)
//                                                               <number of bins, e.g., 16>
//                                                               <maximum number of steps to search the best matched descriptor, e.g., 5>
//
// InterFacePointDistanceFeatureExtractor
//
// TimeSeriesFeatureExtractor format: 'TimeSeriesFeatureExtractor';
//                               <comma separated list of functions to run on the time series, {'Mean', 'Variance', 'ExponentiallyWeightedVariance', 'ExponentiallyWeightedMean', 'Percentile', 'AbsGradient', 'Gradient'}>
//                               <comma separated list of feature labels to track in the history>
//                               <history window length, in frames, e.g., 'f:3' or in milliseconds, e.g., 't:100'>
//                               <exponentWeightCoefficient>
//                               <percentile, [0.0,1.0]>
// PoseFeatureExtractor


// Probabilities for all the models for debugging purposes
GenerateFeatures Pass0 = ;ModelProbabilityFeatureExtractor;EyeRight,EyeLeft
GenerateFeatures Pass1 = ;ModelProbabilityFeatureExtractor;MouthOpen,MouthMoved
GenerateFeatures Pass3 = ;ModelProbabilityFeatureExtractor;Expression,LookingAway
GenerateFeatures IRBaseGlasses = Glasses;ModelProbabilityFeatureExtractor;GlassesIR
GenerateFeatures IRBaseFacialHair = FacialHair;ModelProbabilityFeatureExtractor;FacialHairIR
GenerateFeatures Pass4 = ;ModelProbabilityFeatureExtractor;Glasses

// Shared feature config
GenerateFeatures InterFacePointDistance = FacialHairIR,Expression,MouthOpen,LookingAway,GlassesIR;InterFacePointDistanceFeatureExtractor
GenerateFeatures FaceOrientation = FacialHairIR,Expression,MouthOpen,LookingAway,GlassesIR,EyeRight,EyeLeft;DepthFaceOrientationFeatureExtractor
GenerateFeatures FaceDistance = FacialHairIR,Expression,MouthOpen,LookingAway,GlassesIR,EyeRight,EyeLeft;FaceDistanceFeatureExtractor

// Cheek Patches
GenerateFeatures cg0Upper = Expression,GlassesIR;SuperKernelFeatureExtractor;cLeftUpOut,cRightUpOut;0,1,2,3,4,5,6,7,8,9,10,11
GenerateFeatures cg1Upper = Expression,GlassesIR;SuperKernelFeatureExtractor;cLeftUpOut,cRightUpOut;12,13,14,15,16,17,18,19,20,21,22,23
GenerateFeatures cg2Upper = Expression,GlassesIR;SuperKernelFeatureExtractor;cLeftUpOut,cRightUpOut;24,25,26,27,28,29,30,31,32,33,34,35

GenerateFeatures cg1 = Expression;SuperKernelFeatureExtractor;cLeftMidIn,cLeftLowIn,cLeftLowOut,cRightMidIn,cRightLowIn,cRightLowOut;12,13,14,15,16,17,18,19,20,21,22,23
GenerateFeatures cg2 = Expression;SuperKernelFeatureExtractor;cLeftMidIn,cLeftLowIn,cLeftLowOut,cRightMidIn,cRightLowIn,cRightLowOut;24,25,26,27,28,29,30,31,32,33,34,35


// MouthOpen feature config
GenerateFeatures M0 = MouthOpen,Expression;SuperKernelFeatureExtractor;IRMouthPoints;0,1,2,3,4,5,6,7,8,9,10,11
GenerateFeatures M1 = MouthOpen,Expression;SuperKernelFeatureExtractor;IRMouthPoints;12,13,14,15,16,17,18,19,20,21,22,23
GenerateFeatures M2 = MouthOpen,Expression;SuperKernelFeatureExtractor;IRMouthPoints;24,25,26,27,28,29,30,31,32,33,34,35

GenerateFeatures MouthDepth = MouthOpen,Expression;FaceDepthFeatureExtractor;0.25

GenerateFeatures IRMouthBoxHOGs = MouthOpen,Expression;HOGFeatureExtractorV2;IRMouthBoxes;Gradient;2,0,1,0
GenerateFeatures ColorMouthBoxHOGs = MouthOpen,Expression;HOGFeatureExtractorV2;ColorMouthBoxes;Gradient;2,0,1,0

// MouthMove feature config
GenerateFeatures MouthVariance = MouthMoved;TimeSeriesFeatureExtractor;Variance;IRMouthBoxHOGs,ColorMouthBoxHOGs;f:4;0.75;0.0
GenerateFeatures MouthVarianceGradient = MouthMoved;TimeSeriesFeatureExtractor;Gradient;MouthVariance;f:4;0.75;0.0

// GLASSES
GenerateFeatures g0 = GlassesIR;SuperKernelFeatureExtractor;GlassesPoints;0,1,2,3,4,5,6,7,8,9,10,11
GenerateFeatures g1 = GlassesIR;SuperKernelFeatureExtractor;GlassesPoints;12,13,14,15,16,17,18,19,20,21,22,23
GenerateFeatures g2 = GlassesIR;SuperKernelFeatureExtractor;GlassesPoints;24,25,26,27,28,29,30,31,32,33,34,35

GenerateFeatures GlassBoxHOGs = GlassesIR;HOGFeatureExtractorV2;GlassesBoxes;Gradient;4,0,1,0

// FACIALHAIR
GenerateFeatures fhog = FacialHairIR;HOGFeatureExtractorV2;GoateeBoxes,MuttonBoxes,MustacheBoxes;Gradient;4,1,1,1
GenerateFeatures fconv = FacialHairIR;ConvolutionSuperKernelFeatureExtractor;GoateePoints;36,37,38,39,40,41,42,43;2;0.05
GenerateFeatures fg1 = FacialHairIR;SuperKernelFeatureExtractor;GoateePoints,MuttonPoints,MustachePoints;0,1,2,3,4,5,6,7,8,9,10,11
GenerateFeatures fg2 = FacialHairIR;SuperKernelFeatureExtractor;GoateePoints,MuttonPoints,MustachePoints;12,13,14,15,16,17,18,19,20,21,22,23
GenerateFeatures fg3 = FacialHairIR;SuperKernelFeatureExtractor;GoateePoints,MuttonPoints,MustachePoints;24,25,26,27,28,29,30,31,32,33,34,35

// ####################################################
// COLOR Section
// ####################################################

// GLASSES PATCHES
//ImagePatchSet Color_GlassesPoints =
//{
//    Color_GlassBridgeUpper = MidEye,-.2,MidEye,0,0,0,Color
//    Color_GlassBridgeMid = MidEye,0,MidEye,0,0,0,Color

//    Color_GlassLeftLowerRimInner = LeftEye,.3,LeftEye,.2,0,0,Color
//    Color_GlassLeftLowerRimMid = LeftEye,.3,LeftEye,0,0,0,Color
//    Color_GlassLeftLowerRimOuter = LeftEye,.3,LeftEye,-.2,0,0,Color

//    Color_GlassRightLowerRimInner = RightEye,.3,RightEye,.2,0,0,Color
//    Color_GlassRightLowerRimMid = RightEye,.3,RightEye,0,0,0,Color
//    Color_GlassRightLowerRimOuter = RightEye,.3,RightEye,-.2,0,0,Color

//    Color_GlassLeftOuterRimUpper = LeftEye,-.125,LeftEye,.3,0,0,Color
//    Color_GlassLeftOuterRimMid = LeftEye,.0,LeftEye,.35,0,0,Color
//    Color_GlassLeftOuterRimLower = LeftEye,.125,LeftEye,.3,0,0,Color

//    Color_GlassRightOuterRimUpper = RightEye,-.125,RightEye,-.3,0,0,Color
//    Color_GlassRightOuterRimMid = RightEye,.0,RightEye,-.35,0,0,Color
//    Color_GlassRightOuterRimLower = RightEye,.125,RightEye,-.3,0,0,Color
//}

// GLASSES BOXES
//ImagePatchSet Color_GlassesBoxes =
//{
//    Color_GlassBridgeBox = MidEye,0.0,MidEye,0.0,.4,.2,Color

//    Color_GlassLeftLowerRimInnerBox = LeftEye,.3,LeftEye,.2,.2,.2,Color
//    Color_GlassLeftLowerRimMidBox = LeftEye,.3,LeftEye,0,.2,.2,Color
//    Color_GlassLeftLowerRimOuterBox = LeftEye,.3,LeftEye,-.2,.2,.2,Color

//    Color_GlassRightLowerRimInnerBox = RightEye,.3,RightEye,.2,.2,.2,Color
//    Color_GlassRightLowerRimMidBox = RightEye,.3,RightEye,0,.2,.2,Color
//    Color_GlassRightLowerRimOuterBox = RightEye,.3,RightEye,-.2,.2,.2,Color

//    Color_GlassLeftOuterRimUpperBox = LeftEye,-.125,LeftEye,.3,.2,.2,Color
//    Color_GlassLeftOuterRimMidBox = LeftEye,.0,LeftEye,.35,.2,.2,Color
//    Color_GlassLeftOuterRimLowerBox = LeftEye,.125,LeftEye,.3,.2,.2,Color

//    Color_GlassRightOuterRimUpperBox = RightEye,-.125,RightEye,-.3,.2,.2,Color
//    Color_GlassRightOuterRimMidBox = RightEye,.0,RightEye,-.35,.2,.2,Color
//    Color_GlassRightOuterRimLowerBox = RightEye,.125,RightEye,-.3,.2,.2,Color
//}

ImagePatchSet ColorLeftEyePatches =
{
    Color_LeftEyeCenterUpperPoint = LeftEye,-.075,LeftEye,0,.0,.0,EyesOnlyRotatedAndContrastAdjustedColorLum,EnablePitchCorrection
    Color_LeftEyeCenterCenterPoint = LeftEye,0.0,LeftEye,0.0,.0,.0,EyesOnlyRotatedAndContrastAdjustedColorLum,EnablePitchCorrection
    Color_LeftEyeCenterLowerPoint = LeftEye,.075,LeftEye,0,.0,.0,EyesOnlyRotatedAndContrastAdjustedColorLum,EnablePitchCorrection

    Color_LeftEyeInnerUpperPoint = LeftEye,-.075,LeftEye,-.20,.0,.0,EyesOnlyRotatedAndContrastAdjustedColorLum,EnablePitchCorrection
    Color_LeftEyeInnerCenterPoint = LeftEye,0.0,LeftEye,-.20,.0,.0,EyesOnlyRotatedAndContrastAdjustedColorLum,EnablePitchCorrection
    Color_LeftEyeInnerLowerPoint = LeftEye,.075,LeftEye,-.20,.0,.0,EyesOnlyRotatedAndContrastAdjustedColorLum,EnablePitchCorrection

    Color_LeftEyeOuterUpperPoint = LeftEye,-.075,LeftEye,.20,.0,.0,EyesOnlyRotatedAndContrastAdjustedColorLum,EnablePitchCorrection
    Color_LeftEyeOuterCenterPoint = LeftEye,0.0,LeftEye,.20,.0,.0,EyesOnlyRotatedAndContrastAdjustedColorLum,EnablePitchCorrection
    Color_LeftEyeOuterLowerPoint = LeftEye,.075,LeftEye,.20,.0,.0,EyesOnlyRotatedAndContrastAdjustedColorLum,EnablePitchCorrection
}

ImagePatchSet ColorLeftEyeHOGs =
{
    Color_LeftEyeCenterCenter = LeftEye,0.0,LeftEye,0.0,.2,.375,EyesOnlyRotatedAndContrastAdjustedColorLum,EnablePitchCorrection

    Color_LeftEyeInnerUpper = LeftEye,-.075,LeftEye,-.20,.2,.25,EyesOnlyRotatedAndContrastAdjustedColorLum,EnablePitchCorrection
    Color_LeftEyeInnerLower = LeftEye,.075,LeftEye,-.20,.2,.25,EyesOnlyRotatedAndContrastAdjustedColorLum,EnablePitchCorrection

    Color_LeftEyeOuterUpper = LeftEye,-.075,LeftEye,.20,.2,.25,EyesOnlyRotatedAndContrastAdjustedColorLum,EnablePitchCorrection
    Color_LeftEyeOuterLower = LeftEye,.075,LeftEye,.20,.2,.25,EyesOnlyRotatedAndContrastAdjustedColorLum,EnablePitchCorrection
}

// RIGHT EYE
ImagePatchSet ColorRightEyePatches =
{
    Color_RightEyeCenterUpperPoint = RightEye,-.075,RightEye,0,.0,.0,EyesOnlyRotatedAndContrastAdjustedColorLum,EnablePitchCorrection
    Color_RightEyeCenterCenterPoint = RightEye,0.0,RightEye,0.0,.0,.0,EyesOnlyRotatedAndContrastAdjustedColorLum,EnablePitchCorrection
    Color_RightEyeCenterLowerPoint = RightEye,.075,RightEye,0,.0,.0,EyesOnlyRotatedAndContrastAdjustedColorLum,EnablePitchCorrection

    Color_RightEyeInnerUpperPoint = RightEye,-.075,RightEye,.20,.0,.0,EyesOnlyRotatedAndContrastAdjustedColorLum,EnablePitchCorrection
    Color_RightEyeInnerCenterPoint = RightEye,0.0,RightEye,.20,.0,.0,EyesOnlyRotatedAndContrastAdjustedColorLum,EnablePitchCorrection
    Color_RightEyeInnerLowerPoint = RightEye,.075,RightEye,.20,.0,.0,EyesOnlyRotatedAndContrastAdjustedColorLum,EnablePitchCorrection

    Color_RightEyeOuterUpperPoint = RightEye,-.075,RightEye,-.20,.0,.0,EyesOnlyRotatedAndContrastAdjustedColorLum,EnablePitchCorrection
    Color_RightEyeOuterCenterPoint = RightEye,0.0,RightEye,-.20,.0,.0,EyesOnlyRotatedAndContrastAdjustedColorLum,EnablePitchCorrection
    Color_RightEyeOuterLowerPoint = RightEye,.075,RightEye,-.20,.0,.0,EyesOnlyRotatedAndContrastAdjustedColorLum,EnablePitchCorrection
}

ImagePatchSet ColorRightEyeHOGs =
{
    Color_RightEyeCenterCenter = RightEye,0.0,RightEye,0.0,.2,.375,EyesOnlyRotatedAndContrastAdjustedColorLum,EnablePitchCorrection

    Color_RightEyeInnerUpper = RightEye,-.075,RightEye,.20,.2,.25,EyesOnlyRotatedAndContrastAdjustedColorLum,EnablePitchCorrection
    Color_RightEyeInnerLower = RightEye,.075,RightEye,.20,.2,.25,EyesOnlyRotatedAndContrastAdjustedColorLum,EnablePitchCorrection

    Color_RightEyeOuterUpper = RightEye,-.075,RightEye,-.20,.2,.25,EyesOnlyRotatedAndContrastAdjustedColorLum,EnablePitchCorrection
    Color_RightEyeOuterLower = RightEye,.075,RightEye,-.20,.2,.25,EyesOnlyRotatedAndContrastAdjustedColorLum,EnablePitchCorrection
}


// ###########
// Color features
// ###########

// LEFT EYE
GenerateFeatures Color_l0 = EyeLeft;SuperKernelFeatureExtractor;ColorLeftEyePatches;0,1,2,3,4,5,6,7,8,9,10,11
GenerateFeatures Color_l1 = EyeLeft;SuperKernelFeatureExtractor;ColorLeftEyePatches;12,13,14,15,16,17,18,19,20,21,22,23
GenerateFeatures Color_l2 = EyeLeft;SuperKernelFeatureExtractor;ColorLeftEyePatches;24,25,26,27,28,29,30,31,32,33,34,35

GenerateFeatures LeftEyeHOG = EyeLeft;HOGFeatureExtractorV2;ColorLeftEyeHOGs;Gradient;4,0,1,0

// RIGHT EYE
GenerateFeatures Color_r0 = EyeRight;SuperKernelFeatureExtractor;ColorRightEyePatches;0,1,2,3,4,5,6,7,8,9,10,11
GenerateFeatures Color_r1 = EyeRight;SuperKernelFeatureExtractor;ColorRightEyePatches;12,13,14,15,16,17,18,19,20,21,22,23
GenerateFeatures Color_r2 = EyeRight;SuperKernelFeatureExtractor;ColorRightEyePatches;24,25,26,27,28,29,30,31,32,33,34,35

GenerateFeatures RightEyeHOG = EyeRight;HOGFeatureExtractorV2;ColorRightEyeHOGs;Gradient;4,0,1,0

// GLASSES
//GenerateFeatures Color_g0 = Glasses;SuperKernelFeatureExtractor;Color_GlassesPoints;0,1,2,3,4,5,6,7,8,9,10,11
//GenerateFeatures Color_g1 = Glasses;SuperKernelFeatureExtractor;Color_GlassesPoints;12,13,14,15,16,17,18,19,20,21,22,23
//GenerateFeatures Color_g2 = Glasses;SuperKernelFeatureExtractor;Color_GlassesPoints;24,25,26,27,28,29,30,31,32,33,34,35

//GenerateFeatures Color_GlassBridgeHog = Glasses;HOGFeatureExtractorV2;Color_GlassesBoxes;Gradient;4,0,1,0
