diff --git a/3rdparty/stasm/stasm/stasm/include/atface.h b/3rdparty/stasm/stasm/stasm/include/atface.h deleted file mode 100755 index 733cc0a..0000000 --- a/3rdparty/stasm/stasm/stasm/include/atface.h +++ /dev/null @@ -1,70 +0,0 @@ -// atface.h: face point attributes -// -// These attributes are used when training new models (they appear in -// LANDMARK_INFO_TAB). They are also sometimes used when testing Stasm. -// They are not needed for doing landmark searches. -// -// Some of these bits apply to the entire image (AT_BadImg); other apply -// only to a specific points (AT_Glasses). -// -// In shape files, the bits appear in the in the "tag" preceding each shape. -// For example -// 0004 d0145 -// means that the face in image d0145.jpg is wearing glasses. - -#ifndef STASM_ATFACE_HPP -#define STASM_ATFACE_HPP - -static const char* const AT_NAMES[] = // used only for information during training -{ - "Male", // AT_Male 0x0001 - "Child", // AT_Child 0x0002 - "Glasses", // AT_Glasses 0x0004 - "Beard", // AT_Beard 0x0008 - "Mustache", // AT_Mustache 0x0010 - "MouthOpen", // AT_MouthOpen 0x0020 - "Expression", // AT_Expression 0x0040 - "Eye", // AT_Eye 0x0080 - "BadImg", // AT_BadImg 0x0100 - "Cropped", // AT_Cropped 0x0200 - "Obscured", // AT_Obscured 0x0400 - "BadEye", // AT_BadEye 0x0800 - "Hat", // AT_Hat 0x1000 - "Unused", // AT_Hat 0x2000 - "MultiFace", // AT_MultiFace 0x4000 - "BadTrain", // AT_BadTrain 0x8000 -}; - -static const unsigned AT_Male = 0x0001; // gender, 1=male -static const unsigned AT_Child = 0x0002; // child -static const unsigned AT_Glasses = 0x0004; // face is wearing specs -static const unsigned AT_Beard = 0x0008; // beard including possible mustache -static const unsigned AT_Mustache = 0x0010; // mustache -static const unsigned AT_MouthOpen = 0x0020; // mouth is open -static const unsigned AT_Expression = 0x0040; // non-neutral expression on face -static const unsigned AT_Eye = 0x0080; // is eye landmark, used only during training - -static const unsigned AT_BadImg = 0x0100; // image is "bad" in some way (blurred, duplicated, etc.) -static const unsigned AT_Cropped = 0x0200; // a landmark would be off the page -static const unsigned AT_Obscured = 0x0400; // face is obscured e.g. by subject's hand -static const unsigned AT_BadEye = 0x0800; // an eye is closed or obscured by hair etc. -static const unsigned AT_Hat = 0x1000; // HAT desciptor (ignored if pyr lev > HAT_START_LEV) - -// following are currently used only in aflw.shape -static const unsigned AT_MultiFace = 0x4000; // multiple faces in the image -static const unsigned AT_BadTrain = 0x8000; // face is not suitable for training face det - // (by manual inspection of train face rects) - -static const unsigned AT_Meta = 0xFF000000; // "meta bits" used for face and pose detectors - -static const unsigned AT_Pose = 0x80000000; // 4 elements: yaw, pitch, roll, estimated_err - -static const unsigned AT_EYAW00 = 0x81000000; // yaw00 face detector results, see DetPar -static const unsigned AT_EYAW22 = 0x82000000; -static const unsigned AT_EYAW45 = 0x83000000; -static const unsigned AT_EYAW_22 = 0x8A000000; // ms bit of nibble indicates negative yaw -static const unsigned AT_EYAW_45 = 0x8B000000; - -static const unsigned AT_Any = 0xFFFFFFFF; // special case, match any bit in Mask0 - -#endif // STASM_ATFACE_HPP diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p18.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p18.mh deleted file mode 100755 index 7f9a543..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p18.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p18.mh: - -#ifndef stasm_hat_yaw00_lev1_p18_mh -#define stasm_hat_yaw00_lev1_p18_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p18(const double* const d) // d has 160 elements -{ - const double intercept = -0.448753; - const double coef[160] = - { - -0.0498749, -0.0295384, -0.0622896, 0.0356942, -0.0292167, 0.0283713, 0.00836971, -0.0121596, - 0.0209972, 0.00382417, 0.050891, -0.0164777, 0.0242696, -0.00391463, -0.0277812, -0.0138764, - 0.072988, -0.0271966, -0.0908054, -0.0734843, -0.0604963, 0.0136477, -0.0727193, 0.0275438, - 0.0110599, 0.0588015, 0.00201384, 0.0164636, -0.00199381, 0.0922571, 0.0699612, 0.0217522, - -0.00142602, -0.00528477, 0.00603293, 0.0617398, -0.0417845, 0.0516238, -0.0569251, 0.0888432, - 0.0420806, 0.0498754, 0.0839362, 0.0110966, 0.0596055, 0.0101679, 0.00859569, -0.021343, - 0.0153672, -0.0383215, -0.0905357, -0.00618441, 0.0649987, -0.0654346, -0.0405493, 0.0329732, - -0.09689, 0.0202469, 0.0330359, 0.0379222, 0.179394, 0.0828963, 0.130292, 0.0730782, - -0.0308012, 0.108059, 0.0110634, -0.0114949, -0.084209, -0.0632223, 0.00555993, 0.00827395, - -0.0322704, 0.0254536, 0.0448415, -0.0122099, 0.0581972, -0.0255867, -0.00141774, -0.0369018, - -0.00161121, 0.00661957, -0.045868, -0.0756884, -0.0735135, -0.0600961, 0.0242683, -0.0197821, - 0.0745215, -0.0585634, -0.0179505, 0.0547213, -0.0345571, -0.025263, 0.0334299, 0.00947121, - 0.051453, 0.0639829, 0.0359268, 0.0210573, -0.0619948, -0.0628176, -0.0306752, -0.051822, - 0.0126318, -0.0452903, -0.01876, 0.00772562, -0.00129544, 0.0511064, -0.0106129, -0.00556659, - 0.0426059, 0.032925, 0.0212555, 0.0334898, -0.0357824, -0.00509332, 0.0150316, 0.00836535, - 0.0260177, 0.0158509, 0.0215553, 0.0268927, 0.0590347, 0.0190613, 0.0199399, -0.0514828, - -0.00742887, -0.0419478, 0.00628358, 0.0638355, -0.00724743, 0.0347969, -0.00623699, -0.0583069, - -0.0161296, -0.037127, 0.0168519, 0.0147875, -0.00326895, 0.0385574, -0.0158858, 0.0614535, - -0.0200043, 0.00139308, 0.013431, -0.0543626, 0.0576407, -0.0165498, -0.0840573, 0.0222336, - 0.0296575, -0.00278878, 0.00448438, -0.00359893, 0.0102988, 0.106763, 0.090092, 0.0431567 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p18(hatfit_yaw00_lev1_p18); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p18_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p19.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p19.mh deleted file mode 100755 index 5fbe7a2..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p19.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p19.mh: - -#ifndef stasm_hat_yaw00_lev1_p19_mh -#define stasm_hat_yaw00_lev1_p19_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p19(const double* const d) // d has 160 elements -{ - const double intercept = -0.262195; - const double coef[160] = - { - 0.0570257, 0.0367344, -0.0570711, -0.011802, -0.0167134, 0.101382, -0.0180198, 0.00963814, - -0.0279159, 0.00725883, -0.0390742, -0.0731636, -0.0300552, 0.0610662, -0.0564866, -0.00215811, - 0.0331278, -0.0245061, -0.0190675, 0.0308108, 0.0597088, -0.0582475, 0.0068199, -0.0045789, - 0.0112172, -0.0042283, -0.0460313, -0.0683531, 0.0490784, 0.0357457, 0.0513087, 0.065163, - 0.0120269, 0.0846221, -0.0103265, 0.0475844, 0.00477526, 0.0399056, 0.0540089, -0.0564785, - -0.07569, -0.0260325, -0.0242496, -0.0162332, -0.01269, 0.0115391, 0.144577, 0.0917523, - -0.0031184, 0.0494672, 0.0600518, 0.0757492, 0.0268476, -0.0358991, -0.0714125, -0.0217126, - -0.0619601, 0.00266571, 0.0342395, 0.0499819, 0.0149065, -0.0327131, -0.0215528, -0.0440197, - -0.0420585, -0.0419247, 0.0676071, 0.0562871, -0.00336289, -0.0189186, -0.0412871, -0.063268, - -0.0263585, -0.139443, 0.050477, -0.0565013, -0.0138931, 0.00646753, 0.0454679, 0.0638653, - 0.00880726, 0.0693776, -0.00639578, 0.0123959, -0.0768389, 0.0366207, -0.0836684, -0.0324729, - -0.000682837, 0.0349943, 0.000274644, -0.00886348, 0.00739915, 0.00832502, 0.0206392, -0.0190099, - 0.0570095, 0.033442, -0.00262595, 0.0070713, 0.00129516, 0.0143729, 0.0452677, 0.00304362, - 0.00623422, 0.0423643, 0.00203898, -0.0335307, 0.0291394, -0.0161017, 0.00515308, 0.0344269, - 0.00664613, -0.020668, -0.0448438, 0.0866967, 0.0269182, 0.0468494, 0.0656892, 0.00646981, - -0.0383485, -0.00762912, -0.0750351, 0.0130538, 0.0269591, -0.0112271, -0.0624056, 0.0493525, - 0.0296482, -0.0213624, 0.0267932, 0.0117763, -0.0091476, 0.0151417, -0.00320312, 0.0152537, - -0.0114015, -0.00710413, 0.00773785, -0.00463671, -0.034757, 0.0182189, 0.0225663, 0.0463874, - 0.0323866, 0.0080666, 0.0581044, 0.0524154, 0.0108156, -0.0567258, -0.0227012, -0.048997, - 0.0646889, -0.0463338, -0.0283976, -0.0935714, 0.0225522, -0.0529328, 0.11244, -0.0702994 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p19(hatfit_yaw00_lev1_p19); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p19_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p20.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p20.mh deleted file mode 100755 index 3288679..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p20.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p20.mh: - -#ifndef stasm_hat_yaw00_lev1_p20_mh -#define stasm_hat_yaw00_lev1_p20_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p20(const double* const d) // d has 160 elements -{ - const double intercept = -0.40301; - const double coef[160] = - { - -0.044357, 0.065885, -0.100565, -0.0292176, 0.0431703, 0.0559038, 0.0422983, 0.0677039, - 0.0111116, 0.0543616, -0.00831535, 0.0316774, -0.0405766, 0.0545119, 0.0547792, 0.00707303, - -0.0118569, 0.0359603, 0.000738419, -0.00720546, 0.0159878, -0.0454474, -0.00219371, -0.0321887, - -0.00711376, -0.0118625, -0.031807, 0.0318091, 0.0721441, -0.00390437, 0.000654461, -0.00217822, - 0.0136697, -0.0564804, -0.0142228, 0.0489046, 0.0135339, 0.0265044, 0.0836901, -0.0131859, - 0.0193591, -0.0579067, 0.143029, 0.0854465, -0.0273751, -0.0743443, -0.00470803, -0.0470495, - 0.0284289, -0.0908781, -0.0390148, 0.0216415, 0.0237698, -0.00135428, 0.0883609, 0.0570308, - -0.0190371, 0.0543571, -0.0426702, -0.0233553, -0.062339, -0.0680657, -0.0296903, 0.0182473, - -0.0275637, 0.031327, 0.0632576, -0.0441019, -0.0551259, -0.0493404, -0.0933736, 0.0139715, - 0.0351187, 0.201519, 0.109671, -0.0436287, 0.0343854, 0.0617872, 0.00231902, 0.131171, - -0.0447616, 0.0471011, -0.0241846, -0.130945, -0.00283226, 0.0292567, -0.0124652, 0.00699345, - -0.00646692, 0.00169924, 0.0120173, 0.0392728, -0.027388, 0.0654505, 0.0643972, -0.0154942, - -0.0480685, -0.0210734, -0.0285767, 0.0874262, 0.0749026, 0.0901079, 0.0342709, -0.0234091, - 0.0509444, -0.014923, -0.0252291, 0.0453003, 0.0172163, -0.0234517, 0.0583706, -0.00834267, - -0.128634, -0.0329519, 0.0279247, -0.0235598, -0.00885352, -0.0981358, -0.0500313, -0.0635172, - 0.0233945, -0.051642, -0.0143921, 0.0752504, 0.0105108, -0.022365, 0.0275288, -0.0364368, - 0.0413996, -0.0392726, 0.0157608, -0.0648484, 0.0178105, -0.0352664, 0.0258897, -0.0719777, - 0.0267576, 0.019921, 0.000531101, 0.00717289, -0.0355602, -0.0040235, 0.0217799, -0.0267584, - -0.00189987, 0.0767193, 0.0513729, 0.0696818, 0.0447269, -0.00696514, 0.0455562, 0.0813045, - -0.0438993, 0.0213466, -0.0743853, 0.0140133, 0.0300957, 0.042562, -0.0818879, 0.0010326 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p20(hatfit_yaw00_lev1_p20); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p20_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p21.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p21.mh deleted file mode 100755 index 4c3a4f9..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p21.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p21.mh: - -#ifndef stasm_hat_yaw00_lev1_p21_mh -#define stasm_hat_yaw00_lev1_p21_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p21(const double* const d) // d has 160 elements -{ - const double intercept = -0.360611; - const double coef[160] = - { - -0.0436506, -0.054941, -0.00971474, 0.0521024, 0.00206954, 0.0185906, -0.00413247, -0.024137, - -0.0462877, -0.04999, -0.0126494, -0.0039948, 0.0150353, 0.0313915, 0.0540088, -0.0256915, - -0.128476, -0.0262562, 0.0509892, 0.00366824, -0.00866948, 0.0298188, -0.00831123, 0.0105693, - -0.0529987, -0.0259216, -0.00600078, -0.0230685, 0.0339906, 0.0307667, -0.0178926, 0.0698492, - 0.0722452, -0.0227056, -0.00609198, 0.0519129, 0.0620325, 0.0588752, 0.00577859, 0.00438022, - 0.0282987, 0.0421252, 0.0104122, -0.018805, -0.102164, -0.0445192, -0.0648688, 0.0809432, - 0.0950726, 0.117475, 0.0853208, 0.0458148, -0.0171331, 0.0300579, -0.0406555, 0.0118699, - 0.0976135, 0.0484639, -0.033011, 0.0899271, 0.0202407, 0.0261913, -0.00930254, 0.0461875, - 0.0378907, -0.0493307, -0.0274167, -0.0190517, -0.0107293, -0.0157886, 0.0123958, 0.0879697, - 0.00302485, 0.0109669, -0.0332263, -0.0316753, -0.0598432, -0.0198672, 0.0300908, -0.0590955, - -0.0598014, -0.0300721, -0.0144178, 0.00587939, -0.0163208, -0.010562, 0.0622535, -0.0122884, - -0.0888054, 0.00986846, 0.0480497, -0.0690815, 0.0316751, -0.0658706, -0.017178, 2.19983e-05, - -0.031337, 0.12937, 0.00135608, 0.00324541, -0.0383022, -0.0209004, 0.012759, -0.0579081, - -0.022554, -0.0243307, -0.161701, -0.0383884, -0.0341709, 0.0256652, 0.0349183, 0.0408659, - -0.0589702, 0.0420497, 0.069216, 0.0258794, 0.0283805, -0.0236499, -0.00459621, 0.0139046, - 0.0328212, 0.0585561, 0.0112508, 0.0231436, 0.0542301, -0.00382625, 0.045863, 0.0514639, - -0.00793891, -0.0151828, -0.0451044, 0.00866035, -0.0408645, 0.00331327, -0.080927, -0.085434, - 0.0547401, 0.0158916, 0.0294454, 0.0202408, 0.0291153, 0.0326214, 0.0244101, 0.0986617, - 0.0364547, -0.0604266, 0.0127313, -0.0474485, 0.0555188, 0.0124198, -0.0257955, 0.0798925, - 0.124739, -0.0247137, 0.0450575, 0.0279182, -0.005408, 0.00205407, -0.0160856, -0.0509189 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p21(hatfit_yaw00_lev1_p21); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p21_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p22.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p22.mh deleted file mode 100755 index 81d362c..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p22.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p22.mh: - -#ifndef stasm_hat_yaw00_lev1_p22_mh -#define stasm_hat_yaw00_lev1_p22_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p22(const double* const d) // d has 160 elements -{ - const double intercept = -0.283461; - const double coef[160] = - { - 0.113408, 0.028207, 0.0103549, -0.0219927, 0.0431519, 0.00919302, -0.0021129, 0.0822461, - -0.0605805, -0.0288046, 0.00869981, 0.00197979, -0.091122, 0.00543819, -0.0875602, -0.0096333, - -0.0140809, -0.00180853, 0.0272279, -0.0408326, -0.108702, 0.0415715, 0.057489, 0.0631665, - 0.0449359, 0.00809672, -0.0378282, -0.040463, -0.0505169, -0.0300831, 0.0435633, -0.0196153, - 0.0188522, 0.0430165, -0.013274, -0.00146621, -0.0787595, -0.0382562, 0.00339013, -0.0244168, - -0.109492, -0.0534605, 0.0150209, 0.00353936, 0.0185733, -0.0188727, 0.0288706, -0.044357, - 0.0503095, 0.0649049, -0.0550787, -0.0715569, 0.0863819, 0.0590576, 0.00904189, 0.051242, - 0.0460924, 0.0585139, -0.0128731, 0.064008, 0.0780372, 0.0710941, 0.0145533, 0.0773075, - -0.0980892, 0.0193442, 0.0810367, 0.13997, 0.0733226, 0.0512428, -0.103792, 0.0650737, - -0.0728885, -0.012266, 0.023387, -0.00658721, 0.0246795, 0.0391211, -0.0425422, -0.0452243, - 0.0327159, -0.00046799, -0.00746934, 0.041174, -0.0191744, -0.00525241, 0.00667091, -0.044836, - -0.0405409, -0.106829, -0.153472, -0.00257772, -0.0275851, 0.0490619, 0.0456676, 0.0148601, - -0.0409661, 0.0154871, 0.0948287, 0.105885, -0.0128939, -0.0611814, -0.00809154, -0.0978214, - 0.0252439, -0.0215762, -0.0285384, -0.018451, -0.0553872, -0.0160569, 0.00576589, -0.109376, - -0.00953276, -0.0124028, -0.00071097, -0.00153849, -0.043606, -0.0358039, 0.0836616, 0.0602529, - 0.0487441, 0.0265395, 0.0409188, 0.00543898, 0.0838617, -0.0281679, -0.0813627, 0.00686685, - -0.0205098, -0.0206478, -0.0149907, -0.0498131, 0.0185005, 0.0928399, 0.0517432, -0.00931367, - 0.0553956, -0.000987589, 0.0256532, 0.0190481, 0.0120548, 0.0256755, -0.0056007, 0.0773276, - -0.0299009, 0.0231982, -0.0541054, -0.0363423, -0.00481595, -0.0450222, -0.0591807, 0.0140353, - 0.0115709, 0.051797, 0.00671813, 0.060524, 0.0404935, 0.0628342, 0.0301882, -0.0445167 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p22(hatfit_yaw00_lev1_p22); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p22_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p23.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p23.mh deleted file mode 100755 index ce9f12c..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p23.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p23.mh: - -#ifndef stasm_hat_yaw00_lev1_p23_mh -#define stasm_hat_yaw00_lev1_p23_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p23(const double* const d) // d has 160 elements -{ - const double intercept = -0.130233; - const double coef[160] = - { - 0.0472834, 0.00781718, 0.00785787, 0.0540163, -0.026445, 0.116213, -0.0237177, 0.0424393, - 0.0187807, -0.024349, -0.0246988, 0.0576934, 0.0111652, 0.0538067, -0.121513, 0.0500683, - -0.00359233, -0.0209018, -0.00154044, 0.0619222, 0.0839956, 0.070999, -0.0467736, 0.0184966, - 0.00613903, 0.00382141, -0.0737772, 0.00515294, -0.00382716, 0.0400579, 0.00606548, 0.0256581, - 0.0594181, 0.0186452, 0.0815342, 0.0398505, 0.00194601, 0.0017904, -0.0349286, 0.106442, - -0.018651, 0.00312345, -0.0059111, -0.0568959, -0.0328872, -0.148534, 0.104767, 0.0236835, - 0.00637615, 0.0115255, 0.0801526, -0.00868843, 0.00586364, -0.10412, -0.0490881, -0.0593897, - -0.00372443, 0.00618455, 0.0371041, -0.0521332, -0.00660873, -0.0285671, 0.131414, -0.0504068, - -0.0296972, -0.0634493, 0.0637341, -0.0350294, 0.0066418, -0.00762099, -0.0144002, -0.0300104, - -0.0378424, -0.0719849, -0.0839801, -0.0249018, -0.0853061, 0.0688983, 0.103192, -0.0620734, - 0.0151431, 0.0111592, -0.0657549, 0.0352495, 0.0105818, 0.246062, 0.0820122, 0.0520822, - 0.0462958, 0.0629337, 0.0883106, 0.0716172, -0.073364, -0.0192448, -0.109873, -0.0512651, - -0.0390072, -0.00551202, -0.0114683, 0.0342657, 0.0128699, 0.0191531, -0.0255654, 0.0133674, - 0.0513161, 0.0279945, -0.0674543, -0.00280994, 0.0383715, -0.0308886, 0.101607, 0.102294, - -0.00181516, 0.0832472, 0.0175008, 0.0196384, 0.0216818, -0.070902, -0.0207262, 0.0160676, - -0.0254123, -0.0816697, 0.0283321, 0.125951, -0.0731279, 0.0101732, -0.0494108, 0.00338782, - -0.051712, 0.0155175, 0.0158018, -0.0212249, -0.00432322, -0.0379499, -0.0358608, -0.00421285, - 0.0108169, 0.0207882, -0.0720815, -0.0455948, -0.0374766, -0.049237, 0.0186335, 0.0110743, - -0.0458633, 0.0435132, 0.0137485, -0.0760113, 0.0111323, -0.00146219, 0.0642206, -0.0233832, - -0.0129117, -0.0448585, 0.0893718, -0.0306933, -0.00994433, 0.0235545, -0.0486931, -0.0471647 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p23(hatfit_yaw00_lev1_p23); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p23_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p24.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p24.mh deleted file mode 100755 index 04fbd78..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p24.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p24.mh: - -#ifndef stasm_hat_yaw00_lev1_p24_mh -#define stasm_hat_yaw00_lev1_p24_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p24(const double* const d) // d has 160 elements -{ - const double intercept = -0.209957; - const double coef[160] = - { - 0.0329241, 0.0204195, -0.0457593, 0.0501425, -0.00613224, 0.00723748, 0.00753633, -0.00218967, - 0.0567324, 0.0279709, 0.044728, 0.00627779, 0.0202298, 0.00300185, -0.0439539, 0.0484225, - 0.0599061, -0.0229727, -0.0046023, -0.0425072, -0.0265741, -0.0402482, -0.0184064, -0.0400436, - 0.129868, 0.0186916, -0.0187492, -0.0279144, -0.00644049, -0.0152003, -0.019119, 0.0695958, - -0.0579541, 0.0241296, 0.0301872, -0.0184226, -0.0375482, 0.00369089, -0.067679, 0.0316725, - -0.055719, -0.0459733, 0.130253, 0.0100149, 0.0523362, -0.0390752, 0.049506, -0.0562703, - -0.0882681, -0.0460667, -0.0540077, -0.0063019, 0.00833983, -0.0356212, 0.0579247, -0.0667233, - -0.0917908, -0.0543343, -0.0344169, -0.0230161, -0.00531222, 0.0843524, 0.07836, 0.0221333, - -0.139507, 0.007516, 0.0603828, 0.0806264, 0.0404374, -0.00715456, 0.088454, 0.0628061, - 0.0829363, -0.0348646, -0.0190776, 0.00782911, 0.0738113, 0.0218468, -0.133212, -0.109976, - 0.0430187, 0.0600624, -0.0250504, 0.0394135, -0.105551, 0.0274974, 0.0425897, 0.0730274, - 0.0721941, 0.0543258, -0.00415248, -0.0637805, -0.0302164, 0.0400649, -0.0335531, 0.0165375, - 0.0569047, 0.0575467, 0.0384013, 0.0282555, -0.0193094, 0.0499828, -0.10377, 0.0923725, - 0.018542, -0.0432079, -0.0109277, 0.00175565, -0.028568, 0.0184082, -0.0969235, 0.0896471, - -0.0161893, 0.0327373, -0.004733, 0.00905427, -0.0520759, 0.0635459, 0.152796, 0.000308197, - -0.0354366, -0.00113181, 0.061364, -0.128608, 0.00421285, -0.0287593, 0.0243545, -0.052208, - 0.000375558, -0.0167535, 0.00873265, 0.0752245, 0.00744216, -0.0119389, 0.0225206, -0.0189916, - -0.0253872, 0.00905674, -0.00873364, 0.00526114, 0.0448877, -0.0580581, 0.00681423, -0.0637524, - -0.0370372, -0.0561434, -0.00836047, 0.0433733, -0.0140024, 0.000233554, 0.00309609, -0.0161593, - 0.0248977, 0.0330903, 0.0336645, 0.0216872, 0.0263714, 0.072331, -0.0283138, 0.0637294 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p24(hatfit_yaw00_lev1_p24); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p24_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p25.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p25.mh deleted file mode 100755 index 8efc458..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p25.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p25.mh: - -#ifndef stasm_hat_yaw00_lev1_p25_mh -#define stasm_hat_yaw00_lev1_p25_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p25(const double* const d) // d has 160 elements -{ - const double intercept = -0.343956; - const double coef[160] = - { - 0.00760984, 0.00677376, -0.0254998, -0.0180962, -0.0163319, 0.0787102, -0.0501463, 0.109694, - 0.0324034, 0.0167922, -0.0197681, 0.0290643, -0.0292062, 0.0780218, 0.0643669, 0.0284101, - -0.0255905, -0.0887582, -0.00245165, 0.000299687, 0.0577481, 0.0246098, -0.0493255, 0.0317641, - 0.0699807, 0.00365498, -0.0248711, -0.0952788, -0.0441012, -0.00877127, -0.030372, 0.025457, - 0.00123633, 0.00568069, 0.0530734, 0.0160453, -0.0228293, -0.0383732, -0.0202062, 0.00138904, - -0.0311672, -0.0647133, -0.011528, 0.0200126, -0.0633424, -0.0168273, 0.01839, -0.0474396, - 0.0407186, 0.0366202, 0.0856484, 0.190433, 0.0179868, 0.00304538, 0.0494411, -0.0136479, - 0.111389, 0.0899019, -0.0682664, -0.0100893, -0.06274, 0.0846425, 0.0863926, 0.0344789, - -0.00408501, -0.0395417, -0.0479772, 0.0403961, 0.0353354, 0.0277053, -0.0834275, -0.0522247, - 0.0280733, 0.0182633, 0.0412811, 0.030988, 0.0378751, -0.029654, 0.0410781, -0.0249082, - 0.00416055, 0.018964, 0.0161914, 0.0459608, 0.0419443, 0.000767701, 0.00510756, 0.0379706, - -0.0847118, -0.00462727, -0.00259532, -0.0472359, 0.019949, -0.015067, -0.0199384, -0.00995159, - -0.0998395, 0.0710568, 0.0364557, 0.0287091, 0.0888186, -0.0355493, -0.041063, -0.0758328, - -0.0759168, -0.0295297, -0.0642619, -0.030304, 0.0497545, 0.0141481, 0.0492566, -0.00652294, - -0.0226196, -0.0498264, -0.0234137, -0.0373272, -0.00606085, -0.00196313, -0.0231809, -0.0233476, - -0.00804062, 0.0100827, -0.0173219, 0.010049, 0.0315197, 0.0323537, 0.113683, 0.111685, - 0.050072, -0.0252066, 0.0313543, -0.0228036, -0.0584108, 0.0153078, -0.0722343, -0.0497144, - 0.0357457, 0.0532115, -0.0072414, -0.0434428, -0.035532, -0.00558749, -0.0402508, 0.0592584, - 0.0665029, 0.0417867, 0.00392788, -0.0309772, 0.00040911, -0.0210691, 0.0148444, 0.0146238, - 0.0102926, 0.0166917, 0.0144286, 0.0537487, 0.000804561, -0.0208786, -0.0339195, 0.0450666 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p25(hatfit_yaw00_lev1_p25); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p25_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p26.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p26.mh deleted file mode 100755 index be11363..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p26.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p26.mh: - -#ifndef stasm_hat_yaw00_lev1_p26_mh -#define stasm_hat_yaw00_lev1_p26_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p26(const double* const d) // d has 160 elements -{ - const double intercept = -0.258416; - const double coef[160] = - { - -0.00350965, -0.00176727, 0.0280615, 0.100582, 0.0516356, -0.014299, 0.0969119, 0.0611335, - 0.0505389, -0.0141772, -0.072076, -0.0704732, 0.0288541, 0.0270603, 0.0417463, 0.012438, - -0.026474, 0.0106418, -0.0192412, 0.00922146, -0.0171761, 0.000301015, -0.0321873, -0.0131573, - 0.0106071, -0.0488669, -0.0599012, 0.0174829, 0.025597, -0.0133362, -0.104343, 0.184658, - 0.00435425, -0.0187789, -0.0399474, 0.0455359, -0.0288366, 0.0699611, 0.0333399, -0.0800692, - 0.0122853, 0.00344305, 0.0364898, -0.151364, -0.0852088, -0.00178568, 0.0316897, -0.0305154, - 0.00425055, 0.0301504, 0.0282844, -0.0151934, -0.0699295, -0.0299469, 0.0155334, -0.0324951, - 0.0297988, 0.0744955, 0.0666288, 0.0450893, -0.0617183, -0.0574214, -0.0496704, -0.0188076, - -0.0436869, -0.0200248, 0.0252562, 0.0178969, -0.047149, 0.00292977, -0.062868, -0.0842954, - 0.043477, 0.0700997, -0.00511285, 0.00301757, -0.0417495, 0.0746707, 0.129842, 0.0575271, - -0.0194383, 0.0668798, -0.0348481, -0.0217796, 0.0407116, 0.00766602, 0.0684383, 0.00838842, - 0.00132244, -0.0290873, 0.0186756, 0.0560339, 0.0317368, 0.045016, 0.0153503, 0.0255243, - -0.0127486, -0.0204903, -0.0369487, 0.0489509, 0.076522, 0.0118913, 0.0292849, 0.0308702, - 0.0262609, 0.00018022, -0.00272539, 0.00638587, -0.00702837, -0.0447886, -0.00564197, 0.0424315, - -0.0743288, -0.00477299, 0.0350454, 0.0938537, 0.0271551, 0.0364917, -0.0451706, 0.0142219, - 0.0136303, -0.0614797, -0.0208402, -0.0323582, 0.0512702, -0.0464986, 0.0845153, -0.00519982, - -0.0139982, 0.0406294, 0.0316932, -0.0047094, -0.00554515, -0.00944887, -0.057371, -0.0618004, - -0.0259082, 0.0238172, 0.0214687, -0.0108454, -0.00737554, 0.0388521, 0.0486423, -0.015575, - -0.0425036, -0.0370336, -0.0227926, 0.0054459, -0.00637709, 0.0188067, 0.0420747, 0.0616357, - 0.0455921, 0.0453217, -0.0197868, -0.0337423, 0.00859838, 0.00324809, -0.110627, -0.0217408 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p26(hatfit_yaw00_lev1_p26); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p26_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p27.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p27.mh deleted file mode 100755 index 555f46f..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p27.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p27.mh: - -#ifndef stasm_hat_yaw00_lev1_p27_mh -#define stasm_hat_yaw00_lev1_p27_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p27(const double* const d) // d has 160 elements -{ - const double intercept = -0.27113; - const double coef[160] = - { - 0.0659569, 0.0464331, -0.103289, -0.0413934, -0.0712755, 0.0346774, 0.0776075, 0.00796679, - 0.0563323, 0.0349391, 0.00432435, 0.0186805, -0.0227768, -0.0411882, 0.0180095, -0.0299084, - -0.00206588, 0.0248174, 0.00940869, 0.0292864, 0.036919, -0.0294685, 0.0153051, -0.00761443, - 0.0207946, -0.020588, -0.0167524, 0.0681632, 0.0617253, -0.0113329, 0.0781032, 0.120613, - 0.0584448, 0.00895681, -0.0797661, 0.0199725, -0.091961, 0.0210085, -0.0103899, -0.0277577, - -0.0227788, -0.0613546, 0.129852, 0.213951, 0.0422787, 0.13874, -0.00840513, 0.0306937, - -0.0819338, -0.0682186, -0.000161617, 0.0264743, -0.0361697, -0.00122901, -0.0812425, -0.0483864, - -0.0367527, 0.00506988, -0.0264522, 0.028902, -0.0366666, 0.0396858, -0.0272568, -0.0785532, - -0.0198807, 0.0610862, -0.025964, -0.14049, -0.00583712, 0.0220212, 0.0874111, -0.0149439, - -0.0559577, 0.00576425, 0.140836, 0.0080078, 0.0273005, -0.0369856, -0.00886448, -0.0916488, - 0.0144509, 0.0354737, 0.0483817, -0.0442041, -0.131503, -0.0762792, -0.0897255, -0.127158, - 0.0441685, 0.0695112, -0.074735, -0.0137479, 0.0393981, -0.00539789, 0.128842, 0.0522683, - 0.0255804, 0.047649, -0.00367784, -0.0202382, 0.00898913, -0.0726423, 0.0113562, 0.11802, - -0.0330782, -0.0250013, 0.0268071, 0.0255662, -0.0229084, 0.0101128, 0.0254925, 0.0043954, - 0.0369233, -0.0643779, -0.032985, 0.0624686, -0.0150503, 0.0408147, -0.0230252, 0.0894271, - -0.0239848, 0.0469918, -0.0968045, -0.0127922, -0.0347748, 0.0538083, -0.115578, 0.00181725, - -0.012524, 0.0620152, 0.0521556, 0.0723663, 0.0223458, 0.0462425, 0.0593311, -0.0103422, - 0.0260298, -0.0407782, 0.0141628, 0.0185399, 0.0204076, -0.028273, 0.0340808, -0.0169075, - 0.0207457, -0.00554604, -0.0227777, -0.0297453, 0.0190428, -0.042317, 0.0355453, -0.0367405, - -0.0275647, 0.0482755, 0.0201301, -0.03366, 0.024693, -0.02327, 0.00295774, -0.0371129 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p27(hatfit_yaw00_lev1_p27); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p27_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p28.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p28.mh deleted file mode 100755 index 935c0d0..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p28.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p28.mh: - -#ifndef stasm_hat_yaw00_lev1_p28_mh -#define stasm_hat_yaw00_lev1_p28_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p28(const double* const d) // d has 160 elements -{ - const double intercept = -0.367265; - const double coef[160] = - { - -0.0491177, 0.0231859, -0.0192595, 0.0330815, -0.0576877, 0.0225005, -0.0189693, -0.073541, - -0.0359155, 0.0280567, 0.058852, -0.021962, -0.0898127, 0.00992803, -0.105721, -0.0758356, - -0.0399572, -0.00768943, -0.00834162, -0.0527198, -0.00505285, 0.0574883, 0.0495735, 0.0353355, - 0.00565149, -0.0138252, 0.0275444, -0.0166165, -0.0180696, 0.0225599, 0.00422979, 0.0218285, - 0.0106431, -0.00438759, -0.0253353, 0.0531471, -0.00232429, 0.0125946, -0.0443213, 0.0380441, - 0.0545565, -0.0245121, -0.0243301, -0.0125267, 0.00408049, 0.0140579, 0.0684684, 0.0430101, - 0.0634023, 0.0491572, 0.00547892, -0.00679154, 0.0471163, -0.0927548, 0.0349607, 0.144998, - 0.0668455, 0.0199738, 0.0526352, -0.0139169, 0.0229871, -0.054652, -0.0295048, -0.00122264, - 0.015289, 0.0322566, 0.0218405, 0.0401696, 0.0214872, 0.00197294, -0.010518, -0.0242283, - -0.0318135, -0.00595729, 0.0123801, -0.064379, -0.0093272, -0.047988, 0.0772107, -0.0524223, - -0.0844024, -0.000671938, -0.0151113, -0.0149563, -0.0036049, 0.083559, -0.0754542, -0.0956407, - -0.035109, -0.0375144, 0.0130195, -0.0312299, -0.0114591, 0.055766, 0.120315, -0.0705052, - -0.09633, -0.011542, 0.0518571, 0.00872181, 0.0032912, -0.103982, 0.0191252, 0.000668796, - -0.0401536, -0.0493773, 0.0168348, 0.01139, 0.00740454, 0.039254, -0.0362172, 0.02814, - 0.014249, 0.0354089, -0.0336193, -0.0126663, -0.0140059, 0.0756294, 0.0198288, 0.0730499, - -0.0297365, 0.16755, 0.0359386, 0.111478, -0.0208914, 0.0188063, -0.041303, 0.0697762, - 0.0757622, -0.134472, 0.0145896, 0.133626, 0.109506, -0.00747391, 0.0592377, -0.0418491, - 0.158857, -0.0764913, -0.0324145, -0.0740956, -0.0123833, 0.021435, 0.0274086, 0.0530061, - -0.0218357, 0.158698, -0.0228227, -0.102267, -0.0387576, -0.0172159, -0.0725893, -0.113119, - -0.0698103, -0.0334452, 0.0718383, 0.153521, 0.0144299, 0.0119134, 0.0590488, 0.0985707 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p28(hatfit_yaw00_lev1_p28); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p28_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p29.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p29.mh deleted file mode 100755 index 443c0bf..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p29.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p29.mh: - -#ifndef stasm_hat_yaw00_lev1_p29_mh -#define stasm_hat_yaw00_lev1_p29_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p29(const double* const d) // d has 160 elements -{ - const double intercept = -0.424705; - const double coef[160] = - { - -0.0101392, 0.0594769, -0.0503994, -0.0217849, -0.0176289, 0.0145377, -0.0522176, 0.00121116, - 0.00360008, -0.0637196, 0.0524819, 0.00122919, 0.00585721, 0.0379185, 0.0118428, 0.0235596, - -0.00853191, -0.0297745, -0.0191564, 0.0336039, -0.0503812, -0.018574, 0.0527383, 0.0650683, - -0.0243727, -0.0434241, 0.00644921, -0.0300497, 0.00796432, -0.0536368, -0.0621528, 0.0279038, - -0.00738354, 0.0727482, 0.0549024, 0.0158414, -0.0583833, -0.0326461, -0.0674633, 0.0371455, - -0.00235584, -0.115486, 0.0571597, 0.0360401, 0.0540954, -0.0771664, 0.0161136, -0.035354, - 0.0430979, 0.0319481, 0.0163812, 0.0243459, 0.0489217, 0.0122026, 0.0135831, -0.000182662, - 0.0122186, -0.00370179, 0.0199094, -0.00179121, 0.0482769, 0.0688446, -0.0269516, -0.12388, - -0.00352889, 0.0219264, -0.00611725, 0.0666546, 0.0573278, 0.107485, 0.106329, -0.0893211, - -0.0891537, -0.0652508, -0.0010934, -0.00372103, 0.0410134, -0.00465645, 0.0239861, 0.0364478, - 0.0299715, 0.0630202, -0.0419831, -0.0686255, -0.0778967, 0.0467799, 0.0227674, 0.0657124, - 0.027953, 0.0426046, 0.0358549, -0.0399428, -0.0516945, 0.00788335, -0.00547867, -0.048281, - -0.0345903, -0.0463522, 0.0183776, -0.0318859, -0.0904243, -0.0961235, 0.071241, -0.0241751, - 0.0132324, 0.0117648, 0.0641096, 0.0415856, -0.00481538, -0.07176, 0.0348739, 0.107626, - 0.0708185, 0.0693277, -0.0641239, -0.0530838, -0.0661927, 0.0143412, -0.0828503, 0.0556659, - -0.142306, 0.110705, -0.0279635, 0.149666, -0.0350018, 0.0168867, 0.0640467, 0.0316187, - 0.0633347, -0.158517, 0.1008, 0.0477829, 0.111661, -0.0384688, -0.0385956, -0.0884942, - 0.092242, -0.028367, -0.0673696, -0.0897616, 0.061894, 0.10119, 0.0367397, 0.0390003, - 0.00781926, 0.135441, -0.000614327, -0.0771375, -0.107391, 0.0188102, -0.0536738, -0.0515374, - -0.0620133, -0.0284957, 0.0837494, 0.185942, 0.135109, -0.0251174, 0.0389205, 0.114206 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p29(hatfit_yaw00_lev1_p29); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p29_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p30.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p30.mh deleted file mode 100755 index 57b0c46..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p30.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p30.mh: - -#ifndef stasm_hat_yaw00_lev1_p30_mh -#define stasm_hat_yaw00_lev1_p30_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p30(const double* const d) // d has 160 elements -{ - const double intercept = -0.0531596; - const double coef[160] = - { - -0.116102, -0.0172225, 0.0454119, -0.0262966, -0.0207222, -0.0427532, 0.103657, 0.02224, - 0.0453501, -0.0014315, -0.0386289, -0.0456763, -0.0244043, 0.0208895, -0.0248768, 0.0451056, - -0.0245413, 0.0127505, 0.0329261, -0.00134255, -0.0140381, -0.0259175, -0.0684072, -0.0488436, - -0.0394765, -0.0451636, -0.0680844, -0.0211025, -0.00292934, 0.0674798, -0.00288135, 0.0395926, - 0.00930007, 0.0408055, 0.0158728, -0.0368503, -0.00486911, 0.0206787, -0.0960855, 0.0674777, - 0.146507, 0.0597985, -0.0785504, -0.0352399, -0.0553251, 0.0498531, -0.0510412, -0.05066, - -0.0637962, 0.0197599, 0.0860904, 0.19492, 0.16902, -0.0177371, 0.0311064, 0.0233502, - 0.0702246, 0.0475911, -0.09766, -0.0689293, -0.00937745, 0.00158015, 0.113499, 0.129597, - 0.0206268, 0.0119381, 0.0850598, 0.015194, -0.0276467, -0.0842619, 0.00383884, -0.00787932, - 0.016834, 3.43563e-05, 0.0220212, 0.0351324, -0.013533, 0.00399515, -0.0409508, -0.0654589, - -0.032318, 0.0819506, -0.0245304, -0.127415, -0.0202418, 0.00750139, 0.103719, 0.027766, - -0.00622414, -0.0615687, 0.0384051, -0.00782071, -0.109777, -0.0693072, -0.030324, -0.0384596, - -0.0193364, -0.0411026, 0.113159, 0.0408849, -0.0170671, 0.0279579, -0.0372294, -0.0214017, - 0.0114996, 0.0578027, -0.0615514, 0.0152347, 0.0460153, 0.111419, 0.0514752, 0.0416284, - -0.00200971, -0.00390233, -0.0450069, -0.023482, 0.0194326, -0.0105444, -0.0657913, -0.0614153, - -0.00685912, -0.0665019, -0.0477235, 0.0210051, 0.0345011, 0.0562563, 0.0548732, 0.00697098, - -0.0315075, -0.0138438, 0.00567381, -0.0284875, 0.00999239, -0.00871022, -0.0646768, -0.0581475, - -0.0023445, 0.0307289, -0.0300773, -0.0644101, 0.012134, -0.0145632, -0.0152647, 0.0761716, - -0.0944007, -0.00998309, 0.0451726, 0.0128116, 0.025647, -0.0153354, -0.0149689, 0.0425286, - 0.00340354, 0.0453019, -0.0248344, 0.0279366, -0.0537908, -0.00810353, -0.0232331, -0.0725048 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p30(hatfit_yaw00_lev1_p30); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p30_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p31.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p31.mh deleted file mode 100755 index f3392ae..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p31.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p31.mh: - -#ifndef stasm_hat_yaw00_lev1_p31_mh -#define stasm_hat_yaw00_lev1_p31_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p31(const double* const d) // d has 160 elements -{ - const double intercept = -0.388448; - const double coef[160] = - { - 0.0395692, -0.000582387, 0.0396386, 0.00866431, 0.0319535, 0.0041876, -0.0354922, -0.0104189, - -0.0310756, -0.0246819, 0.0131718, 0.0140588, -0.0118571, 0.0396711, 0.00573793, -0.0420841, - -0.0392253, 0.00435255, 0.0107915, 0.0484352, 0.069234, 0.0120039, -0.0142504, -0.0481674, - -0.0288146, -0.0300535, 0.0359163, 0.0134041, 0.0314277, -0.0117238, 0.0785214, 0.0631591, - -0.0130544, -0.0264549, -0.05275, -0.012083, 0.0545285, 0.00115459, -0.0312022, 0.0219239, - -0.0323945, -0.0122762, 0.015471, -0.0308729, -0.0539241, -0.0488238, 0.12595, -0.111672, - -0.0124925, 0.00426807, 0.0116804, -0.00775668, 0.039259, -0.0806952, 0.061823, 0.0456183, - 0.0410691, 0.0470852, 0.0510043, -0.00393638, -0.0729619, -0.0124941, 0.0428558, 0.122023, - 0.0525826, 0.0228482, -0.0453305, -0.0276555, -0.0690039, 0.00233118, -0.0920037, -0.011254, - -0.0476996, -0.00179941, -0.00906979, -0.0290895, 0.00247007, 0.0122311, -0.0150106, -0.0317769, - 0.099511, -0.102523, 0.0281903, 0.0553347, 0.119371, 0.0605233, -0.0784847, 0.0330739, - 0.0753692, 0.0859453, -0.0625154, -0.0926569, -0.0918532, 0.109675, -0.0501109, 0.0111423, - -0.049514, 0.0157422, 0.0406392, 0.105897, 0.038947, -0.0269157, -0.0732481, -0.134709, - -0.0132958, -0.0224088, 0.0157976, 0.0838067, 0.120186, 0.0517959, 0.105812, 0.130127, - 0.0182283, 0.052454, -0.0116218, -0.0192446, -0.0667099, -0.0212154, 0.0318632, -0.00745494, - 0.00943903, -0.0745027, 0.0762356, -0.00904315, -0.017699, -0.0561609, 0.0252819, 0.00907982, - -0.0613076, 0.0518035, 0.0243614, -0.0599225, 0.0215072, 0.00576192, 0.00735767, -0.0274716, - 0.0246765, 0.0444133, -0.000244459, -0.0395511, -0.0331652, -0.0164145, 0.0816089, 0.0400588, - -0.0199769, -0.102558, -0.0129884, -0.0170645, -0.0686559, -0.0387113, -0.0817568, -0.0127845, - -0.00316126, 0.0933731, 0.0331108, 0.0268358, 0.0409501, 0.0787449, 0.0206058, 0.0677994 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p31(hatfit_yaw00_lev1_p31); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p31_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p32.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p32.mh deleted file mode 100755 index a76f1ee..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p32.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p32.mh: - -#ifndef stasm_hat_yaw00_lev1_p32_mh -#define stasm_hat_yaw00_lev1_p32_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p32(const double* const d) // d has 160 elements -{ - const double intercept = -0.320639; - const double coef[160] = - { - -0.00911108, -0.0479156, -0.00740632, -0.012859, 0.0309539, 0.00489859, -0.00624756, -0.020108, - 0.0677567, -0.0155136, 0.0678659, 0.00147824, 0.0438044, 0.00549171, 0.0268882, -0.00297623, - 0.0467355, -0.000569183, 0.0496245, 0.014699, 0.0616936, 0.00263958, -0.0395147, -0.0297785, - 0.0126961, -0.00781382, 0.000625079, 0.0178607, 0.0226246, 0.0655686, 0.0337088, -0.0304876, - -0.0257202, -0.0219612, -0.0213103, 0.0194326, 0.0577388, -0.0477398, 0.0466768, 0.0194634, - 0.0182962, -0.0162236, -0.00055095, -0.0110111, -0.0190531, -0.0274738, -0.0244005, 0.066355, - -0.0631781, 0.0319185, 0.00377789, 0.00719412, -0.0578098, 0.0220575, -0.0130465, -0.0338156, - -0.0718547, -0.0406409, -0.0248472, -0.0471251, -0.0763616, -0.0305719, 0.0872795, -0.04342, - -0.0291223, 0.0174219, 0.0140269, 0.0152528, -0.00418056, -0.0340391, 0.0826187, 0.0677038, - 0.0170003, -0.00907442, -0.0291512, -0.0377432, -0.0488433, 0.0483225, -0.100243, 0.034457, - -0.106342, 0.12952, 0.0241453, 0.0446246, -0.0607043, 0.0811712, 0.0895215, -0.0504978, - 0.122301, -0.0768722, 0.0214746, -0.0429019, 0.0439603, -0.0422063, 0.0225263, -0.0368518, - 0.0926311, 0.02738, -0.0239644, 0.0229243, 0.0579599, 0.0101616, -0.00726972, -0.000649471, - 0.0135215, 0.0385566, 0.0175664, -0.0460473, -0.050476, 0.0167167, -0.040066, 0.0147113, - -0.00118741, 0.042841, 0.0631771, 0.145191, 0.0466015, -0.0373302, 0.0596687, 0.106164, - 0.0088616, 0.0634729, -0.0771898, 0.0459812, 0.0167569, -0.0705409, -0.0386409, 0.112283, - -0.0571554, -0.168199, 0.0226604, 0.034943, 0.0155652, 0.0234396, -0.0123834, 0.00107804, - 0.0273647, 0.033714, 0.0945813, -0.0809198, 0.0404793, 0.0308191, -0.00997607, -0.0276745, - 0.0276755, 0.0481048, -0.101447, -0.0905513, -0.0451026, 0.0491422, 0.0664234, -0.0265713, - -0.040285, -0.0443237, 0.0464626, 0.0769965, 0.0259644, -0.0342793, -0.0543196, -0.0928784 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p32(hatfit_yaw00_lev1_p32); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p32_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p33.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p33.mh deleted file mode 100755 index 36a056d..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p33.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p33.mh: - -#ifndef stasm_hat_yaw00_lev1_p33_mh -#define stasm_hat_yaw00_lev1_p33_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p33(const double* const d) // d has 160 elements -{ - const double intercept = -0.0187845; - const double coef[160] = - { - 0.0128283, -0.055128, 0.010886, -0.0231225, -0.0305408, 0.00461099, 0.0104216, 0.0271656, - -0.00228586, 0.0483301, -0.0136487, 0.0271316, 0.0564309, -0.0270776, 0.043211, -0.0112379, - 0.0231918, -0.0112949, 0.036762, -0.00612861, -0.00486995, -0.0342318, -0.0290889, -0.0106391, - 0.000312558, 0.0285837, 0.0235095, -0.028434, 0.00831803, 0.0265148, -0.050084, -0.0117228, - 0.00236049, -0.041693, -0.026685, 0.0302716, 0.00699107, 0.0666115, 0.037568, -0.003785, - -0.0251941, 0.0411825, -0.122721, -0.0247136, -0.0390895, 0.0417399, -0.0253207, -0.0118569, - -0.0162393, -0.0527942, 0.0783038, -0.00984112, -0.0233633, -0.000284128, -0.0400959, 0.0280783, - -0.0313475, 0.0260252, 0.00081784, -0.00324565, -0.0279781, 0.044135, 0.040844, 0.0306354, - 0.0187744, -0.0480202, 0.00757192, -0.00948626, -0.0589132, -0.0367085, 0.0597323, -0.108456, - -0.0430326, -0.0269714, 0.0392287, -0.00913477, 0.0286522, -0.137626, 0.0983528, 0.0694479, - 0.0673885, -0.0641448, 0.0966714, 0.0478503, 0.0526654, 0.105189, 0.0627519, -0.00105678, - -0.0623832, 0.134875, -0.0582099, -0.0352066, -0.0525147, 0.00990412, 0.0244933, 0.0171214, - 0.0367176, -0.0621222, 0.0158906, 0.0668107, -0.0107779, -0.0596686, -0.0566563, -0.0810594, - 0.0323834, 0.0121392, 0.0145543, -0.00650743, 0.114811, 0.0771221, -0.0600683, 0.0573055, - 0.0851473, 0.0814111, -0.0693027, -0.0160514, -0.0557765, 0.096182, -0.0552072, -0.0662288, - -0.029029, -0.0104541, 0.00859579, -0.0230395, -0.00224977, -0.0723467, -0.113479, -0.0628757, - 0.0067731, -0.000458681, -0.0301224, -0.00614874, -0.0341254, 0.00474058, 0.0300139, 0.0479876, - -0.0236848, -0.0624128, -0.0471116, 0.0415574, 0.0389746, 0.00909709, 0.102794, 0.0861245, - -0.0197406, -0.0237167, 0.164457, -0.0215144, -0.0320249, -0.0882093, -0.0687686, -0.0792362, - -0.0391014, 0.0326003, -0.031806, -0.111365, 0.0365271, 0.00928061, 0.0847804, 0.066844 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p33(hatfit_yaw00_lev1_p33); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p33_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p34.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p34.mh deleted file mode 100755 index e1812de..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p34.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p34.mh: - -#ifndef stasm_hat_yaw00_lev1_p34_mh -#define stasm_hat_yaw00_lev1_p34_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p34(const double* const d) // d has 160 elements -{ - const double intercept = 0.178305; - const double coef[160] = - { - 0.0332668, -0.0545706, -0.0397769, -0.102727, -0.0513047, -0.0280496, 0.0212568, 0.100975, - 0.0147986, 0.0945098, 0.0225728, 0.0163496, -0.0706498, 0.0135124, -0.0338867, -0.00292602, - -0.0117578, -0.0228322, -0.0991631, -0.0196783, -0.0715382, -0.0609741, -0.0451959, -0.00996876, - -0.0218956, 0.0405813, 0.0512725, -0.0304816, -0.0346735, 0.0410437, -0.0599454, 0.0278405, - -0.00430012, -0.0515526, 0.0408474, -0.0180384, -0.0375938, -0.050297, 0.0854439, -0.065132, - -0.0480776, -0.00851022, -0.0311825, -0.0125235, 0.10003, 0.0265117, -0.0932129, -0.0905405, - -0.0179596, -0.0783844, 0.0545748, 0.0983039, 0.112361, 0.103802, 0.000276691, -0.000181198, - 0.0260529, 0.0539351, 0.0215641, -0.0677932, 0.000667061, 0.145442, 0.129529, -0.000832013, - -0.0467681, 0.0241408, 0.0423294, 0.121797, -0.0189404, -0.12473, -0.00636875, -0.0269607, - 0.0997501, -0.0567658, -0.0953586, -0.0093058, 0.0775357, 0.0544267, -0.0465235, -0.0602757, - 0.0582786, -0.0635637, -0.027749, -0.0187748, -0.0546626, -0.149418, 0.043224, 0.0541148, - 0.0228059, 0.0306246, 0.00155719, -0.0412755, 0.032523, -0.0587637, -0.0013374, 0.0502265, - -0.0342482, 0.038831, 0.110763, -0.0240828, -0.0316851, -0.083598, -0.0966767, 0.00540257, - 0.0175222, -0.0453235, -0.0782324, 0.0424939, 0.0441882, -0.00707829, 0.0587061, 0.0676098, - -0.0898869, -0.0279974, 0.112122, -0.0175998, 0.0104283, -0.00582047, 0.00140559, 0.0392947, - -0.0652298, 0.0749545, 0.0544736, 0.0131598, 0.0152306, 0.0831729, -0.0200888, -0.0612296, - -0.0401844, -0.0736851, -0.079223, 0.0341835, -0.0466979, 0.0652963, -0.0215782, 0.0160373, - -0.00665171, 0.0425585, -0.0160073, 0.0448272, 0.00451256, 0.00694954, -0.00332655, -0.00627149, - -0.0135419, 0.00919265, 0.0027794, -0.00835187, -0.0440384, 0.0110796, -0.000867199, -0.00321809, - 0.0543303, -0.0137353, -0.0224532, -0.0320376, -0.0150772, 0.00407994, 0.0127847, -0.0176401 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p34(hatfit_yaw00_lev1_p34); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p34_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p35.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p35.mh deleted file mode 100755 index b04fecc..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p35.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p35.mh: - -#ifndef stasm_hat_yaw00_lev1_p35_mh -#define stasm_hat_yaw00_lev1_p35_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p35(const double* const d) // d has 160 elements -{ - const double intercept = -0.128463; - const double coef[160] = - { - 0.0548922, -0.0110683, -0.142114, -0.061709, -0.0739904, 0.0729181, 0.00372399, -0.0401665, - -0.0617821, 0.0601517, 0.0413927, -0.0297843, -0.0801413, 0.00486967, 0.0463089, 0.0182653, - 0.0368233, -0.00796331, 0.00955545, -0.0470071, -0.0327957, -0.0484237, 0.00205177, -0.0591226, - 0.0825365, 0.0521992, 0.00709222, 0.0413314, 0.026715, 0.0396009, 0.05337, -0.0870864, - 0.0624343, -0.0520468, 0.0297113, 0.0155546, 0.0373713, -0.0259624, -0.00302342, 0.0722519, - -0.012865, -0.0359395, 0.201415, 0.0834435, 0.131066, 0.0488908, -0.0165508, -0.0287044, - -0.0236077, 0.0360244, -0.0465815, 0.0298103, -0.0507475, -0.0381212, -0.00291925, 0.066679, - -0.0280296, -0.116999, -0.0653786, 0.138842, 0.135875, 0.00553319, 0.0729103, 0.0155418, - -0.0202042, -0.0540844, 0.101567, -0.051419, 0.0423417, 0.0287684, -0.123131, 0.0581658, - 0.0604602, 0.113075, -0.0644531, -0.0664801, -0.0592592, 0.0547968, 0.0039087, -0.0837654, - -0.0117236, 0.0236007, -0.146423, -0.0754925, -0.0932447, -0.0715713, -0.0024796, 0.001342, - 0.00909714, 0.0537925, -0.0105599, -0.0726132, -0.0738913, 0.023578, 0.0422188, -0.0206054, - 0.0173315, 0.0659782, 0.0403875, 1.06256e-05, -0.0569155, -0.00761777, 0.00587271, 0.0149728, - -0.0151301, 0.0470131, 0.0320093, 0.0175039, -0.0121165, -0.051231, 0.0608582, -0.0104416, - -0.0912704, 0.00771752, 0.0291578, -0.0629806, 0.0279452, -0.0162268, -0.0166928, 0.0858329, - -0.0414572, -0.00935215, -0.00984813, 0.0352476, 0.0321423, 0.0210393, -0.0371691, 0.0191584, - -0.0362629, -0.0497132, 0.00950301, 0.0912439, 0.0447469, 0.0326298, -0.0463132, 0.0560467, - 0.0252251, -0.0729444, -0.00413866, -0.0123862, 0.0247588, -0.0158056, 0.017215, -0.0253207, - 0.0436535, -0.0472254, 0.0386084, -0.0160216, 0.00108055, 0.00200998, 0.0146819, 0.00212591, - 0.0759401, -0.0456016, 0.0433273, -0.0109767, 0.00185021, 0.0298317, -0.018552, -0.128413 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p35(hatfit_yaw00_lev1_p35); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p35_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p36.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p36.mh deleted file mode 100755 index 9902dcf..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p36.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p36.mh: - -#ifndef stasm_hat_yaw00_lev1_p36_mh -#define stasm_hat_yaw00_lev1_p36_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p36(const double* const d) // d has 160 elements -{ - const double intercept = -0.1457; - const double coef[160] = - { - -0.0564536, 0.0914242, 0.00271123, -0.00182844, -0.0633129, -0.00733241, 0.0999422, -0.0477681, - 0.0764352, -0.0870852, -0.0486103, -0.0607736, -0.000435941, 0.00508668, -0.00500671, -0.0702268, - 0.128733, 0.0442575, 0.00878972, 0.0700395, 0.0473909, 0.0543005, -0.0111132, 0.013342, - 0.0205181, -0.0355777, -0.0151112, -0.0472716, -0.0856515, -0.0205877, -0.052943, -0.0136666, - 0.0069465, -0.0149346, -0.011358, 0.12753, 0.0984476, -0.0389193, 0.0579468, 0.0582624, - -0.0110768, 0.0444154, 0.00744086, 0.0866081, 0.0722389, -0.0573269, 0.0403181, 0.0920937, - -0.0364049, -0.115042, -0.00983702, 0.0596673, 0.0885667, 0.0310721, 0.00586564, 0.0468913, - -0.017122, -0.000325935, 0.0991339, -0.116244, -0.00667895, -0.0376603, -0.0678163, -0.0170879, - 0.0636697, 0.176845, -0.0927495, -0.091466, -0.0301194, 0.0528387, 0.0603075, 0.0012436, - -0.023938, 0.0278906, 0.172167, 0.0984494, 0.0194545, -0.024253, 0.0253562, -0.0318126, - -0.0194975, -0.0336116, -0.0267596, -0.0570041, -0.114461, 0.049068, -0.0356616, -0.0641071, - -0.00190114, 0.0505992, 0.0442466, 0.0142396, 0.00045172, 0.00117748, 0.064219, 0.00253523, - -0.0195815, -0.0274017, -0.0863983, -0.00886134, 0.030472, 0.0307451, 0.0463506, 0.0257106, - -0.0510129, -0.0619829, 0.0429726, 0.00240901, 0.0356966, 0.0180151, 0.0145302, 0.0191548, - -0.00199986, -0.0803635, -0.0330699, -0.0717274, -0.111292, -0.0742702, -0.0968331, -0.0140921, - -0.00389644, -0.0145533, 0.0115622, 0.0453926, 0.0300503, -0.0389438, -0.0292711, 0.0364436, - 0.0649299, -0.0437214, 0.0145625, -0.0366767, -0.00301135, -0.0164178, 0.0228936, -0.0039428, - 0.0138233, -0.059277, 0.0865879, -0.0358495, 0.0105995, -0.00712132, -0.0193304, -0.0165668, - 0.030437, -0.0192797, -0.0634831, -0.010421, -0.0251347, 0.0561532, 0.0426267, -0.0252875, - -0.0555928, 0.101112, 0.0649617, 0.0141765, 0.0842734, 0.00376744, -0.076665, -0.0297095 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p36(hatfit_yaw00_lev1_p36); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p36_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p37.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p37.mh deleted file mode 100755 index f2343ca..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p37.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p37.mh: - -#ifndef stasm_hat_yaw00_lev1_p37_mh -#define stasm_hat_yaw00_lev1_p37_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p37(const double* const d) // d has 160 elements -{ - const double intercept = -0.210055; - const double coef[160] = - { - 0.0950493, -0.00935139, 0.01181, 0.0394899, 0.0811007, 0.0275117, 0.0722424, -0.0881804, - 0.0348525, -0.0485876, -0.0160258, -0.0341514, -0.0305043, 0.0101718, -0.015857, 0.0402802, - -0.0377945, -0.0019027, 0.072919, 0.0842745, 0.000222965, -0.0380939, -0.0246376, -0.00424166, - 0.0194486, -0.0349667, -0.0273841, 0.0305295, 0.0636758, 0.00705299, 0.0305668, 0.0398521, - -0.118265, -0.0584037, -0.10794, -0.0415925, -0.0515304, -0.0127716, -0.0253359, -0.0407751, - 0.0420787, -0.148058, 0.0641812, 0.0268058, 0.0528418, -0.0247641, -0.0671391, 0.0818132, - 0.0311401, 0.128031, -0.0883229, -0.153532, -0.0651225, 0.034562, -0.00306306, -0.0456042, - 0.0944498, 0.100044, -0.000950214, 0.0151305, -0.0213224, -0.00808936, 0.0587715, -0.0295509, - -0.0385254, 0.034971, 0.0858179, 0.0599195, 0.0747935, -0.0450389, 0.00131876, 0.0261896, - 0.169738, 0.154491, 0.100171, 0.012634, -1.95869e-05, 0.0209616, 0.0390095, 0.102296, - -0.0308072, 0.0561644, 0.0242179, 0.0230298, -0.0307823, -0.00846482, 0.0667324, -0.0606024, - -0.0581933, -0.0114812, -0.0133874, -0.0071245, 0.0813445, 0.0274338, 0.0280443, 0.0464938, - -0.0905175, -0.0693952, 0.00853314, -0.00178364, -0.0380305, 0.00459273, 0.0106825, 0.0111277, - -0.0120436, -0.117429, -0.0235661, -0.0397598, -0.101663, -0.0520093, -0.0944389, 0.000748769, - -0.11383, -0.000200208, -0.0660839, -0.0318683, 0.00202877, 0.0629289, 0.0393827, -0.0105708, - 0.0631688, -0.108595, 0.0667351, -0.0726672, 0.0300087, -0.00349452, 0.00734037, 0.031999, - 0.0497461, 0.00735207, 0.00306494, 0.014219, -0.0212763, 0.00729894, 0.0156232, -0.0397873, - 0.0196028, 0.0102293, -0.0297117, -0.0220887, 0.011573, 0.0196214, -0.0306056, -0.0356663, - 0.0183344, 0.0707345, 0.0325791, -0.00904613, 0.0610273, 0.0230972, -0.0134933, -0.00580341, - -0.00179494, 0.0261325, 0.0439199, 0.0950851, 0.0437041, -0.0344384, -0.0711167, 0.0268441 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p37(hatfit_yaw00_lev1_p37); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p37_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p38.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p38.mh deleted file mode 100755 index 73ca407..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p38.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p38.mh: - -#ifndef stasm_hat_yaw00_lev1_p38_mh -#define stasm_hat_yaw00_lev1_p38_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p38(const double* const d) // d has 160 elements -{ - const double intercept = 0.00825774; - const double coef[160] = - { - 0.020407, 0.00890872, -0.0169787, -0.00204599, 0.00584481, 0.00639558, -0.0849912, 0.00116488, - -0.0601776, 0.00297223, 0.0121289, -0.000996734, -0.0504259, 0.0155576, 0.0171136, -0.0268562, - -0.113227, -0.0539823, -0.00137992, -0.0682175, -0.054388, -0.029641, 0.056121, -0.0473043, - -0.0266457, 0.0332315, -0.0335831, 0.0421327, 0.0238765, 0.0182142, 0.0496482, 0.0712496, - -0.00973039, 0.0157489, 0.0170978, -0.0118249, -0.00446035, 0.00864153, -0.085431, 0.0142116, - -0.0440188, 0.0403919, 0.0950656, 0.0150426, -0.0402887, -0.00466724, 0.0537792, 0.00106359, - 0.0897128, -0.0689607, -0.0521427, -0.0517765, 0.030659, -0.0411972, 0.0376676, -0.082132, - 0.127533, 0.0719542, 0.00061304, 0.0947038, 0.0898292, 0.05316, 0.0314538, 0.053163, - -0.00890308, -0.0451384, 0.0111458, -0.10212, -0.0509414, -0.0147361, -0.0346506, -0.0219878, - 0.00741214, 0.0021788, 0.0244155, 0.101578, 0.0200075, -0.0234641, 0.0230619, 0.0857225, - -0.0198343, 0.0936703, -0.0537956, 0.0921753, 0.138995, -0.0724931, 0.0615286, 0.0941637, - -0.0237765, -0.164809, 0.0134797, -0.00604466, -0.0255852, 0.0324988, -0.1069, 0.0255736, - -0.0514497, -0.0090038, 0.0936203, -0.0991071, 0.00258113, -0.0100746, -0.00428397, -0.0354388, - 0.0905338, 0.142749, -0.142989, -0.0846769, -0.0825498, 0.0805062, -0.00189693, -0.0404901, - -0.00501544, -0.0170325, 0.104385, 0.133965, 0.0772667, -0.076081, 0.040041, -0.0423703, - -0.0192534, 0.00365024, -0.00859575, -0.021672, -0.0746258, 0.0422147, 0.00830109, -0.00595983, - -0.00282683, 0.0146986, 0.0234629, 0.0102508, 0.00175921, 0.0115853, 0.0428529, -0.0050183, - -0.0154206, -0.0336309, 0.0154812, -0.0383404, 0.0251418, -0.0212968, -0.0185515, 0.0357765, - -0.0842346, -0.022264, -0.00279582, 0.00169226, 0.056891, 0.056779, 0.0231415, 0.0348637, - -0.0464232, -0.0307553, -0.00421516, -0.0536781, -0.0807341, -0.0179894, -0.0516063, 0.0255976 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p38(hatfit_yaw00_lev1_p38); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p38_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p39.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p39.mh deleted file mode 100755 index 5dd53ad..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p39.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p39.mh: - -#ifndef stasm_hat_yaw00_lev1_p39_mh -#define stasm_hat_yaw00_lev1_p39_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p39(const double* const d) // d has 160 elements -{ - const double intercept = -0.02697; - const double coef[160] = - { - -0.0137683, 0.0311045, -0.00576306, -0.0245337, -0.02928, 0.0415028, -0.107335, -0.016224, - -0.0457684, -0.00847157, 0.00116153, -0.0267579, -0.0351215, 0.010888, 0.05105, -0.00561323, - -0.0823366, -0.0528186, -0.0139097, -0.0424504, -0.0681589, -0.0593362, 0.0631822, -0.0315455, - -0.0168791, 0.0661379, 0.00162439, 0.00656767, 0.0131466, 0.0123653, 0.0107543, -0.00464072, - -0.0276494, 0.0165671, -0.0178021, 0.0154676, -0.0178779, 0.0137792, -0.0560624, 0.0100809, - -0.0397822, 0.0332191, 0.0806629, 0.106174, -0.0112653, 0.00187161, 0.017389, 0.0214195, - 0.089707, -0.0532137, -0.0466615, -0.0195368, 0.0441674, -0.0145126, 0.0705208, -0.0387176, - 0.116554, 0.0654563, 0.00963125, 0.0722848, 0.113763, 0.0196434, 0.0266145, 0.0757253, - -0.0426398, -0.109253, 0.000972455, -0.070805, -0.068536, -0.00561257, -0.0636282, -0.0180017, - 0.0597286, -0.0306022, 0.0558584, 0.0753626, 0.0085934, -0.0378896, 0.067625, 0.0802456, - -0.0274845, 0.162607, -0.0419922, 0.0483271, 0.123508, -0.0646426, 0.0586254, 0.0346976, - 0.0291506, -0.159534, -0.0188968, 0.0379708, 0.0134742, 0.029137, -0.0647252, 0.029742, - -0.0261874, -0.0465041, 0.143266, -0.088367, -0.0551904, -0.00386277, -0.0299972, -0.0609167, - 0.00441822, 0.154191, -0.129404, -0.0879472, -0.0580239, 0.0599026, -0.0028995, -0.0540687, - 0.0144118, -0.0158184, 0.0417359, 0.0837592, 0.0243108, 0.00549566, 0.0503914, -0.0967733, - -0.0229701, -0.073099, -0.0420856, -0.0503984, -0.111204, 0.0354666, -0.0518395, -0.0114431, - 0.0396234, 0.025096, 0.0130838, 0.056822, -0.0405526, -0.00781527, 0.073553, 0.00667156, - 0.000719109, -0.0457464, -0.00136307, -0.0379476, -0.0192339, -0.0586512, -0.0390123, 0.0188078, - -0.0139295, 0.0144688, 0.0327322, 0.0454937, 0.0938609, 0.0331601, 0.050297, 0.0423592, - -0.0363346, -0.010519, -0.00131118, -0.0415203, -0.0498438, -0.00662749, -0.0168949, 0.0644758 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p39(hatfit_yaw00_lev1_p39); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p39_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p40.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p40.mh deleted file mode 100755 index 6e71e5e..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p40.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p40.mh: - -#ifndef stasm_hat_yaw00_lev1_p40_mh -#define stasm_hat_yaw00_lev1_p40_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p40(const double* const d) // d has 160 elements -{ - const double intercept = -0.0617577; - const double coef[160] = - { - 0.0156052, -0.0459866, -0.00696063, 0.0189737, 0.0265626, 0.0491555, -0.068995, 0.0519549, - 0.0218703, 0.00595397, -0.048948, -0.0240862, -0.0436321, 0.0146736, 0.00315227, 0.0799594, - -0.0552814, -0.00730044, -0.0093325, -0.0324573, -0.0363188, -0.0184091, -0.0983743, -0.0142322, - -0.0277883, -0.0040611, 0.0201635, 0.0043392, -0.0182613, 0.0492748, -0.0425199, -0.0311676, - -0.0198514, -0.0524871, 0.0234489, -0.0173401, -0.0654155, -0.0320293, 0.136825, 0.00609792, - 0.0312316, 0.0166199, 0.0998807, -0.0362655, -0.00310585, -0.103129, -0.0359893, -0.0347384, - -0.125087, -0.0814028, -0.00221715, 0.057648, 0.0746448, 0.00398399, 0.0274751, -0.0829248, - 0.0451593, 0.0611274, -0.0543719, 0.00362775, 0.00348841, 0.154784, 0.0544589, -0.000858817, - 0.0289775, 0.116359, 0.0488896, 0.0798694, 0.0394962, -0.0692173, 0.0532962, 0.0636297, - 0.088678, -0.0533548, -0.0582863, -0.000803631, 0.109162, 0.00118488, -0.059963, -0.0239472, - 0.0771359, 0.0276344, -0.0882249, 0.0688487, -0.00748756, -0.0326405, -0.0178754, -0.00313541, - 0.0451601, 0.043886, 0.0659399, -0.059189, 0.0788565, 0.0218061, 0.0332941, 0.108433, - -0.0465029, -0.0203694, 0.0980137, -0.0546819, -0.0378287, -0.03932, -0.00657228, -0.018022, - -0.0559456, -0.00620295, -0.0316693, 0.00968451, -0.0135787, 0.0130518, -0.00506395, -0.00892536, - -0.0593109, -0.104716, 0.0508358, 0.060059, -0.00030429, 0.0226462, 0.069877, 0.0195314, - -0.0268644, 0.00339959, 0.00963795, 0.0229593, -0.0540894, -0.0612055, -0.0395579, -0.0376664, - 0.0072953, 0.0102422, -0.0257972, 0.0812377, -0.110344, 0.046166, 0.0147895, -0.0229899, - 0.00976963, -0.0256674, -0.0210554, 0.00772394, -0.00608955, 0.00331062, -0.0475402, 0.0181648, - 0.0137614, -0.000236305, -0.0178339, -0.0104172, -0.0305334, -0.0299109, -0.0491962, -0.0191575, - 0.057466, 0.0412388, -0.034844, -0.0256005, -0.00917834, 0.00792608, 0.0468386, 0.021432 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p40(hatfit_yaw00_lev1_p40); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p40_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p41.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p41.mh deleted file mode 100755 index 3368ddf..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p41.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p41.mh: - -#ifndef stasm_hat_yaw00_lev1_p41_mh -#define stasm_hat_yaw00_lev1_p41_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p41(const double* const d) // d has 160 elements -{ - const double intercept = -0.262799; - const double coef[160] = - { - 0.0594156, -0.0187286, -0.0323565, -0.0226788, -0.055155, 0.0173702, -0.033518, -0.0434084, - 0.0596953, 0.04228, -0.00726641, 0.0119526, -0.0537957, 0.0293668, 0.100588, 0.000491553, - 0.0307966, 0.0224319, 0.00512161, -0.0152303, 0.00408469, -0.0856581, -0.0283398, 0.0343747, - 0.0086871, 0.0207789, 0.0469816, -0.038938, 0.00391296, -0.0168281, -0.0427036, 0.00361286, - 0.0179812, 0.0169613, 0.00572675, 0.0304129, -0.00196809, 0.0418755, -0.00682326, -0.00526619, - -0.051209, 0.00270587, -0.0942246, -0.032416, -0.0220637, -0.00783117, -0.0169596, 0.0714794, - -0.0995697, -0.0152599, 0.0286164, 0.00709659, 0.0347345, 0.0513593, -0.132293, -0.0621502, - -0.0369908, 0.00803909, 0.0541353, 0.049953, -0.00213287, 0.0951546, 0.0857773, -0.00410647, - -0.0191665, -0.0381783, -0.0355435, -0.0131754, -0.00711061, -0.0496656, 0.0938031, -0.0537285, - -0.0575811, -0.0393168, 0.0567432, 0.00969633, 0.00741533, -0.0857071, 0.0651419, 0.0182334, - -0.0445946, -0.078534, 0.0226902, 0.00333909, 0.0361221, 0.0670708, 0.0128299, -0.0734256, - 0.0400354, 0.166504, 0.0157823, -0.00584887, -0.0352993, 0.0117685, 0.0264848, 0.0966697, - 0.0356856, -0.0375088, 0.0058627, 0.0673025, 0.0384437, -0.0679526, -0.0509106, -0.00267304, - 0.0892667, 0.0126181, 0.0327518, 0.0443882, 0.073673, 0.0527703, -0.0464817, 0.0490703, - 0.0459133, 0.0243223, -0.0656711, -0.0428812, -0.0567108, 0.0741543, -0.0408965, -0.0359412, - 0.00660457, 0.0337438, 0.084027, 0.00664404, 0.00537387, 0.00442322, -0.016303, 0.0799516, - -0.0276819, -0.0329564, -0.0322236, -0.0538003, -0.0247828, -0.0352706, -0.00563658, -0.0606449, - -0.0264253, -0.0629177, -0.0583771, 0.0590368, -0.00873518, 0.0266721, 0.0847975, 0.0309815, - 0.00688709, -0.0389876, 0.132531, -0.0169061, -0.0111577, -0.0763632, -0.0418102, -0.0389548, - -0.00804132, 0.0567647, 0.00484636, -0.0533848, 0.0127496, 0.00782392, 0.079095, 0.0268384 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p41(hatfit_yaw00_lev1_p41); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p41_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p42.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p42.mh deleted file mode 100755 index f128ecf..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p42.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p42.mh: - -#ifndef stasm_hat_yaw00_lev1_p42_mh -#define stasm_hat_yaw00_lev1_p42_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p42(const double* const d) // d has 160 elements -{ - const double intercept = -0.267832; - const double coef[160] = - { - 0.0250589, 0.0223719, -0.0531637, 0.0118598, -0.0518864, 0.0149485, 0.0560363, 0.000827213, - 0.0652895, 0.0216623, 0.0213494, -0.00431385, 0.0155663, -0.0697053, 0.0143104, 0.0269714, - 0.0717636, 0.0164198, 0.0651081, -0.00678762, 0.0217544, 0.0433132, -0.0405112, 0.0233288, - 0.0368319, -0.00987942, 0.0394593, 0.0363214, 0.0098887, -0.032322, -0.0148654, -0.0114874, - 0.0167995, -0.0430063, -0.00212365, -0.0600111, -0.0100988, 0.00564683, 0.00651138, 0.0223506, - -0.0475533, -0.017191, -0.0231814, -0.0394015, 0.0183108, 0.056735, -0.0773495, -0.0186808, - -0.10888, -0.01172, -0.012778, -0.0280946, -0.023565, 0.0426887, 0.0803558, -0.00555116, - -0.0821078, -0.0211481, 0.0114963, 0.0126135, -0.0138914, -0.0961712, 0.0534635, -0.0237414, - -0.0627828, 0.0069159, -0.0124681, -0.0437366, -0.015536, 0.0277698, 0.00946747, -0.0386741, - -0.00681303, 0.0287985, -0.0146775, -0.00106336, -2.09394e-05, 0.0529079, 0.0153303, 0.00134007, - -0.0475712, 0.150543, 0.0663932, 0.110781, -0.0139091, 0.0487534, -0.00906667, -0.00264463, - 0.105522, -0.0986673, 0.00944924, 0.044035, 0.0759185, -0.00941136, 0.0772422, -0.0080406, - 0.0982731, 0.009884, -0.0309918, 0.00527481, 0.0366586, -0.0249879, -0.00944553, 0.0612417, - -0.0196947, 0.0219406, -0.00881142, -0.0202785, -0.0113854, 0.0112294, -0.0726931, -0.00253419, - 0.0140862, -0.0546059, 0.0840347, 0.104682, -0.0256582, -0.038651, 0.0835034, 0.136506, - 0.00104366, 0.0249283, -0.0248792, 0.00766329, 0.0371655, -0.0961918, 0.0151661, 0.0401377, - 0.000438639, -0.108393, -0.0157583, 0.0281483, 0.0234077, 0.0413021, -0.0310684, 0.00633404, - 0.0395615, -0.0197817, 0.0962121, -0.0522614, -0.042909, 0.027851, 0.0400732, -0.00705579, - 0.0100766, 0.082584, -0.0489721, -0.0849357, -0.0251572, 0.0194749, -0.0308505, -0.074304, - -0.0790463, -0.0262516, -0.024485, 0.0603077, 0.0270147, 0.0375003, 0.00448266, -0.0809277 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p42(hatfit_yaw00_lev1_p42); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p42_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p43.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p43.mh deleted file mode 100755 index 625323d..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p43.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p43.mh: - -#ifndef stasm_hat_yaw00_lev1_p43_mh -#define stasm_hat_yaw00_lev1_p43_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p43(const double* const d) // d has 160 elements -{ - const double intercept = -0.109739; - const double coef[160] = - { - 0.0570196, -0.00816288, -0.0396789, -0.0691714, -0.0147693, -0.0113571, 0.0238471, 0.0654756, - 0.0127259, 0.0262569, 0.0713755, 0.0551583, -0.00408789, 7.70712e-06, -0.0481539, -0.0185502, - -0.0290117, -0.0125839, -0.00523495, 0.0186073, 0.0100473, 0.00134032, -0.0158129, -0.0650889, - -0.00211844, 0.0373439, 0.00656235, 0.0406139, 0.0121945, -0.0274831, 0.0764015, 0.0587713, - -0.00853797, -0.0345838, -0.00964707, -0.0727974, 0.00889578, 0.0503037, -0.0333862, -0.034163, - -0.0827511, -0.0471695, -0.0346255, -0.0385785, -0.00680009, -0.023391, 0.180779, -0.110075, - -0.0308566, 0.00913772, 0.0667521, -0.0236769, 0.0473191, -0.114058, -0.00661101, 0.0277845, - 0.00833675, -0.0048789, 0.0638954, -0.00843914, -0.00834834, 0.0313403, 0.00101895, 0.0332497, - -0.00245061, -0.0320165, -0.0555559, -0.111136, -0.0490009, 0.056839, 0.00416749, -0.0448449, - -0.0293516, 0.031744, -0.0351489, 0.113501, 0.00559084, -0.0416646, -0.011213, 0.0752133, - 0.163951, -0.0631562, 0.0117438, 0.0983181, 0.129859, 0.0358397, -0.0592237, 0.0938551, - 0.0407702, 0.016116, -0.0669065, -0.0705481, -0.0925694, 0.0770623, -0.06897, -0.0108773, - -0.038666, 0.106142, 0.0032002, 0.0526937, -0.0260607, -0.0476551, -0.0931545, -0.0581646, - -0.0213479, -0.0944708, 0.0764147, 0.155, 0.0953724, 0.00644171, 0.0818339, 0.098784, - 0.0583541, 0.0385834, 0.014567, -0.151929, 0.0651872, 0.0237393, 0.0354186, 0.0701812, - -0.00868975, -0.120429, 0.0431517, 0.00308768, -0.0856116, -0.0145191, 0.036296, -0.0410546, - -0.0409622, 0.0470182, 0.0770556, -0.0371906, 0.0159651, -0.0274052, 0.0122354, -0.030157, - -0.0336936, 0.0396808, -0.0337803, -0.0324049, 0.0169184, 0.0412101, 0.0850196, 0.0202203, - -0.0207872, -0.0314282, 0.00840539, -0.0183683, -0.036961, 0.00315037, -0.0447284, -0.0183713, - 0.00828758, 0.0171499, -0.0376258, -0.00846203, -0.0420137, -0.0241747, -0.0150662, -0.0478079 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p43(hatfit_yaw00_lev1_p43); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p43_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p44.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p44.mh deleted file mode 100755 index e474deb..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p44.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p44.mh: - -#ifndef stasm_hat_yaw00_lev1_p44_mh -#define stasm_hat_yaw00_lev1_p44_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p44(const double* const d) // d has 160 elements -{ - const double intercept = 0.109008; - const double coef[160] = - { - -0.0945362, -0.0449524, 0.0660333, -0.0246236, 0.0158696, -0.0471226, 0.0447189, -0.0258553, - 0.025887, -0.0135329, -0.0214826, -0.0206675, 0.013636, 0.0741179, -0.0320414, 0.0372598, - -0.0704824, -0.0233604, -0.00317469, -0.00842793, -0.00341977, 0.00219688, -0.0954223, -0.0554482, - -0.0525299, -0.0333753, 0.0021748, 0.074139, 0.0360935, 0.00534435, 0.0684776, 0.0403155, - -0.0192615, -0.0568851, -0.0342091, -0.0741966, -0.00925542, 0.052715, -0.0159705, -0.0190257, - 0.0881149, 0.0554443, -0.077389, -0.0955993, -0.0563765, 0.0634231, -0.0891371, 0.0688448, - -0.0877472, -0.0258642, 0.0407242, 0.157993, 0.0400953, -0.127256, -0.0189779, -0.0743465, - 0.113783, 0.0492693, 0.0370564, -0.010719, 0.0538533, 0.0681946, 0.16568, 0.173489, - 0.104194, 0.0467617, 0.0189704, -0.0376701, 0.00528474, -0.0861354, -0.00434834, 0.122647, - 0.0184847, -0.00775123, -0.0450692, 0.0104375, -0.0201632, -0.0271411, -0.0935868, -0.0408573, - -0.0339742, 0.12917, 0.0588921, -0.0593483, -0.0471046, 0.00587893, 0.0765586, -0.0184146, - -0.0654201, -0.0186158, -0.0343246, -0.0380061, -0.036993, 0.0425709, -0.00783674, -0.0133803, - 0.00813309, -0.0370071, 0.10609, 0.0397922, -0.0274873, -0.021436, -0.0703765, -0.0782073, - -0.0418972, -0.00730855, -0.0399368, -0.00838882, 0.00432808, 0.0418548, 0.0388093, -0.133597, - -0.032826, -0.0237243, -0.0124979, -0.0523122, 0.0277924, 0.0076101, -0.00757488, -0.080163, - -0.0339697, -0.0814072, -0.024809, -0.0294447, 0.0479387, 3.89295e-05, 0.0361916, 0.00560784, - 0.00638087, 0.0103722, -0.0058001, 0.0313552, -0.0131113, 0.0205947, -0.0219136, 0.000589408, - -0.0214051, 0.0924824, -0.0379552, 0.00046803, -0.0307971, 0.0155563, -0.0262803, 0.0326664, - -0.0468105, -0.00447329, -0.0346878, -0.0124326, -0.0402621, 0.0115866, -0.0451612, 0.138228, - 0.0480731, 0.01717, 0.0404243, 0.0616278, -0.0362902, -0.0333519, 0.0372897, 0.0130936 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p44(hatfit_yaw00_lev1_p44); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p44_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p45.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p45.mh deleted file mode 100755 index ad60533..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p45.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p45.mh: - -#ifndef stasm_hat_yaw00_lev1_p45_mh -#define stasm_hat_yaw00_lev1_p45_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p45(const double* const d) // d has 160 elements -{ - const double intercept = -0.25172; - const double coef[160] = - { - 0.138588, 0.0320257, 0.0356155, 0.0724541, 0.120651, -0.0189986, 0.106301, -0.0298257, - 0.0350613, -0.0742858, -0.00626365, -0.0366956, 0.00288059, -0.0262773, -0.0335548, 0.0513913, - -0.0487848, -0.0594982, 0.0626344, 0.0553294, -0.0107779, -0.0238063, -0.0467799, -0.0179865, - -0.0237511, -0.0537311, 0.00119416, 0.0220104, 0.0691962, 0.0204227, 0.0969524, 0.0179205, - -0.0370185, -0.0426937, -0.100493, 0.0102081, 0.0312435, 0.00265713, -0.0234102, 0.122252, - 0.0547786, -0.107252, 0.111451, 0.0475615, 0.0537575, -0.00080478, -0.0791252, 0.0088121, - 0.0253345, 0.0846276, -0.108816, -0.130749, -0.10341, 0.0592801, -0.0318539, -0.0249449, - -0.010017, 0.192572, -0.0720721, -0.0648521, -0.0571078, 0.0111925, 0.0666735, -0.0547617, - -0.0309815, -0.0215697, 0.109581, 0.0672603, 0.011995, -0.00119004, -0.0238963, 0.0618288, - 0.146923, 0.133224, 0.0838379, -0.0742575, -0.0287099, -0.00583805, 0.0450488, -0.0666454, - -0.0188749, -0.0366709, 0.037215, 0.0536543, -0.100444, -0.0419477, 0.0163139, -0.0565705, - -0.0278959, 0.000975454, 0.0281221, 0.049062, 0.102175, 0.0226027, 0.0645185, 0.0349713, - -0.0826408, -0.0749836, 0.0577827, 0.0822353, 0.0798172, 0.0386831, -0.0101139, 0.0461214, - 0.00293569, -0.0776405, -0.0391742, 0.0176803, -0.00405256, -0.0141349, 0.0250607, 0.00126634, - -0.111324, -0.0221828, -0.11046, 0.0129321, 0.0242276, 0.00152692, -0.00077143, 0.0251926, - 0.0453204, -0.0121045, 0.09637, -0.0769084, 0.0588002, -0.0329975, -0.0250022, 0.0456485, - -0.0177055, -0.0139467, -0.0054085, -0.0442463, -0.0385275, -0.020766, -0.00469496, -0.0233761, - 0.0459073, 0.0279808, -0.0103614, -0.0883182, -0.0111125, 4.03714e-05, 0.0135568, -0.062711, - -0.00610121, 0.0899954, 0.00370827, -0.0199731, -0.043631, 0.0366049, 0.0242956, 0.0318513, - 0.0163144, -0.0494192, 0.00613827, -0.0128951, -0.0382535, -0.0117383, -0.0496041, -0.0232795 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p45(hatfit_yaw00_lev1_p45); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p45_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p46.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p46.mh deleted file mode 100755 index 2f576a5..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p46.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p46.mh: - -#ifndef stasm_hat_yaw00_lev1_p46_mh -#define stasm_hat_yaw00_lev1_p46_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p46(const double* const d) // d has 160 elements -{ - const double intercept = -0.1262; - const double coef[160] = - { - -0.0247898, 0.0725981, 0.00940554, 0.0052597, 0.00695337, -0.0227812, 0.0829615, -0.0182238, - 0.0912312, -0.0397266, -0.00802797, 0.0164496, 0.050756, -0.00600232, -0.0175702, -0.03503, - 0.147221, 0.0160325, -0.00482178, 0.0407726, 0.0537962, 0.020743, 0.0355159, 0.057278, - -0.0217205, -0.0576563, -0.0685952, -0.0518904, -0.0855381, -0.0101204, -0.0816496, -0.00958126, - -0.017169, -0.0468333, 0.0395461, 0.0787189, 0.0362518, -0.0288426, 0.0762642, 0.0955865, - -0.0407962, 0.0912819, 0.00170931, 0.111283, 0.0747911, 0.0214694, 0.0356399, 0.0678785, - -0.0119807, -0.125812, 0.0183076, 0.0566146, 0.0650642, 0.043017, -0.0296444, 0.0171253, - -0.0139448, -0.0234206, 0.0995859, -0.0773336, -0.0337063, -0.0184082, -0.0234433, -0.0469514, - -0.0159479, 0.164123, -0.0909827, -0.0802733, -0.0225864, 0.0681187, 0.0216672, -0.0506549, - -0.0686634, 0.0314723, 0.0919573, 0.053391, 0.0320703, 0.052185, 0.0490161, -0.0794547, - -0.0305819, -0.0936891, -0.0178693, -0.0513525, -0.0980818, -0.00498728, -0.074374, -0.0999793, - 0.00662704, 0.0383561, 0.00845843, 0.0425148, -0.0533615, 0.0118851, 0.0324261, -0.00552462, - 0.0162779, -0.0513451, -0.0764762, -0.00473995, 0.000206355, 0.00314181, 0.0385827, 0.0602592, - -0.0351145, -0.0386392, 0.0498369, 0.0366033, 0.0440881, 0.0136349, 0.0225003, 0.0527547, - 0.00338717, -0.0367825, -0.0426791, -0.0226034, -0.0303609, -0.0594028, -0.0347768, 0.0730718, - 0.0173539, 0.0453047, 0.0667917, 0.0466438, -0.0243697, -0.0156744, -0.101598, 0.0479361, - 0.0261366, -0.0550373, -0.0107337, -0.0677039, 0.00929147, 0.0117664, 0.0345724, 0.0198759, - -0.0534636, 0.0071773, 0.0380319, -0.051799, 0.0129421, -0.00628485, -0.00436391, 0.0113728, - 0.0319683, -0.0269471, 0.0113978, -0.0513272, 0.0395217, -0.00380428, 0.0259736, -0.0518657, - 0.014918, 0.0633155, -0.00548257, 0.0103552, -0.04868, 0.0484848, -0.00154793, -0.102005 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p46(hatfit_yaw00_lev1_p46); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p46_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p47.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p47.mh deleted file mode 100755 index 3fa31a0..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p47.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p47.mh: - -#ifndef stasm_hat_yaw00_lev1_p47_mh -#define stasm_hat_yaw00_lev1_p47_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p47(const double* const d) // d has 160 elements -{ - const double intercept = -0.118965; - const double coef[160] = - { - -0.0440492, -0.0836416, -0.141257, -0.0910721, -0.110534, -0.00214304, -0.0472487, 0.00261588, - -0.0335697, 0.0914798, 0.0305937, 0.00916225, -0.0435401, 0.0723333, -0.040065, -0.0185088, - 0.0401661, -0.0159768, 0.0349517, 0.0174412, 0.00390451, -0.0429541, 0.0773829, -0.038843, - 0.0832298, 0.0353028, 0.0146736, 0.0350658, 0.0369444, -0.00336594, -0.0110071, -0.00688144, - 0.0573221, -0.0910749, -0.0130102, 0.0147298, -0.00252087, -0.0223729, 0.0463613, 0.0419724, - 0.0217844, 0.0157986, 0.163274, 0.102168, 0.131031, 0.106365, -0.00268922, -0.0544499, - -0.0149947, 0.135501, 0.0304682, 0.0334622, 0.0114081, -0.039136, 0.0350434, 0.0430796, - -0.0425841, -0.110417, -0.0606183, 0.0744933, 0.134342, 0.0286298, 0.0279522, 0.0449863, - 0.0347973, -0.0419459, 0.0857313, -0.0128635, 0.0381703, -0.00587311, -0.0681089, -0.0187003, - -0.00328471, 0.0941593, -0.0736437, -0.128757, -0.04768, 0.0727935, 0.0273488, -0.0977504, - -0.023949, -0.0421614, -0.0286373, -0.0653269, -0.0963842, -0.0483031, 0.0505979, 0.0368761, - -0.0125742, -0.0706676, -0.0430058, -0.0963538, -0.0924971, -0.0266817, -0.0941927, -0.0325834, - 0.00716453, 0.0209282, 0.00390391, 0.0369161, -0.0915738, 0.00390245, 0.0418545, -0.0403939, - 0.00975892, -0.0248716, -0.0255247, 0.0214165, -0.0274118, -0.0254147, 0.0207873, 0.00385507, - -0.0257841, 0.0125612, 0.034636, 0.0482864, 0.0363408, -0.0167484, 0.0397208, 0.11034, - 0.0580511, 0.0643112, 0.00275626, 0.0200438, 0.0397158, -0.00459059, -0.0624459, -0.0130516, - 0.0194177, 0.0302497, 0.0528601, 0.0954436, 0.0441685, -0.000957178, 0.0123102, -0.0159973, - 0.0208708, 0.00253739, 0.00969131, 0.00487447, 0.0228892, -0.00806758, -0.0474296, 0.0435123, - 0.0126327, -0.0250043, -0.0049342, -0.0446558, 0.00411561, 0.0215649, 0.01054, -0.0185998, - 0.000267183, -0.0528733, 0.0212056, -0.0966146, 0.00481207, -0.00617578, 0.0559641, -0.0571265 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p47(hatfit_yaw00_lev1_p47); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p47_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p48.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p48.mh deleted file mode 100755 index 14ed789..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p48.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p48.mh: - -#ifndef stasm_hat_yaw00_lev1_p48_mh -#define stasm_hat_yaw00_lev1_p48_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p48(const double* const d) // d has 160 elements -{ - const double intercept = -0.348712; - const double coef[160] = - { - -0.0199642, -0.016524, 0.0185488, 0.0753993, 0.0220202, 0.0315148, -0.0563141, -0.00505819, - 0.00273267, -0.0239206, -0.0834737, -0.0285988, 0.0565259, -0.00569715, 0.0483493, -0.0712883, - -0.0712879, -0.00462779, 0.0462177, 0.0520587, -0.020654, -0.0252241, 0.0488485, 0.0282503, - 0.00559442, 0.0144023, -0.0132484, 0.0254584, 0.0395418, 0.0306705, -0.0352704, -0.0166598, - -0.00170908, -0.0370785, -0.0203859, 0.0144599, -0.0146208, -0.01403, -0.00723498, -0.00876678, - 0.0327493, -0.0113121, 0.0448436, -0.0526941, 0.0259987, 0.0262766, -0.0312069, -0.000567117, - 0.013922, 0.0441781, 0.0086888, 0.0547899, 0.0423473, 0.00918695, -0.0101297, -0.0328613, - 0.0691136, 0.00758904, 0.0224273, -0.0291462, -0.0939671, 0.0324741, 0.0354135, -0.0303462, - 0.0356238, -0.0387213, -0.0665426, -0.0383849, -0.0274669, -0.0220878, 0.0289407, -0.00507145, - 0.111319, 0.0215501, 0.0416781, -0.0171691, 0.00257299, -0.0688882, 0.0220108, -0.0918581, - 0.0105098, 0.0140829, 0.0724206, 0.0268746, -0.0194448, -0.029022, -0.0317727, -0.0115339, - 0.00787806, 0.00153147, -0.133061, -0.0171583, 0.060793, -0.0497396, 0.0178434, 0.0115849, - 0.0521507, 0.0308188, 0.0278041, 0.087127, 0.0105865, -0.00899581, -0.00784267, 0.0185296, - 0.0018345, -0.0473944, -0.0727011, -0.06032, 0.0167443, 0.0669789, 0.0532385, 0.0856828, - -0.0457355, 0.0439268, 0.0353426, 0.0279889, -0.0711119, 0.00938103, -0.0660489, -0.00674734, - 0.0124368, -0.0648288, 0.0244971, 0.00933523, -0.0561851, 0.0146086, 0.00783616, 0.0405319, - 0.0264534, -0.0114669, 0.042876, 0.0869413, 0.030355, 0.0372803, -0.0117394, -0.0308215, - -0.0666074, -0.000140927, -0.050663, -0.0559189, -0.0074306, 0.00361242, 0.0232975, 0.0355665, - -0.0388373, 0.0357383, 0.115658, 0.0711105, -0.0131747, -0.0143666, -0.0302213, -0.080427, - 0.0653268, 0.0254734, 0.0134195, 0.121503, 0.142421, 0.0482576, 0.0452815, 0.0540552 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p48(hatfit_yaw00_lev1_p48); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p48_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p49.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p49.mh deleted file mode 100755 index 7a851cc..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p49.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p49.mh: - -#ifndef stasm_hat_yaw00_lev1_p49_mh -#define stasm_hat_yaw00_lev1_p49_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p49(const double* const d) // d has 160 elements -{ - const double intercept = 0.337902; - const double coef[160] = - { - 0.0114154, -0.0726488, -0.0778797, -0.0423141, -0.101282, -0.0447445, 0.0436873, -0.0644333, - 0.0624447, 0.0491255, -0.0232039, -0.0278307, 0.0139972, -0.0112907, -0.0322537, 0.0502897, - -0.098117, 0.0451549, 0.103961, 0.087829, -0.0385551, -0.0336443, -0.0132464, -0.0463502, - 0.0256201, -0.0661301, -0.0965179, 0.00416883, 0.12706, 0.0554865, -0.0172941, -0.0300243, - -0.101453, -0.0254417, -0.0144953, -0.011406, -0.065835, -0.0178107, 0.0889139, -0.0244951, - -0.0274361, -0.0272035, -0.0302713, 0.02199, 0.0393062, 0.0542217, 0.0382146, 0.00430417, - -0.0252084, 0.0177507, 0.0837669, -0.020463, 0.023539, -0.0222531, -0.033568, 0.0405018, - 0.0366544, 0.0219979, 0.0433826, 0.0337518, -0.0382937, 0.026798, 0.0155538, 0.022436, - 0.022377, -0.0522834, 0.00202955, -0.0484192, 0.0382646, 0.00632605, -0.0541592, -0.0216834, - 0.0718766, 0.0921278, 7.72105e-05, -0.0248985, -0.121145, 0.0050598, 0.0584069, 0.0625849, - 0.0341806, 0.0432261, -0.0717361, 0.019553, -0.00874797, -0.0566127, -0.035232, -0.0217414, - 0.0112061, -0.0173741, -0.0251796, -0.061976, 0.00953155, 0.0346141, -0.0552639, -0.0386179, - -0.049074, 0.0114269, 0.0481586, 0.0266696, -0.0454927, -0.0340543, -0.0192265, -0.0198516, - 0.0283237, -0.00680941, -0.00792814, -0.00371509, 0.0451747, -0.00511052, -0.038361, 0.042594, - -0.0624682, -0.0839768, -0.125767, 0.0346305, 0.0854665, -0.0188636, 0.012889, -0.0784834, - 0.0532098, 0.00439309, -0.00386652, -0.0325034, -0.00939869, 0.00199078, -0.00463391, 0.00874155, - -0.0679019, 0.0341406, 0.107982, 0.0298168, 0.0419922, 0.00153954, 0.036435, -0.011819, - 0.0351083, -0.0217196, -0.0573149, -0.0786371, -0.0240665, 0.0144203, -0.0828524, 0.0440092, - 0.0234886, -0.003938, 0.048797, 0.0791573, -0.0599733, -0.0299365, 0.0744551, 0.0195751, - -0.0408867, 0.0259072, 0.00605974, -0.0173957, 0.0276731, 0.016588, -0.0502496, 0.0181499 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p49(hatfit_yaw00_lev1_p49); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p49_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p50.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p50.mh deleted file mode 100755 index e440e3c..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p50.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p50.mh: - -#ifndef stasm_hat_yaw00_lev1_p50_mh -#define stasm_hat_yaw00_lev1_p50_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p50(const double* const d) // d has 160 elements -{ - const double intercept = -0.354588; - const double coef[160] = - { - -0.0230603, -0.00406651, -0.00636519, -0.0227412, 0.00548503, -0.0184082, -0.0141572, 0.0294223, - -0.00797574, 0.0429883, 0.00673783, 0.00372198, -0.0629349, -0.00877111, -0.0495952, -0.0169266, - -0.0011404, 0.0479142, 0.0259209, -0.0259865, -0.0192255, 0.0396561, 0.0876463, 0.0230926, - 0.166111, -0.0461354, -0.0703753, -0.0448939, -0.0629481, -0.0580323, -0.0453387, -0.0270917, - -0.0884495, 0.140163, 0.0784775, 0.0228562, 0.024435, -0.0254433, 0.00177285, 0.0505875, - 0.0343714, -0.0174439, -0.0160221, -0.00753022, 0.117415, -0.0406816, 0.0532156, -0.0788673, - -0.108941, -0.0483069, -0.00519991, -0.0256438, 0.0142451, -0.040349, -0.0169156, -0.0526813, - 0.00228688, -0.0658973, -0.0337889, -0.0172707, 0.0379358, 0.0414351, 0.0617095, 0.0538789, - -0.0267418, 0.0563266, 0.0380729, 0.0618607, 0.0620722, -0.0352426, -0.0599867, 0.0257612, - 0.0177003, -0.0275431, 0.0416884, -0.00144024, 0.059808, 0.0194098, 0.026223, 0.0179042, - -0.0544042, 0.0229145, 0.0554572, 0.0782817, 0.00250939, -0.0428284, 0.0150715, -0.0411066, - 0.105643, -0.0499674, -0.073674, -0.0294076, -0.0109432, 0.120955, 0.0618048, 0.104465, - 0.00742026, 0.104745, -0.0396997, 0.0703248, 0.0415391, -0.0242536, 0.00578664, -0.0406675, - 0.0587635, -0.021202, -0.0501602, -0.0246371, -0.0119139, -0.00216564, -0.0159471, -0.0599296, - -0.0168455, 0.0184902, 0.0463801, 0.023843, -0.0373052, -0.0362718, -0.033582, -0.00780508, - 0.112369, 0.133683, 0.0611724, -0.058416, 0.00130038, 0.0465242, -0.011343, 0.0759481, - -0.0879834, 0.0318877, 0.0545767, 0.0623571, -0.00027041, -0.0773191, -0.00461445, -0.0368097, - 0.0221211, -0.0317399, -0.0332144, -0.0194702, -0.0366173, 0.0686429, 0.000139026, 0.0184993, - 0.00466772, 0.0430889, 0.0650156, 0.00889211, 0.0384161, -0.0229575, 0.0181281, 0.0296131, - -0.0204703, -0.0082565, -0.00745633, -0.0388592, -0.0328784, 0.0540064, -0.0102891, -0.0235745 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p50(hatfit_yaw00_lev1_p50); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p50_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p51.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p51.mh deleted file mode 100755 index 9683559..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p51.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p51.mh: - -#ifndef stasm_hat_yaw00_lev1_p51_mh -#define stasm_hat_yaw00_lev1_p51_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p51(const double* const d) // d has 160 elements -{ - const double intercept = 0.0230474; - const double coef[160] = - { - 0.0663473, 0.000903765, -0.0568126, -0.0645652, -0.0530415, -0.0268245, -0.0218149, 0.0366416, - -0.014686, 0.000853658, 0.0810107, -0.00321661, -0.066158, -0.0160669, 0.00472433, -0.0332292, - 0.0330697, -0.00830061, -0.038049, 0.0414012, -0.025938, -0.0337634, -0.0624311, -0.0666223, - 0.0190076, 3.00099e-05, -0.0131323, -0.000139539, -0.0129442, -0.00751247, -0.00130726, -0.0481927, - -0.0262949, -0.0109233, 0.0115115, -0.00923386, 0.023316, 0.0373891, 0.0673234, 0.00609755, - -0.0574537, 0.0107934, -0.00300931, 0.00542485, 0.079916, 0.0676615, -0.0268088, 0.11462, - -0.0158615, -0.00119364, -0.0246292, 0.028597, 0.0300322, 0.00761411, 0.061184, -0.145516, - -0.00567826, 0.050977, 0.0545752, 0.0137527, -0.00676976, 0.0184424, 0.196666, 0.144337, - 0.0411955, 0.00197774, 0.0394365, -0.00925136, 0.0421624, -0.105268, -0.0782102, 0.115249, - 0.00126801, -0.0217805, -0.074432, -0.0324334, -0.0274283, -0.0287226, -0.0339885, -0.010246, - 0.0325106, -0.00227297, -0.0941444, -0.00635483, -0.0408689, -0.0332418, 0.0612756, -0.0524843, - 0.0355948, -0.0014673, 0.0306843, 0.0577673, 0.0199915, -0.0467922, -0.0840219, 0.0587219, - -0.0329374, -0.0208942, 0.0176221, -0.0472118, 0.0111347, 0.0012257, -0.0930815, -0.0833302, - -0.00729518, 0.0645366, -0.0184519, 0.0540724, 0.0145464, 0.0883286, -0.00444572, -0.0526893, - -0.000339233, -0.0349865, 0.0208982, 0.0190641, -0.0156414, 0.031688, 0.0360566, 0.0317097, - -0.0217811, -0.0349732, -0.00390683, 0.0259709, 0.00449953, 0.0655442, 0.00876421, 0.0173605, - -0.035843, -0.0170143, 0.0354342, -0.0122638, -0.00324034, 0.0223394, -0.00597277, -0.0410188, - 0.00998847, 0.0325441, -0.0168173, 0.0160914, -0.011555, 0.00730345, 0.0483929, 0.0374363, - 0.0135017, -0.0115598, -0.0202782, -0.0114978, -0.0321284, -0.0731003, -0.0334655, -0.00437303, - 0.0197171, -0.0246698, 0.0248675, -0.0169994, -0.000349178, -0.000402507, 0.0187988, 0.000184288 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p51(hatfit_yaw00_lev1_p51); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p51_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p52.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p52.mh deleted file mode 100755 index b193f51..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p52.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p52.mh: - -#ifndef stasm_hat_yaw00_lev1_p52_mh -#define stasm_hat_yaw00_lev1_p52_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p52(const double* const d) // d has 160 elements -{ - const double intercept = 0.260475; - const double coef[160] = - { - -0.0122162, 0.0115179, -0.0394977, -0.0273243, 0.0081333, -0.0292732, -0.0272394, -0.0629533, - -0.0160925, -0.0153455, 0.0233635, 0.00893212, 0.0156689, -0.00794567, -0.0215812, 0.0127846, - 0.00154317, -0.0295031, -0.0112134, -0.0471515, -0.0387776, 0.00687466, -0.0651829, -0.00330553, - -0.00238385, 0.0168992, -0.0253943, 0.0126812, -0.00885185, -0.0310302, 0.0462275, -0.0090145, - 0.0199466, -0.00959636, 0.0223492, -0.043071, 0.00604921, -0.0458674, -0.0598643, -0.0317473, - 0.041322, 0.0243245, -0.0333469, 0.00167273, -0.0231955, 0.0280683, -0.0408995, 0.0521944, - 0.0471815, 0.0195343, 0.0768077, 0.0138787, 0.0532719, 0.0308796, 0.0358051, -0.040371, - -0.0161893, -0.000882692, 0.00726768, -0.00207923, -0.0419194, 0.0167848, 0.0744163, 0.0413397, - 0.00373214, 0.0212196, 0.0661876, 0.106068, 0.0905908, 0.0277513, -0.0535409, 0.0355472, - 0.00544559, -0.0416627, -0.0741092, 0.0324289, -0.0080518, 0.0432406, 0.015265, -0.0241128, - -0.0894882, -0.0119182, 0.0450217, 0.0378082, 0.0401644, -0.0560642, -0.0292303, 0.093536, - -0.0402295, -0.0737898, -0.0504552, -0.0355426, -0.0623674, 0.0272413, -0.0698962, 0.0609242, - -0.0243137, -0.0250455, -0.0456399, -0.00184349, 0.010865, -0.0160513, 0.0462055, -0.00131114, - 0.00717732, -0.0360419, 0.00377416, -0.100877, -0.150282, 0.102032, -0.119642, -0.0398214, - -0.0127371, 0.0342076, 0.0148993, -0.0137932, -0.0433186, 0.00366693, 0.0356687, 0.0112555, - 0.0687725, 0.0916713, 0.00660631, 0.0305018, 0.0272057, -0.0504018, 0.0325087, -0.0239357, - 0.0155957, -0.0185372, 0.00141619, -0.0305813, 0.0167892, 0.0193565, -0.00279585, 0.0248534, - -0.0360369, -0.0333261, 0.0219202, -0.00153852, -0.0756654, -0.0493757, -0.00439795, -0.0429899, - -0.00114111, 0.0156505, -0.0395002, -0.00583805, 0.0881942, 0.0363239, 0.0082846, 0.0303329, - 0.0175637, 0.0392368, -0.00202269, 0.0581765, 0.030248, -0.0268457, 0.0116774, -0.0235466 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p52(hatfit_yaw00_lev1_p52); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p52_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p53.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p53.mh deleted file mode 100755 index 1b223f5..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p53.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p53.mh: - -#ifndef stasm_hat_yaw00_lev1_p53_mh -#define stasm_hat_yaw00_lev1_p53_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p53(const double* const d) // d has 160 elements -{ - const double intercept = 0.00632593; - const double coef[160] = - { - 0.0162556, -0.016435, 0.0339606, 0.0190099, -0.00390404, 0.0151999, 0.0530393, 0.052145, - -0.00404482, -0.0094945, -0.0652414, -0.00307563, 0.0279835, -0.0286695, -0.00707483, -0.0602497, - -0.0578366, 0.00570518, 0.00521795, -0.0343149, 0.0021638, -0.0576883, -0.0745119, 0.019378, - -0.0841465, -0.0374895, 0.101069, 0.0372186, -0.00409056, 0.00763705, -0.0176534, -0.0721434, - -0.00235338, -0.0460276, -0.105931, -0.00206172, 0.126004, 0.0340346, 0.00308281, 0.0239345, - 0.00935259, -0.026381, -0.0517119, -0.0346371, 0.0437243, 0.0277076, -0.0788865, -0.0669713, - -0.0392242, 0.00309652, 0.0151427, 0.0303108, -0.0255152, 0.144139, -0.0251527, -0.0566317, - 0.00885491, 0.0283135, 0.037537, 0.0185783, -0.0110133, 0.00417545, 0.230708, 0.0531011, - 0.0907433, 0.0775194, -0.0214501, 0.011126, 0.0125839, -0.0929108, 0.00861834, 0.0431739, - 0.0294098, -0.00786103, 0.0294776, -0.0266784, -0.0651989, 0.0573041, -0.0222599, 0.0342067, - -0.00935431, 0.0617671, 0.0254821, -0.0025932, -0.0126894, 0.0202708, 0.0160974, 0.065353, - 0.0739513, -0.0176589, -0.0373128, 0.0569696, -0.0255352, -0.056134, -0.00311956, 0.0397551, - -0.00707641, 0.00840045, 0.0395881, -0.0274419, -0.000901333, 0.0115174, -0.11227, -0.0630251, - -0.0277898, 0.0103932, -0.0382606, 0.00752723, 0.0198304, 0.0285424, -0.0162424, -0.0462255, - -0.0205232, -0.00646888, -0.0418055, 0.0165335, 0.0309852, -0.0296247, 0.0262914, -0.0154413, - 0.00808804, -0.0302165, 0.0269277, -0.0276307, 0.00803103, 0.00727718, 0.00967092, -0.0103951, - -0.0485179, -0.0149506, -0.0186684, 0.0197415, 0.00151862, -0.0135448, -0.0159554, -0.0411914, - 0.0203195, 0.00491663, 0.00384737, -0.00418953, -0.000701313, -0.00528702, 0.030757, 0.0292946, - -0.0010533, -0.0195983, 0.0331644, -0.0196452, -0.0326561, -0.0333651, -0.00118972, 0.0528589, - 0.00832532, 0.00903297, -0.0053677, -0.0299995, 0.0035794, 0.0148879, 0.0135945, 0.0180385 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p53(hatfit_yaw00_lev1_p53); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p53_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p54.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p54.mh deleted file mode 100755 index 7268853..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p54.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p54.mh: - -#ifndef stasm_hat_yaw00_lev1_p54_mh -#define stasm_hat_yaw00_lev1_p54_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p54(const double* const d) // d has 160 elements -{ - const double intercept = -0.327895; - const double coef[160] = - { - -0.0260285, -0.0305355, -0.0270729, 0.0336952, 0.0120556, -0.0589881, 0.0423471, -0.0165861, - 0.0533515, 0.0665271, -0.00661282, -0.011853, -0.0202604, 0.0660017, 0.0285465, 0.00870395, - 0.011837, -0.00816245, 0.0137459, -0.0274992, -0.040575, -0.0637543, -0.0130194, 0.0133845, - 0.0178475, 0.0405467, 0.0289009, 0.0209144, 0.0200407, 0.0257918, 0.0374848, 0.0275908, - 0.0136018, -0.0102763, 0.00641704, -0.00874899, 0.00182998, -0.0147132, 0.009265, -0.0220378, - -0.00638297, -0.0385975, 0.0624042, 0.0211003, -0.0707084, -0.0690531, -0.0210087, -0.0194916, - -0.0478112, -0.0269841, -0.0424758, 0.0264064, 0.142619, -0.00246511, 0.0361538, -0.0312128, - 0.0834964, -0.0165381, -0.0157382, -0.0939294, 0.0240593, 0.0854562, 0.0349298, 0.14353, - -0.0906933, -0.0340672, 0.0548739, 0.0571566, -0.0687595, -0.0800209, -0.0813809, -0.0359659, - -0.00366757, -0.0117603, -0.0208327, -0.0119305, 0.0182508, -0.00730518, 0.00837606, 0.0256656, - 0.0411851, 0.0630306, 0.0979421, 0.0441905, -0.00305332, 0.00201647, -0.0361447, -0.0198163, - 0.00723425, -0.0100551, -0.110571, -0.0993676, -0.00957446, 0.0802569, 0.128686, 0.0888631, - 0.0427143, 0.0464205, 0.0483508, 0.0942419, 0.0700467, -0.018517, -0.103884, -0.116386, - -0.0176959, 0.0100904, -0.0232444, -0.0174606, 0.00793912, -0.00859066, 0.0853811, 0.00499183, - 0.0240163, 0.00380892, 0.00422997, -0.0257352, 0.0227225, 0.00677831, -0.0593922, 0.0328476, - 0.00827972, 0.0692015, 0.0431744, 0.0373662, -0.0140093, 0.0106239, 0.0258463, 0.0208192, - -0.0546277, 0.0957585, -0.0963772, -0.027162, 0.00231769, 0.0486463, 0.0512952, 0.00430508, - -0.0114316, 0.00979404, 0.0511977, -0.0338667, 0.00809882, -0.0153916, -0.0599761, 0.0148887, - 0.00670799, -0.0197052, -0.0426134, 0.0297467, -0.0830705, -0.0143339, -0.0152399, -0.00805109, - 0.00354804, 0.0101011, 0.0160634, 0.0429957, -0.0188213, 0.0160184, -0.0033741, 0.046853 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p54(hatfit_yaw00_lev1_p54); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p54_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p55.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p55.mh deleted file mode 100755 index 1602318..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p55.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p55.mh: - -#ifndef stasm_hat_yaw00_lev1_p55_mh -#define stasm_hat_yaw00_lev1_p55_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p55(const double* const d) // d has 160 elements -{ - const double intercept = -0.141314; - const double coef[160] = - { - -0.0184455, -0.0496397, -0.0592839, -0.00129605, 0.0152698, 0.00895235, 0.0198226, -0.0277392, - 0.00174921, 0.0466079, 0.136804, -0.0408086, -0.0219539, -0.0515463, 0.0376534, 0.0197422, - 0.0264812, -0.0747326, -0.0189345, -0.0108892, 0.12583, -0.050607, 0.0287181, 0.0893428, - 0.0338705, -0.0305728, -0.0605811, -0.123117, 0.0530918, 0.0561058, -0.0661859, 0.0142702, - 0.0222033, 0.00274117, 0.0488894, 0.00854528, -0.0357957, -0.0137169, -0.0860731, 0.0804902, - 0.0155904, -0.0489535, 0.110207, 0.0279448, 0.0146425, 0.0608853, -0.0478279, -0.0360042, - -0.0253087, 0.0520949, 0.00854192, 0.0698672, 0.0728003, 0.0192769, 0.0532905, -0.0539675, - 0.0194983, 0.0686626, -0.14808, -0.00330555, -0.0603803, 0.161152, 0.125227, 0.0176252, - -0.0489934, 0.129008, 0.0143522, 0.0924871, -0.0940712, 0.0170069, -0.0504719, -0.0804901, - -0.0535133, 0.0471255, 0.0155013, 0.041728, 0.0464161, -0.0309468, 0.022264, -0.0485352, - -0.0161353, 0.00673767, -0.069235, -0.0269012, -0.0468631, -0.0286551, 0.0185527, 0.00926746, - 0.0816668, 0.0315413, -0.0115304, 0.00704217, -0.081754, -0.0394356, -0.0400905, 0.0372851, - -0.0783434, -0.00330682, 0.0511188, -0.0193499, 0.0811155, -0.090431, -0.0156567, 0.0132851, - -0.0127041, -0.119106, 0.0548832, -0.0584279, 0.0635739, -0.0258336, 0.0090243, -0.00490429, - 0.0567433, -0.0508576, -0.0229306, 0.00359339, -0.0406265, -0.0266562, 0.00501218, 0.0391647, - -0.0125267, -0.00340731, 0.0125769, 0.0486265, 0.0777279, 0.00933577, -0.00487516, -0.0130414, - -0.0285719, -0.0331306, 0.00711141, -0.0199061, 0.0080499, 0.0135002, 0.0017077, -0.0214639, - 0.0445958, -0.0085222, 0.006994, 0.00919682, -0.0502234, 0.0181756, -0.0122827, 0.0353963, - -0.00204672, 0.0618339, -0.0356547, -0.000447894, -0.0157183, 0.00273223, -0.000334279, -0.0068244, - -6.21048e-05, -0.0152627, 0.000293438, 0.0261028, 0.0310108, 0.0125394, 0.0326627, 0.00563211 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p55(hatfit_yaw00_lev1_p55); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p55_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p56.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p56.mh deleted file mode 100755 index 47fdda9..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p56.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p56.mh: - -#ifndef stasm_hat_yaw00_lev1_p56_mh -#define stasm_hat_yaw00_lev1_p56_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p56(const double* const d) // d has 160 elements -{ - const double intercept = 0.017971; - const double coef[160] = - { - 0.00383981, 0.132936, 0.051431, 0.0241506, 0.0525363, -0.0220713, 0.0264425, 0.162811, - 0.010563, -0.024777, -0.0376598, -0.00827839, 0.00969403, 0.00935741, -0.0604863, 0.0154237, - -0.0274918, -0.0916428, -0.0771056, -0.0789401, -0.0175398, -0.0618622, 0.0553185, 0.000933057, - 0.016674, 0.0419166, -0.0552628, -0.010995, -0.000659341, 0.111832, -0.113944, -0.0251928, - 0.0213259, 0.0239533, 0.0910532, 0.124619, 0.00420422, 0.0613157, 0.0784614, 0.0147032, - -0.0502116, -0.00272015, -0.0218368, 0.0310639, -0.0254734, 0.0358821, -0.0424754, -0.0367543, - 0.034152, -0.0402477, 0.00443733, 0.0517393, -0.0272244, -0.0217685, 0.0550534, 0.0378432, - -0.0246521, 0.0384891, 0.112565, 0.0140988, 0.0115197, -0.0149323, -0.0195592, -0.0719281, - -0.0191504, 0.0050603, -0.00609517, 0.00456367, -0.0230841, 0.0247522, 0.0545905, -0.000413494, - 0.0194383, 0.0112078, -0.0309524, -0.0159333, -0.0384538, -0.0252684, -0.0531839, -0.0135636, - 0.0280733, -0.0273113, -0.0108497, -0.0499342, -0.0281279, -0.0259257, -0.0200306, -0.0279048, - 0.00745871, -0.00630893, -0.0226936, -0.0506898, 0.0313296, -0.00117594, -0.00321243, 0.00721248, - 0.0305157, 0.00244387, 0.0234044, 0.0174985, -0.0430736, -0.0159342, -0.033331, -0.0123217, - 0.0225584, -0.0402171, -0.028357, -0.0100419, 0.0292749, 0.00170746, 0.00587944, 0.0203983, - -0.0195129, -0.0348478, -0.00877047, -0.0150409, -0.0216345, -0.0229652, -0.0295588, 0.0128356, - 0.0211214, 0.0382187, -0.0154869, 0.0121175, -0.00290521, 0.00593086, 0.0205967, 0.0272012, - -0.0202218, -0.035515, 0.0315396, 0.0916433, 0.0619819, 0.00402121, -0.00515144, 0.0165358, - -0.0207477, 0.00806855, 0.00542765, -0.0761913, -0.0252847, 0.0203587, -0.0169178, 0.00516717, - 0.0370735, 0.0901672, -0.00499778, 0.0357751, 0.00468033, 0.0309109, -0.0129976, -0.0110622, - -0.0403696, -0.0231525, 0.0128741, 0.0240667, 0.0221441, 0.0157496, 0.0360906, -0.0192411 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p56(hatfit_yaw00_lev1_p56); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p56_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p57.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p57.mh deleted file mode 100755 index b23935f..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p57.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p57.mh: - -#ifndef stasm_hat_yaw00_lev1_p57_mh -#define stasm_hat_yaw00_lev1_p57_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p57(const double* const d) // d has 160 elements -{ - const double intercept = -0.167239; - const double coef[160] = - { - 0.0260893, -0.0208531, 0.0851417, 0.0640984, 0.0395397, 0.0832486, -0.106037, -0.00565412, - 0.135724, -0.112393, -0.0760649, -0.0727544, 0.0301193, 0.0232471, -0.0351258, 0.0368426, - 0.0011005, -0.0139854, -0.0151755, -0.0914272, -0.00952267, 0.0704949, 0.0125235, -0.0656696, - 0.0163932, -0.0335675, 0.111352, 0.0753735, -0.00554281, -0.0227295, 0.0323614, -0.017804, - 0.0300734, 0.0112641, -0.0658481, -0.0309896, -0.0172728, -0.0217191, 0.0190975, 0.0200581, - -0.0304982, 0.111991, -0.030698, 0.014727, -0.0765688, -0.112386, -0.0101198, -0.0275647, - -0.0291291, 0.0641304, 0.0141026, 0.131626, 0.0186017, -0.0385728, 0.0421381, 0.0855096, - 0.0213613, 0.0420065, -0.102038, 0.0681566, 0.0273364, 0.00325661, 0.109219, 0.137224, - 0.0491412, 0.088167, 0.0714511, -0.0240283, -0.0108067, -0.02918, -0.00819857, 0.00807906, - -0.000642976, 0.0220372, 0.0679965, -0.0029879, -0.00222426, 0.00558169, -0.0326685, 0.0492872, - -0.0260234, -0.0484975, -0.0112216, -0.0918971, 0.020581, 0.0441363, -0.0100994, -0.0226429, - 0.0423898, -0.0759438, 0.0145201, -0.0784476, -0.110442, -0.0174169, 0.0110941, -0.0645113, - -0.0452308, -0.038347, 0.0775638, 0.0521202, 0.0446646, 0.0411368, -0.0421825, -0.0853063, - -0.0442879, -0.0157349, -0.0467638, -0.0149989, 0.0432842, 0.0192302, -0.0305666, -0.0181959, - -0.0200714, -0.035937, -0.0330333, 0.00311701, -0.0224627, -0.026858, 0.0243919, -0.00885834, - 0.0217909, 0.0593707, -0.0167115, 0.0215884, 0.0155522, -0.0263219, 0.0362682, -0.0223162, - -0.0338701, 0.0206674, -0.0189506, 0.0452908, 0.0427534, 0.0569601, -0.00517576, 0.0232792, - -0.0144103, 0.0177986, -0.00841608, -0.0333067, -0.0267299, -0.00136334, -0.00993319, 0.0110416, - 0.0370933, 0.0113945, -0.020208, -0.0220435, -0.0428138, -0.0156631, 0.0366901, 0.00527689, - 0.0700923, 0.0280007, 0.0391572, 0.0324461, 0.0177147, -0.00531412, -0.0189824, -0.0167404 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p57(hatfit_yaw00_lev1_p57); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p57_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p58.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p58.mh deleted file mode 100755 index 18448a5..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p58.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p58.mh: - -#ifndef stasm_hat_yaw00_lev1_p58_mh -#define stasm_hat_yaw00_lev1_p58_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p58(const double* const d) // d has 160 elements -{ - const double intercept = -0.387439; - const double coef[160] = - { - 0.0251959, -0.031358, 0.0248397, -0.0131824, 0.013193, 0.00977301, 0.0348601, -0.0349634, - -0.0411533, 0.0159114, 0.0200665, 0.0543823, -0.00285392, -0.0164136, -0.0131662, -0.0514869, - -0.0336987, -0.0299794, -0.0270398, 0.0109185, 0.0625347, 0.0464263, 0.0578354, 0.00233093, - -0.010815, 0.0476417, 0.0163326, 0.0303621, 0.01894, -0.00207762, 0.0393991, 0.0221854, - 0.0233303, 0.0113982, -0.0423612, -0.00875855, -0.0287951, -0.0320702, 0.0137407, -0.0522144, - 0.0268739, 0.0237628, -0.0114081, -0.0225842, -0.0248982, 0.0488374, -0.0460236, -0.00664693, - -0.145548, -0.00911589, 0.0412094, -0.0239402, -0.0495942, -0.0117525, -0.0624228, -0.0266718, - 0.16983, 0.00188042, -0.0316957, 0.0227592, 0.0206071, 0.0874189, 0.0592865, 0.0821602, - -0.0523558, -0.0319036, 0.00421973, -0.111092, -0.0440164, 0.0161895, -0.0261552, -0.00754087, - 0.0331884, 0.0112931, 0.0394848, 0.0335052, 0.000709858, -0.0220998, 0.010377, -0.065032, - -0.00952658, 0.00141604, 0.000973108, 0.00853263, 0.0150984, -0.0348417, -0.0396614, 0.0344867, - 0.0216721, 0.0202387, -0.0365127, -0.0293635, -0.00677211, 0.0411506, 0.0676114, 0.016138, - 0.127968, 0.025489, 0.0839619, 0.105465, 0.0564818, -0.10753, -0.0982015, -0.0440012, - -0.0646146, -0.0759671, -0.141105, -0.0364377, 0.00156565, 0.0914474, 0.140688, 0.105158, - 0.0291594, 0.0630341, 0.146519, 0.0441008, 0.0494588, -0.0256931, -0.0515613, 0.0123743, - -0.0393184, 0.0750014, -0.0384452, -0.0162481, 0.029397, 0.0409304, 0.0106834, -0.00793491, - -0.0516883, -0.041537, -0.00348172, 0.0114551, -0.0441435, 0.00598323, -0.0702927, -0.0302706, - 0.0455167, -0.0145394, -0.0133603, 0.0211058, -0.000153093, -0.0450269, 0.0275393, 0.00331146, - -0.0536648, -0.0167442, -0.0187828, 0.0685981, 0.0143649, 0.0544769, 0.00699127, 0.0343859, - -0.0182254, 0.0574156, 0.0272669, 0.0274204, 0.00861177, -0.0038009, 0.0266157, 0.038463 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p58(hatfit_yaw00_lev1_p58); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p58_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p59.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p59.mh deleted file mode 100755 index 0f1e06f..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p59.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p59.mh: - -#ifndef stasm_hat_yaw00_lev1_p59_mh -#define stasm_hat_yaw00_lev1_p59_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p59(const double* const d) // d has 160 elements -{ - const double intercept = -0.107774; - const double coef[160] = - { - 0.0426851, 0.0262278, -0.00991465, -0.000978476, 0.0458819, 0.0860606, 0.0126212, 0.0351958, - -0.0108269, 0.0156452, -0.00403915, -0.0589473, -0.0503682, -0.0320335, 0.00120433, -0.021901, - 0.0165196, 0.00485185, -0.0632538, -0.033039, -0.0857811, -0.0409284, -0.0988562, -0.0239078, - -0.0159283, 0.0137357, 0.0167643, 0.0372145, -0.0532216, -0.00210648, -0.0560769, -0.0308524, - -0.00231797, -0.00864326, -0.0076651, -0.0200123, -0.00891805, 0.0118245, -0.0131865, 0.00115877, - -0.0157525, 0.00356822, 0.0567132, 0.0403024, 0.0292255, -0.0482951, -0.0460269, -0.0327407, - -0.0675029, -0.0684373, -0.109158, 0.0287362, 0.0815637, 0.084078, -0.13562, -0.0559729, - -0.0141325, -0.00702409, 0.114953, 0.0541443, 0.100854, 0.170284, 0.183675, 0.146337, - -0.0231098, 0.0221174, 0.0281214, 0.0233031, -0.017274, -0.0041107, 0.0963267, 0.00364101, - 0.014492, 0.00786082, -0.00316655, 0.00596734, 0.0241714, -0.000496014, -0.00440175, -0.0178358, - 0.00585745, 0.0161528, -0.0458383, -0.00903678, -0.0375578, -0.0417482, -0.00357475, 0.0374616, - 0.0654028, 0.0913228, -0.0561372, -0.0271866, -0.0859397, -0.109589, -0.00593507, 0.052015, - 0.012834, 0.0383004, 0.0439461, 0.0182694, -0.0531884, -0.0306476, -0.0185561, 0.0390919, - 0.0141079, -0.0136812, 0.0498581, 0.0531345, -0.0225092, -0.044298, -0.0679187, -0.0250561, - 0.00712008, 0.00510321, -0.0365955, -0.0117867, -0.000928219, -0.019591, 0.00284898, -0.00144887, - 0.000711874, 0.000233623, -0.0184974, 0.00654051, 0.0396035, 0.0526651, 0.04285, 0.00770713, - -0.0319265, 0.0147321, 0.0456475, 0.00415368, 0.0131458, 0.0349704, -0.0124635, -0.0340754, - -0.0113526, -0.0312564, -0.022371, 0.0178618, 0.042623, 0.0281632, 0.0326478, -0.0512589, - -0.0159272, -0.0205289, -0.00583209, -0.00745363, 0.020593, -0.0142671, 0.0127739, -0.000311366, - 0.0624123, 0.00682976, 0.00476288, 0.00296209, -0.0286042, 0.00250046, -0.00978856, 0.0134617 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p59(hatfit_yaw00_lev1_p59); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p59_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p60.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p60.mh deleted file mode 100755 index f8adb0f..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p60.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p60.mh: - -#ifndef stasm_hat_yaw00_lev1_p60_mh -#define stasm_hat_yaw00_lev1_p60_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p60(const double* const d) // d has 160 elements -{ - const double intercept = -0.116653; - const double coef[160] = - { - -0.00800115, -0.019492, 0.00130996, 0.093303, 0.0040077, 0.00293987, 0.0207828, 0.0148185, - -0.00817948, -0.0597545, 0.0187817, -0.0230762, 0.0288565, 0.0880908, -0.0261195, -0.0208943, - -0.0786128, -0.110647, -0.000169552, 0.0230022, -0.0147655, 0.02944, -0.07112, 0.00319348, - 0.0383762, 0.00837539, -0.0543089, -0.138768, -0.0885013, 0.00156443, -0.0660238, -0.00148416, - 0.189822, 0.067456, 0.0813394, 0.0406543, 0.018721, 0.000646743, 0.0077848, -0.0197932, - -0.0269575, -0.017093, -0.00285546, -0.0457437, -0.00899611, -0.102345, -0.0712876, 0.0432109, - 0.0359983, 0.056176, -0.0205152, 0.0611076, -0.018347, -0.0684581, 0.0147728, -0.00519016, - 0.0229803, 0.0944576, -0.0201227, -0.0464451, -0.00871038, 0.0315791, 0.0922994, 0.0030201, - -0.0269314, 0.0528, 0.0333682, -0.00605027, -0.030852, 0.04281, 0.0665199, -0.0700912, - -0.101844, -0.0220294, -0.0188747, 0.0615306, 0.0196525, -0.0799243, 0.0370941, 0.0902844, - 0.0416295, 0.052584, 0.0186824, 0.0684195, -0.0496191, 0.0324619, 0.13132, 0.0186903, - 0.0444294, 0.0309525, 0.00405779, 0.00128988, -0.0657186, 0.112942, 0.0240502, -0.00600384, - -0.0561522, -0.0562045, -0.0645724, -0.0383953, -0.0717917, -0.0210858, -0.0221317, 0.0233049, - -0.00346189, -0.0171532, 0.0635409, 0.0106124, 0.0421655, -0.0798043, -0.0581925, -0.0148507, - -0.0014853, -0.0312885, 0.00728589, -0.0465815, 0.00556272, -0.0347748, 0.0110482, -0.0348356, - 0.0195249, -0.00102007, 0.0754928, 0.0908389, 0.0423783, 0.0519425, 0.0120671, -0.00592963, - -0.0746104, -0.0188304, -0.109229, -0.0357286, -0.0569914, -0.0486546, -0.019758, -0.0133699, - 0.0361224, 0.0025763, 0.0344059, 0.0643234, 0.04667, 0.0730196, -0.0286662, -0.0235946, - 0.0214739, 0.0315117, -0.034062, 0.017128, -0.000353135, 0.054981, -0.0163462, 0.0336397, - 0.063106, 0.0276215, 0.0973305, 0.0433355, -0.0436393, -0.0243513, 0.0297241, 0.013637 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p60(hatfit_yaw00_lev1_p60); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p60_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p61.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p61.mh deleted file mode 100755 index e64022a..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p61.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p61.mh: - -#ifndef stasm_hat_yaw00_lev1_p61_mh -#define stasm_hat_yaw00_lev1_p61_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p61(const double* const d) // d has 160 elements -{ - const double intercept = -0.355452; - const double coef[160] = - { - 0.00140287, -0.0316798, 0.0380944, 0.0396429, -0.00327414, 0.0534538, -0.0514958, 0.0113563, - 0.0628189, -0.0527768, -0.0827135, -0.00429168, -0.0555817, -0.0224312, -0.0407113, -0.00936148, - 0.117758, 0.0172411, -0.0474983, -0.0391484, -0.00839861, 0.0452208, -0.0689015, 0.0234783, - -0.0403392, 0.0229358, 0.0537275, 0.0364107, -0.0132679, 0.00101861, -0.0318202, 0.0280393, - -0.00788005, -0.0354963, 0.00622629, -0.0649081, 0.0307974, 0.0258964, -0.0857159, 0.0242797, - -0.040267, 0.0102513, -0.0156274, -0.102174, -0.0138545, -0.0322275, -0.0188658, -0.0404741, - 0.0330834, 0.0739416, 0.0376474, -0.0476424, 0.00287154, 0.00264503, 0.0639759, 0.0475915, - 0.0401054, -0.00781034, 0.0559358, 0.150539, 0.0994351, -0.0272158, 0.141554, 0.0275502, - 0.0128532, -0.0504704, 0.0469205, 0.0449008, 0.0408228, -0.0276349, -0.0209576, -0.0231619, - 0.072671, 0.12655, 0.0367423, -0.075046, -0.00881941, 0.0092089, 0.0531118, -0.0610395, - -0.0308093, 0.0767906, 0.0426318, 0.0265518, -0.0121348, 0.0626648, 0.1149, -0.0153465, - -0.0529852, -0.0242805, -0.0290872, -0.0384416, 0.0343093, -0.0252964, -0.0554503, -0.0615641, - -0.106664, -0.0378279, 0.00787081, 0.0156845, -0.0198557, -0.0269115, -0.0297493, 0.0352897, - -0.0297293, -0.0573563, -0.0150174, -0.00484731, -0.000683478, -0.0495411, 0.0360824, 0.16726, - -0.0293956, 0.00953138, 0.00360933, -0.0400254, -0.0715633, 0.142315, 0.0342854, -0.177897, - 0.0310687, -0.0126615, -0.0606509, 0.00786516, -0.0250216, 0.0461068, -0.041784, 0.0340997, - 0.0534171, 0.0510974, 0.0264472, 0.0273428, 0.00988166, -0.00606464, 0.0777458, 0.0387601, - 0.066705, 0.0378485, 0.0927968, 0.000296498, 0.00404288, -0.0435417, -0.0159648, -0.061769, - 0.00421003, -0.0703772, -0.062171, 0.017123, -0.0279047, 0.0872595, -0.00249575, 0.0153716, - -0.00386909, 0.0423806, 0.0198908, -0.00423521, 0.0487592, -0.0326987, -0.0145375, 0.0613222 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p61(hatfit_yaw00_lev1_p61); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p61_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p62.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p62.mh deleted file mode 100755 index 80d3416..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p62.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p62.mh: - -#ifndef stasm_hat_yaw00_lev1_p62_mh -#define stasm_hat_yaw00_lev1_p62_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p62(const double* const d) // d has 160 elements -{ - const double intercept = -0.401911; - const double coef[160] = - { - 0.184278, -0.00880947, -0.0685209, 0.00358168, -0.0459728, 0.0232556, -0.0864801, -0.00469044, - 0.0310894, 0.0243865, 0.0258792, 0.00859373, -0.00994606, 0.0328219, 0.00173091, 0.0121548, - -0.0353948, -0.036784, 0.0429776, -0.0300712, -0.0116732, -0.0122296, -0.108762, -0.0247855, - -0.0145263, 0.0219631, -0.00113074, 0.0309911, 0.107029, 0.0123373, 0.0532587, 0.069205, - -0.0494749, -0.0244451, -0.0697308, -0.0338787, 0.0873429, 0.0171967, -0.130104, 0.0204336, - -0.088184, 0.0317872, -0.00989599, -0.015471, 0.0552868, -0.0243923, 0.0858775, 0.0686318, - -0.0481306, -0.0770413, 0.0589144, 0.168037, 0.0945978, -0.0524547, 0.0839754, 0.124417, - 0.0480366, 0.0590726, 0.0667549, -0.0894952, -0.0230222, -0.0171754, -0.0533098, -0.0684075, - 0.0712733, 0.142855, -0.00189312, -0.00863717, -0.0647512, 0.101509, 0.0666608, -0.0918015, - -0.000196614, -0.0658736, 0.0204404, 0.0705559, -0.0270679, -0.0141069, 0.126831, -0.019163, - -0.0343151, 0.00672472, 0.03967, -0.0291874, 0.0336686, -0.0107086, -0.0043349, -0.0798378, - -0.0110414, -0.0650645, -0.0318544, -0.027198, -0.0480764, -0.0918649, -0.0143225, 0.107353, - -0.0130905, -0.00631972, -0.0110005, -0.0352918, 0.0152812, 0.102473, 0.0223577, -0.00408579, - -0.037512, -0.0288581, -0.0172214, -0.0453225, -0.0328941, -0.0150905, 0.0194013, -0.050533, - 0.0512633, 0.00142581, 0.0276191, 0.0555792, -0.0250743, -0.049271, -0.0158396, 0.00580838, - 0.0759738, 0.0489876, 0.00899392, -0.0250023, -0.0139366, -0.00691351, 0.069753, 0.02297, - -0.010819, -0.0195435, 0.0379298, 0.0638778, 0.00869268, 0.0244828, -0.0468469, -0.0425572, - 0.0265019, -0.00503489, -0.0229935, -0.0391067, 0.00398011, 0.0506024, 0.0196865, 0.0822405, - -0.0331631, 0.0331953, 0.0364992, 0.0264935, 0.0194893, -0.0485401, -0.0526263, -0.0288017, - -0.000343949, -0.00305366, 0.0195557, 0.00916105, 0.0849109, 0.0622262, 0.0617623, 0.0296367 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p62(hatfit_yaw00_lev1_p62); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p62_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p63.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p63.mh deleted file mode 100755 index ebdf6f0..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p63.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p63.mh: - -#ifndef stasm_hat_yaw00_lev1_p63_mh -#define stasm_hat_yaw00_lev1_p63_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p63(const double* const d) // d has 160 elements -{ - const double intercept = -0.327027; - const double coef[160] = - { - 0.00117412, -0.0265293, 0.0414526, -0.00446532, -0.000780244, 0.0309753, -0.126524, 0.0273416, - -0.0422317, -0.00609733, 0.00825351, 0.00790836, 0.0291014, 0.0441713, -0.0145854, 0.0137382, - -0.00831013, -0.0526895, -0.037661, -0.00968318, 0.116618, 0.0103253, -0.0595431, 0.0496003, - -0.0665721, 0.00702109, -0.109901, -0.0827082, -0.00936522, -0.00162648, -0.0562617, -0.0153416, - -0.0065123, 0.0472623, 0.0634004, -0.0196607, -0.019769, -0.00566076, -0.0607523, 0.0749408, - -0.00611749, -0.0276194, 0.114619, 0.084836, 0.00815514, -0.0555772, 0.0391078, 0.0414358, - 0.121184, 0.147412, -0.0318164, -0.145786, 0.00704808, -0.0110287, 0.0164001, -0.0621218, - 0.0149256, 0.0808699, 0.0804086, 0.106282, 0.0405482, 0.0330293, 0.12561, -0.0589569, - 0.0224142, -0.108786, -0.00491116, 0.0465216, 0.0453282, 0.0296043, 0.0982771, 0.0627282, - 0.0506193, -0.0174854, 0.0256419, -0.0266217, -0.0465652, -0.0619258, -0.0532835, -0.0785362, - -0.0161707, -0.0490527, 0.0143398, -0.0138499, 0.020052, -0.0703482, 0.0590368, 0.134647, - -0.049885, -0.00266826, -0.0244827, -0.111946, -0.0878235, 0.15595, -0.000659438, -0.154788, - 0.00297078, 0.0132703, 0.0115521, 0.0331993, -0.0966483, -0.0545614, -0.026128, 0.0150231, - -0.0128654, -0.0320918, -0.0591223, -0.0218507, -0.0361654, -0.0115635, -0.0273279, -0.0585035, - -0.0352849, 0.0301985, 0.0714253, 0.0790165, 0.0457336, 0.00843746, 0.113132, 0.10087, - 0.0580212, -0.0135828, 0.00489927, 0.0153762, -0.0217218, 0.0638703, 0.000115968, 0.0334685, - -0.0241135, 0.00384658, -0.0261348, -0.0454305, 0.0297893, -0.0343742, -0.036355, 0.0349305, - -0.0196957, 0.00692413, 0.075663, 0.0631312, 0.0852203, -0.0199816, 0.0110331, -0.0218748, - 0.0535471, 0.0363862, 0.0293074, -0.00509621, 0.0277587, 0.0447058, 0.0520932, 0.00976812, - -0.00756772, -0.0466398, -0.0370653, -0.0200316, 0.0236178, 0.0165199, -0.0315377, 0.0236377 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p63(hatfit_yaw00_lev1_p63); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p63_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p64.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p64.mh deleted file mode 100755 index 6b196a9..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p64.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p64.mh: - -#ifndef stasm_hat_yaw00_lev1_p64_mh -#define stasm_hat_yaw00_lev1_p64_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p64(const double* const d) // d has 160 elements -{ - const double intercept = -0.221659; - const double coef[160] = - { - 0.0364118, -0.0340164, 0.0407147, 0.113031, 0.190778, 0.0314938, 0.0342179, 0.015366, - -0.0132611, -0.0636244, -0.040571, -0.081486, -0.0900368, -0.0268184, -0.089493, -0.0174274, - 0.0183977, 0.0234542, 0.0288216, -0.0624968, -0.0524316, -0.0307032, -0.0639346, 0.0857077, - -0.0308074, 0.00837735, -0.00453838, -0.0611632, -0.0128637, 0.0077273, -0.0417138, 0.0219363, - 0.00718579, 0.0559161, 0.000579146, -0.0125301, 0.0297841, -0.0235627, 0.0463869, 0.0387731, - -0.0562936, -0.0190806, 0.0087306, 0.0261748, -0.0659872, 0.00151971, 0.0554092, -0.0774134, - -0.0402783, -0.0251337, 0.00201256, 0.053982, 0.0628297, -0.00454475, 0.0813841, 0.0984645, - 0.0291425, 0.0222582, 0.0444502, 0.0767124, 0.0390445, 0.051904, 0.0941079, -0.00941949, - 0.00284052, 0.0111219, -0.0460434, 0.0373575, -0.00560822, -0.0544922, 0.00609882, -0.141022, - -0.024522, -0.0432508, -0.0190956, -0.0165462, -0.0313735, 0.0506585, -0.0642271, -0.0219566, - 0.0127945, -0.0164266, -0.01266, -0.0571315, -0.042462, -0.0443998, -0.0256433, -0.0906727, - 0.0369999, -0.00749289, 0.0305802, -0.0199618, -0.0398645, -0.012479, 0.0293881, -0.0915479, - -0.0875018, -0.0522991, -0.0300075, -0.0293367, 0.00304054, -0.0153113, -0.0852418, 0.0606356, - -0.0508301, 0.0473317, -0.00559567, -0.0145069, 0.0155352, 0.0937862, 0.0419105, 0.107439, - -0.0132481, 0.0641715, 0.0312028, 0.0733368, 0.0265372, 0.0135173, 0.106767, 0.0236229, - 0.00246322, 0.0206615, 0.10063, 0.0451973, 0.030797, 0.0583173, 0.00928432, -0.0118978, - 0.0111116, 0.0528778, -0.0254398, -0.00435345, 0.0536206, 0.0278869, -0.0166692, 0.118701, - 0.0105538, 0.0128111, 0.0164439, 0.0130927, 0.00129399, -0.0440021, -0.0115579, -0.019537, - -0.0620245, -0.0291088, -0.110246, -0.0248473, -0.0256739, -0.0519484, -0.000626873, -0.0129347, - 0.0514691, 0.105352, 0.0998094, 0.0253072, 0.0281183, 0.0241761, -0.00190695, 0.061081 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p64(hatfit_yaw00_lev1_p64); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p64_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p65.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p65.mh deleted file mode 100755 index 05ea80b..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p65.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p65.mh: - -#ifndef stasm_hat_yaw00_lev1_p65_mh -#define stasm_hat_yaw00_lev1_p65_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p65(const double* const d) // d has 160 elements -{ - const double intercept = -0.175002; - const double coef[160] = - { - -0.0277865, -0.00461839, 0.000804702, -0.00666069, -0.000353549, -0.00788238, -0.00938188, 0.0222033, - -0.050188, 0.00359491, 0.00366198, -0.0166296, 0.000297359, 0.00483099, -0.0825797, 0.000643547, - -0.0630764, -0.0659505, -0.0102977, 0.0360068, 0.0127702, -0.0259893, -0.0789133, -0.0683098, - -0.00482564, -0.0310966, 0.00995508, -0.0132953, 0.00953184, 0.0175084, 0.00165241, 0.00201592, - 0.0766108, -0.0181389, -0.0332234, 0.0332517, 0.0219349, 0.0512349, 0.0322202, 0.046018, - 0.0169466, 0.0146008, -0.0477406, 0.019435, -0.0121325, -0.0332415, 0.00211002, 0.00113552, - -0.00347845, 0.0185526, 0.0799375, 0.0184735, -0.0247489, 0.0306522, 0.132248, -0.00205819, - 0.13069, 0.115871, 0.0506738, -0.0372212, -0.0175758, 0.0684921, 0.122341, 0.269659, - 0.0665379, -0.0155841, -0.0518629, -0.0142568, -0.0944692, -0.088548, -0.11378, 0.01854, - 0.0115034, 0.0424948, 0.0296922, 0.0247563, 0.00335754, -0.00599567, -0.0309015, -0.0741586, - -0.0465119, -0.00161941, -0.0021765, -0.00246838, 0.0341996, 0.00583213, -0.0227952, -0.0198427, - -0.0189341, 0.0117395, 0.0318078, -0.0215246, -0.0300004, -0.00681776, -0.0461987, -0.0623052, - -0.0844771, 0.000542585, 0.0246798, 0.0770029, 0.0857678, 0.0739165, 0.0184543, -0.0843127, - -0.0576231, -0.0629255, -0.0450643, 0.00599557, 0.0455094, 0.0537528, 0.00473172, -0.0845924, - 0.0150027, 0.0171967, -0.0127595, 0.00703861, -0.0182145, -0.0213446, -0.00797504, -0.0245089, - -0.0192921, 0.0136112, 0.0116631, 0.00265455, -0.000741286, 0.0304773, -0.02086, -0.00264433, - 0.0204618, 0.0387465, -0.0510006, -0.041918, -0.0177707, -0.0228606, 0.0180372, -0.00552248, - 0.0331364, -0.00103725, -0.00155859, 0.00364934, -0.030725, -0.0601593, -0.00316454, 0.0510012, - 0.024794, 0.0200472, 0.0260482, 0.03692, 0.00540666, -0.012112, 0.012476, 0.0372805, - 0.0373335, -0.00687078, 0.0080672, -0.0159034, 0.0101183, 0.0374216, 0.0163694, 0.0310197 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p65(hatfit_yaw00_lev1_p65); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p65_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p66.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p66.mh deleted file mode 100755 index 7cf1ef9..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p66.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p66.mh: - -#ifndef stasm_hat_yaw00_lev1_p66_mh -#define stasm_hat_yaw00_lev1_p66_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p66(const double* const d) // d has 160 elements -{ - const double intercept = -0.114908; - const double coef[160] = - { - 0.0621479, 0.148664, -0.0808057, -0.0734325, -0.0779598, 0.112303, 0.0691012, -0.0734984, - -0.0891871, -0.0303359, -0.0296288, 0.0653355, 0.057726, -0.0747313, -0.0389204, 0.030748, - -0.0376043, -0.0242851, 0.00215944, -0.0128589, 0.0526175, -0.0154007, -0.0356016, 0.00790394, - 0.0393551, 0.0121278, 0.0740665, 0.101692, 0.0326844, 0.00688292, 0.0422339, 0.107239, - 0.0503345, 0.00995021, -0.0509846, 0.0117855, -0.0384774, 0.031577, 0.00134269, -0.127872, - -0.0709863, -0.149595, 0.00666169, -0.000596597, -0.0462128, 0.0550865, -0.0638316, -0.0380512, - 0.0592485, 0.0172013, 0.0699331, 0.0563683, -0.0446237, -0.0296292, 0.0829031, -0.0981408, - -0.00211501, -0.0287852, 0.0204565, -0.0160499, -0.0508642, -0.0430687, 0.0686544, -0.0860575, - -0.109292, -0.0432463, -0.0627935, -0.0897644, -0.0565552, -0.0392803, -0.0675007, -0.0981836, - -0.110825, -0.00265412, -0.024454, 0.00582448, 0.0328972, 0.0868582, 0.151676, 0.157909, - 0.0173907, 0.0769144, 0.0790404, -0.024212, 0.0882533, -0.0252413, 0.0427054, 0.0565396, - -0.00320091, 0.043672, -0.00638487, 0.015961, 0.0536973, 0.0572533, -0.0228992, 0.00460968, - 0.0530984, 0.0482597, 0.0217364, 0.0170837, 0.0227786, 0.0455684, -0.0356677, 0.14438, - 0.0971565, 0.0352834, 0.0686218, 0.0613583, 0.0810098, -0.0496866, -0.085401, 0.0643533, - -0.0701281, -0.0474367, -0.0551886, 0.0374986, 0.0114636, 0.0147769, 0.0209621, -0.0237301, - -0.0613557, -0.048417, -0.0312429, -0.0513667, -0.04645, -0.0179482, 0.0837733, -0.0114909, - 0.0243065, 0.00229574, 0.0533605, 0.0381334, 0.00564831, -0.00935319, -0.0554278, -0.015606, - -0.0499693, -0.00343467, 0.00644126, -0.00769993, 0.0214419, 0.017018, 0.00379739, -0.0394817, - -0.0649387, 0.00961401, -0.0294862, -0.047631, -0.0189085, -0.0200228, -0.0206836, 0.0113553, - 0.0340622, 0.0568404, -0.030138, -0.026374, -0.0548503, -0.0599922, 0.0537001, -0.0145433 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p66(hatfit_yaw00_lev1_p66); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p66_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p67.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p67.mh deleted file mode 100755 index 58885e7..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p67.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p67.mh: - -#ifndef stasm_hat_yaw00_lev1_p67_mh -#define stasm_hat_yaw00_lev1_p67_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p67(const double* const d) // d has 160 elements -{ - const double intercept = -0.113909; - const double coef[160] = - { - -0.0188617, 0.00316902, -0.0739061, 0.0282265, 0.003645, -0.057957, 0.0050709, 0.0242442, - -0.123112, -0.0885432, -0.0231802, 0.0524963, 0.145596, -0.0695975, 0.0542611, 0.213012, - 0.0771955, 0.0859766, 0.112913, 0.00182485, -0.041207, 0.0709448, -0.133451, -0.0534433, - 0.0443474, 0.0526311, -0.0920123, -0.0394857, -0.110341, 0.114107, 0.105256, -0.104847, - -0.0502754, -0.019576, -0.0423652, 0.00980916, 0.0210069, -0.0375084, -0.00186543, -0.0165352, - -0.068461, 0.033185, 0.0545209, -0.0520722, 0.0253465, -0.0047908, 0.0872255, -0.0718019, - 0.0179633, -0.0174179, 0.0828479, 0.0307566, -0.0581829, -0.0772103, -0.0863097, 0.0172761, - -0.0636419, -0.0857602, -0.225817, -0.129229, -0.0221761, 0.049664, 0.0880692, -0.0322266, - -0.00965428, -0.0102029, 0.113926, 0.0290924, -0.0104373, -0.0425892, -0.0732669, -0.0120473, - 0.0358277, -0.0121853, 0.0111512, 0.0297736, -0.0455152, -0.0421967, 0.106585, -0.0538339, - 0.119307, 0.0605931, 0.0337106, -0.0143666, -0.000475732, -0.00033312, -0.016137, 0.0540146, - -3.17965e-05, -0.0643621, -0.0239138, 0.0592346, 0.0313051, 0.0205812, 0.00707053, -0.00760147, - 0.0728607, 0.0906611, 0.112247, 0.0393033, 0.057346, 0.044609, 0.0267728, 0.111261, - -0.0273771, 0.0108312, -0.0310528, -0.0753102, 0.00676557, -0.00323801, -0.00547113, -0.042993, - 0.0217995, 0.000293362, 0.0527807, 0.052532, 0.0965316, 0.0762126, -0.050425, 0.0904335, - -0.00995776, -0.0420223, -0.0163665, -0.00787983, -0.0444523, -0.0292807, 0.00134789, -0.00916903, - -0.0439685, -0.00308172, 0.0153934, 0.0264436, -0.0139337, 0.0130059, 0.0210779, -0.0585686, - 0.00739594, -0.0367863, 0.016144, -0.0448992, -0.0466312, 0.00240427, 0.0113582, 0.0102517, - 0.000421868, 0.00283884, -0.0185146, -0.00344203, 0.00447471, -0.0599441, 0.0294516, -0.0166099, - -0.039928, 0.0147255, 0.0114217, 0.0182585, 0.000694995, 0.0165909, -0.0146478, -0.022212 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p67(hatfit_yaw00_lev1_p67); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p67_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p68.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p68.mh deleted file mode 100755 index e4d551b..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p68.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p68.mh: - -#ifndef stasm_hat_yaw00_lev1_p68_mh -#define stasm_hat_yaw00_lev1_p68_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p68(const double* const d) // d has 160 elements -{ - const double intercept = -0.0472535; - const double coef[160] = - { - -0.0333984, 0.0656835, 0.0106519, 0.0399759, 0.0837495, -0.0590801, -0.0354664, 0.000401582, - 0.0507861, 0.0305926, -0.0299797, -0.0280611, -0.0375379, 0.0890645, 0.0991353, -0.0119074, - 0.0500358, 0.0327039, 0.0326631, 0.0156037, -0.0896013, -0.0172661, -0.0611493, -0.0487139, - -0.0158553, -0.0170312, -0.0675439, 0.0393561, -0.0252104, -0.0245059, -0.0460004, -0.00717333, - -0.0699404, -0.0325669, -0.0441731, 0.122475, 0.114906, -0.00302238, 0.0638788, 0.0975657, - 0.0238194, -0.0122492, 0.00939505, -0.0268166, -0.161655, 0.0738256, 0.133678, 0.0601642, - -0.0502025, -0.0815136, -0.0643104, -0.0445671, -0.0357928, -0.0869471, -0.0474168, -0.0431398, - -0.0825893, -0.0275855, 0.0356601, -0.0646219, 0.033888, -0.0717098, 0.0574178, -0.0301816, - -0.00499705, 0.0727134, 0.0824336, -0.0235041, 0.0235093, -0.0639051, 0.0631396, -0.0419611, - -0.037852, -0.0387067, -0.0240848, -0.111232, -0.0691031, -0.0380525, -0.0390921, 0.099562, - -0.00279045, 0.0328427, -0.0615046, -0.0442496, -0.0400743, 0.00526195, 0.00243521, 0.0295069, - 0.0521513, 0.0641226, 0.040687, 0.0798061, 0.0492278, 0.12391, -0.076507, -0.00658683, - 0.0782203, 0.0321287, 0.0274339, 0.0559232, 0.0188869, 0.0718778, -0.0556092, 0.0221964, - 0.0632411, 0.0219449, -0.0251334, 0.0464636, -0.0239108, -0.0166778, 0.0142018, 0.0594118, - 0.0749457, -0.0632603, 0.094559, 0.077424, 0.0532179, 0.0567741, 0.02659, -0.0608049, - -0.010741, -0.037765, -0.02709, 0.0687838, 0.0112361, 0.0066147, 0.0325352, -0.0838491, - -0.00727761, -0.00590156, -0.0304007, -0.00232171, -0.0285817, -0.0194663, -0.0117951, 0.0231252, - -0.000157544, 0.0139116, 0.00777066, -0.00782038, -0.00366661, -0.023865, -0.0216654, 0.0361765, - -0.00748849, 0.00483604, 0.0402628, 0.00263971, -0.0368632, -0.0121392, -0.00152512, -0.0232155, - -0.0494068, -0.0315213, -0.0389766, -0.00911571, -0.0881912, -0.00859301, 0.0414033, -0.0362998 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p68(hatfit_yaw00_lev1_p68); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p68_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p69.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p69.mh deleted file mode 100755 index 0b19712..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p69.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p69.mh: - -#ifndef stasm_hat_yaw00_lev1_p69_mh -#define stasm_hat_yaw00_lev1_p69_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p69(const double* const d) // d has 160 elements -{ - const double intercept = 0.138467; - const double coef[160] = - { - 0.0727278, 0.0410694, -0.0121286, 0.10934, -0.0571606, 0.039361, 0.0798405, 0.00142393, - 0.0423685, -0.0694792, -0.08714, -0.00116926, -0.0417457, 0.00768107, -0.0147799, -0.0480903, - 0.0175646, -0.0171768, -0.0445522, -0.00384396, -0.0298101, -0.0217389, -0.0199785, -0.0402522, - -0.0202302, 0.053779, 0.0185913, 0.0391604, 0.0158164, -0.0631713, -0.0215226, -0.013408, - -0.0493236, -0.0716819, -0.0305592, -0.00565181, 0.0295756, -0.0225791, -0.0125007, 0.0718176, - 0.0186186, 0.0286526, 0.0436904, -0.019139, -0.0522052, -0.00536649, 0.0472919, 0.0208337, - -0.0203697, 0.0782312, 0.0839855, 0.090479, 0.0706644, 0.0731851, -0.0965635, -0.0463428, - -0.0293672, -0.00786047, 0.0409683, -0.0374142, 0.0901149, 0.0818718, 0.0673608, 0.0438763, - 0.0559625, 0.0183026, 0.0521258, -0.00613286, 0.0426728, -0.00262783, 0.0623643, 0.0629963, - 0.0465622, -0.0554452, -0.000150035, -0.0175842, -0.00246682, 0.0739301, 0.0362838, 0.00592763, - -0.12026, -0.00668744, -0.0786816, -0.0647531, -0.0321518, -0.0100294, -0.0490275, -0.029289, - 0.0413105, 0.0238406, -0.0300419, -0.0638156, -0.110498, -0.0941771, -0.0253184, 0.0428704, - 0.0438465, 0.0224067, -0.0342461, 0.0399161, -0.0840878, -0.0685666, -0.0208694, -0.0306758, - 0.00892258, -0.00213832, 0.032049, 0.0173309, -0.0638428, -0.0443805, -0.0341364, -0.0546695, - -0.0353043, -0.0557252, 0.00519504, 0.0286246, -0.044046, -0.014966, 0.0130059, -0.0170023, - -0.0490745, -0.0462449, -0.0301219, 0.0728487, -0.00719909, -0.0244057, -0.014565, -0.0500982, - -0.0102718, -0.0382015, 0.0355018, -0.0108327, 0.0390334, 0.0880404, 0.0422387, 0.0559269, - 0.0475343, 0.0106384, 0.060598, 0.00438707, 0.021236, 0.0164531, -0.112987, 0.0802725, - -0.00106202, 0.0180457, 0.0100923, -0.0175058, 0.0423891, 0.0244042, -0.0349724, -0.0170408, - -0.0506162, -0.0169565, -0.0853738, -0.0504872, -0.0229947, -0.00657965, 0.132349, -0.025945 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p69(hatfit_yaw00_lev1_p69); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p69_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p70.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p70.mh deleted file mode 100755 index b1e76b6..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p70.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p70.mh: - -#ifndef stasm_hat_yaw00_lev1_p70_mh -#define stasm_hat_yaw00_lev1_p70_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p70(const double* const d) // d has 160 elements -{ - const double intercept = -0.133387; - const double coef[160] = - { - 0.0424555, 0.0670308, 0.0010174, -0.0308677, 0.0528108, -0.070897, 0.0448855, -0.000525556, - -0.100123, -0.0861334, 0.0316145, 0.0169901, 0.0901615, -0.0500279, -0.0376332, 0.0427404, - 0.0720401, 0.0227514, -0.106129, -0.0212751, -0.0379922, 0.063484, 0.0188433, 0.0395767, - 0.0301117, -0.0215064, 0.0471855, -0.0341529, -0.0803298, -0.0145573, -0.0235636, -0.105323, - 0.0193279, 0.0311169, -0.0481364, 0.11473, 0.0624199, 0.0110681, 0.0336379, 0.00642461, - 0.0422275, 0.0139292, 0.155419, 0.0669998, -0.0508135, -0.00343256, -0.0168017, 0.0231051, - 0.0575028, -0.0536568, -0.0718591, 0.000673625, -0.0521534, 0.0252803, -0.00296366, -0.0187603, - -0.00851754, 0.0395557, 0.100741, 0.00741312, 0.0600377, 0.0807008, 0.0521776, 0.0797571, - -0.0629093, -0.00673294, -0.0946586, -0.116795, 0.0606276, -0.00622547, 0.0292151, 0.0388462, - -0.0109681, 0.0554172, 0.240807, -0.0162847, 0.0303524, 0.0470641, -0.0465172, 0.00661341, - -0.0431188, -0.0139805, -0.0778138, -0.0917159, -0.0543887, -0.0126208, 0.0157767, -0.0381842, - -0.0601245, -0.0132269, 0.0229161, 0.0946917, 0.0333466, -0.0432457, 0.00767451, 0.0313255, - 0.00869893, 0.0124194, 0.0200126, -0.0542009, -0.0419267, -0.0324422, -0.0361022, -0.0342807, - 0.0285237, -0.00941491, 0.042298, 0.0531628, -0.0579588, -0.00360975, 0.0202182, -0.0463113, - -0.0217165, -0.0558329, -0.10461, 0.000644266, 0.0265933, -0.0190376, -0.0139198, -0.0177487, - 0.042957, 0.0337059, 0.0435429, 0.0366932, 0.0356663, 0.0708965, -0.112017, 0.0768778, - -0.0748603, -0.02778, -0.0439688, -0.0396568, -0.0230837, 0.0124313, 0.140415, -0.0556834, - 0.000653722, -0.070152, 0.00936496, -0.058654, -0.0223955, -0.0612233, 0.00818948, -0.0656468, - -0.00210204, 0.0253095, -0.0739135, -0.00608692, 0.00664508, -0.0317965, 0.123874, 0.0472496, - 0.00864499, 0.017566, 0.100338, 0.0076835, 0.0248831, 0.089721, -0.121064, 0.0594471 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p70(hatfit_yaw00_lev1_p70); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p70_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p71.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p71.mh deleted file mode 100755 index ce2385d..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p71.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p71.mh: - -#ifndef stasm_hat_yaw00_lev1_p71_mh -#define stasm_hat_yaw00_lev1_p71_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p71(const double* const d) // d has 160 elements -{ - const double intercept = 0.266632; - const double coef[160] = - { - -0.00323948, -0.0113591, -0.0336446, -0.0710632, -0.0705223, 0.062828, -0.0251187, -0.0602036, - 1.21336e-05, 0.0550747, 0.00732572, 0.0563387, -0.0153524, -0.0419621, -0.00887493, -0.0643784, - -0.0137269, -0.024181, -0.0454399, -0.00608388, 0.0322647, -0.0382676, -0.00581657, -0.016338, - -0.0108501, 0.0256067, -0.0825346, -0.032075, 0.013924, -0.0233511, -0.0214738, 0.0280752, - -0.107449, 0.0538449, -0.0324866, 0.0252568, 0.0629976, 0.0207773, 0.0430119, 0.0273273, - -0.014923, -0.0388074, 0.00823292, -0.045255, 0.0650417, 0.0443541, 0.0635936, 0.083295, - 0.0382236, 0.000554167, 0.0419841, 0.0106936, 0.0110228, 0.0459013, 0.00467543, 0.0332924, - 0.0945127, 0.0472357, 0.0382225, -0.0225111, -0.0164956, 0.0434837, 0.0606323, 0.118943, - 0.0227736, 0.0480948, 0.082012, 0.0256161, 0.0113917, -0.0481997, -0.073957, 0.00668885, - -0.0322754, -0.019252, 0.0818042, 0.00733527, 0.0100666, 0.00991564, 0.0338835, 0.000509096, - -0.0388687, -0.00841774, 0.0167134, -0.0761158, -0.0143569, -0.00907291, 0.0220304, -0.0468844, - -0.0292457, -0.000624045, 0.0446416, 0.0363924, -0.00851759, -0.0481172, -0.0102748, -0.0435456, - -0.133599, -0.0498851, -0.0371449, 0.0411598, 0.0312921, -0.00926869, -0.0673707, -0.0917156, - -0.042758, -0.0852033, -0.0295567, 0.059162, -0.0074855, 0.0215083, -0.0329871, -0.0651943, - -0.0189135, -0.00652077, -0.11006, 0.032581, -0.102509, -0.0305093, -0.00925267, -0.0128011, - 0.0166546, -0.0709906, -0.0983723, -0.0197508, -0.0533792, -0.0488329, 0.141153, 0.0443988, - 0.00938893, 0.0266859, 0.0275815, 0.0470291, 0.0272184, 0.0654562, -0.107629, 0.0189209, - 0.0634252, 0.0416836, 0.071386, -0.00291001, -0.0148239, 0.0567805, -0.071365, 0.0271712, - -0.0311755, 0.0128937, 0.00768441, -0.0793778, -0.0645176, -0.0124901, 0.0369286, 0.0268296, - 0.0126682, 0.0331465, -0.0406404, -0.0143453, -0.0388306, -0.0232577, -0.0152349, -0.00314514 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p71(hatfit_yaw00_lev1_p71); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p71_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p72.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p72.mh deleted file mode 100755 index 7e45765..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p72.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p72.mh: - -#ifndef stasm_hat_yaw00_lev1_p72_mh -#define stasm_hat_yaw00_lev1_p72_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p72(const double* const d) // d has 160 elements -{ - const double intercept = 0.298111; - const double coef[160] = - { - 0.0659044, -0.0136349, -0.000657047, -0.0524316, 0.0093208, 0.0259109, 0.0627028, -0.00903453, - 0.0274928, 0.0297302, 0.0694621, 0.0678002, 0.0654913, -0.0031269, 0.00777132, 0.0435105, - -0.0336438, -0.00949334, -0.0201626, 0.0315994, 0.0374407, -0.0292693, -0.0488771, -0.0692642, - -0.0778231, 0.0947238, 0.0986332, 0.0204165, 0.0653812, 0.0855347, 0.10902, 0.0990798, - 0.0252731, 0.0228385, -0.0354786, -0.0257165, 0.00979335, 0.0133789, -0.011996, 0.122096, - -0.116807, 0.03751, 0.0182167, 0.072391, 0.0461229, 0.0279572, -0.0575722, -0.0174644, - -0.110995, -0.0872117, -0.044589, -0.0274898, -0.0213475, -0.0663374, -0.0594111, -0.038104, - 0.0225458, 0.0143709, -0.0475647, -0.0176696, -0.0952845, -0.0270043, -0.0115237, -0.013899, - 0.0440536, -0.0365961, -0.0699315, -0.0686312, -0.0798702, -0.0546913, -0.00454662, -0.0516614, - -0.021318, -0.0627624, 0.0824855, 0.0662995, 0.0526493, -0.0404413, 0.0253183, -0.010623, - 0.0509673, -0.0313634, 0.0580512, 0.036311, 0.00554113, 0.0408745, -0.0538253, -0.0556542, - -0.0161722, 0.0340043, -0.0203796, -0.0764515, -0.0650205, 0.0578113, 0.091688, 0.00397961, - 0.0227092, -0.012721, -0.0121066, -0.0237495, 0.000210238, 0.00523915, 0.00866707, 0.0416126, - -0.00888034, 0.0335162, 0.00281285, 0.000216386, 0.0195712, -0.00883568, -0.0601433, -0.0224163, - 0.0219169, -0.0063463, -0.0157962, 0.0198269, 0.00410662, 0.00975731, -0.0218908, 0.0454962, - -0.0155503, 0.0988849, 0.0463098, -0.0100967, -0.0268059, 0.0566602, 0.072615, 0.0740009, - -0.0333233, -0.0182402, -0.0706448, 0.0125493, -0.040476, -0.0350976, -0.137625, 0.00128251, - -0.0558219, -0.00671415, -0.0848036, 0.0173377, -0.0294549, -0.000625941, -0.0863849, -0.0417296, - -0.00513088, -0.0261223, 0.0074173, -0.0278166, -0.0170869, 0.00271093, 0.0106674, 0.0273419, - -0.0100846, 0.00562695, -0.00600253, 0.0216703, -0.00989039, -0.00382208, 0.0260593, -0.000255542 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p72(hatfit_yaw00_lev1_p72); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p72_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p73.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p73.mh deleted file mode 100755 index 1a6731b..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p73.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p73.mh: - -#ifndef stasm_hat_yaw00_lev1_p73_mh -#define stasm_hat_yaw00_lev1_p73_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p73(const double* const d) // d has 160 elements -{ - const double intercept = 0.444151; - const double coef[160] = - { - -0.020546, 0.0161181, 0.0654594, -0.0948747, 0.0285488, 0.0408993, -0.0211689, 0.0247758, - -0.00582393, 0.0185156, 0.0725341, 0.00802478, 0.0177493, 0.0507399, 0.0132491, 0.00144042, - -0.0140682, 0.0033576, -0.000123129, -0.0115809, -0.00328298, 0.0253079, -0.0533519, 0.0387285, - -0.00350354, -0.0703206, 0.0106172, -0.0374575, 0.0282741, 0.0254831, -0.0700683, -0.0170526, - -0.0364723, 0.0324261, -0.0404725, 0.0728566, 0.00123376, -0.01443, 0.0143197, -0.0289, - -0.044168, -0.0394531, -0.0453126, -0.0427691, -0.0969554, -0.104084, 0.0706115, -0.0336697, - -0.0357658, -0.00877757, -0.018146, 0.0280338, 0.0330396, -0.0116376, -0.0718934, -0.0169607, - -0.00429307, -0.00922947, -0.0148544, 0.0603271, 0.0430832, 0.0702863, -0.0180784, -0.0242528, - -0.0409658, 0.0116987, 0.0459699, 0.0121752, -0.0819474, -0.00677367, 0.0379443, -0.0223598, - -0.0292117, 0.000454892, -0.0194356, -0.031597, -0.109613, -0.0242186, -0.00652066, 0.0350001, - -0.012082, 0.0091048, 0.065266, -0.0128821, 0.028678, 0.00238832, 0.182173, -0.0143746, - 0.0724319, 0.0371631, 0.0456258, 0.0132541, 0.031683, -0.0492994, 0.0593304, 0.0549378, - 0.0210115, 0.00293678, -0.0423056, -0.0732382, -0.0307535, 0.00439763, -0.0169179, 0.0584682, - -0.00417461, -0.000920001, -0.0323396, -0.0243903, -0.0290335, -0.0224079, -0.0441952, 0.0355719, - 0.00940746, 0.0466832, -0.0271315, -0.0411812, 0.00951903, -0.0392041, -0.112846, -0.0197858, - 0.0278604, 0.00782806, -0.0426082, -0.0257704, 0.0161067, 0.0148668, -0.128532, -0.0126304, - 0.0221653, -0.0646441, 0.00312968, -0.0427131, -0.0420398, -0.021803, -0.0280242, 0.00798578, - -0.0327944, -0.0170829, -0.0214821, 0.058862, 0.0327726, 0.00170463, -0.029606, 0.0144036, - -0.0451911, -0.0545393, -0.0336726, 0.0161638, -0.0212735, 0.00839933, 0.00677629, -0.0399395, - -0.0440208, 0.0470579, 0.01285, 0.0786805, 0.00188622, -0.00854256, 0.00466533, -0.00454773 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p73(hatfit_yaw00_lev1_p73); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p73_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p74.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p74.mh deleted file mode 100755 index f7dcbd7..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p74.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p74.mh: - -#ifndef stasm_hat_yaw00_lev1_p74_mh -#define stasm_hat_yaw00_lev1_p74_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p74(const double* const d) // d has 160 elements -{ - const double intercept = -0.0861693; - const double coef[160] = - { - 0.0377272, -0.052074, 0.0842496, 0.0269239, -0.0173226, -0.0148563, -0.0387223, 0.0620431, - -0.0304301, -0.0629466, -0.011215, 0.0698194, -0.0163436, 0.0618149, -0.0107698, 0.00857855, - 0.0154768, 0.0553717, 0.0201951, -0.0199971, 0.0157546, 0.0529829, -0.0227046, 0.0993725, - -0.00917861, 0.0140864, 0.0278605, -0.0611641, -0.0496295, -0.0369097, -0.00715461, 0.0107413, - -0.00622658, -0.00358566, 0.0699447, -0.027576, 0.0455637, 0.125504, -0.0768594, 0.0122902, - 0.0925916, 0.0657672, -0.020839, -0.0717925, -0.0366377, -0.0562988, 0.0310773, 0.0800754, - -0.0604142, -0.0229939, 0.00696296, -0.00243065, 0.0139147, -0.0643964, 0.0709301, -0.0999129, - -0.0211337, -0.0358355, -0.02303, -0.0486519, -0.0799998, -0.0850369, 0.0285144, -0.0695838, - -0.0289704, 0.000604421, -0.00804623, -0.0119128, 0.013159, -0.0179008, 0.0642296, -0.0752543, - -0.0255169, -0.0183058, 0.0117462, 0.111172, 0.0510885, 0.0540716, 0.00467105, -0.00388082, - -0.0727964, -0.0721001, -0.0465695, 0.0430624, -0.0273294, 0.141421, -0.119877, -0.0860733, - 0.0234302, 0.004918, 0.106259, -0.0271116, 0.0233788, -0.0203192, 0.135544, 0.0318046, - 0.0164929, -0.0175186, 0.0115526, 0.000396585, 0.0416848, 0.0269781, 0.00863606, -0.0310569, - 0.0687198, 0.0206739, 0.124923, 0.0268222, 0.0208457, -0.0239115, 0.129879, 0.0822653, - 0.0138962, 0.0317609, -0.0513746, -0.0950611, -0.00748574, -0.0715021, -0.146752, 0.101075, - 0.0161374, 0.0291443, -0.0163718, -0.00827008, 0.0423341, -0.0263848, -0.0503185, -0.00127387, - 0.00326663, -0.0664793, 0.00148467, 0.031439, -0.00665274, 0.00286052, -0.0226317, 0.00987852, - -0.0108395, 0.0167889, -0.0189328, -0.00941313, 0.0100464, 0.00736375, -0.0125995, 0.0145155, - -0.0128805, 0.0106394, -0.0727996, -0.0944875, -0.0211638, 0.040031, -0.0387772, -0.0253539, - 0.0236832, -0.0159759, 0.0388389, 0.0955583, -0.0130999, -0.0450405, -0.026158, -0.0274946 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p74(hatfit_yaw00_lev1_p74); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p74_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p75.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p75.mh deleted file mode 100755 index 9d6c29f..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p75.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p75.mh: - -#ifndef stasm_hat_yaw00_lev1_p75_mh -#define stasm_hat_yaw00_lev1_p75_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p75(const double* const d) // d has 160 elements -{ - const double intercept = 0.244095; - const double coef[160] = - { - -0.000899974, 0.0353078, 0.0145825, -0.0121622, -0.00485157, -0.0256038, -0.0205757, -0.00587983, - 0.0199168, -0.0300858, -0.0231304, -0.0156234, -0.0188123, 0.0105047, -0.0780988, 0.0180119, - 0.0160617, -0.0164322, 0.0267275, 0.0324825, 0.0183688, 0.0275049, -0.0196376, 0.0290752, - 0.0127766, 0.00365792, 0.074349, 0.0197182, -0.00756497, -0.0135765, -0.00210256, 0.0444623, - 0.0134508, -0.0655841, 0.0336806, 0.0269161, -0.0119017, 0.0793009, -0.00775912, 0.0461052, - -0.115087, -0.0353255, 0.0132794, 0.00745167, -0.0310263, 0.0243837, 0.00809966, -0.00518043, - 0.0636831, 0.037696, 0.0776245, -0.0330936, 0.000981091, -0.00115743, 0.0407476, 0.0586357, - 0.0680963, 0.0492938, -0.00274996, -0.00482297, -0.0331305, -0.0555758, -0.0430299, 0.0130458, - -0.00616732, -0.0500856, -0.0828604, -0.0381615, -0.0566974, -0.0150602, 0.0302092, -0.0708142, - -0.0398492, 0.00213115, 0.00406433, -0.00636538, -0.0487779, -0.0669123, 0.0364117, -0.0910838, - -0.017267, -0.033364, -0.0169948, 0.0431293, 0.0316849, -0.0475541, -0.10673, -0.085643, - -0.0627401, -0.022714, -0.0650185, 0.060876, -0.0126668, 0.0498532, -0.0311162, -0.00631595, - -0.0592686, -0.0217015, -0.0353328, 3.01015e-05, 0.00939841, 0.0838227, -0.0118762, 0.046194, - -0.0344715, 0.010483, 0.0423841, 0.0120006, 0.0735342, 0.0507255, 0.0291151, -0.0374105, - 0.0230171, -0.0427561, 0.0774957, -0.0130141, 0.0157903, -0.0284648, 0.205693, -0.00952433, - -0.00556125, 0.0859779, 0.0195645, 0.000381589, -0.0186602, -0.0494488, -0.0101716, 0.00144208, - 0.0220583, 0.00610326, -0.0362644, -0.0273198, -0.0653834, -0.0249836, 0.0135337, 0.0338374, - 0.0109754, 0.0187904, -0.0189524, -0.0386528, -0.00947884, -0.0129014, -0.0440307, -0.0168492, - 0.00959161, -0.0341214, 0.00378802, 0.0197966, 0.0237692, 0.00692549, -0.0449733, 0.0142163, - 0.0276045, 0.0132254, -0.0378692, -0.0531314, -0.0021312, 0.0143778, -0.106118, 0.0143603 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p75(hatfit_yaw00_lev1_p75); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p75_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p76.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p76.mh deleted file mode 100755 index ef0902e..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p76.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev1_p76.mh: - -#ifndef stasm_hat_yaw00_lev1_p76_mh -#define stasm_hat_yaw00_lev1_p76_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev1_p76(const double* const d) // d has 160 elements -{ - const double intercept = 0.167083; - const double coef[160] = - { - 0.0178567, 0.00471566, -0.00311486, 0.0590848, 0.018484, 0.109937, 0.0273678, 0.0385779, - 0.0964948, 0.0198502, 0.0733013, 0.0630774, -0.0975216, 0.0475847, 0.141174, 0.055912, - 0.0450708, 0.102869, -0.0110608, 0.0225142, -0.00837921, -0.0446967, -0.0637368, -0.0486541, - 0.007223, 0.0421737, 0.0486142, 0.035173, 0.0203823, 0.0383853, 0.00289787, -0.0133363, - 0.00970628, -0.0349687, 0.0170089, -0.0533628, 0.0531978, 0.000440911, 0.046605, 0.0487779, - 0.000617105, 0.0353907, 0.0273192, -0.092682, -0.0704793, -0.0155085, -0.0217113, -0.0631617, - -0.112172, -0.0802243, -0.0608824, 0.0123457, 0.101898, -0.0345389, 0.00356435, -0.0256903, - -0.0861817, -0.0318411, -0.00801122, -0.0602708, -0.0648524, -0.0169876, -0.0223819, -0.0399834, - 0.0246939, -0.00651791, -0.025922, -0.0122764, -0.0152515, -0.074221, -0.0428134, 0.0231071, - 0.0214263, 0.0464157, -0.00333684, 0.0686476, -0.0726611, -0.01918, -0.0510255, -0.0121835, - 0.0251027, 0.017702, -0.020816, 0.0256276, 0.062492, 0.031742, 0.0160975, 0.0905406, - -0.00495778, -0.0248092, -0.0028224, 0.00834231, -0.0172717, -0.0282789, -0.0644648, -0.091834, - 0.0375562, -0.00619002, -0.00536505, 0.020868, 0.032814, 0.0248805, 0.0170806, 0.0586391, - -0.0149593, -0.0445147, 0.0531902, -0.0218665, -0.0289037, 0.065172, 0.0438367, 0.017724, - 0.0487856, 0.0179788, 0.0317689, -0.0629089, 0.0142979, -0.051581, -0.00846684, 0.0634947, - -0.0244065, 0.00798281, 0.0281053, -0.0294804, 0.00115965, 0.0110325, 0.0143852, -0.0351062, - -0.0154878, -0.0199757, -0.0262725, 0.00266283, -0.0202465, 0.0119766, -0.0192617, 0.0439345, - -0.0650565, -0.0194041, -0.0956524, -0.0440435, -0.00749312, -0.0431471, -0.067371, -0.054401, - -0.0463175, 0.0219669, -0.0384754, 0.0520812, -0.0308316, -0.0167847, -0.100874, 0.0112061, - -0.0256602, -0.0237249, 0.0170488, 0.0909679, -0.0136034, 0.0805518, 0.0374694, 0.0708242 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev1_p76(hatfit_yaw00_lev1_p76); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev1_p76_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p16.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p16.mh deleted file mode 100755 index d1fa3ee..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p16.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p16.mh: - -#ifndef stasm_hat_yaw00_lev2_p16_mh -#define stasm_hat_yaw00_lev2_p16_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p16(const double* const d) // d has 160 elements -{ - const double intercept = 0.201199; - const double coef[160] = - { - 0.0479748, -0.00784569, -0.0839676, -0.0402904, -0.00990121, -0.0161831, 0.0171531, 0.0633562, - 0.0458178, 0.038718, -0.00229275, -0.00807225, -0.00097018, -0.0167164, -0.0218175, 0.0212908, - 0.0483748, 0.0306654, 0.00668657, -0.0368009, 0.00499699, -0.0319757, -0.0424916, 0.0178991, - 0.0126939, 0.0156106, -0.0195705, -0.0524409, 0.00303049, -0.00036784, -0.0339076, -0.00650181, - -0.00221962, 0.0418911, 0.0109849, -0.0273736, -0.026405, 0.0189485, -0.0374008, -0.0135253, - -0.0509223, -0.017173, -0.00960212, -0.00728783, 0.0171797, 0.0235679, 0.11178, 0.00767195, - -0.0532631, -0.0134703, 0.0251553, 0.0296362, 0.0100125, -0.00951279, 0.0175886, -0.0152258, - -0.0643198, -0.00778827, 0.0185586, 0.0440405, 0.0352242, 0.000335484, 0.0510853, -0.0333015, - -0.0664789, -0.022523, 0.0492345, 0.0635387, 0.0590402, -0.0214514, 0.0291401, -0.0576358, - -0.0595315, -0.0602438, -0.0498133, -0.00367544, 0.0452483, -0.0124489, 0.125025, 0.0170502, - -0.0049248, -0.0393945, 0.0171818, 0.0114648, -0.0132102, -0.016775, 0.0096432, -0.0147961, - 0.0331186, 0.00980842, -0.0214262, -0.0321873, -0.0313714, -0.0137095, -0.0132678, 0.0154735, - 0.0614494, 0.0190023, 0.00482608, -0.0350526, -0.0510161, -0.04975, -0.0354202, 0.0309835, - 0.0550816, 0.0681949, 0.0527185, -0.0125734, -0.0319863, -0.0356415, -0.0373618, 0.0207985, - 0.0501947, 0.0225517, -0.0432618, 0.00168456, -0.00521152, -0.013559, 0.00523639, 0.094479, - -0.00574153, -0.0537307, 0.0131248, -0.00685395, -0.0151087, 0.00691375, -0.00111654, -0.0486872, - -0.014142, -0.0469476, 0.00942551, 0.0237295, 0.0337823, 0.0245199, 0.0387013, -0.0252803, - -0.0613539, -0.0400444, 0.0029828, 0.00468973, 0.00446706, 0.0299791, 0.00778386, -0.0241703, - -0.0407481, -0.00160535, 0.00760824, 0.00280452, -0.0209072, -0.0135813, -0.030542, -0.0249088, - -0.0641581, 0.0137424, -0.0494603, -0.0549461, -0.0140327, 0.010657, -0.0297539, -0.0048274 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p16(hatfit_yaw00_lev2_p16); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p16_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p17.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p17.mh deleted file mode 100755 index dec1d34..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p17.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p17.mh: - -#ifndef stasm_hat_yaw00_lev2_p17_mh -#define stasm_hat_yaw00_lev2_p17_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p17(const double* const d) // d has 160 elements -{ - const double intercept = 0.0641183; - const double coef[160] = - { - 0.00548101, -0.0278398, -0.0529979, -0.0184241, -0.0244758, 0.00750857, -0.0870743, -0.0408273, - 0.0191316, -0.0132359, -0.0197415, -0.0282264, -0.0230354, -0.0469168, 0.00305976, 0.00509154, - 0.0337102, 0.0317416, -0.0147772, -0.0521098, -0.0298594, -0.0364094, 0.00320256, -0.00965839, - 0.0502111, 0.0040414, -0.0186344, -0.00963626, -0.00643085, -0.0348256, 0.0274904, 0.0428869, - 0.0423164, 0.0703478, 0.0436876, -0.043167, -0.0155584, -0.0627262, -0.0910627, -0.0270945, - 0.0381986, 0.0170332, -0.0378051, -0.0305759, -0.0101497, 0.0294837, 0.0541005, 0.0204143, - -0.0107043, 0.0141293, -0.000124892, -0.00228929, -0.00584688, 0.0562794, 0.029545, 0.0289569, - -0.0294728, -0.00693026, -0.00502799, -0.0220686, 0.017127, 0.0168838, 0.0372847, 0.035913, - -0.0387757, -0.00677981, 0.0154889, 0.00584213, 0.0138248, 0.022448, 0.0259633, -0.000267879, - -0.0199762, 0.0355431, 0.0268489, 0.059433, 0.0371466, -0.0195291, 0.0631884, 0.0154288, - -0.0666278, -0.0212345, 0.00775835, -0.0203998, -0.00585601, 0.118692, 0.0160203, 0.00520236, - -0.0245992, -0.0205268, 0.0347002, 0.0146157, 0.021682, 0.0334895, -0.0537345, -0.0151598, - -0.0188597, -0.0376348, 0.0303035, 0.0415455, 0.0246958, 0.0142054, -0.0206932, 0.00589225, - -0.0151944, -0.0372652, 0.00272563, -0.00158859, 0.0128479, 0.00141992, -0.0375236, -0.0219545, - -0.0257391, -0.0161181, 0.0355049, -0.0246824, -0.0230046, -0.0200004, 0.00343231, 0.0139045, - -0.00558463, 0.0414232, -0.0391887, -0.048578, -0.0148066, 0.00240101, -0.0306445, 0.0222875, - 0.0113709, 0.0243018, 0.0126473, -0.0107071, -0.028586, -0.0114096, 0.00955817, 0.00577993, - 0.00295543, -0.00017432, -0.00483328, -0.00866622, -0.0210113, -0.00407164, 0.00779089, -0.0204989, - 0.0224204, -0.0126428, 0.0216603, 0.0197888, -0.00295644, -0.000934317, 0.0240641, -0.0132466, - 0.0069265, -0.0727936, 0.0252536, 0.0185129, -0.00494405, 0.00818837, 0.0187053, -0.0385674 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p17(hatfit_yaw00_lev2_p17); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p17_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p18.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p18.mh deleted file mode 100755 index 2aa4ba4..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p18.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p18.mh: - -#ifndef stasm_hat_yaw00_lev2_p18_mh -#define stasm_hat_yaw00_lev2_p18_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p18(const double* const d) // d has 160 elements -{ - const double intercept = -0.464167; - const double coef[160] = - { - -0.0070516, -0.0138885, -0.00838615, 0.0241183, 0.00800509, -0.0107691, -0.0318889, -0.0226589, - 0.0601676, -0.0169016, -0.00575287, -0.0394743, 0.0451446, -0.0203331, -0.0540854, -0.0105876, - 0.0294445, -0.0333346, -0.0331402, -0.0444691, 0.0121001, 0.0844445, 0.041568, 0.0562884, - -0.0322616, 0.0360436, 0.00921021, -0.013502, -0.0027091, 0.0523874, 0.0272614, 0.012032, - 0.000168089, 0.0174628, 0.0798083, 0.0276852, 0.0135955, 0.0296484, 0.0129555, 0.0806812, - 0.0500424, 0.00710139, -0.00429781, -0.0238927, 0.00206671, -0.0204532, 0.0172665, -0.000815265, - -0.00492949, -0.00120939, -0.0317968, -0.00504358, 0.00071816, -0.00772781, 0.00686577, 0.0260517, - -0.028403, 0.0759707, 0.0504597, 0.0504078, 0.0332929, -0.00196605, -0.000229055, -0.0222047, - 0.0165769, 0.0412389, -0.00796234, -0.00544252, -0.0125328, -0.0431626, -0.00170195, -0.0120648, - -0.0211015, 0.00974593, 0.0316203, 0.0240425, -0.00954887, 0.0135305, 0.0313708, -0.0139964, - 0.00818618, -0.0291873, -0.0385677, -0.0388603, -0.00953679, -0.0185117, 0.00438256, -0.0280945, - 0.00657028, -0.0137535, 0.0160152, 0.0283693, 0.0329595, -0.00655665, 0.0025663, -0.00771347, - 0.0294882, 0.0260856, 0.00637648, -0.00866566, -0.040871, -0.0224035, -0.00895485, -0.00151325, - 0.00673054, -0.0275637, -0.0518765, -0.0346669, -0.0177936, 0.0449881, 0.0065214, 0.00766954, - 0.0429394, 0.0386208, 0.0464108, 0.00573303, -0.0410096, 0.00386441, 0.0278229, 0.0230318, - 0.0152115, -0.0100685, 0.0293164, 0.0540824, 0.0292131, 0.0355769, 0.000325612, -0.0256946, - -0.0172053, -0.00233631, 0.00716747, 0.0294623, -0.00225413, -0.0271301, -0.037571, -0.00656058, - -0.00636178, -0.0178503, -0.0179586, 0.0090866, 0.0361297, 0.00409523, -0.0119827, -0.0166724, - 0.00418527, -0.00409336, 0.00976438, 0.0118843, 0.0649968, 0.00491458, -0.0490295, 0.00522135, - -0.0017874, 0.00497965, -0.0123665, 0.0632608, 0.0561797, 0.0983509, 0.126985, 0.0707482 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p18(hatfit_yaw00_lev2_p18); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p18_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p19.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p19.mh deleted file mode 100755 index c0c45d2..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p19.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p19.mh: - -#ifndef stasm_hat_yaw00_lev2_p19_mh -#define stasm_hat_yaw00_lev2_p19_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p19(const double* const d) // d has 160 elements -{ - const double intercept = -0.240635; - const double coef[160] = - { - 0.0168096, -0.0442579, -0.070338, -0.0473302, -0.0222136, 0.0957758, 0.0164518, 0.00523625, - 0.00195702, -0.0127086, -0.00720966, -0.00891624, -0.0226743, 0.0302098, -0.00206097, 0.00197536, - 0.0119359, -0.010845, 0.0263878, 0.0103592, 0.0269128, 0.0031775, 0.00825071, 0.0185765, - -0.00863547, -0.0109844, -0.0088456, -0.026454, -0.0136792, 0.02238, 0.0159833, 0.0229814, - 0.00676278, 0.0356278, 0.0243659, -0.0483941, -0.00029279, -0.0285899, 0.0724552, 0.0293844, - -0.0628865, 0.0278929, 0.0492395, -0.00819929, -0.00417028, -0.0135682, -0.00638027, -0.00104148, - -0.0277807, 0.0166524, 0.0453805, 0.00800668, 0.0257926, -0.0182616, -0.0193732, -0.0185252, - -0.0363109, -0.00320665, 0.0598099, 0.0404136, -0.000212925, -0.0243272, -0.00412736, -0.0254325, - 0.00665958, -0.0315541, 0.0232733, 0.0193451, 0.0184404, 0.00400625, 0.0300885, -0.00994864, - -0.0271101, -0.0865407, 0.064576, 0.0308198, -0.0193159, -0.00973269, -0.0206604, -0.0100628, - 0.0268986, 0.0501878, -0.0267205, -0.0220307, -0.0236678, 0.0160175, -0.0324663, -0.00533803, - 0.0409558, -0.00325867, -0.0142667, -0.0142876, -0.0127697, 0.0148601, 0.0163897, 0.00407631, - 0.0428517, 0.0201913, -0.0215948, -0.00872995, -0.00192159, 0.008682, 0.0154782, -0.00524282, - 0.00842598, -0.00765053, 0.00464852, 6.63136e-05, 0.014949, 0.00761466, 0.0266099, -0.00830669, - 0.0452914, -0.0164204, -0.031957, 0.0121778, 0.028522, 0.0417206, 0.0588211, -0.0239453, - -0.00447031, -0.00836715, -0.036449, 0.0202073, 0.0334947, 0.0145783, -0.0586885, 0.0168487, - -0.00579858, 0.0101248, 0.0214281, 0.00176611, 0.000148868, 0.0413324, 0.0124326, 0.0215377, - 0.0165895, 0.00406493, 0.0232231, 0.0357304, -0.00316806, -0.00542247, 0.0273935, 0.0283702, - 0.0246317, -0.0173005, 0.0102101, 0.00916052, -0.00898166, -0.0394295, -0.00401933, -0.0383193, - 0.0141222, 0.0139724, -0.0176987, -0.0316665, -0.00812724, 0.00615176, 0.0640168, 0.00201298 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p19(hatfit_yaw00_lev2_p19); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p19_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p20.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p20.mh deleted file mode 100755 index d9c0510..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p20.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p20.mh: - -#ifndef stasm_hat_yaw00_lev2_p20_mh -#define stasm_hat_yaw00_lev2_p20_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p20(const double* const d) // d has 160 elements -{ - const double intercept = -0.57973; - const double coef[160] = - { - -0.00205481, -0.0137214, -0.00309148, -0.0185552, -0.0044485, -0.00405411, 0.0980302, 0.0258474, - 0.0441372, 0.0271223, -0.022722, -0.0374453, -0.00967222, 0.00451008, 0.0400823, 0.0441306, - 0.0282369, 0.0376717, 0.00993434, -0.00164766, -0.0277478, -0.0452401, 0.0094723, 0.0245945, - -0.00383547, 0.0326884, 0.0353405, 0.0255885, 0.0267886, 0.0080378, 0.0145145, 0.0248141, - 0.0470777, -0.0160207, 0.0149831, 0.0101602, 0.0657714, -0.0467214, 0.102737, 0.0984535, - 0.0310132, -0.0311305, 0.095894, 0.0438843, 0.00138908, -0.0255201, 0.00320738, -0.00878598, - -0.00080174, -0.0433443, 0.00994268, 0.0442605, 0.0359996, 0.0168742, 0.0266655, -0.015031, - -0.0108812, -0.0152446, 0.0306542, -0.0408367, -0.0200448, -0.0219055, -0.00829048, -0.0299107, - 0.00286763, 0.0235611, 0.0619527, -0.00629094, -0.0349205, -0.0349401, -0.0219735, -0.0223126, - -0.0190521, 0.0522663, 0.0175953, -0.0569897, -0.0104982, 0.0112655, -0.0351287, -0.0102906, - -0.020444, -0.0218077, -0.0230517, -0.0435241, -0.00586253, 0.0243467, 0.023879, -0.031373, - 0.00837013, -0.0207039, 0.00489612, 0.0227467, 0.00429101, 0.0393884, 0.0267815, -0.0161819, - 0.00150121, -0.0100761, -0.0098574, 0.058646, 0.0332048, 0.0457629, 0.0414061, -0.000192158, - 0.0113764, -0.0175181, -0.00533787, 0.0196774, 0.0189207, 0.00725609, 0.0267366, 0.0193298, - -0.0244301, -0.0107281, -0.0358781, -0.0160337, 0.00206874, -0.0594505, -0.0192336, 0.00931433, - 0.0467891, -0.0349222, 0.0139858, 0.0436247, -0.00253807, 0.003628, 0.0264592, -0.0351408, - 0.0164997, 0.0299346, -0.0112387, -0.049508, -0.00414905, -0.0249483, 0.0164856, -0.0237207, - 0.0292897, 0.0463837, 0.00937479, 0.00963005, 0.0212507, 0.00877913, 0.0395294, 0.0149616, - 0.00562129, 0.0367735, 0.0154453, 0.0195445, 0.0171127, 0.0147879, 0.0285341, 0.0203778, - -0.0326154, 0.0306668, -0.00174604, 0.0345561, 0.0300234, 0.0564806, -0.0346435, 0.0125497 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p20(hatfit_yaw00_lev2_p20); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p20_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p21.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p21.mh deleted file mode 100755 index 68ae1d7..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p21.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p21.mh: - -#ifndef stasm_hat_yaw00_lev2_p21_mh -#define stasm_hat_yaw00_lev2_p21_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p21(const double* const d) // d has 160 elements -{ - const double intercept = -0.137371; - const double coef[160] = - { - -0.00236509, -0.00904201, 0.0482622, 0.0424488, 0.0565872, -0.0327647, 0.0570792, 0.0605706, - -0.0128233, -0.0312516, 0.0244441, 0.0247274, 0.0639721, 0.00583817, 0.051489, 0.0328103, - -0.0583378, -0.0380139, 0.0164458, 0.0317571, 0.0424508, 0.0116324, 0.0200214, 0.0590078, - -0.0306806, -0.0405981, -0.00652414, 0.00700168, 0.0290531, 0.0100532, -0.0120271, 0.0226684, - -0.0112358, 0.00504471, -0.0403399, -0.0153419, -0.0315861, 0.0165162, 0.00592848, 0.0118801, - 0.0344096, 0.0426078, 0.0536365, -0.0266674, -0.0599532, -0.0454601, -0.0507451, -0.0308664, - 0.00734138, 0.0751499, 0.00975933, 0.0111379, -0.00815451, 0.00552466, -0.0422937, -0.0288442, - 0.0361002, 0.0313253, -0.0258745, 0.000885331, -0.0193726, 0.00598507, -0.0090692, -0.00433989, - 0.0222115, -0.00361573, -0.0331707, -0.030468, -0.0244275, -0.00293196, 0.0322258, 0.0321031, - -0.0104847, -0.0303236, 0.00775746, -0.00491881, -0.00907141, 0.003709, -0.00123734, -0.0289989, - -0.0653049, -0.0366091, -0.0253084, -0.0427656, -0.0227685, -0.0113534, 0.0215344, 0.000436021, - 0.00641436, 0.011706, -0.0162955, -0.0391898, -0.0397683, -0.0374501, 0.0154038, 0.0331744, - 0.0310901, 0.0396808, -0.0369438, -0.0320113, -0.0365431, -0.0231747, 0.00364888, 0.0506336, - 0.00216586, 0.00920747, 4.29333e-06, -0.0160827, -0.0171278, -0.00370237, -0.0198794, 0.0251668, - -0.0425848, 0.0218599, 0.0425504, 0.0306612, -0.0116232, -0.030963, -0.0149334, -0.0128814, - 0.0366718, 0.0230035, -0.0129825, 0.0180202, 0.0178947, 0.0340951, 0.020461, 0.0255292, - -0.0281736, 0.00630762, 0.0147464, 0.0573448, 0.0240933, 0.0175706, -0.0213692, -0.022618, - 0.0105691, -0.0263521, -0.00420126, 0.0318987, 0.037116, 0.0379115, -0.00468657, 0.0204243, - 0.062086, -0.0372716, -0.0137724, -0.00837101, 0.0258512, 0.00812403, -0.0121935, 0.0185915, - 0.085514, -0.0301003, 0.0350227, 0.0149268, -0.00248905, 0.000797402, -0.0177684, -0.00654257 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p21(hatfit_yaw00_lev2_p21); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p21_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p22.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p22.mh deleted file mode 100755 index ce2b58b..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p22.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p22.mh: - -#ifndef stasm_hat_yaw00_lev2_p22_mh -#define stasm_hat_yaw00_lev2_p22_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p22(const double* const d) // d has 160 elements -{ - const double intercept = 0.0117697; - const double coef[160] = - { - -0.0178546, -0.00507232, -0.00537885, -0.0530472, -0.0562883, 0.0296127, -0.0548014, -0.000823639, - 0.015926, 0.00988827, 0.00843378, -0.0217375, -0.0385913, 0.0506703, -0.00520324, -0.0104024, - -0.000330601, 0.00924059, -0.0198405, -0.0429418, -0.0654977, 0.0470837, 0.0526988, -0.0131279, - 0.018024, 0.0390424, 0.0101875, 0.0238801, -0.00712584, 0.0535957, 0.0522608, 0.0102155, - -0.0226839, 0.0148612, 0.0226066, 0.0162535, -0.0285434, 0.0257833, 0.0471718, -0.0458596, - 0.000277075, 0.00620342, -0.0221676, -0.00461481, 0.0636075, 0.00634243, 0.00543572, 0.0105987, - 0.00897372, -0.0190757, -0.0626532, -0.0109301, 0.0265744, 0.00603106, 0.00160259, 0.0368236, - -0.00140971, -0.0150079, 0.0203465, 0.0625984, 0.0503313, -0.00942197, -0.0263503, 0.00727295, - -0.0242728, -0.0137839, 0.0411412, 0.0404335, 0.0170111, -0.0161308, -0.0472095, -0.00676737, - -0.0562529, -0.0229003, 0.0162299, -0.00866833, -0.00391738, -0.0337265, -0.0379058, -0.0230986, - -0.0253698, 0.00212937, -0.00591203, 0.0584039, -0.0129678, 0.00929018, -0.0232662, -0.0520017, - -0.0194294, -0.053814, -0.0157562, -0.00375296, 0.00727014, 0.0407859, 0.0240675, -0.0271583, - -0.0294064, -0.0145298, 0.0048997, 0.0142413, -0.0138544, 0.00606824, 0.0031445, -0.0401113, - -0.0231949, -0.024332, -0.0455487, -0.0347302, -0.0593698, 0.0135033, 0.0127122, -0.0139138, - 0.0174126, 0.010852, -0.00842191, -0.0195408, -0.0233637, -0.0315422, 0.0133297, 0.0701624, - 0.0198514, 0.0102554, 0.00782285, -0.0285294, 0.104508, -0.00569995, -0.0339732, 5.90907e-05, - 0.0168465, 0.00239644, -0.0307843, -0.0371566, -0.0234185, 0.00555857, 0.00332544, 0.0340692, - 0.0329612, 0.0234823, -0.000965576, 0.00522464, -0.00789185, -0.0021173, -0.00775234, 0.0164451, - 0.0117572, 0.0227539, 0.00524717, 0.00727862, 0.0275104, 0.0121523, -0.020892, 0.00706355, - -0.0286189, 0.0186815, -0.0136882, 0.051597, 0.0459619, 0.0245787, 0.0183904, -0.0107941 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p22(hatfit_yaw00_lev2_p22); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p22_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p23.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p23.mh deleted file mode 100755 index c4fb6cc..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p23.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p23.mh: - -#ifndef stasm_hat_yaw00_lev2_p23_mh -#define stasm_hat_yaw00_lev2_p23_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p23(const double* const d) // d has 160 elements -{ - const double intercept = 0.242677; - const double coef[160] = - { - 0.000810244, -0.0477374, 0.0151243, 0.0792231, 0.043766, 0.000172928, -0.075201, 0.00877918, - 0.015561, -0.0270447, -0.0130295, 0.0234744, 0.0498321, 0.0208237, -0.0278933, -0.0238794, - 0.00150402, -0.0242494, -0.0122306, 0.0299458, 0.0606751, 0.0493692, -0.0425213, -0.0218249, - -0.0176783, -0.027917, -0.0168181, 0.012025, 0.0191672, 0.0318289, -0.00528081, -0.0383298, - 0.0343618, -0.0327522, -0.0511107, -0.0318691, -0.00791867, 0.0300615, 0.0169818, -0.00332896, - 0.0518194, 0.0364182, -0.0303691, -0.0891738, -0.108781, -0.0286836, 0.128743, -0.0317241, - 0.0213597, 0.0567028, 0.04782, 0.02951, -0.0305566, -0.0470166, 0.0357719, -0.02154, - -0.0043653, 0.0199172, 0.0119268, -0.0062304, -0.0498879, -0.0364475, 0.0605531, -0.0401511, - -0.0210481, 0.0142989, 0.0170633, 0.0183518, -0.00906584, -0.00979833, 0.020948, -0.0205823, - -0.019643, -0.0211283, -0.0295402, 0.00603548, -0.0146838, 0.0189525, 0.131104, 0.065143, - -0.0461765, -0.0538791, -0.0125012, 0.0887613, 0.0478228, 0.1007, -0.0118974, -0.0282087, - -0.0355892, -0.0213169, 0.00692103, 0.0126706, 0.00220347, 0.00400608, -0.0346168, -0.0361555, - -0.0238473, -0.0127767, -0.00240078, 0.00380214, 0.013514, 0.00170848, -0.0348666, -0.0270525, - 0.0167837, 0.00526975, -0.0129707, -0.0673188, -0.0227539, -0.0285314, 0.0154404, 0.0236957, - -0.015565, -0.00533645, 0.017867, -0.014366, 0.000218929, -0.00643451, -0.0288213, -0.0261644, - -0.00861372, -0.0167076, -0.0179646, -0.0232297, -0.0938334, -0.0352466, -0.0660536, -0.0109894, - 0.00404062, 0.0396702, -0.00151376, -0.00703396, -0.029871, -0.0304434, 0.0106963, 0.0171258, - 0.00310458, 0.00955822, 0.00599693, -0.0508966, -0.0324266, -0.0448106, 0.0169098, 0.0349014, - -0.0102038, -0.00315048, -0.00164872, -0.0324597, 0.00105539, -0.014407, 0.0222697, 0.00200826, - -0.00475663, -0.0406545, 0.046732, -0.00708498, 0.01835, -9.08009e-05, 0.00659241, 0.0128114 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p23(hatfit_yaw00_lev2_p23); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p23_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p24.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p24.mh deleted file mode 100755 index df1912a..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p24.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p24.mh: - -#ifndef stasm_hat_yaw00_lev2_p24_mh -#define stasm_hat_yaw00_lev2_p24_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p24(const double* const d) // d has 160 elements -{ - const double intercept = -0.290285; - const double coef[160] = - { - -0.00391734, -0.0373713, 0.0296847, 0.0856366, 0.0680252, -0.0141347, -0.056779, -0.0639785, - -0.0345783, -0.0245752, -0.00601101, 0.0248511, 0.0549668, -0.0103632, 0.0176319, -0.0324854, - 0.0277483, -0.0459327, -0.0292241, -0.0201631, 0.018909, 0.0133223, 0.0299505, -0.0124793, - 0.0329833, 0.0094125, -0.0165424, -0.0104312, 0.00643773, -0.00469624, -0.0291954, 0.027616, - -0.0116333, -0.0426014, -0.00213712, -0.0557142, -0.00217717, -0.0468454, -0.0729048, -0.0447836, - -0.0144842, 0.0405147, 0.0584253, 0.0787079, -0.00218177, 0.00945018, 0.0511602, -0.043676, - -0.0145351, -0.00977988, 0.00578833, -0.0117745, -0.0274247, 0.0305891, 0.0285472, 0.0443184, - -0.050581, -0.0244408, -0.0281909, 0.0058221, 0.00330261, 0.0454032, 0.0898193, 0.0662471, - -0.0216286, -0.013524, 0.00069891, 0.0404074, 0.0169764, 0.0274654, 0.0459739, 0.0206503, - 0.0152971, 0.0228002, -0.0187678, 0.0247393, 0.0265094, 0.0373614, -0.0228019, -0.00311044, - 0.024944, 0.0275463, 0.0259327, -0.0799705, -0.082091, -0.0391279, 0.0124728, 0.033311, - 0.0487404, 0.0302635, 0.0271769, -0.0397876, -0.0402077, -0.0282224, -0.0541014, -0.00161753, - 0.0762442, 0.0214009, 0.04125, 0.00345349, -0.0299646, 0.00257046, -0.0469857, 0.0344531, - 0.0353149, 0.00880637, 0.0149039, -0.00547696, -0.022949, 0.0183402, 0.0309907, 0.0685378, - 0.0257068, 0.00948362, 0.022245, 0.00982482, -0.0307185, 0.0381942, 0.013981, 0.0019222, - -0.0234243, -0.0100864, 0.0290335, -0.0571687, 0.0195604, -0.0328423, 0.0471029, 0.0198729, - -0.00538831, -0.025955, 0.0340384, 0.0245018, 0.0335489, -0.00632678, 0.0119202, 0.00663611, - -0.029499, -0.0505394, 0.0100067, 0.0302057, 0.0131081, -0.00547969, 0.0186686, -0.00161012, - -0.00888793, -0.0391302, 0.00500464, 0.0354366, 0.0211353, 0.0240429, 0.00906457, -0.024416, - -0.000141046, 0.0398088, -0.0288674, 0.00956516, 0.0214225, 0.0303871, -0.0272088, 0.020084 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p24(hatfit_yaw00_lev2_p24); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p24_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p25.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p25.mh deleted file mode 100755 index d46ebfc..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p25.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p25.mh: - -#ifndef stasm_hat_yaw00_lev2_p25_mh -#define stasm_hat_yaw00_lev2_p25_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p25(const double* const d) // d has 160 elements -{ - const double intercept = -0.48192; - const double coef[160] = - { - 0.080069, 0.0254212, 0.0698047, 0.0172652, -0.0437604, 0.0533673, 0.0479497, 0.0707692, - 0.028919, 0.0218598, -2.02511e-05, 0.0177421, 0.0252949, 0.0957902, 0.0679331, 0.0477211, - 0.015103, -0.0350397, -0.0226795, -0.0309532, 0.0196631, 0.0314508, -0.0098721, 0.026174, - 0.00875322, -0.0102275, 0.00161853, -0.0244689, -0.00217672, -0.0258021, -0.0712362, -0.0247072, - 0.0169485, -0.00647493, 0.00909959, -0.00290298, -0.0018975, -0.00785463, 0.0170031, -0.00405343, - -0.0453393, -0.0316815, 0.00553392, 0.0467984, 0.013018, 0.00286137, 0.0641622, -0.0108293, - 0.0106426, 0.0659868, 0.0619154, 0.0683916, 0.00400672, -0.0316998, -0.0439017, -0.0531982, - 0.0227195, 0.0171857, 0.0149441, 0.0469003, 0.0509676, 0.0393706, 0.0125297, -0.0131728, - 0.00232523, -0.043456, -0.0545071, -0.0356114, 0.0232419, 0.00208771, -0.0142744, -0.0270206, - 0.00372195, -0.00702677, 0.00791299, -0.0125764, 0.016542, 0.000498141, 0.0112614, -0.00637377, - -0.0150705, -0.0661879, 0.000954137, 0.00578005, 0.0330873, 0.0207243, 0.0608699, 0.0118893, - 0.00744177, 0.0285924, -0.0143176, -0.0313716, 0.00486059, -0.0034366, -0.00624046, 0.0333263, - 0.00123777, 0.0434691, 0.0071437, -0.00841325, -0.00695282, -0.0243996, -0.0220286, -0.0228198, - 0.00216731, -0.0135737, -0.0088714, -0.0068874, 0.021012, -0.0209814, 0.00917872, 0.0201832, - 0.03023, -0.0125052, -0.00717798, 0.0265657, 0.0205816, 0.00318955, -0.00975955, 0.00153578, - 0.0342051, 0.0493117, -0.0221902, 0.0290784, -0.00464809, 0.060173, 0.170815, 0.107283, - -0.0163555, -0.0098902, -0.0120301, -0.0361608, -0.0128753, -0.0265617, -0.0919782, -0.0455791, - 0.0263706, 0.0432768, -0.00306199, 0.00291669, 0.0149201, -0.019987, -0.0236052, 0.0239656, - 0.0316036, 0.010793, 0.0203367, 0.0120483, 0.00752219, -0.0246316, 0.00150752, -0.0318513, - 0.00499792, -0.00242502, 0.03601, 0.000732988, 0.0184117, -0.0522315, 0.00194238, 0.0259723 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p25(hatfit_yaw00_lev2_p25); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p25_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p26.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p26.mh deleted file mode 100755 index 224cc7c..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p26.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p26.mh: - -#ifndef stasm_hat_yaw00_lev2_p26_mh -#define stasm_hat_yaw00_lev2_p26_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p26(const double* const d) // d has 160 elements -{ - const double intercept = -0.433871; - const double coef[160] = - { - -0.0129694, -0.0362405, 0.0456953, 0.00806892, 0.0332427, 0.0166249, 0.0858091, -0.021537, - 0.0121069, -0.00958319, 0.00183791, -0.0445408, -0.00691424, 0.0149946, 0.0484259, 0.0455105, - 0.042137, -0.000148501, 0.0187582, 0.000764644, 0.00677489, 0.00827639, -0.0203425, 0.0730549, - 0.0487964, -0.0258577, -0.0323376, 0.0132528, 0.0104709, 0.0293409, 0.0351007, 0.0678395, - 0.0204265, -0.0113785, -0.0333476, -0.0144913, -0.0179195, 0.0584139, -0.0229801, -0.0179397, - 0.0227342, 0.0295118, 0.0340656, -0.100074, -0.0846886, -0.0443842, 0.0208676, -0.00939233, - 0.000832701, 0.0194225, 0.0593964, 0.0382799, -0.010556, -0.0222984, -0.00961312, -0.0178815, - 0.00109992, 0.00598413, 0.0445235, 0.03007, -0.0509595, -0.0385867, 0.00564818, -0.0411887, - -0.0344969, -0.0066254, 0.061847, 0.0286021, -0.0345655, 0.00151497, -0.0380565, -0.0705052, - 0.00740955, 0.020345, -0.00978735, 0.00859556, -0.0107584, 0.0208075, 0.0526561, 0.0167182, - -0.00683639, -0.00606006, -0.0112797, 0.010233, 0.0705434, 0.00259656, 0.0712719, 0.0468567, - 0.00622382, -0.0110342, -0.026088, 0.0169622, 0.036032, 0.00953248, 0.00938651, 0.0240754, - 0.00729027, -0.0263141, -0.0345428, -0.00845764, 0.0462167, 0.0211959, 0.0531272, 0.0379018, - 0.0424938, 0.0160658, -0.00649713, 0.021857, 0.0325163, -0.0139418, 0.00759465, 0.0524858, - -0.0168994, 0.0164893, 0.022728, 0.0323317, 0.0331378, 0.00548303, -0.0425947, -0.0101325, - -0.0124091, -0.00910286, -0.00862779, -0.049988, 0.0218122, -0.0166035, 0.0570387, -0.0150303, - -0.0109328, 0.0141641, 0.0296191, 0.00220599, 0.00667076, 0.00647957, 0.00102784, -0.02686, - -0.0170128, 0.019061, 0.00824237, 0.0392189, 0.00182692, 0.03255, 0.0341041, 0.0186872, - 0.000108326, -0.00739809, -0.0118376, 0.00302759, 0.00874007, 0.0298719, 0.0378712, 0.0260831, - 0.0143321, 0.0357566, -0.0302584, -0.0210763, -0.00892332, -0.0329427, -0.0798826, -0.0461567 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p26(hatfit_yaw00_lev2_p26); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p26_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p27.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p27.mh deleted file mode 100755 index 5225077..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p27.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p27.mh: - -#ifndef stasm_hat_yaw00_lev2_p27_mh -#define stasm_hat_yaw00_lev2_p27_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p27(const double* const d) // d has 160 elements -{ - const double intercept = -0.306931; - const double coef[160] = - { - 0.0262349, -0.0455742, -0.0345448, 0.0296043, -0.0368644, 0.105961, 0.0917271, -0.0349775, - -0.0118083, 0.00226836, 0.0315588, 0.0651592, 0.0192105, 4.45677e-05, 0.0111032, -0.0301818, - -0.0235868, -0.026485, -0.00434409, 0.0180196, 0.0351823, 0.0192955, 0.0241057, -0.0337034, - 0.00146458, -0.019946, -0.00849322, -0.0249317, 0.00794208, 0.00548202, 0.0600154, 0.0171288, - 0.00478391, 0.0128435, 0.0206005, -0.0152299, -0.00785918, -0.000263394, 0.0517713, 0.0416178, - -0.0400955, -0.0371783, 0.0589854, 0.0327506, -0.0189932, -0.0248052, -0.0847246, -0.0425839, - -0.0294927, 0.00193715, 0.0270183, -0.0242868, -0.02323, -0.0221412, -0.0299839, -0.0253512, - 0.0019324, 0.032574, 0.011557, -0.0437154, -0.0286583, -0.028798, 0.0130759, -0.00196222, - 0.00783066, 0.0246079, 0.0314151, -0.0433835, -0.0152253, -0.00376657, 0.0137829, -0.0141508, - -0.0185663, -0.0270969, 0.0763604, 0.032464, -0.00457786, -0.00714493, -0.00839772, -0.0471893, - -0.0304596, 0.0113046, -0.0575614, -0.04895, -0.0555437, -0.0118463, -0.0287419, -0.0226617, - 0.0476703, 0.0541762, -0.0129649, -0.0181623, -0.00457971, 0.0050365, 0.048555, 0.0856549, - 0.00916771, 0.0128563, 0.00436323, -0.00929648, 0.00355898, -0.0264574, 0.0298014, 0.048906, - 0.00256579, -0.0139028, 0.0214163, 0.0158788, 0.0410612, -0.0213137, 0.0133411, 0.0239583, - 0.0212723, -0.014747, -0.0303819, -0.00101849, 0.0202947, -0.00473982, 0.000768866, 0.0634918, - 0.0272171, 0.0606848, -0.0083977, 0.0323225, 0.00269824, 0.0622742, -0.0492059, 0.0108266, - -0.0245984, -0.00360764, 0.0335002, 0.0621516, 0.0580589, 0.0152602, 0.062728, 0.00257798, - 0.00265603, -0.0211292, -0.00126619, 0.0229256, 0.0381987, -0.00541837, 0.02072, -0.0247069, - -0.00978707, 0.00263283, -0.00619977, -0.0417827, 0.00227379, -0.0141621, 0.0218684, -0.0106956, - -0.0028489, 0.0407164, 0.00786468, 0.00379042, 0.0117465, -0.002769, 0.00417461, 0.00823767 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p27(hatfit_yaw00_lev2_p27); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p27_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p28.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p28.mh deleted file mode 100755 index 6f76b98..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p28.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p28.mh: - -#ifndef stasm_hat_yaw00_lev2_p28_mh -#define stasm_hat_yaw00_lev2_p28_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p28(const double* const d) // d has 160 elements -{ - const double intercept = -0.911282; - const double coef[160] = - { - 0.0238533, 0.0397944, -0.00203305, -0.0376938, -0.0576054, 0.0102932, -0.00350282, -0.0347154, - 0.0114035, 0.0375278, 0.0576787, -0.011191, -0.00113305, -0.00862682, 0.015185, -0.00437239, - 0.0307686, 0.0196598, 0.0440094, -0.0379801, -0.0141113, -0.0120627, 0.0393276, 0.0134787, - 0.0370115, 0.000457543, 0.0603269, -0.00987555, 0.0105079, -0.00996932, 0.019966, 0.0060897, - 0.0304525, -0.0284774, 0.0406466, 0.0226233, -0.00374561, -0.00344988, -0.0165723, 0.00456927, - 4.77179e-05, -0.0215519, -0.0611072, -0.0461596, -0.0359187, 0.00475347, 0.0589447, 0.0603199, - 0.015611, 0.0302667, 0.012469, -0.0101909, 0.0232281, -0.058931, 0.0315346, 0.0487677, - -0.0218948, 0.0241924, 0.0431596, 0.00191124, 0.0400794, -0.0415914, 0.00944237, 0.000643755, - -0.032809, 0.013452, 0.0403323, 0.0361078, 0.0355794, -0.0115256, -0.037264, -0.031884, - -0.042228, -0.0211665, -0.0310247, -0.0319164, 0.00456799, 0.0271444, 0.0618117, 0.0108998, - -0.0234185, 0.0129911, 0.00094152, 0.0555492, 0.0407842, 0.0751483, -0.00163825, -0.0359983, - -0.062111, -0.018929, 0.0249147, 0.00943173, 0.0418229, -0.00747328, 0.0690318, -0.0227955, - -0.0198671, -0.00218184, 0.0446939, 0.00229586, 0.053604, -0.0153666, 0.0320683, 0.0248043, - 0.00287477, 0.00778391, 0.0331717, 0.00229524, 0.00562737, 0.0154625, 0.0164591, 0.0400992, - 0.0425685, 0.000193887, 0.00597018, -0.0136202, -0.00538856, 0.0131999, 0.0261254, 0.123714, - 0.0643788, 0.0452873, 0.0716094, 0.159596, 0.0741898, 0.056755, 0.0376108, 0.0507256, - 0.0697902, -0.0516756, 0.0169421, 0.0447843, 0.0417189, 0.00326605, 0.00592841, -0.0132248, - 0.0556151, 0.0180181, -0.0209075, -0.0826685, -0.0280024, 0.025601, -0.00580471, -0.0237519, - 0.00913779, 0.0706989, 0.0126799, 0.00300497, -0.00981312, -0.0168915, -3.9095e-05, -0.0625823, - -0.00544378, 0.0403442, 0.0135646, 0.0797236, 0.0384641, 0.0289419, 0.0494675, -0.00505185 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p28(hatfit_yaw00_lev2_p28); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p28_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p29.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p29.mh deleted file mode 100755 index 2fe1275..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p29.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p29.mh: - -#ifndef stasm_hat_yaw00_lev2_p29_mh -#define stasm_hat_yaw00_lev2_p29_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p29(const double* const d) // d has 160 elements -{ - const double intercept = -1.05057; - const double coef[160] = - { - 0.0182463, -0.0164278, 0.0793519, 0.0203683, 0.0103424, -0.00468872, 0.00376642, 0.00789167, - 0.0365452, -0.0296432, 0.0316379, 0.0281642, 0.0264598, 0.00896892, 0.0389974, 0.00696295, - 0.0210673, -0.0165715, 0.0249197, 0.0415189, 0.0234516, 0.0039805, 0.0282824, 0.019377, - 0.0136788, 0.0078962, 0.0400487, 0.0247874, 0.0484899, -0.00169232, 0.0157129, 0.00810864, - 0.00254052, 0.004636, 0.0127591, 0.023789, 0.00420449, -0.0383569, -0.0112375, 0.0181937, - 0.0123328, -0.00178604, -0.0273803, -0.0125259, -0.00871021, 0.00392074, 0.0347972, -0.00844315, - 0.0058953, 0.0156757, 0.029977, 0.014578, 0.00275342, 0.000159312, -0.00132859, -0.0674545, - -0.0131045, -0.0125819, 0.0371212, 0.0165592, 0.0301665, 0.0350271, 0.0262243, -0.0768821, - -0.0251874, -0.00765544, 0.0265035, 0.022286, 0.0165599, 0.0398895, 0.0171191, -0.00820294, - -0.0258373, -0.0408784, -0.0487514, -0.0316219, 0.0193729, 0.05273, 0.0415007, 0.0334458, - 0.00916367, 0.00382008, 0.0153757, 0.00359487, -0.0514642, 0.0857362, 0.0547107, 0.00137235, - 0.0347672, 0.00346709, 0.00981953, 0.0124956, -0.00603081, -0.0447948, 0.0584001, -0.0200425, - 0.0510406, 0.031761, 0.0119073, -0.0177227, -0.041249, -0.0484298, 0.0517662, 0.0266991, - 0.0669104, 0.0763834, 0.0368872, 0.0240411, 0.0134583, -0.0205295, 0.0445935, 0.0713025, - 0.0204831, 0.0253047, -0.0104218, -0.0282662, -0.0465509, 0.013753, -0.0597406, 0.0126048, - 0.0241487, 0.0263117, 0.034671, 0.116738, 0.0671411, 0.00670641, 0.042299, 0.0235448, - 0.0144205, -0.0647902, 0.0507454, 0.00526156, 0.0375987, 0.00463127, -0.0314179, -0.0293136, - 0.0496903, 0.0400285, -0.0293638, -0.0647404, 0.0175175, 0.0611509, 0.0215046, 0.0172993, - -0.0101004, 0.0569459, -0.00413199, 0.0193916, 0.0152643, 0.00874664, -0.0093991, -0.0254695, - -0.00236696, 0.0810356, 0.085522, 0.09974, 0.0918543, 0.0265118, 0.081347, 0.0256086 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p29(hatfit_yaw00_lev2_p29); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p29_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p30.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p30.mh deleted file mode 100755 index 6244251..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p30.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p30.mh: - -#ifndef stasm_hat_yaw00_lev2_p30_mh -#define stasm_hat_yaw00_lev2_p30_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p30(const double* const d) // d has 160 elements -{ - const double intercept = -0.158421; - const double coef[160] = - { - -0.00843022, 0.013809, -0.00794464, -0.0280121, -0.0255196, -0.0195118, 0.075042, 0.0257987, - 0.02871, 0.014171, -0.0372592, -0.0380695, -0.0431202, 0.0171225, 0.022328, 0.055504, - 0.0265488, -0.0289131, -0.0281819, -0.0412153, -0.0759227, -0.0295684, 0.0107261, 0.0315409, - 0.0272802, -0.0116362, 0.0206321, 0.0109335, -0.0183937, -0.0122625, -0.0481045, 0.0309332, - 0.0608065, 0.024013, 0.0347018, -0.00428828, -0.0368289, -0.0443961, -0.136547, 0.0201979, - 0.0855011, 0.0571143, -0.0375799, 0.016459, 0.047898, 0.0619319, -0.00773834, 0.0441075, - 0.0146869, 0.0451598, 0.0725738, 0.132561, 0.101115, 0.0209962, 0.0323263, -0.0114213, - 0.0252005, 0.0741543, -0.0264473, 0.0168047, 0.00380724, 0.025259, 0.0513686, 0.0286347, - -0.0300812, 0.0154615, 0.0249453, 0.0434057, 0.0262186, 0.00797694, 0.0215338, -0.0195746, - 0.0452787, -0.00701455, -0.0229841, 0.0159123, -0.00454588, -0.0185701, -0.0208287, -0.097003, - -0.031168, 0.0169527, -0.0343204, -0.0604752, -0.0506117, -0.00868898, 0.0581987, 0.0346967, - -0.0299566, -0.0487133, 0.0231685, -0.0172943, -0.0444626, -0.0258802, -0.0260437, 0.00632427, - -0.0239597, -0.00391656, 0.0107738, -0.00493213, -0.000692711, 0.0458643, -0.0185572, 0.00836634, - -0.0305402, 0.0256927, 0.00675199, 0.0139364, 0.0439735, 0.0283794, -0.0130652, 0.00275794, - 0.0312156, 0.0296386, -0.0355726, -0.0134245, -0.020942, 0.00984381, -0.00773278, -0.023931, - -0.0300758, -0.0669045, -0.0276446, -0.00646776, -0.00236777, 0.0540602, -0.016052, -0.0336337, - -0.0154917, 0.00563903, 0.0243744, -0.00992392, 0.0268612, 0.00221559, -0.0196216, -0.0194976, - -0.0281026, 0.0153356, 0.0276602, 0.00143168, 0.0411615, -0.0150804, -0.00796113, -0.00828842, - -0.0284587, 0.0130893, 0.0282914, 0.0170294, -0.0129933, -0.0233002, 0.00116514, -0.0143735, - -0.025027, 0.0174324, -0.0541421, -0.0264543, -0.0165433, 0.00211273, 0.0148214, -0.0422046 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p30(hatfit_yaw00_lev2_p30); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p30_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p31.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p31.mh deleted file mode 100755 index 23c14ba..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p31.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p31.mh: - -#ifndef stasm_hat_yaw00_lev2_p31_mh -#define stasm_hat_yaw00_lev2_p31_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p31(const double* const d) // d has 160 elements -{ - const double intercept = -0.528655; - const double coef[160] = - { - -0.066406, -0.0431597, 0.0637768, 0.0370243, -0.00068307, -0.0259349, 0.0159448, -0.136056, - -0.0293552, -0.0403311, 0.0230454, 0.0283, 0.0388175, 0.046244, 0.04128, -0.00817411, - -0.0405367, -0.0406695, 0.0112241, 0.0182357, 0.0367736, 0.0285879, -0.00759859, -0.00266288, - -0.00139768, -0.0344043, 0.00392997, 0.0241541, 0.0412715, 0.0280483, 0.0292519, 0.0165686, - -0.00435702, -0.0265016, -0.0453606, -0.00250928, 0.0196911, 0.00655709, -0.0367992, 0.0509089, - 0.031559, 0.00575523, -0.0247191, -0.0486219, -0.0750928, -0.00041327, 0.0747566, 0.0146888, - 0.0646145, 0.054396, -0.0192251, -0.0412112, -0.0324459, -0.0705477, 0.0119363, 0.0347726, - 0.106872, 0.102241, 0.0271929, 0.00171756, -0.0470992, 0.00978825, 0.0508835, 0.0792254, - 0.0360194, 0.0367165, -0.0314265, -0.044109, -0.0814634, -0.0126653, 0.0191743, 0.0371767, - -0.0164398, 0.0210203, 0.0384518, 0.0141576, -0.0197071, -0.0172753, -0.101494, -0.0619908, - 0.0851666, -0.0212017, 0.0488603, 0.0448861, 0.118305, 0.0508748, -0.0450723, 0.0224068, - 0.0187996, 0.0203916, -0.0541929, -0.055438, -0.0193445, 0.0425345, -0.00569827, -0.0287024, - -0.0268724, 0.0050541, 0.0470904, 0.103708, 0.10632, 0.0373919, -0.00797826, -0.0303334, - 0.0272002, 0.0300674, 0.0210971, 0.0667653, 0.0624621, 0.0579313, 0.0607208, 0.0280428, - 0.00218957, 0.0585137, -0.00491464, 0.0042163, -0.00801497, 0.00611642, 0.00430601, -0.000424544, - -0.0332441, 0.000448628, 0.107588, -0.0215919, -0.0459838, -0.0180594, -0.00837773, 0.0129875, - -0.0322999, 0.0200498, -0.0108524, -0.0415339, 0.00357464, 0.0119421, 0.00847187, 0.0184128, - -0.0147528, -0.0172094, 0.00718621, -0.0272791, -0.0360428, 0.000881667, 0.018738, 0.0129722, - -0.033975, -0.0226858, 0.0149901, -0.00787227, 0.0079924, -0.0160559, -0.0223671, 0.0172656, - -0.0396059, 0.0749142, -0.00781715, -0.0241655, 0.0206719, 0.0288847, 0.00349044, 0.000974065 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p31(hatfit_yaw00_lev2_p31); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p31_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p32.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p32.mh deleted file mode 100755 index b26c2d0..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p32.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p32.mh: - -#ifndef stasm_hat_yaw00_lev2_p32_mh -#define stasm_hat_yaw00_lev2_p32_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p32(const double* const d) // d has 160 elements -{ - const double intercept = -0.609531; - const double coef[160] = - { - 0.0172974, -0.0195856, 0.0167722, 0.00276741, -0.00863195, -0.00587176, -0.00695058, 0.00103168, - 0.0252518, -0.00719318, 0.0691906, 0.0363376, 0.0383578, 0.00307675, -0.000676522, -0.024943, - -0.0442041, -0.0318909, 0.034783, 0.0447597, 0.0655272, 0.0380396, -0.00974726, -0.0836417, - -0.0233229, -0.039634, 0.0247777, 0.0296812, 0.0518156, 0.0525699, 0.0183891, -0.0139419, - -0.020914, -0.0524356, -0.0490225, 0.00449505, 0.0358374, 0.0320777, 0.0296459, 0.0310532, - -0.0330381, -0.00897001, -0.00230202, -0.0116356, -0.0561876, 0.0508519, 0.0528285, -0.0220447, - -0.0139597, 0.00648959, -0.0200131, -0.0142853, -0.0548651, -0.0256694, 0.0602749, -0.0456561, - 0.0398712, 0.0362381, 0.0279318, -0.028746, -0.0830828, -0.0523895, 0.0622793, 0.0371123, - 0.0490164, 0.0442704, 0.00661728, -0.00335947, -0.0317967, -0.0174821, 0.0718556, 0.0818157, - 0.0211283, 0.02002, -0.0133365, -0.026983, -0.0673874, 0.0154517, -0.063193, -0.00218304, - 0.0374297, 0.0487677, 0.0544543, 0.0878194, 0.0336702, 0.0359337, 0.0358279, -0.0204046, - 0.0455341, -0.0529557, 0.00531201, 0.0209168, 0.0554839, 0.00579068, -0.0201319, -0.0282061, - 0.0528097, 0.00506556, -0.057539, -0.0366376, 0.0122283, 0.040994, -0.021031, 0.0168281, - 0.00323699, 0.0498915, -0.00517948, 0.0202621, 0.0198603, -0.00465672, -0.0212471, -0.0241135, - 0.0386897, 0.0834197, 0.0564583, 0.0766421, 0.0567623, 0.0541306, 0.038094, 0.006473, - 0.00720124, 0.00299913, 0.00695718, 0.0279686, 0.00285145, -0.0329046, -0.0212397, 0.0685372, - 0.0195813, -0.0237838, 0.0724148, 0.00519205, 0.0182673, 0.00552493, 0.00626116, 0.0171959, - -0.00884863, 0.0247297, 0.0399036, -0.0589063, 0.00735654, 0.014987, 0.00327186, -0.0123504, - -0.0107126, -0.00717319, -0.0262902, -0.0281028, 0.00582021, 0.0159987, 0.0436614, 0.0026328, - -0.0659616, 0.0210302, 0.0281372, 0.0251827, 0.0175415, -0.00426784, -0.0135234, 0.0161755 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p32(hatfit_yaw00_lev2_p32); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p32_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p33.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p33.mh deleted file mode 100755 index 545ff33..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p33.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p33.mh: - -#ifndef stasm_hat_yaw00_lev2_p33_mh -#define stasm_hat_yaw00_lev2_p33_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p33(const double* const d) // d has 160 elements -{ - const double intercept = -0.134494; - const double coef[160] = - { - 0.00347821, -0.012647, -0.0365701, -0.0502767, -0.0744315, 0.043386, -0.0109632, 0.0408712, - 0.0179905, 0.012047, 0.00764653, 0.0153773, -0.00873694, -0.0365147, -0.0151809, 0.00267504, - -0.0168584, -0.0186926, 0.0209671, -0.00799703, -0.00927319, -0.0278799, -0.00988936, -0.0523256, - -0.0294883, -0.00538619, 0.068079, 0.0330258, 0.0310367, -0.0115363, 0.0173, -0.0956444, - -0.057032, -0.064803, -0.0476392, -0.00186673, 0.0208305, 0.0656317, 0.076984, -0.00418163, - -0.0342102, -0.0295482, -0.0482665, -0.00800121, 0.00782046, 0.0959585, 0.00216746, -0.032154, - 0.00264983, 0.00756613, 0.0352023, -0.0055577, -0.0268146, 0.0481587, 0.0554458, 0.0308655, - 0.00604261, 0.0099717, 0.0418676, 0.0370696, -0.0259611, 0.00845801, 0.0177592, -0.053832, - 0.0574967, -0.00604871, -0.0470008, -0.03597, -0.0512817, -0.0258823, 0.0508364, 0.0315381, - 0.0494617, 0.0662095, 0.0300199, -0.00536518, -0.0187981, -0.0615925, 0.0101557, 0.0309746, - 0.00546111, 0.0467793, 0.0561231, 0.0115831, 0.044103, 0.0122641, -0.0163395, 0.0139846, - -0.00558476, -0.00304077, -0.0153255, 0.0488837, 0.0226645, 0.00507803, -0.00177007, 2.87077e-05, - 0.0540572, -0.0334947, 0.0243881, 0.0453923, 0.0752189, -0.00790317, -0.0371975, -0.022949, - 0.013664, -0.0464787, -0.0117823, -0.0402601, 0.0423795, 0.0570048, -0.0240886, -0.0248997, - 0.00782879, 0.0796069, -0.0435097, 0.00644649, 0.0344214, 0.050919, 0.00223326, -0.0633793, - -0.0164302, 0.0151376, 0.0285752, 0.0378886, -0.0433041, -0.0629131, -0.0664811, -0.01045, - 0.00204687, 0.00533082, -0.0442703, -0.0276485, -0.0263146, 0.00585577, 0.041874, 0.0404161, - 0.0136317, -0.00439693, 0.0465754, 0.0266685, -0.0134835, -0.0163303, 0.0257163, 0.0497645, - -0.0267151, -0.00359233, 0.0465391, -0.052706, -0.0343048, -0.054638, -0.0428177, -0.0114796, - -0.0324168, 0.0278659, 0.0114471, -0.0448499, -0.00375096, 0.0193088, 0.00295261, 0.0724012 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p33(hatfit_yaw00_lev2_p33); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p33_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p34.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p34.mh deleted file mode 100755 index 9f03ee3..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p34.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p34.mh: - -#ifndef stasm_hat_yaw00_lev2_p34_mh -#define stasm_hat_yaw00_lev2_p34_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p34(const double* const d) // d has 160 elements -{ - const double intercept = -0.0298145; - const double coef[160] = - { - -0.00712763, -0.0168461, -0.0649287, -0.0964368, -0.0396287, 0.0355124, -0.0932723, -0.0232354, - 0.0015701, 0.000841849, -0.0528588, -0.0779626, -0.0767684, 0.0536808, 0.021654, 0.0115116, - -0.0244025, 0.0129733, 0.00882587, -0.0296528, -0.0752668, 0.0202583, 0.0284596, 0.0038893, - 0.0131413, 0.0202238, 0.0632173, 0.00876749, -0.00538983, 0.00914925, 0.0317333, -0.0110394, - 0.0197249, -0.0156403, -0.0123602, -0.00436375, -0.0205289, -0.0380516, 0.0528582, -0.0722589, - 0.00167284, -0.0296978, -0.0278581, 0.0860811, 0.109771, -0.0337156, -0.0290938, -0.000718443, - -0.0306613, 0.0175718, 0.0508415, 0.0882596, 0.0906046, 0.0451894, 0.0249118, 0.0101467, - 0.0197867, 0.0163201, 0.0461364, 0.0497436, 0.0735869, 0.0261005, 0.0272832, 0.00319717, - 0.0133939, -0.033167, 0.0138665, 0.076355, 0.0436984, -0.0193582, 0.00494415, 0.00794336, - 0.0402147, -0.0356436, -0.0325444, -0.0406939, 0.0445568, 0.0529566, -0.0480436, -0.0361198, - 0.0239785, -0.022601, 0.004583, 0.0357781, -0.024916, -0.0673301, 0.0300021, 0.0233541, - 0.00131507, 0.020674, -0.0172261, -0.0378908, -0.0281607, -0.0362968, -0.0120887, 0.00251283, - -0.0151418, 0.0139788, 0.00226799, -0.0405325, -0.0372183, -0.0239591, 0.000689374, 0.00728419, - 0.0109032, 0.00117639, 0.0110613, 0.0284659, -0.00405134, 0.0224151, 0.0497437, 0.024467, - -0.0197926, 0.0191099, 0.0560234, -0.015999, 0.00349098, -0.0136769, -0.00855267, 0.0378745, - -0.0402489, 0.0187419, 0.00346364, 0.00200766, -0.051981, 0.0314351, -0.0370516, -0.031647, - 0.00269862, -0.0117079, -0.0113778, 0.0323024, 0.000887866, 0.0206333, 0.00573009, 0.0182514, - 0.0140522, -0.00215495, 0.00969224, 0.0445658, -0.0164545, 0.00403198, -0.0327273, 0.00355842, - 0.00186056, -0.0365137, 0.001591, -0.0147659, -0.0152249, -0.028393, -0.0295118, 0.00309647, - 0.0177405, -0.022215, 0.0110218, -0.0373177, -0.0264965, 0.0153762, -0.0577899, -0.0217735 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p34(hatfit_yaw00_lev2_p34); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p34_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p35.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p35.mh deleted file mode 100755 index d1cc4ef..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p35.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p35.mh: - -#ifndef stasm_hat_yaw00_lev2_p35_mh -#define stasm_hat_yaw00_lev2_p35_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p35(const double* const d) // d has 160 elements -{ - const double intercept = -0.0569861; - const double coef[160] = - { - -0.0452166, -0.00120985, -0.0642733, -0.0433011, -0.0143067, 0.187839, -0.00428658, -0.00650242, - 0.0394361, 0.0211488, 0.0687109, 0.000483339, -0.0199071, 0.0220808, 0.0780823, 0.0556368, - 0.0586077, -0.0237231, 0.030264, 0.0372592, 0.0211708, -0.00451533, -0.0238338, -0.0808726, - 0.0375287, -0.0425377, -0.0537355, -0.0160995, 0.0191792, 0.0143375, 0.0323217, -0.0160405, - 0.0641634, 0.041519, -0.0194647, 0.00845982, -0.00460267, -0.00117591, 0.00773437, 0.00707627, - 0.0137806, 0.0537537, 0.116498, 0.0836869, 0.042555, -0.128439, -0.0448244, -0.0201245, - -0.0354514, -0.0320875, -0.0596862, 0.0322179, 0.0248905, 0.00867726, 0.0026904, 0.00215038, - 0.0176725, -0.0278685, 0.0647107, 0.0700868, 0.0723984, 0.013583, 0.0189065, 0.0296625, - -0.0125392, -0.0363014, 0.0524765, -0.0592515, -0.00260219, -0.00356819, -0.0465201, 0.00398317, - -0.0148738, 0.0892113, -0.00931875, -0.0290633, 0.0459755, 0.0466378, 0.0537626, 0.0155148, - 0.00157531, -0.0144777, -0.0566745, -0.0333648, -0.0635901, -0.00229455, -0.0108516, 0.0337369, - 0.0213568, 0.0212246, 0.0134308, -0.0349036, -0.0518544, 0.00736802, 0.00410732, -0.00219179, - 0.00875987, -0.00275223, 0.00445113, -0.0208322, -0.0406893, -0.0105535, 0.0171398, 0.0333355, - 0.0272341, 0.016625, -0.0150876, -0.0448088, -0.0305251, -0.00475766, 0.0282755, 0.0229124, - -0.0562676, -0.00235707, 0.00318367, -0.0375074, -0.036737, -0.0121753, -0.0456456, 0.0088149, - -0.0129207, -0.00481494, 0.0121743, 0.0636755, -0.00218512, -0.0264368, -0.0426944, -0.0331295, - -0.000268162, -0.0303325, -0.0100597, 0.0201173, -0.0187584, -0.0106597, -0.0162527, 0.00213507, - 0.000782108, -0.0446817, 0.0291512, -0.00622929, -0.032462, -0.00722358, -0.015956, -0.017508, - -0.00442869, -0.0616177, 0.00842057, -0.0221374, 0.00273545, 0.0370507, -0.0110599, -0.00349913, - -0.0150104, -0.00249232, 0.0607886, 0.00642015, 0.0137252, -0.00537359, -0.0407976, -0.0264226 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p35(hatfit_yaw00_lev2_p35); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p35_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p36.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p36.mh deleted file mode 100755 index cfe7474..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p36.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p36.mh: - -#ifndef stasm_hat_yaw00_lev2_p36_mh -#define stasm_hat_yaw00_lev2_p36_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p36(const double* const d) // d has 160 elements -{ - const double intercept = -0.15802; - const double coef[160] = - { - 0.0486285, 0.0186809, 0.0610722, 0.0591576, 0.0388397, 0.0574882, 0.0641434, 0.0121667, - 0.0637028, -0.0778575, 0.0320216, 0.00871883, 0.0568133, -0.0225462, -0.015418, -0.0783217, - 0.0842919, -0.0221539, -0.0830029, -0.0634517, -0.0171046, 0.0330657, -0.00201285, 0.0145844, - 0.0509864, 0.0483077, -0.019694, -0.00253477, 0.00980955, -0.0071178, -0.00909895, 0.0133682, - 0.0367686, 0.0816382, 0.0405787, 0.0708277, 0.0300118, 0.0263414, 0.0264027, 0.0197782, - 0.0128342, 0.013998, 0.0557143, 0.0705258, 0.0274475, -0.0401644, -0.0111443, 0.0419802, - -0.0182621, -0.0129423, 0.0528886, 0.0155429, 0.0246531, -0.000775137, 0.00772486, 0.0353004, - -0.0283473, 0.0586058, 0.0423699, -0.0620206, 0.0120028, 0.0105429, 0.0076168, 0.00933035, - -0.0370865, 0.0248185, -0.0452911, -0.0178737, -0.00556646, 0.0268091, 0.0552079, 0.0282525, - -0.0621828, 0.0145903, 0.0643291, 0.0572874, 0.0105461, -0.0216231, -0.0403918, -0.0157246, - 0.0215985, -0.0416195, -0.0175289, -0.0418673, -0.0733202, 0.019949, -0.00658043, 0.0100759, - 0.0164112, -0.00890375, 0.00470579, -0.0475732, -0.0369, 0.00252177, 0.0184815, -0.00362862, - 0.0292086, -0.0130186, -0.0116424, -0.0283327, -0.0278432, 0.0182052, 0.0289034, 0.0470675, - -0.00995198, -0.0356322, -0.000162729, -0.0194088, -0.00831224, -0.00612526, -0.0350988, -0.0230069, - -0.0117491, -0.000818398, 0.015496, -0.0512162, -0.0297679, -0.00224479, -0.0714257, -0.0113509, - -0.043043, -0.0334773, 0.0407909, 0.0321586, -0.00719895, -0.0271855, -0.0296371, -0.0375253, - -0.000821446, -0.0586061, 0.0237793, -0.0243459, -0.00034366, 0.00762769, -0.00338772, 0.0103057, - -0.0559739, -0.0361567, 0.0295625, -0.0245679, 0.0341336, 0.0163618, -0.0120698, -0.034086, - -0.00365451, 0.00950689, 0.021756, -0.000354534, 0.0156633, 0.0315098, -0.00492233, 0.0151073, - -0.0510463, 0.0232019, 0.0325111, 0.0112793, 0.0388108, -0.0584284, -0.00696607, 0.000317936 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p36(hatfit_yaw00_lev2_p36); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p36_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p37.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p37.mh deleted file mode 100755 index 0998e72..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p37.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p37.mh: - -#ifndef stasm_hat_yaw00_lev2_p37_mh -#define stasm_hat_yaw00_lev2_p37_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p37(const double* const d) // d has 160 elements -{ - const double intercept = -0.357641; - const double coef[160] = - { - 0.090426, -0.0479457, -0.0400332, -0.0212107, 0.0130497, 0.0347203, 0.0603362, -0.00201685, - 0.0617162, 0.0154297, -0.0587526, -0.0498464, -0.0406109, -0.0444513, -0.0101726, 0.00113316, - 0.0643447, 0.0712631, 0.0518715, 0.0514074, 0.0424869, 0.0176295, -0.000344309, 0.0428262, - 0.0942759, 0.0405735, -0.0464468, -0.0186385, -0.0142453, -0.00193271, 0.0862762, 0.081217, - -0.016825, 0.0197965, 0.0147129, 0.0161728, -0.0757111, -0.0559225, -0.115652, -0.0622848, - -0.00501507, 0.0123832, 0.15875, 0.0352441, 0.0686156, -0.00259391, -0.00970851, 0.0319497, - 0.0172795, 0.0454753, -0.0590746, -0.0806317, 0.00137259, 0.049291, 0.0217576, 0.0280549, - -0.0351055, 0.0234457, 0.0331394, 0.0432127, 0.0247829, 0.0144538, 0.0285027, 0.00046848, - -0.0448116, 0.0182161, 0.0592176, 0.0918027, 0.0649448, 0.0105857, -0.0196588, 0.00406895, - 0.0034925, 0.0990291, -0.0319524, -0.00638724, 0.00562423, 0.0447108, 0.0227806, 0.014012, - -0.0143819, -0.0158124, -0.0378926, -0.0673686, -0.0649373, 0.00224931, 0.0333127, 0.0316347, - -0.0234361, 0.00150827, -0.0153644, -0.0250532, -0.00597671, -0.0067867, 0.018995, 0.0223197, - -0.0146966, -0.0435748, -0.00637642, -0.0419609, -0.0532878, -0.0176804, -0.0263347, -0.0276614, - 0.0162287, -0.00532958, -0.015642, -0.0538278, -0.025124, -0.0130719, -0.0193754, 0.0287796, - -0.0413712, 0.0480701, 0.0441385, 0.00548393, 0.00292707, 0.0269691, -0.0504128, -0.00968982, - -0.0149377, -0.0761418, 0.0646164, -0.013872, 0.0254016, 0.0211067, -0.0213354, -0.0101183, - -0.00769239, -0.018979, 0.0195936, 0.00275689, 0.0226773, 0.0528095, 0.00701476, -0.000215039, - -0.0385599, 0.0166449, 0.0279211, 0.0131107, 0.0463374, 0.0352633, -0.0267223, -0.00659304, - -0.0239268, 0.00596462, 0.064236, 0.0534211, 0.0618139, -0.00417547, 0.0169228, 0.00955138, - -0.0356719, -0.0140551, -0.0375888, -0.00973585, -0.00167822, -0.0297079, -0.0161585, -0.0314359 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p37(hatfit_yaw00_lev2_p37); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p37_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p38.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p38.mh deleted file mode 100755 index d13a2f3..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p38.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p38.mh: - -#ifndef stasm_hat_yaw00_lev2_p38_mh -#define stasm_hat_yaw00_lev2_p38_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p38(const double* const d) // d has 160 elements -{ - const double intercept = -0.376783; - const double coef[160] = - { - -0.0381625, -0.0216802, -0.0155914, -0.0404376, -0.0631582, 0.0381639, 0.0377976, -0.0516102, - -0.028152, -0.0202302, 0.0302485, 0.00262319, -0.0207045, -0.0417396, 0.0787168, -0.0787154, - -0.0329266, -0.0189142, 0.000370531, -0.00575274, -0.0277813, -0.0345295, 0.0621677, -0.0119504, - 0.0166243, 0.0148557, 0.0187655, 0.0119691, 0.0209956, 0.000136722, 0.0679876, 0.0596953, - -0.0173308, -0.0304385, -0.0195675, -0.00678459, -0.058364, 0.00845924, -0.0914828, -0.0269946, - 0.0442164, 0.0218957, 0.0834356, 0.0923645, 0.0542928, 0.0437193, 0.00909546, 0.00658516, - 0.0595327, -0.0285361, -0.0120236, 0.0127215, 0.0471597, 0.00693775, -0.0502759, -0.00219912, - 0.0692, 0.0115397, -0.0597431, -0.0345065, 0.00897436, 0.0644876, -0.00529858, 0.0172422, - 0.0592641, 0.0368146, -0.0170227, 0.000427752, -0.0220798, -0.002191, -0.0154746, -0.0168699, - 0.0352867, 0.111853, 0.0565004, 0.0728899, 0.0717551, 0.033416, 0.048564, 0.00220777, - 0.031206, 0.0294133, -0.00374811, 0.0601965, 0.0488322, -0.0252048, 0.0418437, 0.0539204, - -0.00425075, -0.0373638, 0.0889858, -0.00515388, -0.00512685, -0.0250974, -0.00357214, 0.00699725, - -0.038465, 0.0384146, 0.0125729, -0.0497535, 0.0188856, 0.00873619, 0.0314734, 0.0134863, - -0.0273422, 0.032113, -0.0321483, 0.0119197, 0.0338809, 0.0323335, 0.0534044, 0.0411907, - -0.0332367, 0.0126317, 0.0531453, 0.0720893, 0.00242768, 0.00830297, -0.00492567, 0.0257998, - 0.0186504, -0.0333308, 0.0421134, 0.00815198, -0.0375097, 0.0125134, -0.0599385, 0.000119946, - 0.00751917, -0.019638, 0.00632028, -0.0359062, -0.0111683, 0.00175841, -0.00667292, 0.00282321, - -0.0037453, -0.0103999, 0.00707973, -0.0368289, -0.00472334, 0.00666663, -0.017547, 0.000420025, - -0.0198019, -0.038683, 0.00103139, -0.0286226, -0.00983428, 0.00971842, -0.0108167, -0.0309264, - -0.019254, 0.00464451, 0.0170737, -0.0466007, -0.0101921, -0.019542, -0.0446412, -0.0198669 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p38(hatfit_yaw00_lev2_p38); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p38_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p39.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p39.mh deleted file mode 100755 index 87acb56..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p39.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p39.mh: - -#ifndef stasm_hat_yaw00_lev2_p39_mh -#define stasm_hat_yaw00_lev2_p39_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p39(const double* const d) // d has 160 elements -{ - const double intercept = -0.175478; - const double coef[160] = - { - -0.0340044, 0.0102974, -0.0326885, -0.027898, -0.0574698, 0.0218861, -0.0295587, -0.0136835, - -0.0670967, -0.00859483, 0.01472, -0.0127685, -0.00715043, -0.0560974, 0.095579, -0.0138027, - -0.0477498, -0.0188489, 0.0206146, -0.0341245, -0.0114705, -0.0814169, 0.067814, 0.0128964, - -0.0372988, -0.00688147, 0.0535055, 0.0309127, 0.0136957, -0.00924958, -0.0222743, 0.000739304, - 0.00947217, -0.0633822, -0.0394817, -0.0256672, -0.0301259, 0.0126494, 0.033581, 0.0792859, - 0.0625707, 0.0213443, 0.0645021, 0.132729, 0.103496, 0.0360967, 0.0149085, 0.0283455, - 0.0447562, -0.0191749, -0.0247524, 0.0118958, 0.0418581, 0.0228802, -0.0348868, -0.00160803, - 0.0499076, 0.000436949, -0.0455082, -0.0523261, 0.0281439, 0.0563502, -0.0373772, 0.01161, - 0.0649382, 0.0375478, -0.000152216, -0.0242474, -0.0302719, -0.024227, -0.0163539, -0.0237781, - 0.0413481, 0.0639565, 0.0449211, 0.0730719, 0.0627154, 0.0195653, 0.0534155, 0.0242415, - -0.000842906, 0.0446278, 0.00706155, 0.107019, 0.0513803, 0.0188349, 0.0145981, 0.0541501, - 0.0323207, -0.0788871, 0.0691921, 0.0198263, 0.00516369, -0.00499741, 0.0431621, 0.0124451, - -0.0272489, 0.0178388, 0.0144972, -0.0310218, -0.0193413, -0.0027794, 0.0101328, -0.0183224, - -0.0375776, 0.0308271, -0.000599625, 0.00775446, 0.0111844, 0.00535355, 0.0351003, -0.00201906, - -0.0403671, -0.0297313, 0.000650426, 0.0552283, 0.00158567, 0.0127998, 0.0129658, -0.0540405, - 0.0126699, -0.0194195, -0.00137171, -0.0249486, -0.0977167, -0.0190306, -0.0617337, -0.0140263, - -0.0100231, -0.0157547, 0.014888, -0.0241838, -0.0298007, -0.00558167, -0.0200118, -0.00189711, - -0.00822873, -0.0244598, 0.0163851, -0.0267565, -0.00843671, 0.0101747, -0.0156994, 0.0148806, - 0.00397398, -0.0200779, -0.00718148, -0.0189266, 0.0237742, 0.0249438, -0.0174873, 0.00724446, - -0.0138303, 0.0292336, 0.0226407, -0.0766599, -0.0446403, -0.0119488, -0.0658979, 0.00344958 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p39(hatfit_yaw00_lev2_p39); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p39_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p40.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p40.mh deleted file mode 100755 index 51341b2..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p40.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p40.mh: - -#ifndef stasm_hat_yaw00_lev2_p40_mh -#define stasm_hat_yaw00_lev2_p40_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p40(const double* const d) // d has 160 elements -{ - const double intercept = -0.578154; - const double coef[160] = - { - -0.0230053, -0.0210838, 0.00833996, -0.00132794, -0.0195168, -0.0318791, -0.127763, -0.0155701, - -0.034902, -0.0315064, -0.0238103, -0.0304517, -0.0559896, 0.0267209, -0.0384578, -0.0265872, - -0.0585699, -0.0104624, -0.0336322, -0.0122956, 0.0132704, 0.0493953, -0.0308533, -0.00357042, - -0.0150394, 0.0170744, 0.0514288, 0.0387841, 0.0129995, 0.0622468, 0.0250487, -0.0148398, - -0.0116489, -0.0478068, -0.0371379, -0.0249553, -0.0180283, -0.0432322, 0.132777, 0.0320973, - 0.0230915, 0.016988, 0.00972359, 0.010769, 0.0282244, -0.0455557, -0.0193062, -0.0163898, - -0.0221048, 0.0368945, 0.0199199, 0.0685538, 0.117503, 0.0400076, 0.0400602, 0.0219632, - 0.0804955, 0.113797, 0.0771816, 0.0595862, 0.0464587, 0.044355, 0.033685, 0.04135, - 0.0573583, 0.000241402, 0.00757319, 0.061972, 0.0494706, -0.00927967, 0.0377478, 0.0453895, - 0.0660352, -0.00707717, -0.00409466, -0.00659626, 0.0710256, 0.0611401, -0.0468957, -0.0240416, - 0.0347565, 0.0332099, 0.0189545, 0.0699647, 0.0311581, 0.00807129, -0.00869748, 0.0150902, - -0.00120095, 0.00668937, 0.0326635, -0.0161191, -0.0129208, 0.0251813, 0.0124696, 0.0217988, - -0.0263708, -0.010514, -0.00390802, -0.0325808, -0.0571086, -0.0154732, 0.0102109, 0.0214122, - -0.0357933, -0.0272357, -0.00538061, 0.0474521, 0.0227356, 0.0232602, 0.0168437, 0.00073643, - 0.0113116, -0.0475376, 0.0560595, 0.031259, 0.0121835, 0.0106892, 0.0648001, 0.0432554, - -0.024124, -0.000816847, -0.0314966, 0.0103787, -0.0787828, -0.0520581, -0.00567509, -0.0185509, - 0.0535842, 0.0555946, 0.0181, 0.0220096, -0.0165579, 0.00212479, 0.0108745, 0.0136421, - 0.00809864, 0.0153479, 0.0293642, 0.0041109, -0.00828299, -0.0165547, -0.00871561, 0.00771352, - 0.0348994, 0.00533858, 0.0126395, -0.00496751, -0.0284364, -0.00480445, -0.0365954, 0.0008347, - -0.0041323, -0.0130019, 0.00889659, -0.0643651, -0.0419563, -0.002939, -0.0148031, 0.000960831 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p40(hatfit_yaw00_lev2_p40); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p40_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p41.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p41.mh deleted file mode 100755 index 9156cea..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p41.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p41.mh: - -#ifndef stasm_hat_yaw00_lev2_p41_mh -#define stasm_hat_yaw00_lev2_p41_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p41(const double* const d) // d has 160 elements -{ - const double intercept = -0.504123; - const double coef[160] = - { - 0.0296403, 0.0184192, -0.0822754, -0.0845612, -0.108267, 0.0246414, -0.0393737, 0.000256301, - 0.0228941, 0.041033, 0.0219511, -0.0137096, -0.0388542, -0.0138863, -0.00818661, 0.0105972, - 0.0145915, 0.0357209, -0.00152212, -0.0583622, -0.0404801, -0.0635977, 0.029528, 0.0399791, - -0.0220115, 0.0247502, 0.0609008, -0.00388183, -0.00349649, -0.0646161, 0.00873463, -0.03864, - -0.0574588, 0.0144267, 0.0276363, -0.00116585, -0.00827149, -0.0148357, 0.0379215, 0.0178955, - -0.0908591, -0.0282526, -0.0384145, 0.0148034, 0.0555861, 0.0348459, -0.0682362, -0.0137359, - -0.0161934, -0.000992711, 0.0417267, 0.0533682, 0.0606705, 0.0785771, 0.0177393, 0.0258979, - -0.0378051, -0.0430567, 0.0340479, 0.0873226, 0.0767643, 0.0501276, 0.0462917, -0.0225498, - -0.0253765, -0.0254106, -0.0434375, -0.0268121, 0.00946014, -0.0095343, 0.0410103, 0.0386735, - 0.0417865, -0.0111444, 0.038282, 0.0109508, 0.0165757, -0.0350916, 0.0181481, 0.0559019, - 0.0110023, 0.0756945, 0.0451606, 0.0317503, 0.0342808, 0.0563747, 0.00184054, 0.010916, - 0.0490982, 0.0742725, 0.0272439, 0.0667738, 0.0190779, -0.00363077, 0.0399377, 0.0587057, - 0.08214, -0.00631514, 0.015092, 0.0469049, 0.0700421, -0.000771437, -0.0188088, 0.00943442, - 0.0630941, -0.0083379, 0.000113802, -0.042742, 0.011614, 0.060704, -0.0111803, -0.0069888, - -0.0106874, 0.0722705, -0.0291486, 0.00721724, 0.00275513, 0.0355739, -0.0104596, -0.122197, - 0.0204395, 0.0355279, 0.0431984, 0.00359042, -0.0360651, -0.0240803, 0.00372068, 0.00855862, - -0.0373134, -0.035564, -0.0466182, -0.034249, -0.0504504, -0.0126724, -0.0210202, -0.0237463, - 0.0132138, -0.0377139, 0.0280111, 0.0393601, -0.0212865, 0.0149723, 0.0411332, 0.028714, - -0.0196819, -0.0324787, 0.0620909, -0.0094347, -0.0184877, -0.0330845, -0.013543, 0.00747859, - 0.0163584, 0.0246972, 0.0322218, -0.0315325, -0.00362678, 0.0186201, -0.00667478, 0.0466913 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p41(hatfit_yaw00_lev2_p41); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p41_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p42.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p42.mh deleted file mode 100755 index 35e06c0..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p42.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p42.mh: - -#ifndef stasm_hat_yaw00_lev2_p42_mh -#define stasm_hat_yaw00_lev2_p42_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p42(const double* const d) // d has 160 elements -{ - const double intercept = -0.487045; - const double coef[160] = - { - 0.0625564, 0.0377063, -0.0936294, -0.112431, -0.11527, -0.0167091, 0.0406052, 0.0738598, - 0.031717, 0.0592982, 0.0601575, -0.0166848, -0.00291908, -0.0829607, -0.00857274, 0.0205755, - 0.00948705, 0.0357341, 0.0519815, -0.0105257, -0.0086745, -0.0348401, -0.0191874, -0.00563161, - -0.00584097, 0.00939445, 0.0496421, 0.00617174, 0.0109272, -0.00699703, -0.019802, -0.036845, - 0.00622295, -0.0363641, -0.00320816, -0.00398417, -0.00117188, 0.0340202, 0.0232643, 0.0210433, - -0.076952, -0.0577683, 0.00690922, 0.0417571, 0.050944, 0.0913182, 0.0142636, -0.0422739, - -0.0723603, -0.0353338, 0.0062463, 0.027837, 0.0227093, -0.0154173, 0.0851114, 0.00579794, - -0.0556967, -0.016606, 0.00632741, -0.00221272, 0.0259411, -0.0336812, 0.0517649, 0.0257381, - -0.0381896, -0.000830177, 0.0243649, 0.0013848, 0.0115003, -0.0168612, 0.00369493, 0.0256691, - 0.0106233, -0.00775145, -0.00300705, -0.0247126, -0.0192061, 0.0160463, 0.0219635, 0.0912614, - 0.054399, 0.0505047, 0.0788935, 0.124535, 0.0689719, 0.0184976, 0.00473304, 0.0295179, - 0.05098, -0.0160143, -0.0138044, -0.00226117, 0.0481735, 0.0127097, -0.0128908, -0.000225028, - 0.0365491, 0.00311747, -0.0318899, -0.0402103, 0.00986184, 0.0267959, -0.0597112, 0.00930144, - 0.0337973, 0.0299957, 0.0120455, -0.00462641, -0.0216377, -0.0225958, 0.00223717, -0.0270024, - 0.0628005, 0.0489483, 0.0415761, 0.0761125, 0.0714916, 0.0226824, 0.0721983, 0.0584937, - 0.0218871, -0.00527917, -0.021159, 0.0474577, -0.0094378, 0.0238818, 0.00390066, 0.0178393, - 0.0356874, -0.0529759, 0.0605261, 0.0161625, 0.00235941, 0.00300719, 0.0191452, 0.0183478, - 0.00476389, 0.0355849, 0.0325118, -0.0273234, -0.0178925, 0.00676039, 0.00677796, -0.0404392, - -0.0159076, 0.00463432, -0.0117526, -0.00362902, 0.00451682, 0.0295932, 0.0400523, -0.00565271, - -0.0698196, 0.00656611, -0.00782271, 0.000942894, -0.0420094, -0.00445787, -0.0551658, -0.0701101 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p42(hatfit_yaw00_lev2_p42); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p42_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p43.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p43.mh deleted file mode 100755 index 3867d83..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p43.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p43.mh: - -#ifndef stasm_hat_yaw00_lev2_p43_mh -#define stasm_hat_yaw00_lev2_p43_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p43(const double* const d) // d has 160 elements -{ - const double intercept = 0.00648366; - const double coef[160] = - { - -0.0152163, -0.00938193, -0.0190419, -0.0687831, -0.0468449, -0.0880119, 0.0812563, -0.00542163, - -0.0303208, 0.00806224, 0.0623734, 0.0413201, -0.00380485, -0.0133008, -0.00241608, -0.0323745, - -0.0738325, -0.0242139, 0.0190181, 0.0157716, 0.0080979, 0.00166531, -0.0480585, -0.0434921, - -0.0302065, -0.0234743, -0.0184186, 0.0244355, 0.0155824, 0.0468844, 0.0080336, 0.00117218, - -0.0331888, -0.0584217, -0.0338365, -0.026523, -0.0119799, 0.0596711, 0.0115523, -0.0122433, - -0.0458657, -0.0397486, 0.00973897, 0.0146185, 0.069101, -0.0167322, 0.0669437, 0.0339211, - 0.00604615, 0.00201924, -0.0142197, -0.0430294, -0.00720905, -0.0326489, -0.0359383, 0.0285836, - 0.0545388, 0.0379828, 0.0598856, 0.0112929, -0.0060677, -0.00368719, 0.0259153, 0.0502069, - 0.0226217, 0.0012846, 0.0148117, -0.0016945, -0.000385082, 0.00444569, 0.0713966, 0.090965, - 0.0507963, -0.00174389, -0.0463333, 0.00418675, 0.0053341, -0.0537939, -0.0550999, 0.0945129, - 0.113893, -0.0139617, 0.0316123, 0.0529792, 0.0495666, 0.0340494, -0.039953, 0.0260375, - 0.00641793, 0.0377733, -0.0625308, -0.0868844, -0.048856, 0.0186374, -0.0411507, -0.0667005, - 0.0029778, 0.0232979, 0.0265188, 0.0512988, 0.0191031, 0.00196293, -0.0345508, -0.0318195, - 0.00777352, 0.0336489, 0.0340635, 0.0523148, 0.03348, 0.0224716, 0.0471509, -0.0111932, - 0.0163388, 0.0360007, -0.0550825, -0.0319889, 0.00674877, 0.0246315, 0.0166669, -0.00832142, - -0.0104868, -0.0427722, 0.0921329, 0.0220887, -0.0355666, -0.0185576, -0.00916089, -0.0092353, - -0.0317364, 0.0305874, 0.00675156, -0.0249873, 0.01326, 0.0109879, -0.016378, 0.00128751, - -0.0210845, -0.0114771, -0.00718837, -0.00888316, -0.0110957, 0.0127997, 0.0179059, 0.0174434, - -0.0127198, -0.0120589, -0.0196548, -0.0179925, -0.071387, 0.00189062, -0.0285034, 0.0140863, - -0.0971454, 0.0467506, -0.00717021, -0.0347361, -0.0281356, -0.0441394, -0.0500878, -0.0092695 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p43(hatfit_yaw00_lev2_p43); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p43_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p44.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p44.mh deleted file mode 100755 index 0c890e2..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p44.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p44.mh: - -#ifndef stasm_hat_yaw00_lev2_p44_mh -#define stasm_hat_yaw00_lev2_p44_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p44(const double* const d) // d has 160 elements -{ - const double intercept = 0.133498; - const double coef[160] = - { - -0.0434608, -0.0375412, 0.0454066, -0.00232263, 0.00944101, -0.0499478, 0.0126621, -0.0423901, - -0.00525387, -0.0133133, 0.0215207, 0.0288921, 0.0142323, 0.049969, 0.0481931, 0.0500351, - -0.00359542, -0.0930273, 0.00287021, 0.00598216, 0.0164819, 0.0124433, 0.00604495, 0.0709833, - 0.0020777, -0.0585229, -0.0286585, 0.0102381, 0.0246242, -0.00483163, 0.0220621, 0.0599245, - -0.0185056, -0.0421779, -0.0461277, -0.0347843, -0.0399771, 0.0179453, -0.0988327, -0.0343631, - 0.062811, 0.0709959, -0.0625171, -0.0890556, -0.038321, 0.00148258, -0.0706364, 0.0280211, - 0.013062, 0.0328506, 0.0540438, 0.0737895, 0.0182533, 0.00714815, 0.00747047, -0.0631775, - 0.0937722, 0.11209, 0.00853257, -0.0115347, -0.0403247, 0.0116919, 0.0922686, 0.100438, - 0.0496898, 0.0776282, -0.00799543, 0.0177156, -0.0209815, -0.0426646, 0.012797, 0.00244885, - 0.00795191, 0.0361026, -0.00259492, -0.0143084, -0.0014389, -0.0315686, -0.0858858, -0.0289207, - -0.0384161, 0.0405562, 0.0318509, -0.00677956, 0.0019075, 0.0227394, 0.0385147, 0.0332749, - -0.0443305, -0.0409049, 0.0268993, 0.0395555, -0.00697073, -0.0169692, -0.0110896, 0.0226296, - -0.099113, -0.0380493, -0.0555956, -0.0272147, 0.00162701, 0.0157433, -0.00016503, -0.0427643, - -0.0706651, -0.0126277, -0.00925659, -0.0135335, 0.00727166, -0.00311888, -0.0019915, -0.0481127, - -0.0174759, 0.00736274, 0.0108935, -0.0304465, -0.00479456, 0.0137333, -0.0236878, -0.026351, - -0.0180594, -0.0492838, 0.00470431, -0.0337215, 0.0155772, 0.00649963, -0.0740774, -0.0380523, - 0.0186271, 0.0388299, -0.00633185, -0.0332862, -0.0272252, 0.00657739, -0.0168025, -0.024778, - -0.0133223, -0.000528839, 0.00341718, -0.00758616, -0.0135721, 0.0138585, -0.0262324, 0.0120914, - 0.00661195, -0.00240091, 0.0207088, 0.0293574, -0.0124487, 0.00932525, -0.0122027, 0.0285461, - 0.0236277, 0.000629146, 0.00127135, 0.0423906, -0.00154121, -0.014517, -0.00175293, 0.0134204 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p44(hatfit_yaw00_lev2_p44); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p44_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p45.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p45.mh deleted file mode 100755 index d7d8b17..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p45.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p45.mh: - -#ifndef stasm_hat_yaw00_lev2_p45_mh -#define stasm_hat_yaw00_lev2_p45_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p45(const double* const d) // d has 160 elements -{ - const double intercept = 0.167203; - const double coef[160] = - { - 0.0727442, -0.0166493, -0.0626483, -0.00407148, 0.0385231, 0.0138944, 0.0220685, 0.0317868, - 0.0202424, -0.00508257, -0.02991, -0.0642126, -0.0457136, -0.0205781, -0.0460721, -0.0144347, - 0.0185551, 0.021069, 0.0572957, 0.0567964, 0.0393136, 0.00655403, 0.00297779, -0.0212999, - 0.0588155, -0.0125789, 0.0302992, 0.0420561, 0.0321475, 0.0444928, 0.113518, 0.115613, - 0.0840319, 9.00529e-05, -0.0672098, -0.0382904, 0.00831286, -0.0415421, -0.0300061, 0.112934, - 0.0500438, -0.0398309, 0.121826, 0.0632192, 0.0417922, 0.0189858, 0.00649431, 0.00459315, - -0.0273207, 0.0733033, -0.023846, -0.0719232, -0.0331931, 0.00526774, -0.0276115, -0.0230609, - -0.0322007, 0.0294648, 0.024586, 0.0277014, -0.0083174, 0.00650928, 0.000355891, -0.0111656, - -0.0321933, 0.0129832, -0.00113023, 0.0126422, -0.028525, -0.0111074, 0.00155808, -0.0336636, - -0.0639764, 0.0777543, -0.0134676, -0.0233251, -0.0131801, -0.0252243, 0.00837433, -0.0979294, - -0.0316445, -0.0533707, 0.0260078, 0.0344793, -0.0253976, -0.0140301, 0.00174039, 0.00276017, - 0.00545666, -0.0200741, -0.0239352, -0.0327871, 0.0297689, 0.00861198, 0.040564, 0.052606, - 0.0074788, -0.0479343, 0.0154175, -0.0141605, -0.00841478, -0.00624186, -0.0179837, 0.00613419, - -0.0151695, -0.00554206, -0.0266159, -0.00971198, -0.0140612, 0.00957265, -0.00149456, 0.0407301, - -0.0514291, -0.00426822, -0.0378928, -0.025287, -0.000235668, -0.00516234, -0.043896, 0.0421735, - -0.0130924, -0.0251465, 0.0425118, -0.0765011, -0.041684, -0.0207319, -0.06635, -0.0265088, - -0.033695, -0.0298012, 0.00865036, -0.0296191, 0.00521558, 0.0239798, 0.00332807, -0.0132821, - -0.0237629, 0.0281534, -0.00584087, -0.0281866, -0.00921105, 0.00566867, -0.0154368, -0.0327216, - -0.0208287, 0.00086343, 0.0179541, -0.0235674, -0.0233201, -0.00703314, -0.022644, -0.0103356, - -0.0110677, -0.0168262, 0.00978007, 0.0523263, -0.0194004, -0.00861894, -0.0303185, -0.0325916 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p45(hatfit_yaw00_lev2_p45); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p45_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p46.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p46.mh deleted file mode 100755 index 4ba2f6c..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p46.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p46.mh: - -#ifndef stasm_hat_yaw00_lev2_p46_mh -#define stasm_hat_yaw00_lev2_p46_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p46(const double* const d) // d has 160 elements -{ - const double intercept = 0.134623; - const double coef[160] = - { - 0.0531168, 0.0334694, 0.043996, 0.12206, 0.0730851, 0.0708911, -0.00521965, 0.0159515, - 0.0281719, -0.0421384, -0.0138892, -0.0198386, 0.0505329, -0.0104663, 0.00154503, -0.0128061, - 0.058639, -0.00837575, -0.0821761, -0.0997137, -0.0181503, 0.0377087, -0.0401936, 0.00375633, - 0.00143321, 0.0237199, 0.00718317, -0.00464007, -0.0229915, -0.0257773, -0.0106924, -0.0683993, - 0.0987416, 0.0460078, 0.0523512, 0.0644147, 0.0502609, 0.0165771, 0.0867663, 0.123899, - 0.00447481, 0.0121519, 0.00354363, 0.0803775, 0.00817232, -0.0145719, 0.00701082, 0.0432215, - 0.0279507, -0.0634129, 0.0607196, 0.0344952, 0.0197178, 0.00448424, 0.00693527, 0.00980093, - -0.0263267, 0.0359766, 0.0495958, 0.00492949, -0.00529447, 0.00687388, 0.0106333, -0.00370484, - -0.0402679, 0.0157835, -0.00736962, -0.00841176, 0.00542731, 0.0202024, 0.010359, 0.0114009, - -0.114368, -0.00373064, 0.0193916, 0.0368617, -0.0185698, -0.00661785, -0.0196855, -0.0660228, - -0.0155701, -0.0423849, 0.0227829, -0.00564839, -0.0628149, -0.0119208, -0.0545034, -0.0238897, - -0.0304989, -0.0239419, 0.018287, 0.0139659, 0.0074725, 0.00120524, -0.0106813, -0.0109142, - -0.0190309, -0.0788974, -0.0350183, -0.040745, -0.00553431, 0.0194616, 0.0108564, 0.0408648, - 0.0127743, -0.0466269, -0.0114537, -0.0223878, 0.0214901, 0.0118409, 0.0131341, 0.0240932, - 0.0149353, 0.00707499, -0.0278634, -0.0513, -0.0344982, 0.00220224, -0.0332546, 0.008111, - -0.00234963, 0.0362378, 0.0399499, 0.0076758, -0.0431636, -0.0341594, -0.0400981, -0.0105245, - 0.0153956, -0.000767963, 0.0185314, -0.0453842, -0.0557711, -0.00781512, 0.00407695, 0.00583734, - -0.0275517, -0.0113003, 0.0115792, -0.0641317, -0.0148315, -0.0078452, -0.0106168, -0.0332407, - -0.0315385, -0.00204452, -0.00591023, -0.0533512, -0.00380281, 0.00919725, 0.0024589, -0.00864855, - -0.0314061, 0.0254036, 0.0529685, 0.00313081, -0.0361513, -0.0241116, -0.0383206, -0.0235494 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p46(hatfit_yaw00_lev2_p46); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p46_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p47.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p47.mh deleted file mode 100755 index 33b09c3..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p47.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p47.mh: - -#ifndef stasm_hat_yaw00_lev2_p47_mh -#define stasm_hat_yaw00_lev2_p47_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p47(const double* const d) // d has 160 elements -{ - const double intercept = -0.349958; - const double coef[160] = - { - -0.0938759, 0.00296821, -0.0729677, -0.0316095, -0.00706991, 0.0713807, -0.125104, -0.0615868, - 0.0707216, 0.055996, 0.066673, 0.063191, 0.0360445, 0.0752131, 0.0635663, 0.0533688, - 0.0104127, -0.0312641, 0.00659127, 0.0569067, 0.0593655, 0.0106091, 0.00629004, -0.0474023, - 0.0337274, -0.0232891, -0.0632985, -0.060388, 0.0187142, 0.0192868, 0.00269171, 0.0232338, - 0.0544664, -0.00795061, 0.00310823, -0.0143325, -0.0106303, -0.010281, 0.0267312, 0.00531744, - 0.0397312, 0.0957103, 0.117226, 0.0655497, 0.0423688, -0.0166754, 0.0271625, 0.0107862, - -0.0253908, 0.0119722, -0.031478, 0.0428568, 0.00490836, -0.0267872, 0.00626841, 0.0239749, - 0.0451296, -0.0252722, 0.0191709, 0.0668581, 0.0521968, 0.042853, 0.0250142, 0.0680039, - 0.0265303, -0.0209002, 0.0792489, -0.0097866, -0.00997529, 0.00598961, -0.0162379, -0.000541026, - -0.0667264, 0.0992408, 0.0101751, -0.0104197, 0.0343122, 0.0579504, 0.00881062, -0.0444161, - -0.0118875, -0.0064939, 0.0189168, 0.000886423, -0.0630399, -0.00776045, -0.0401691, 0.0212956, - -0.0124791, -0.0363352, -0.0313423, -0.0383338, -0.0471207, -0.00316822, -0.0288681, -0.00340652, - -0.0159142, -0.0354307, 0.0194541, 0.0374145, -0.00104714, 0.00322418, -0.00696972, -0.014788, - -0.0295837, -0.0265521, -0.0117168, 0.0133084, -0.0186389, -0.00254122, 0.00481712, 0.0100409, - 0.0211604, -0.0462735, -0.00647958, -0.0555301, -0.00469603, 0.0267769, 0.0434688, 0.0614441, - 0.0477303, 0.0342047, -0.0337731, -0.00408043, -0.0142271, -0.0233577, 0.00147113, -0.0202956, - 0.00291611, 0.0343229, 0.0658706, 0.042245, 0.00563476, -0.011158, -0.00236379, -0.00430019, - 0.024499, 0.0109992, 0.0275971, -0.0199714, -0.0525608, -0.0207767, -0.00988041, 0.0184047, - 0.0161338, -0.0137057, 0.0222027, -0.0660978, -0.0223864, 0.0155657, 0.00532412, 0.00796028, - -0.0192531, -0.00810867, 0.0503201, -0.0601432, -0.00343015, -0.000829491, -0.0402855, -0.0187734 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p47(hatfit_yaw00_lev2_p47); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p47_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p48.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p48.mh deleted file mode 100755 index 04d1e37..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p48.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p48.mh: - -#ifndef stasm_hat_yaw00_lev2_p48_mh -#define stasm_hat_yaw00_lev2_p48_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p48(const double* const d) // d has 160 elements -{ - const double intercept = -0.266244; - const double coef[160] = - { - -0.00244126, -0.00695775, -0.00750911, 0.0373564, 0.0912859, -0.0323123, 0.0135883, -0.0108903, - -0.0138802, -0.0188198, -0.0310479, -0.00867961, 0.0052937, 0.02034, -0.00643894, -0.0194933, - 0.00309242, -0.0162415, 0.0107541, 0.0155267, -0.0138722, -0.0117513, 0.0212924, -0.00367859, - 0.0165307, 0.00492787, -0.00487953, 0.00917269, -0.00646058, -0.00447639, -0.0268833, -0.0118095, - -0.000936887, 0.0130276, 0.0132283, 0.0163816, -0.00492111, -0.0137712, -0.00156212, -0.0168748, - -0.00170122, 0.01619, -0.00337298, 0.0267796, 0.0277441, -0.01436, -0.021252, -0.00902059, - 0.000179468, -0.00228062, -0.00427859, 0.032054, -0.00956211, -0.00282608, 0.00909247, -0.0129984, - -0.00618627, -0.0247032, -0.000789677, -0.0353493, -0.0504948, 0.0341041, 0.00664619, 0.00987884, - 0.0321276, -0.0307376, -0.0337874, -0.0369077, -0.0136238, -0.0040396, 0.0365185, 0.0295871, - 0.0337312, 0.0194397, 0.0405361, 0.00148259, 0.000971457, -0.0311783, -0.0283214, -0.0576002, - 0.0379415, 0.0162879, 0.0238018, 0.0896146, 0.0338163, -0.0440928, -0.0198169, 0.0139492, - 0.0135434, -0.0196034, -0.0666693, -0.0221157, 0.0240976, -0.00951311, 0.00591992, 0.00916109, - 0.0469733, 0.0313011, 0.0146373, 0.030906, 0.000892364, -0.0286324, -0.00992309, 0.0304088, - -0.0208145, -0.0248092, -0.0366884, -0.0395867, -0.0286382, 0.0170484, -0.00629805, 0.0301099, - 0.0390146, 0.0614085, 0.0576423, 0.0200063, -0.0242775, -0.05258, -0.0131601, 0.0207403, - -0.00163866, -0.0121648, 0.0215263, 0.0394177, -0.0529247, 0.0340943, -0.00183509, 0.00380548, - 0.00476614, -0.0106921, -0.0110888, 0.0573969, 0.0170387, 0.0482549, 0.0231282, -0.0111661, - -0.0603029, -0.0115112, -0.0168214, -0.00270062, 0.00541293, 0.012113, 0.0468421, -0.0042761, - -0.00759411, 0.0354396, 0.0728358, 0.0893882, 0.0657231, 0.0364996, 0.0136322, -0.0390175, - 0.0584287, -0.0251267, -0.0315721, 0.0521113, 0.116648, 0.060466, 0.0375091, 0.0571198 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p48(hatfit_yaw00_lev2_p48); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p48_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p49.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p49.mh deleted file mode 100755 index edf24ac..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p49.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p49.mh: - -#ifndef stasm_hat_yaw00_lev2_p49_mh -#define stasm_hat_yaw00_lev2_p49_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p49(const double* const d) // d has 160 elements -{ - const double intercept = 0.192501; - const double coef[160] = - { - 0.0835498, -0.0204216, -0.0675207, -0.0489665, -0.033897, -0.021236, -0.00268309, -0.0164719, - -0.0187461, 0.0227914, 0.0300364, 0.015184, -0.0202062, -0.0158775, -0.0168518, -0.0179463, - -0.038041, -0.0119964, 0.00579416, 0.0356555, 0.0566812, -0.0199519, -0.0280012, -0.0420213, - -0.0132371, -0.0144199, -0.0541125, -0.0105326, 0.0603322, 0.022851, 0.00906489, 0.00544175, - -0.0290449, -0.0236012, -0.00222911, 0.00202367, -0.0600652, -0.00660235, 0.00674581, -0.0434849, - -0.0202302, -0.0287063, -0.0283714, -0.0407221, -0.0072558, 0.00972238, 0.00968606, 0.0152914, - -0.0149908, 0.0289505, 0.0488872, 0.0189728, -0.00561173, -0.0135145, -0.0488983, -0.0182296, - 0.00738071, -0.00137348, 0.0304801, 0.00910722, -0.00820217, -0.00508927, -0.0146195, -0.00154415, - -0.00504071, -0.0246486, -0.0311558, 0.0192517, 0.0282089, -0.00265505, 0.0248406, -0.0107161, - 0.0285478, -0.0112178, -0.0346098, -0.0519415, -0.0952246, 0.00133508, 0.00722505, 0.0403746, - 0.0649075, 0.0123525, -0.0457291, -0.0256825, 0.0120643, -0.00891199, -0.0416236, -0.0463997, - -0.0164144, 0.0205189, 0.0227254, -0.0232941, -0.0217079, -0.0199973, -0.0149456, -0.0384636, - -0.00166413, 0.0212203, 0.00416943, 0.0416679, -0.00479935, -0.0405398, -0.0239473, 0.00734616, - 0.0178309, -0.00162916, -0.0119294, 0.0305882, 0.0530868, -0.0145587, 0.00292821, -0.00612065, - -0.0178099, -0.0325072, -0.0661953, 0.00742307, 0.0488632, 0.0027951, -0.0201514, -0.0186999, - 0.0404047, 0.00993155, 0.0343232, 0.0122804, 0.0379228, 0.0375848, 0.0775912, 0.0897432, - -0.0461039, 0.00967581, 0.0305412, 0.0137018, -0.0143922, -0.00987391, -0.0348911, -0.018628, - 0.0197026, -0.00799958, 0.00957767, 0.00337207, -0.0613752, 0.0195736, -0.0140907, 0.0353882, - 0.034985, 0.0218205, 0.0298671, 0.0567854, -0.00573089, 0.018223, 8.00595e-05, 0.00255585, - -0.0136921, -0.0121694, -0.0137683, 0.0372801, -0.0100846, 0.0482397, 0.057524, 0.0142762 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p49(hatfit_yaw00_lev2_p49); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p49_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p50.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p50.mh deleted file mode 100755 index 97538f0..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p50.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p50.mh: - -#ifndef stasm_hat_yaw00_lev2_p50_mh -#define stasm_hat_yaw00_lev2_p50_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p50(const double* const d) // d has 160 elements -{ - const double intercept = -0.0477386; - const double coef[160] = - { - -0.0495539, 0.0211041, -0.0123644, -0.00237358, 0.0108027, -0.0275818, -0.0549775, -0.0233839, - -0.0836514, 0.0310929, -0.010384, -0.0336357, -0.0451937, -0.0144377, -0.0114682, -0.0333021, - 0.0882937, -0.00533626, -0.0302569, -0.0444939, -0.0423566, 0.0042213, 0.0342134, 0.0200237, - 0.0692929, 0.0399971, 0.0131628, -0.00253586, -0.0242977, -0.0384338, -0.0239605, -0.00330828, - -0.0419197, 0.00794452, -0.02165, 0.0106045, 0.0321402, -0.0296086, -0.0243697, -0.039781, - -0.042991, -0.0300578, 0.0575712, 0.0340556, 0.0579353, -0.0319422, -0.00851638, -0.0470556, - -0.00101905, -0.0480291, -0.0347489, -0.0109098, 0.00852354, 0.0360537, 0.0439627, 0.042935, - -0.0107764, -0.0386511, -0.0721515, -0.0327677, 0.00865226, 0.0152686, 0.0465945, 0.0362127, - 4.46165e-05, 0.0391035, 0.0494602, 0.0191409, 0.00970513, -0.0327974, -0.0348296, -0.0350654, - -0.0118673, -0.00809259, 0.0306083, 0.0223223, 0.0113989, 0.0111524, -0.0393564, -0.00130007, - -0.00938587, 0.0532157, 0.00277165, 0.0182028, -0.0584938, 0.0277438, 0.00704494, -0.00816859, - 0.0295228, 0.00526707, -0.0163852, -0.0128342, -0.0167003, -0.0067569, 0.0236241, -0.00624285, - 0.0457654, 0.0173623, -0.0646333, -0.00727445, 0.00955263, 0.0091617, -0.0389154, -0.0404082, - 0.036049, 0.0225123, 0.0275935, -0.0153545, -0.00186503, -0.0072327, -0.0506511, -0.0285569, - -0.00781563, 0.0385601, 0.00797834, 0.0318072, -0.00728755, -0.0361007, -0.0141264, -0.0288934, - 0.104485, 0.0503813, 0.0321288, -0.0221143, -0.0110662, 0.0157634, 0.0254731, 0.0313357, - -0.0274174, 0.0228067, 0.0466918, 0.0514846, 0.0267139, 0.0101061, -0.00114006, 0.0169987, - 0.0127578, -0.0134715, -0.013775, -0.0045049, 0.0264766, 0.0464675, 0.0606609, 0.0584783, - -0.0149799, 0.0290195, 0.0436679, 0.0239956, 0.0250228, -0.00806094, 0.0177236, 0.00230823, - -0.012279, -0.014165, 0.0218013, 0.00711751, -0.04036, 0.0250468, -0.0194546, 0.0282929 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p50(hatfit_yaw00_lev2_p50); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p50_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p51.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p51.mh deleted file mode 100755 index 4e0e380..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p51.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p51.mh: - -#ifndef stasm_hat_yaw00_lev2_p51_mh -#define stasm_hat_yaw00_lev2_p51_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p51(const double* const d) // d has 160 elements -{ - const double intercept = 0.0764357; - const double coef[160] = - { - 0.0650944, 0.0193851, -0.0594972, -0.100121, -0.104022, -0.0135567, -0.0376246, 0.0163301, - -0.0129405, 0.0103163, 0.0383381, 0.0231603, -0.0437137, -0.0245345, 0.0999677, -0.0503141, - 0.0283688, 3.67082e-05, 0.0251029, 0.0506682, 0.0184266, -0.0705395, 0.0184774, 0.0297773, - -0.00595488, -0.0341949, -0.00113204, 0.00722669, 0.0464591, -0.0242277, -0.0192974, 0.00749769, - -0.0107425, -0.0521185, -0.04147, -0.0343186, -0.0526623, 0.0383393, 0.0396407, 0.0098424, - -0.00613143, -0.0146145, -0.037507, 0.052777, 0.108913, 0.0489861, 0.0294413, 0.00825218, - 0.00635863, 0.017598, 0.00982251, 0.00746601, 0.0341631, 0.0363752, 0.0151007, 0.00218081, - 0.0294743, 0.0752663, 0.0559439, 0.000286545, 0.0110606, 0.012381, 0.0289762, 0.0671849, - 0.0313379, 0.0311749, 0.0262417, 0.0283269, 0.0130074, -0.0453311, -0.0087264, 0.0826683, - -0.0305231, -0.0395294, -0.0730491, -0.0439395, -0.00667226, 0.0224563, 0.00542897, -0.00669543, - -0.00254243, -0.0285783, -0.0136673, 0.0294769, 0.0177926, -0.0204505, 0.00655116, -0.0212695, - -0.0351333, -0.026744, 0.0102726, 0.00539215, -0.0062701, -0.0134256, -0.0305623, -0.0311588, - -0.0275912, 0.00367917, -0.0134105, 0.00069081, 0.003861, 0.0132189, -0.0253056, -0.0409523, - 0.00296127, 0.00236138, -0.00174571, 0.00992103, -0.00668856, 0.00554392, -0.0147451, 0.00857709, - -0.0172276, -0.0069705, 0.00110024, 0.0114147, 0.00020103, 0.0260044, 0.0350674, -0.015979, - -0.0468747, -0.0412072, -0.020738, -0.0234711, -0.0415735, 0.0120218, -0.0126633, -0.02575, - -0.000798617, 0.0116575, -0.00498169, -0.0220634, -0.0188038, 0.00136545, 0.00679813, 0.0155936, - 0.0294948, -0.00340731, -0.00214841, -0.0186313, -0.019873, -0.0132203, -0.00228597, 0.0017341, - 0.0248672, 0.00242723, 0.00372801, 0.0125139, -0.00768655, -0.0294099, -0.00568277, -0.00574113, - -0.00529745, -0.010464, -0.00262238, -0.0218967, -0.00582704, 0.00480886, 0.00623102, 0.00438627 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p51(hatfit_yaw00_lev2_p51); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p51_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p52.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p52.mh deleted file mode 100755 index 07371ef..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p52.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p52.mh: - -#ifndef stasm_hat_yaw00_lev2_p52_mh -#define stasm_hat_yaw00_lev2_p52_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p52(const double* const d) // d has 160 elements -{ - const double intercept = 0.0675872; - const double coef[160] = - { - 0.0422232, 0.00605944, -0.0402839, -0.0373185, -0.0290048, -0.0300657, -0.0521738, -0.0466676, - -0.010222, 0.0108525, 0.010731, 0.00984706, 0.0071276, -0.0020334, 0.00506905, -0.0378795, - 0.0256222, -0.00261496, -0.00874904, 0.0389066, 0.00516485, -0.0127199, 0.0187019, -0.000190753, - -0.00267674, -0.0253644, -0.00748812, 0.0673018, 0.0356246, -0.0255024, -0.00546691, -0.0188718, - -0.0131194, -0.0303938, -0.0786897, -0.0136168, -0.00421177, -0.0507213, -0.0482906, -0.0439651, - 0.0165339, -0.00723551, 0.0494401, 0.0500584, 0.0445881, 0.0448531, 0.00679038, 0.127445, - 0.00635129, -0.00477785, -0.0144259, 0.00167362, -0.00852137, 0.0127319, 0.0194569, 0.0380326, - -0.00862816, 0.00856149, 0.0171049, 0.0156228, -0.021514, 0.0473204, -0.00787639, 0.02784, - 0.00322575, 0.0140646, 0.00674093, -0.00690135, -0.0250757, 0.0660233, -0.0360162, -0.00921877, - 0.00959317, 0.0110007, 0.0146054, 0.018331, -0.0163642, 0.049363, 0.0730171, 0.0120552, - -0.0164216, 0.023567, 0.0119819, 0.0361643, 0.0255793, -0.0372276, 0.00954623, 0.0744301, - -0.0511832, -0.0570134, -0.0396644, -0.0404291, -0.0241616, -0.0218683, 0.0113479, 0.00422602, - -0.0198206, -0.0071985, -0.0374479, -0.0315704, -0.0633209, 0.0221232, -0.015953, -0.00428115, - 0.0153375, 0.0136208, -0.023364, -0.0307367, -0.0540647, 0.0534357, -0.0172693, -0.0192023, - -0.0168497, 0.04081, 0.0412586, 0.0312318, -0.00389699, -0.0169878, 0.044265, 0.00451415, - 0.0174412, 0.046257, 0.000171126, 0.00684629, 0.00116319, -0.0263814, 0.0101471, 0.0133016, - -0.0112506, -0.0140623, -0.0175112, -7.98279e-05, -0.00964185, -0.00319915, 0.00209215, -0.0136634, - -0.014852, -0.00364934, 0.00261632, -0.00717517, 0.0168242, -0.00207797, -0.014872, -0.0169025, - -0.00321814, -0.00673075, -0.00480385, 0.0226337, 0.0466613, 0.0354814, 0.0169009, -0.00421824, - -0.000706595, 0.0251857, 0.00525701, -0.0187527, 0.00833638, -0.0156336, -0.0185438, -0.00773955 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p52(hatfit_yaw00_lev2_p52); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p52_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p53.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p53.mh deleted file mode 100755 index 13639b7..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p53.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p53.mh: - -#ifndef stasm_hat_yaw00_lev2_p53_mh -#define stasm_hat_yaw00_lev2_p53_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p53(const double* const d) // d has 160 elements -{ - const double intercept = 0.0626878; - const double coef[160] = - { - -0.018691, -0.0296059, -0.0703994, 0.00120945, -0.0494968, 0.0795052, -0.00971431, -0.0329191, - -0.0362483, -0.0085063, -0.0191623, -0.024323, -0.0312561, -0.0143246, -0.00839651, -0.0488237, - -0.0588511, -0.00926484, 0.0441297, 0.0445941, 0.017878, -0.046711, 0.0849654, -0.0249244, - -0.0423636, -0.0462836, 0.0275196, 0.0497014, 0.063428, 0.0314373, -0.00740839, -0.0418502, - 0.0557852, -0.0506972, -0.0623033, -0.0245665, 0.0507803, 0.0253386, -0.0329503, 0.0540937, - 0.0081901, -0.0173538, -0.0468151, -0.0113454, 0.0219419, 0.094097, -0.0336471, -0.0388668, - -0.00046048, 0.00541129, 0.0423549, 0.0338251, 0.0152872, 0.0485634, 0.0308025, 0.0141435, - 0.0688133, 0.0714458, 0.0222149, 0.00240129, -0.003577, 0.0127541, 0.0484851, 0.0474281, - 0.0625819, 0.0711041, -0.0137645, -0.00438153, -0.0217192, -0.0282293, 0.0145261, 0.0291524, - 0.000221867, 0.0219362, -0.00657695, -0.00351057, -0.019949, 0.0184259, -0.0142055, 0.00232768, - 0.0323774, 0.0241413, 0.0107102, 0.0214944, 0.000167494, 0.00677882, 0.0125334, 0.0430097, - 0.00430616, -0.0118973, 0.0184187, 0.0247654, 0.0199142, -0.0243278, -0.0211138, -0.00152234, - -0.0335908, -0.0136346, -0.00509563, -0.0118379, 0.00521896, -0.0137947, -0.029525, -0.033767, - -0.0409034, -0.0136538, -0.00955293, -0.0135913, 0.0034148, -0.00914535, -0.0143001, -0.0305599, - 0.00261832, 0.0124695, -0.0291263, -0.00591625, 0.00662083, 0.00995792, 0.0301587, -0.00637953, - -0.00596176, -0.023765, 0.00159443, -0.017357, 0.0219382, -0.00169842, 0.00159802, -0.0072873, - -0.00549211, -0.0196789, 0.00654718, -0.00794658, -0.0214648, -0.0236879, -0.0144501, -0.0129102, - 0.00940209, -0.013199, 0.00696873, -0.0156188, -0.0263607, -0.0121995, -0.0039541, 0.0131912, - 0.0121015, -0.00687284, -0.00235904, -0.0296469, -0.0215484, -0.0173748, -0.0020463, 0.0232373, - -0.0247, -0.00367961, -0.00750513, -0.0123954, -0.0110696, -0.0125895, 0.0128087, 0.0139221 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p53(hatfit_yaw00_lev2_p53); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p53_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p54.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p54.mh deleted file mode 100755 index b5d8222..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p54.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p54.mh: - -#ifndef stasm_hat_yaw00_lev2_p54_mh -#define stasm_hat_yaw00_lev2_p54_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p54(const double* const d) // d has 160 elements -{ - const double intercept = -0.277291; - const double coef[160] = - { - -0.0446887, -0.00374708, 0.00385274, 0.0503045, 0.0217272, -0.0400245, 0.0183714, -0.0416097, - 0.0361514, 0.0264205, -0.0355195, -0.0535544, -0.0176517, 0.0109518, 0.0471306, 0.0530063, - 0.0408165, -0.00365712, 0.0186745, -0.0167308, -0.0192916, -0.0318051, 0.0164768, 0.0619793, - -0.000283606, 0.0150233, 0.0253617, 0.0234364, -0.00652511, -0.0238146, -0.0132057, -0.00482485, - -0.0557863, -0.0139786, 0.0177731, -0.0304113, -0.0156029, -0.0503534, -0.00948837, -0.00765604, - 0.00322491, 0.0139671, 0.0437126, 0.051357, -0.0120266, -0.0424331, 0.0545242, 0.0207623, - 0.0389337, -0.0450301, -0.0408157, -0.00188467, 0.0802237, 0.10159, 0.00144506, 0.00801055, - 0.0471722, 0.00134928, 0.0049963, 0.00331887, -0.023034, -0.0105944, 0.000381919, 0.0476973, - -0.01709, -0.00342293, 0.0247222, 0.0385434, 0.031444, -0.00491429, -0.0478791, -0.00725465, - -0.00313559, -0.026061, -0.00803455, -0.00766215, -0.00734289, -0.00485036, -0.0128516, 0.0467148, - 0.0217181, 0.0961528, 0.0442988, 0.0244961, -0.00209479, 0.070689, 0.0440197, -0.0210048, - -0.0333998, 0.00952642, -0.0375876, 0.00130615, 0.033453, 0.0267356, 0.0286615, -0.0131523, - 0.0185672, 0.00152239, -0.0076401, 0.0130947, 0.0407226, 0.0263838, -0.0137793, -0.0336713, - 0.0205575, 0.0190752, 0.00701367, 0.0192376, 0.000230231, 0.00256423, -0.00603685, 0.00141138, - -0.000274883, -0.0127365, -0.0275762, -0.00276515, -0.0121963, -0.00158619, -0.00822213, 0.021954, - 0.00219908, 0.0747051, -0.00507968, -0.0224858, -0.0288911, -0.009155, -0.0148191, 0.0314522, - -0.00385337, 0.0544586, -0.0213008, -0.0350865, -0.0216466, 0.0122098, 0.00669712, 0.00928643, - -0.0222463, -0.00865128, -0.0119568, -0.0130535, -0.028518, -0.0214098, -0.0315799, -0.0243013, - 0.0445565, 0.0313687, 0.0127979, 0.0226593, 0.002793, -0.00884828, 0.0147583, 0.0132262, - 0.0187937, -0.00249565, -0.00482565, -0.00873885, -0.00158184, 0.018112, 0.00190477, 0.0203196 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p54(hatfit_yaw00_lev2_p54); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p54_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p55.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p55.mh deleted file mode 100755 index a3ca6d7..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p55.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p55.mh: - -#ifndef stasm_hat_yaw00_lev2_p55_mh -#define stasm_hat_yaw00_lev2_p55_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p55(const double* const d) // d has 160 elements -{ - const double intercept = -0.250169; - const double coef[160] = - { - 0.00770038, -0.0117506, 0.062048, 0.0180783, 0.0240321, 0.0333108, 0.0369724, -0.0106229, - 0.0118312, 0.0499778, 0.061373, 0.0373043, 0.0472146, -0.00673929, 0.0755102, 0.0273608, - 0.0547031, -0.015602, -0.0683437, -0.0307405, 0.0675858, 0.0804987, 0.0421439, 0.0451601, - 0.0381199, -0.00587557, -0.017652, 0.00875733, -0.00608711, 0.0247261, -0.0605143, 0.0144518, - 0.107937, 0.00733392, -0.0109964, 0.0212265, -0.0131021, -0.055415, -0.0756234, 0.06983, - -0.0126466, 0.00585092, 0.020196, 0.030979, 0.00395235, 0.0345755, -0.0128192, -0.0237322, - 0.00551386, 0.05754, -0.0355483, -0.0133549, -0.034749, 0.024405, 0.0142873, -0.00536911, - -0.0123543, 0.0699165, -0.00607456, 0.0269026, -0.0222243, 0.0179932, -0.0170113, -0.0444965, - -0.043051, 0.0686616, 0.0156304, 0.0271785, -0.00155287, -0.0190537, 0.00520236, -0.0426718, - -0.0380035, 0.0159989, -0.0108328, 0.00100199, 0.0144364, 0.0342008, 0.0593881, -0.0223646, - 0.0102675, -0.0133535, -0.00346879, 0.01142, 0.001026, -0.00617268, -0.0179935, 0.0294985, - 0.00672279, 0.0123285, 0.0107054, -0.00973206, -0.00529085, -0.0241834, -0.01892, 0.0318575, - -0.0107454, -0.0399393, -0.00696133, -0.0353624, -0.000994443, -0.0316886, 0.0117592, 0.0338041, - 0.0196972, -0.0370209, -0.0057983, -0.0262384, -0.0001756, -0.0105558, 0.0138915, 0.0301981, - 0.046032, 0.0066506, 0.0175139, 0.0332507, 0.00442133, -0.0277928, 0.0017533, 0.0299767, - -0.00254022, -0.00614713, 0.0406137, 0.0403652, 0.0213262, -0.00909879, -0.0216363, -0.0136817, - -0.00606465, -0.0205355, -0.0101716, -0.020908, -0.020426, 0.00635634, -0.00863355, -0.0117216, - -0.0107347, 0.00235228, 0.00293927, 0.00761096, -0.00581517, 0.0156982, -0.00447562, -0.00811945, - -0.0236372, 0.0142137, -0.0213592, 0.0131076, -0.00325128, 0.00408089, -0.0124824, -0.0344511, - -0.0238587, -0.019063, -0.00917022, -0.0286919, 0.023084, 0.0092957, 0.0240128, 0.036306 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p55(hatfit_yaw00_lev2_p55); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p55_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p56.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p56.mh deleted file mode 100755 index 2d234c4..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p56.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p56.mh: - -#ifndef stasm_hat_yaw00_lev2_p56_mh -#define stasm_hat_yaw00_lev2_p56_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p56(const double* const d) // d has 160 elements -{ - const double intercept = -0.328306; - const double coef[160] = - { - 0.0422546, 0.184962, 0.111152, 0.115769, 0.101409, -0.0368084, -0.0156815, 0.139848, - -0.052356, -0.108451, -0.0700122, -0.0229977, -0.0024418, 0.0153147, 0.0345232, 0.0241745, - 0.0212702, 0.000153695, -0.0788591, -0.0915139, -0.0247898, 0.0565069, 0.00748018, 0.0422068, - 0.0181788, 0.0418746, -0.0156512, 0.0312404, -0.00018109, 0.114732, -0.0092167, -0.0121939, - 0.0231432, 0.0906016, 0.160848, 0.0908163, 0.0713517, 0.0394256, 0.00905898, 0.0264914, - 0.0148162, -0.0424319, -0.0394716, -0.0317375, -0.0753654, -0.0172819, -0.0305321, -0.0236258, - 0.022185, 0.012337, 0.0471083, 0.0319807, -0.0116053, -0.0167637, 0.0203835, 0.00503093, - -0.0140213, 0.0198297, 0.0664976, 0.0462881, 0.0105653, -0.000511109, -0.00413334, -0.0450897, - -0.00640742, -0.0325777, 0.0146104, 0.0213001, 0.0387468, -0.00322437, 0.0274184, 0.00179133, - -0.0146529, -0.0246124, -0.0441073, -0.042919, -0.0813967, -0.0495854, -0.0512577, -0.0147774, - 0.0484091, -0.00169258, 0.00229933, 0.0214474, 0.0207526, -0.0267993, -0.042788, -0.0367772, - -0.0232888, -0.0114198, -0.00746757, -0.0123173, 0.000351264, 0.00888676, 0.0162699, 0.0085016, - 0.0219701, 0.00384312, -0.0292739, -0.0425834, 0.0015455, 0.00867374, -0.00863364, 0.0193312, - 0.023051, 0.00926908, 0.00392346, 0.0118959, 0.0199253, 0.00515107, 0.0196919, 0.0199765, - -0.0084015, -0.00823807, 0.0127497, -0.0211327, -0.0121992, -0.0401961, -0.0610518, -0.0164254, - -0.000862504, 0.0221161, 0.0126576, 0.00322465, -0.0033571, 0.00501517, 0.0331727, 0.048669, - -0.0105479, -0.0102952, 0.0363188, 0.0324739, 0.0273342, -0.0126718, 0.00903472, -0.00375157, - 0.00556322, 0.0250934, 0.0164272, 0.0050311, -0.000954502, 0.00514953, -0.00287182, -0.0133536, - -0.0146159, 0.0136428, 0.00980887, 0.0328536, 0.0203876, 0.0245116, 0.00937394, -0.0276986, - -0.00316586, -0.0252487, 0.0171106, 0.0432378, 0.00206141, 0.011208, 0.0426284, -0.0135959 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p56(hatfit_yaw00_lev2_p56); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p56_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p57.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p57.mh deleted file mode 100755 index 19cafd6..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p57.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p57.mh: - -#ifndef stasm_hat_yaw00_lev2_p57_mh -#define stasm_hat_yaw00_lev2_p57_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p57(const double* const d) // d has 160 elements -{ - const double intercept = -0.203007; - const double coef[160] = - { - 0.0865128, 0.0248213, 0.0086474, 0.0259264, 0.0268835, 0.0689304, -0.102411, 0.0205806, - 0.117378, -0.00638402, -0.0704098, -0.0455065, 0.0117648, 0.0137531, 0.0162044, 0.0398035, - 0.0274852, -0.00498262, 0.0209268, 0.0316234, 0.0288375, 0.0340683, 0.0668118, 0.0260287, - 0.0215089, 0.0406523, 0.0853733, 0.0623678, 0.0242103, -0.012731, 0.0075814, 0.0342916, - 0.0283612, -0.00154386, -0.0240037, -0.0495551, 0.00866836, -0.0187868, 0.0618618, 0.0776875, - -0.0219694, 0.0250212, -0.0495675, 0.0345358, -0.00554467, -0.0609616, 0.0596593, -0.0024294, - -0.00819783, 0.0356277, 0.0464799, 0.0898769, 0.0426898, -0.0331242, 0.000643486, -0.00481121, - 0.000895754, 0.0312877, -0.00516461, 0.0300407, 0.00527737, -0.00775853, 0.00704294, 0.0223022, - -0.00470824, 0.0474949, 0.0244843, -0.0149368, -0.0229115, -0.0154321, -0.0265509, 0.0119826, - -0.016407, -0.0128797, 0.00940966, 0.0142355, 0.0178779, 0.02561, -0.0083376, 0.0394511, - -0.052462, -0.0293036, 0.00800413, -0.0132136, -0.0146051, 0.0310741, -0.00819054, -0.0509036, - -0.024018, -0.0654997, -0.0291971, -0.0366762, -0.0289362, 0.0235513, 0.00167891, -0.00503019, - -0.0119401, -0.0284647, 0.00416893, 0.00107612, 0.012074, 0.0370183, -2.30073e-05, -0.0357759, - 0.00721041, 0.00510823, 0.0151765, -0.0191009, -0.0173274, -0.00825617, -0.0405202, -0.0194431, - 0.0323954, -0.0224443, -0.020123, 0.0101763, -0.0117992, -0.000572933, 0.0238616, 0.00865666, - 0.0040677, 0.011807, -0.0538971, -0.00438757, -0.0352308, -0.000402236, -0.00168159, -0.00856236, - -0.00958126, 0.0209521, 0.0110831, 0.0138053, -0.0217701, -0.0060596, -0.0140786, -0.0134007, - -0.0150505, 0.00959312, -0.00261968, -0.0179398, -0.0201037, -0.00983304, -0.000632587, 0.00957735, - 0.0348604, 0.0354315, -0.00866957, -0.0197128, -0.00944631, -8.65125e-05, 0.00391458, 0.0133003, - -0.00452637, 0.010231, 0.0347043, 0.0398113, 0.00425353, -0.00193257, -0.0202522, -0.0150822 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p57(hatfit_yaw00_lev2_p57); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p57_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p58.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p58.mh deleted file mode 100755 index 108e28c..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p58.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p58.mh: - -#ifndef stasm_hat_yaw00_lev2_p58_mh -#define stasm_hat_yaw00_lev2_p58_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p58(const double* const d) // d has 160 elements -{ - const double intercept = -0.384347; - const double coef[160] = - { - -0.0590473, -0.0107227, 0.0440664, 0.00644412, -0.0110966, 0.00148019, -0.0853849, -0.0932483, - -0.0392207, -0.0348981, -0.00926003, 0.0317718, 0.0280975, 0.0566762, 0.00941703, -0.0125592, - -0.000283368, -0.00502152, -0.0161522, -0.000118852, 0.00761111, 0.0468401, 0.0465597, 0.00643877, - -0.00673491, 0.00193026, -0.0347163, -0.0226197, -0.0508994, 0.00725766, 0.0415696, -0.0173771, - 0.0682239, 0.0358892, 0.0108749, -0.00233464, -0.0229325, -0.064544, 0.000298107, -0.0620169, - -0.0186442, 0.0436344, -0.0143493, -0.050769, -0.0402411, 0.0134804, -0.0727617, 0.0189837, - 0.0197985, 0.0115539, 0.00412827, 0.0101014, 0.0171984, 0.0365728, 0.00240549, 0.0200738, - 0.102691, 0.0325696, 0.00238379, -0.0144204, -0.0414022, 0.0173708, 0.00370051, 0.0572132, - -0.0500593, -0.0452855, -0.0308472, -0.0417367, 0.0276262, 0.0335967, 0.000101994, -0.0125322, - 0.0184756, 0.0674955, 0.0767639, 0.0524944, 0.0106225, -0.00806347, 0.0145697, 0.0241127, - 0.0271895, 0.0055225, -0.0450105, -0.0188389, 0.0217115, 0.0201329, -0.0117536, 0.0364266, - 0.0621516, 0.0058109, 0.0328488, 0.0289039, 0.0422151, -0.0215054, 0.0247541, 0.010941, - 0.0546283, 0.0028825, -0.00979371, 0.02213, 0.0302506, -0.0296153, 0.0105182, 0.03328, - 0.0185126, -0.0128748, 0.00842694, 0.0417042, 0.0210447, 0.0329542, 0.0635035, 0.0543379, - 0.0372297, 0.0482659, 0.0787115, 0.0584661, 0.0446115, -0.0131087, -0.00200247, 0.043677, - -0.0560349, 0.0193011, -0.0152084, -0.0208463, 0.0323249, 0.0279498, -0.000862152, 0.00584713, - -0.0218628, -0.0139652, -0.0164495, 0.00507096, -0.0313434, -0.0317992, -0.0274037, -0.0352698, - -0.0352773, -0.0269394, -0.0122851, 0.0570417, 0.0430161, 0.017478, 0.0152139, 0.00152666, - -0.0431643, -0.0129325, 0.0101743, 0.024005, 0.030459, 0.026044, -0.00930558, -0.0343825, - -0.00255551, 0.02388, -0.00157908, -0.0270078, -0.0219657, 0.0105858, -0.0106584, 0.0122666 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p58(hatfit_yaw00_lev2_p58); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p58_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p59.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p59.mh deleted file mode 100755 index 47320f3..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p59.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p59.mh: - -#ifndef stasm_hat_yaw00_lev2_p59_mh -#define stasm_hat_yaw00_lev2_p59_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p59(const double* const d) // d has 160 elements -{ - const double intercept = -0.225675; - const double coef[160] = - { - -0.040477, -0.00609423, -0.00821916, -0.0548738, -0.0169424, 0.0560629, -0.0976803, -0.0536427, - -0.00845835, -0.00693062, -0.0641817, -0.0622238, -0.0746946, -0.00356808, -0.0219615, -0.0562677, - -0.0112212, -0.00771601, -0.0362499, -0.0567906, -0.0768136, 0.00568094, 0.0410822, 0.00568983, - -0.00380847, 0.0141137, 0.0186174, 0.00927793, -0.0298109, -0.00952264, 0.0131703, -0.0200301, - -0.0191894, 0.0028206, 0.00948692, 0.0159359, 0.00167328, -0.0168206, 0.0138921, -0.0010733, - 0.0206606, 0.011975, -0.0235473, 0.0564816, 0.0761392, -0.0740906, -0.0572061, -0.0199989, - 0.00309155, -0.0190737, 0.000729695, 0.0495573, 0.117437, 0.0523793, 0.0212986, 0.0454454, - 0.0286832, 0.0402036, 0.0860817, 0.0986324, 0.080419, 0.0786126, 0.0961135, 0.0916864, - 0.000713514, 0.0161459, 0.0238884, 0.0219361, -0.00209585, 0.0039416, 0.0269808, -0.000680694, - 0.00881705, 0.0295667, 0.0165846, 0.00277793, 0.0118923, -0.0177124, -0.0122367, 0.000993965, - 0.0169292, 0.0339602, -0.019476, 0.0122096, 0.0174662, -0.00977033, 0.0269987, 0.0407677, - 0.0307038, 0.0399019, -0.0295386, -0.030221, -0.061692, -0.0551209, 0.03251, 0.0324767, - -0.00701717, 0.0126396, 0.00466349, 0.0169105, -0.0294034, -0.0441127, -0.00279974, -0.0113114, - 0.0191582, 0.0291767, 0.0220347, 0.0167793, 0.00828308, -0.0079766, -0.0115879, 0.00390746, - 0.00364135, 0.0333894, 0.0046142, -0.00540084, 0.0075717, -0.00470646, -0.0191649, -0.00688477, - 0.0113193, -0.00401891, 0.00742461, -0.00336853, 0.0177918, 0.0482465, 0.0163182, -0.0144115, - -0.0189215, -0.0170834, 0.000100562, -0.00627354, 0.0241668, 0.0217989, -0.0120274, -0.0186345, - -0.0243717, -0.0432802, -0.0227666, 0.0136494, 0.0290572, 0.0133098, -0.0198099, -0.0344272, - -0.0299281, -0.0202596, -0.0112792, -0.00627686, 0.0113015, 0.00128058, -0.0142346, -0.0147663, - 0.0242026, 0.00906782, -0.00932914, 0.016803, -0.00062888, -0.000295773, 0.0133787, 0.064017 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p59(hatfit_yaw00_lev2_p59); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p59_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p60.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p60.mh deleted file mode 100755 index d939901..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p60.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p60.mh: - -#ifndef stasm_hat_yaw00_lev2_p60_mh -#define stasm_hat_yaw00_lev2_p60_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p60(const double* const d) // d has 160 elements -{ - const double intercept = -0.0574429; - const double coef[160] = - { - -0.0481914, -0.0802053, -0.0574908, -0.0144008, -0.0340921, 0.0176143, -0.0273937, -0.065969, - -0.0645076, -0.0216497, -0.0319475, -0.0358559, -0.0307303, -0.000141573, -0.0476916, -0.019718, - -0.011527, 0.00677815, -0.0317135, -0.0533613, -0.0469683, 0.00057032, -0.0231745, 0.00652888, - 0.0652671, 0.0573901, -0.00943745, -0.0753712, -0.0411104, -0.0184814, 0.000290673, 0.0272182, - 0.0513562, 0.0555283, 0.0992615, 0.0705934, 0.024459, 0.00052681, 0.0214185, -0.0196554, - -0.00446396, 0.0397874, -0.0230297, -0.0356375, -0.0500258, -0.0872619, 0.0171653, -0.00482889, - 0.0163187, 0.0409706, 0.0199018, 0.0214592, 0.00166659, -0.00809229, 0.0346777, 0.0031199, - -0.0113046, 0.0163862, -0.00277179, 0.018063, 0.022806, -0.00388124, 0.105189, 0.00141979, - -0.0687237, -0.0122344, -0.00200493, 0.0379497, 0.0276317, -0.0045303, 0.00388892, -0.0202021, - -0.0677418, -0.0309028, -0.016149, -0.00385407, -0.0104694, -0.0736018, 0.0296348, 0.0565345, - 0.0757052, 0.0444074, 0.00251371, 0.0318623, -0.0424912, 0.122445, 0.118608, 0.0299465, - 0.0324904, 0.00866944, -0.0105795, 0.00675961, -0.0485598, 0.0270956, 0.00775366, 0.00346522, - -0.0240875, -0.0145366, 0.00787615, -0.013137, -0.0283774, -0.0251651, -0.036254, -0.0162058, - -0.00468493, -0.0105304, 0.011014, -0.0353427, 0.0080706, -0.03488, 0.00061812, -0.00251708, - -0.00221024, -0.0177607, 0.0496022, -0.0320555, 0.0287524, -0.0167142, -0.0221543, -0.00306374, - -0.0473918, -0.00819185, 0.0295476, 0.0660758, 0.0524945, -0.00485913, -0.0213759, -0.0239857, - -0.0371676, -0.00204892, -0.057195, -0.0158003, 0.0125775, -0.0164363, 0.00846072, -0.0232319, - 0.0346082, 0.034776, 0.00184092, 0.0412026, 0.00858117, 0.042719, -0.0115131, 0.000989414, - 0.0302057, 0.0501328, 0.0110354, 0.0176725, 0.00231205, 0.0281351, -0.00680329, 0.028958, - 0.0595568, 0.00981931, 0.0759773, 0.0700752, -0.0174127, 0.0333898, 0.0162407, 0.0248003 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p60(hatfit_yaw00_lev2_p60); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p60_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p61.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p61.mh deleted file mode 100755 index ca250df..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p61.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p61.mh: - -#ifndef stasm_hat_yaw00_lev2_p61_mh -#define stasm_hat_yaw00_lev2_p61_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p61(const double* const d) // d has 160 elements -{ - const double intercept = -0.522524; - const double coef[160] = - { - -0.025582, -0.051103, -0.0682627, -0.0420982, -0.0651034, -0.00234092, -0.0747404, -0.0480761, - 0.107729, 0.00864232, -0.00692037, -0.0102879, -0.0240543, -0.0372096, -0.00379856, 0.00575709, - 0.0676828, 0.00608742, 0.0175875, 0.0310507, 0.0308839, -0.000315561, -0.021326, -0.00721177, - 0.00359587, -0.00721105, 0.00543791, -0.0175253, -0.00954474, -0.0153807, -0.0221238, 0.000263776, - -0.00772571, 0.0223946, -0.0182963, -0.0436557, 0.0567689, 0.00871555, -0.0673544, -0.0361942, - -0.0467252, 0.0726687, -0.00774027, -0.0425389, 0.0317325, -0.0200056, 0.0628934, 0.0106654, - -0.0175337, 0.0410224, 0.0554879, 0.0386439, 0.0295719, 0.0146787, 0.0482875, 0.058383, - -0.024714, 0.0232768, 0.0340872, 0.055188, 0.0395916, 0.0177769, 0.0895858, 0.0178616, - -0.0133556, 0.0151659, -0.00673149, -0.0250919, -0.0304849, -0.0186642, 0.000626389, -0.0335218, - 0.0608877, 0.0685431, 0.0731696, 0.0613766, -0.0132325, 0.0413995, 0.131949, 0.0114613, - -0.0118039, 0.0113914, 0.0373391, -0.0196422, 0.0161307, 0.0250844, 0.0644002, -0.0362912, - -0.0408222, -0.0456617, -0.0231356, -0.0395514, -0.00521852, -0.0370925, -0.00181958, -0.0144886, - -0.0149205, -0.0229657, 0.0109783, -0.017396, 0.0178595, -0.0404573, -0.0112393, 0.0812739, - 0.0020366, -0.0124532, 0.00444585, -0.0111524, -0.00913733, 0.0125664, 0.00483298, 0.00217064, - -0.0144132, -0.0490858, -0.0180631, -0.0293735, -0.0397752, 0.0204384, 0.0192876, -0.114034, - 0.0300214, 0.0347912, -0.0458519, 0.0255813, -0.0321425, 0.038942, 0.0340921, 0.0874599, - 0.0527331, 0.051523, 0.0481371, -0.0111974, 0.0113982, -0.0118794, 0.0174943, 0.00461061, - 0.0252508, -0.0129713, 0.0672082, 0.045425, 0.00719687, 0.0363388, 0.0130413, -0.0106249, - 0.0131324, -0.025057, 0.0374134, -0.0126326, -0.00183529, -0.00414838, -0.014713, -0.0068541, - 0.0114563, 0.00325675, 0.0470546, 0.0109092, 0.055069, 0.0410553, 0.0344168, 0.061962 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p61(hatfit_yaw00_lev2_p61); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p61_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p62.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p62.mh deleted file mode 100755 index 5b19024..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p62.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p62.mh: - -#ifndef stasm_hat_yaw00_lev2_p62_mh -#define stasm_hat_yaw00_lev2_p62_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p62(const double* const d) // d has 160 elements -{ - const double intercept = -0.546964; - const double coef[160] = - { - 0.138885, -0.00653416, 0.00853471, 0.0371284, 0.0234242, -0.0284408, -0.0315538, -0.0084206, - -0.0215589, -0.0296899, -0.0172399, 0.0141021, -0.00141327, 0.0023797, 0.0203704, -0.0246041, - 0.0218481, 0.0149802, -0.00505354, -0.0424898, 0.0127839, -0.014713, -0.0497268, 0.0124626, - 0.0272064, 0.0198233, 0.0172056, 0.037164, 0.0912689, 0.0180614, 0.040656, 0.0120559, - -0.00933765, -0.0506735, -0.0260352, -0.0163973, -0.0156429, -0.0580504, -0.0765838, -0.0387924, - -0.0905708, 0.0280471, 0.0110524, 0.0151604, 0.0410297, 0.00172472, 0.0868415, 0.125911, - -0.0135293, 0.00280759, 0.0468298, 0.0177423, 0.0340985, -0.0281303, 0.0436825, 0.00510234, - -0.000461449, 0.0356534, 0.00241731, 0.0121216, -0.0304363, 0.0429733, 0.043888, -0.0563081, - 0.00259206, 0.0322458, 0.0219172, 0.0211178, -0.032417, 0.0411085, 0.0655549, -0.0576921, - 0.0124454, 0.000714222, 0.0186819, 0.0605241, -0.00227574, 0.0301202, 0.114545, 0.00673266, - -0.0480568, -0.0312519, 0.0222479, -0.0534711, -0.00581887, -0.0658351, 0.00621864, -0.0312635, - 0.0388063, -0.0279277, 0.00658296, -0.0142938, 0.00486383, -0.0184964, -0.0183719, 0.0867722, - -0.0211815, -0.0206133, 0.0011078, -0.0233788, -0.00747, 0.0274744, -0.0195416, -0.0643339, - -0.0140197, -0.0308474, -0.0133872, -0.0273788, -0.0271311, -0.0214956, 0.00498129, -0.0151128, - 0.0111828, -0.0314769, 0.00919131, -0.0110078, 0.0173443, -0.00997421, 0.0334072, 0.0217874, - 0.106887, 0.0221746, 0.0352712, 0.00712471, -0.0108071, 0.04537, 0.059324, 0.0630501, - -0.0271398, -0.021732, 0.056126, 0.0255872, 0.0172018, -0.0036939, -0.00765012, -0.0380807, - 0.028154, 0.0365638, 0.0154153, -0.0389189, -0.00990173, 0.012854, 0.0239918, 0.0617999, - 0.00838691, 0.0237335, 0.0890365, 0.043905, 0.0672928, 0.0101857, -0.022384, -0.00226531, - 0.00802148, -0.0030324, -0.0216086, 0.0359947, 0.0382351, 0.0844859, 0.0510145, 0.0127371 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p62(hatfit_yaw00_lev2_p62); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p62_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p63.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p63.mh deleted file mode 100755 index 5244e9c..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p63.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p63.mh: - -#ifndef stasm_hat_yaw00_lev2_p63_mh -#define stasm_hat_yaw00_lev2_p63_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p63(const double* const d) // d has 160 elements -{ - const double intercept = -0.423857; - const double coef[160] = - { - 0.0265549, -0.0276044, -0.00370968, -0.0118707, -0.00882112, -0.0246113, -0.0467704, 0.0199824, - -0.00186678, 0.0315145, -0.000559825, 0.00730218, 0.0767914, 0.00480617, -0.0305773, -0.00495591, - -0.00544638, -0.0269742, -0.00591436, -0.000756903, 0.0649644, -0.0157527, 0.00517219, 0.0190719, - -0.00839473, -0.0469533, -0.0418069, -0.0369397, -0.0190076, -0.0324, -0.0165552, 0.0149198, - -0.00471751, 0.0171046, 0.000668457, -0.0698986, -0.0619992, -0.0615341, -0.12642, 0.0252094, - -0.0435028, 0.043545, 0.0441414, 0.0306194, 0.00830911, -0.00160527, 0.0788639, -0.022395, - 0.0282649, 0.0525967, 0.0219707, 0.0154664, -0.0297831, 0.0328373, 0.0345584, -0.0153494, - 0.00618624, 0.0107224, 0.0286507, 0.0758012, 0.00679737, 0.0580987, 0.0755779, -0.0314715, - 0.0216487, 0.00472771, 0.0206649, 0.0615916, -0.00126626, 0.0549339, 0.0545175, -0.0178235, - 0.00250801, -0.0135117, 0.0126693, 0.0254024, -0.0119378, -0.0245614, 0.0872058, -0.061571, - -0.0144706, -0.0139933, 0.0138068, -0.00669542, -0.000147116, 0.0109306, 0.0232728, 0.0236077, - -0.00255406, -0.0218093, -0.0178081, -0.0399348, -0.0541426, 0.0179802, 0.000382026, -0.080307, - -0.0241902, -0.0399402, -0.00650599, -0.0171668, -0.0288674, -0.0543343, 0.00140922, -0.0267591, - -0.0219663, -0.0134303, -0.0101318, -0.0399241, 0.00262961, -0.000841279, 0.000310534, 0.0195679, - 0.00601974, 0.00463629, 0.0528312, 0.0334954, 0.0483439, 0.0173347, 0.0736588, 0.0803597, - 0.0245546, 0.00187879, 0.0513636, -0.0410876, -0.0243436, 0.00211205, 0.0302069, 0.0518358, - 0.000846981, 0.0155087, 0.0579027, -0.000698564, 0.0446464, 0.00159007, -0.00940185, 0.0313693, - 0.0356152, 0.00868856, 0.0632068, 0.0260316, 0.0439695, 0.0391611, -0.00809624, 0.0123908, - 0.0122246, 0.0118871, -0.000141026, 0.0285526, 0.013631, 0.0368892, 0.0312239, -0.0214874, - -0.0506746, -0.00442504, -0.0284878, -0.000463468, 0.0254501, 0.0404056, 0.000673732, 0.0570073 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p63(hatfit_yaw00_lev2_p63); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p63_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p64.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p64.mh deleted file mode 100755 index c42863d..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p64.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p64.mh: - -#ifndef stasm_hat_yaw00_lev2_p64_mh -#define stasm_hat_yaw00_lev2_p64_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p64(const double* const d) // d has 160 elements -{ - const double intercept = -0.318611; - const double coef[160] = - { - 0.0303392, -0.0338756, 0.0834237, 0.120868, 0.0812831, 0.0402208, 0.0340414, 0.00752149, - 0.0202789, -0.0293674, -0.0115149, -0.0100918, -0.0275825, -0.00502325, -0.0134966, 0.0249952, - -0.00173327, -0.0202851, -0.0188452, -0.00362694, -0.0342703, -0.0545043, -0.0315145, 0.0116079, - -0.0292766, -0.0238764, -0.043136, -0.0673906, -0.024928, -0.0381466, -0.0403704, -0.0131486, - -0.00476721, 0.0190162, -0.0253495, -0.035439, 0.0183347, -0.0346492, 0.0120401, 0.0775275, - -0.0580545, 0.0137694, -0.0451933, -0.0478655, -0.0560371, -0.0302546, 0.0278067, -0.0906249, - -0.00611261, 0.0136716, 0.0284031, 0.0141213, 0.0380981, 0.0211424, 0.061006, 0.0220357, - -0.0239319, 0.004601, 0.0116586, 0.00780832, 0.0126529, 0.0389716, 0.0619632, -0.0620037, - -1.6622e-05, 0.00529334, 0.0163925, 0.0575629, -0.0126739, 0.0293707, 0.0555329, -0.0340061, - -0.0492854, -0.0263342, -0.0230841, -0.00664351, -0.00307715, -0.0315079, -0.00801194, -0.0224053, - 0.0216491, -0.0340911, 0.0330381, -0.0138968, -0.0369097, -0.0292224, 0.00749071, -0.0717104, - 0.00193177, -0.0161945, -0.0172798, -0.0321503, -0.0400085, -0.0127888, -0.010172, 0.0146021, - 0.0102315, 0.0240944, 0.0175333, 0.0151656, 0.0321006, -0.00574093, -0.0279765, 0.0826356, - -0.0166594, 0.032607, 0.00456517, 0.0192567, 0.0363608, 0.0470817, 0.0494096, 0.0576953, - 0.0478303, 0.0388651, 0.0304998, 0.0556383, 0.06976, 0.0325026, 0.0548839, 0.0677554, - 0.0387995, 0.058294, 0.0845377, 0.0621987, 0.0602871, 0.100239, -0.032246, 0.0648524, - -0.00656602, 0.0129769, 0.0062775, 0.025612, 0.0493872, 0.0198563, 0.0228554, 0.0235844, - -0.0314601, 0.0076225, -0.013869, 0.00267554, -0.00261668, -0.026843, -7.51825e-05, -0.0290167, - -0.0213466, 0.0254961, -0.0551618, 0.000592905, -0.0348985, -0.00987818, -0.00998483, -0.000237291, - -0.0332162, 0.114249, 0.00864831, 0.00608068, 0.00960567, -0.00525184, -0.00263628, 0.0300145 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p64(hatfit_yaw00_lev2_p64); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p64_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p65.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p65.mh deleted file mode 100755 index d220dc0..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p65.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p65.mh: - -#ifndef stasm_hat_yaw00_lev2_p65_mh -#define stasm_hat_yaw00_lev2_p65_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p65(const double* const d) // d has 160 elements -{ - const double intercept = -0.243987; - const double coef[160] = - { - -0.0349282, -0.0157765, -0.0086924, -0.00282699, -0.0149473, -0.0225539, 0.00811034, -0.0277787, - -0.0445545, -0.0268885, 0.00123814, 0.018723, 0.0215577, 0.00348647, 0.0432877, 0.015393, - -0.0146094, -0.0727512, -0.0167339, -0.00526844, 0.0124206, -0.0192743, -0.00112128, 0.0524325, - 0.0318377, -0.0210181, 0.0185195, 0.0107726, 0.00235686, -0.0229252, -0.0378398, 0.0122169, - 0.0648801, -0.0481284, -0.0225702, -0.016585, -0.0145166, 0.00342191, -0.0343923, 0.0447919, - 0.00730072, 0.00968041, 0.0132859, 0.025228, -0.0165621, 0.00393144, 0.0214046, 0.00439897, - 0.0515766, 0.105316, 0.0531057, 0.0329829, 0.00820431, 0.0454908, 0.0646219, 0.0528244, - 0.0913025, 0.116096, 0.00542359, 0.00230105, -0.00361529, 0.0339653, 0.0867848, 0.0887866, - 0.0249319, 0.0225997, -0.0341391, -0.0283439, -0.032192, -0.0270769, -0.0276354, -0.0278922, - -0.00167969, 0.031839, 0.0130776, 0.0513927, 0.0148874, -0.0333221, -0.0565927, -0.0919326, - -0.0481775, 0.00961148, 0.0369173, 0.0339856, 0.0305644, -0.0105843, -0.0406127, -0.0459686, - -0.0572706, -0.0102658, 0.006908, 0.024483, 0.0237157, 0.0174332, 0.00794934, -0.0169364, - -0.0855346, -0.0607299, -0.0165062, 0.0368585, 0.0678364, 0.0470307, 0.0111429, -0.0778053, - -0.0145917, -0.00644063, -8.66602e-05, 0.0483476, 0.0388019, 0.0390603, 0.0208508, -0.0057846, - 0.02632, 0.0177281, -0.0409234, -0.0488005, -0.00595819, 0.0191264, 0.0198247, 0.0079343, - 0.00294371, 0.0450466, -0.049365, -0.0611519, -0.0673944, 0.00661048, -0.0227719, -0.0129555, - 0.0390499, 0.0313589, -0.0183179, -0.027491, -0.0362773, -0.0336254, -0.0183198, 0.0135441, - 0.0478529, 0.0184543, 0.00221541, -0.0113542, -0.0103142, -0.0332987, -0.00890361, 0.00957642, - 0.035809, 0.00510408, 0.0259121, 0.00585391, 0.00227161, -0.00880785, 0.00959148, 0.0217641, - -0.00181733, -0.0159237, -0.00991204, -0.0155567, -0.00237713, 0.0162149, 0.0108071, 0.0235907 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p65(hatfit_yaw00_lev2_p65); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p65_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p66.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p66.mh deleted file mode 100755 index d97f04b..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p66.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p66.mh: - -#ifndef stasm_hat_yaw00_lev2_p66_mh -#define stasm_hat_yaw00_lev2_p66_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p66(const double* const d) // d has 160 elements -{ - const double intercept = -0.0701518; - const double coef[160] = - { - -0.0708654, 0.00765122, -0.0479664, -0.0151742, -0.0449968, 0.0104616, 0.0187811, -0.111585, - -0.0537272, -0.0074824, 0.00745304, 0.0122481, 0.00990062, -0.0218072, 0.00427396, -0.0480915, - -0.0640504, -0.0264089, -0.0418814, 0.0102942, 0.00557185, 0.022444, 0.0205122, -0.0415472, - -0.000980233, 0.0081122, 0.0142478, 0.0312302, 0.0283258, 0.0249698, 0.0275674, -0.0121698, - 0.00328101, -0.0607017, -0.0547278, -0.00533866, -0.0167359, -0.0187817, 0.0308578, -0.0826227, - 0.0210649, -0.0401433, 0.0858922, -0.0162593, -0.0293997, -0.00709196, -0.0103385, -0.0348045, - 0.046604, 0.0130812, 0.0206067, 0.00890424, -0.0267464, -0.00939369, 0.0128553, -0.0132674, - 0.0038518, -0.00440902, 0.0568641, 0.0129008, -0.0236924, -0.0437552, 0.0106715, -0.00669881, - -0.0294986, -0.0368686, -0.0473002, -0.0190321, -0.0199637, -0.0099342, 0.00954593, 0.0244957, - -0.011637, 0.0395508, 0.0042163, 0.0441084, 0.0638421, 0.0394723, 0.103015, 0.156714, - 0.052255, 0.0621412, 0.0272445, 0.00398312, 0.0339932, 0.0758456, 0.0253288, 0.0927471, - 0.0252759, 0.00858632, -0.00436336, -0.000708602, 0.0080489, 0.0244064, -0.0327362, 0.0375689, - 0.0432853, 0.0704611, 0.0170734, 0.00734155, 0.00790755, 0.0196225, -0.0162497, 0.0689148, - -0.0052587, 0.0383359, 0.0450021, 0.0342107, 0.0244859, -0.0326178, -0.0691935, -0.0223194, - -0.0558986, 0.031864, -0.0243773, 0.0420224, 0.022056, 0.0248185, 0.0355769, 0.00639857, - -0.0372143, -0.0413475, 0.0206646, -0.0256079, 0.013142, 0.000549, 0.0656237, -0.0167369, - -0.00157571, -0.0133437, 0.0393268, 0.0442889, 0.023384, 0.0158681, -0.0211338, -0.0113463, - -0.0411466, -0.0306031, -0.0099946, -0.00577642, 0.0167192, 0.015533, -0.0201584, -0.0222372, - -0.0119031, -0.0196272, -0.0679993, -0.0403379, -0.0448462, -0.00325033, 0.0126336, 0.0200267, - -0.00218492, 0.0761284, 0.00536654, -0.045271, -0.0379694, -0.068879, -0.048176, -0.0235171 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p66(hatfit_yaw00_lev2_p66); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p66_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p67.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p67.mh deleted file mode 100755 index f6cd06c..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p67.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p67.mh: - -#ifndef stasm_hat_yaw00_lev2_p67_mh -#define stasm_hat_yaw00_lev2_p67_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p67(const double* const d) // d has 160 elements -{ - const double intercept = -0.247596; - const double coef[160] = - { - -0.0736169, -0.0276127, -0.0110018, 0.0327689, 0.0417696, -0.0508686, 0.0518187, 0.0840511, - -0.0303886, -0.00991154, -0.0190655, 0.0268638, 0.0390148, -0.0306362, 0.00124625, 0.0292091, - -0.028384, 0.0154506, -0.0489238, -0.0292177, -0.0432419, 0.0237735, -0.00645516, -0.075781, - -0.0344447, 0.00795708, -0.0113362, 0.00375715, -0.0307709, 0.019674, 0.0208082, -0.0810644, - -0.0320321, -0.00306997, -0.0356069, -0.0101321, -0.0319446, -0.00480176, 0.0949859, -0.0169822, - -0.00113823, 0.00555259, 0.071154, -0.062097, -0.0217091, -0.0145069, 0.00738431, -0.0397669, - 0.01241, -0.0189924, 0.0300015, -0.0195862, -0.00475629, -0.0265258, 0.0166531, 0.0318153, - -0.00367116, -0.02759, 0.0188702, -0.0188599, -0.00399811, 0.0167034, -0.0182665, -0.0490339, - 0.0140556, -0.0226848, 0.0621946, 0.00136623, 0.0219617, -0.00417779, 0.00867766, 0.0167383, - 0.0303028, -0.0610571, -0.00157912, 0.00590548, -0.000679747, -0.0181829, 0.0759585, -0.0109324, - 0.103172, 0.0419958, 0.0377971, 0.0550718, 0.0372263, 0.0418955, 0.0177629, 0.105186, - 0.0102773, -0.0236646, 0.0132591, 0.0170306, 0.0274957, 0.0243854, -0.0133287, 0.00106572, - 0.0625944, 0.0669875, 0.0409219, -0.0185662, 0.0264258, -0.00204492, 0.0117916, 0.0869794, - 0.0293629, 0.0145125, -0.0270072, -0.029051, 0.00351191, 0.0514497, -0.0230748, -0.00405066, - 0.0308248, 0.0564195, 0.0713889, 0.0670879, 0.0589003, 0.0795609, -0.0235842, 0.0512964, - 0.0126223, -0.0347411, 0.0108369, -0.00844631, -0.0383972, -0.00864758, -0.0113566, -0.0264627, - -0.0568571, -0.026271, 0.0151984, -0.00574079, -0.0192334, -0.02782, 0.044097, -0.0414028, - -0.0366356, -0.0275175, -0.0127972, -0.0357274, -0.0439535, -0.0347405, 0.0295106, -0.0334166, - -0.0115584, -0.00484589, 0.0494478, 0.0215708, 0.0369365, 0.00632509, 0.029246, 0.0119853, - -0.0246275, -0.010441, -0.01384, -0.00788622, 0.00133374, 0.0109552, -0.0532666, 0.0105872 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p67(hatfit_yaw00_lev2_p67); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p67_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p68.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p68.mh deleted file mode 100755 index 4fbe40c..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p68.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p68.mh: - -#ifndef stasm_hat_yaw00_lev2_p68_mh -#define stasm_hat_yaw00_lev2_p68_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p68(const double* const d) // d has 160 elements -{ - const double intercept = -0.0757646; - const double coef[160] = - { - -0.00765739, 0.00768329, -0.0575099, -0.0516348, -0.0266656, -0.0500927, 0.0358745, -0.0175411, - 0.0177345, 0.0236582, -0.0120278, 0.00559529, -0.0201657, -0.030502, 0.054121, 0.0297531, - -0.0419598, -0.00731448, -0.0151526, -0.00912542, -0.0240267, -0.0837478, -0.0202523, -0.0256003, - -0.022269, 0.00466779, -0.00589252, 0.0435573, 0.0254818, -0.0237978, 0.0257976, 0.0146779, - -0.043373, -0.00708679, -0.0357599, -0.0156336, -0.0216445, -0.0389312, 0.0389291, 0.0233499, - -0.00632229, 0.000509776, -0.0435948, -0.0470262, -0.0667185, 0.0747328, 0.126893, -0.00129318, - -0.0321395, -0.00897225, -3.68053e-05, -0.0283675, -0.0115208, -0.0179474, 0.00675529, -0.00883719, - -0.00705335, 0.0316865, 0.0578501, -0.00771022, 0.0100425, -0.0355437, 0.00655766, -0.0165289, - -0.00349749, 0.0104534, 0.0685608, -0.0369772, 0.00639225, -0.0285923, -0.0259713, -0.00514401, - 0.00499322, -0.0696404, 0.0409068, -0.0124631, 0.00566939, 0.00741387, 0.0199054, 0.0279777, - 0.0304533, 0.0406592, -0.00748054, 0.0523836, 0.0196262, 0.0455741, -0.0128034, 0.0109261, - -0.00248401, 0.0177039, 0.0520706, 0.0980207, 0.0581796, 0.0613779, -0.0584795, -0.0338671, - 0.0320062, 0.000106168, 0.000814598, 0.0446986, 0.0337714, 0.0634353, -0.0129168, 0.04023, - 0.0377319, -0.00135489, -0.00272649, 0.019746, 0.00571683, 0.02824, 0.0143515, 0.0464345, - 0.0379201, -0.0171932, 0.0394895, 0.0366438, 0.0357272, 0.0660102, 0.00613955, 0.000755978, - -0.0498287, -0.00827933, -0.00564258, 0.0293193, -0.0132385, -0.0318905, -0.0579884, -0.0629771, - 0.0413162, 0.0205211, -0.0287987, -0.0527852, -0.0204785, -0.00947517, 0.0112812, 0.0552937, - 0.0302039, 0.0256271, 0.0032538, -0.0196052, -0.0411717, -0.023336, -0.00622439, 0.0119921, - -0.0111091, 0.0054059, 0.00325768, 0.0155701, -0.0202819, -0.0142514, -0.00104689, -0.0309015, - -0.0329345, -0.0311195, 0.00280669, -0.0246231, -0.0683577, -0.0298862, 0.0717735, -0.0271166 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p68(hatfit_yaw00_lev2_p68); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p68_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p69.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p69.mh deleted file mode 100755 index 43fede1..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p69.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p69.mh: - -#ifndef stasm_hat_yaw00_lev2_p69_mh -#define stasm_hat_yaw00_lev2_p69_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p69(const double* const d) // d has 160 elements -{ - const double intercept = -0.501654; - const double coef[160] = - { - 0.0230762, 0.013781, -0.00657445, 0.0471398, -0.0427199, 0.0616323, 0.0787647, -0.0205178, - 0.0283805, 0.00417323, -0.0299789, -0.00113931, 0.00442089, 0.0032871, 0.0688228, 0.0346765, - 0.0165321, -0.00414199, 0.0122695, -0.00732337, 0.0150011, -0.0245671, 0.0132475, 0.032327, - 0.000797509, -0.00988351, 0.051295, 0.0229001, 0.0359781, -0.0336637, -0.0108366, 0.0252209, - 0.020593, -0.052713, -0.00831198, -0.023326, 0.0160632, -0.00662693, 0.0392824, 0.0359511, - 0.0132203, 0.0843051, 0.0489842, 0.0283437, 0.0252406, -0.0132659, -0.00237541, 0.0296945, - -0.0310582, 0.0390671, 0.0513185, 0.063233, 0.0463622, 0.0295249, -0.046507, -0.0503186, - 0.00465255, 0.042021, 0.0377644, 0.0377952, 0.0454656, 0.0607733, 0.011305, 0.00291495, - 0.0162281, 0.0229597, 0.000801866, -0.0258597, -0.006601, 0.0314184, 0.0300617, 0.0221378, - 0.0353532, -0.0223414, 0.0576977, 0.0532616, 0.0339265, 0.0812579, 0.0746731, 0.0397337, - -0.0452784, -0.0296776, -0.00618464, -0.0518293, -0.0230095, -0.0246242, -0.0108614, -0.032008, - 0.0463778, -0.00181644, -0.011047, -0.0398095, -0.032624, -0.0271314, -0.0057484, 0.0243942, - 0.0450044, 0.00126629, -0.0208306, -0.000854032, -0.0459446, -0.0179491, 0.0195236, 0.023157, - 0.0121265, -0.00441669, -0.00206993, 0.0209117, -0.0164818, -0.0292706, 0.0150287, -0.0104449, - 8.88458e-05, -0.00480531, 0.0246249, 0.00735242, -0.0548231, -0.0298589, 0.00930757, -0.0227601, - -0.0147846, -0.00834553, 0.0140991, 0.0687771, 0.0127808, -0.0391709, -0.100938, -0.0643944, - 0.00304581, 0.0149064, -0.00979668, -0.00442815, 0.00117602, 0.0288025, 0.0130279, 0.0453444, - 0.00588069, 0.0113229, 0.0145629, -0.010143, 0.0273337, 0.00405032, -0.026315, 0.0255917, - -0.0205528, -0.0099725, -0.00149903, -0.00361405, 0.0109862, 0.0220806, 0.00492744, -0.0209835, - -0.0241067, -0.0574909, -0.0389412, -0.0288473, -0.0352359, -0.0309879, 0.133181, -0.0314818 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p69(hatfit_yaw00_lev2_p69); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p69_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p70.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p70.mh deleted file mode 100755 index 5e758c7..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p70.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p70.mh: - -#ifndef stasm_hat_yaw00_lev2_p70_mh -#define stasm_hat_yaw00_lev2_p70_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p70(const double* const d) // d has 160 elements -{ - const double intercept = -0.796744; - const double coef[160] = - { - 0.0341126, 0.030913, 0.0565538, -0.0217916, 0.0594326, -0.00177041, 0.0670565, 0.110014, - 0.0136715, -0.0211248, 0.0298438, -0.00643463, 0.0507008, 0.0165849, 0.00193834, 0.0198088, - 0.040878, -0.00468351, 0.0100448, -0.00929118, -0.00366385, 0.0370591, 0.0151456, -0.00610841, - -0.013336, -0.0204119, 0.0169284, 0.0136462, 0.0235074, 0.0580339, -0.0254044, -0.0406963, - 0.0457589, 0.000602063, 0.0289157, 0.0500932, 0.0437863, 0.0717904, 0.115542, 0.0436263, - 0.0597082, 0.04082, 0.0822951, 0.0789102, -0.0223879, 0.0168742, 0.00346895, -0.00116304, - 0.00827851, -0.0188379, 0.00784034, 0.0193207, 0.00303974, 0.0132664, 0.0323815, 0.0108335, - -0.000397366, 0.0480992, 0.0571615, -0.0306483, 0.0298595, -0.0114398, 0.00719362, 0.0230871, - 0.0337041, 0.0186319, 0.016356, -0.0379243, -0.0010245, 0.0157864, 0.039134, 0.0443413, - -0.00662945, 0.0302044, 0.100822, 0.0421849, 0.021755, 0.00721991, -0.0526274, -0.00401875, - 0.00745431, -0.0546156, -0.0483602, -0.0723921, -0.0346058, 0.00494108, 0.0417335, 0.038248, - -0.0521416, -0.0183956, 0.0329272, 0.00122424, -0.0210599, -0.0336885, -0.000733202, -0.0429939, - -0.0131328, -0.00134099, 0.00244619, -0.00476187, -0.0511824, 6.90332e-05, 0.0192196, 0.035143, - -0.0167092, -0.0203088, 0.0356238, 0.0305921, 0.0310917, -0.0159399, -0.00998229, -0.0332763, - -0.00396009, -0.0509041, -0.0438387, -0.0139841, 0.0156792, 0.0802788, -0.00387387, 0.0396491, - -0.0138537, 0.00411943, 0.0459761, 0.0705967, 0.0388752, -0.00499727, -0.0434178, -0.0411767, - 0.00068529, -0.0315149, -0.0276846, -0.0166414, 0.0211953, -0.0120308, 0.101158, -0.0236568, - 0.00511414, -0.00715396, 0.00110345, -0.0277911, 0.01183, -0.0440184, 0.065236, -0.0390393, - 0.0345616, 0.0270472, -0.0106751, -0.0168165, 0.00699347, 0.0236292, 0.0722466, 0.0388224, - 0.0165932, 0.0619228, 0.0400074, 0.00844104, -0.0458653, -0.0401251, -0.0834489, -0.053744 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p70(hatfit_yaw00_lev2_p70); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p70_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p71.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p71.mh deleted file mode 100755 index aa708b4..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p71.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p71.mh: - -#ifndef stasm_hat_yaw00_lev2_p71_mh -#define stasm_hat_yaw00_lev2_p71_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p71(const double* const d) // d has 160 elements -{ - const double intercept = -0.228303; - const double coef[160] = - { - -0.017111, -0.022052, -0.00614923, -0.0357715, -0.0435176, 0.0448165, 0.0220894, -0.0516583, - 0.0108187, 0.00215221, 0.0254229, 0.0407787, -0.00456935, 0.00405667, -0.00742958, -0.0386631, - -0.015499, -0.00547458, -0.0352142, -0.0268172, 0.0305546, 0.0189814, 0.0391679, 0.0137124, - -0.0184416, 0.0157674, -0.0167993, -0.00814776, 0.0233144, 0.00835204, 0.0267862, 0.0261481, - -0.031253, 0.053105, 0.00506253, 0.0295576, 0.0810968, 0.000240087, 0.0685961, 0.0736698, - 0.0396325, -0.00192333, 0.0398411, -0.0224833, 0.0568153, 0.0653045, 0.0746592, 0.0545985, - 0.0476846, 0.0445793, 0.0128924, 0.0168234, 0.0199235, 0.00612228, 0.00681783, 0.0652892, - 0.0271855, 0.0683756, 0.0482958, 0.0264938, 0.0049733, -0.00396101, -0.0108081, 0.0179262, - -0.0120251, 0.0171102, 0.0621464, 0.0619762, 0.00706686, -0.0169642, -0.056881, -0.0319456, - 0.0173384, 0.0326166, 0.0196537, 0.024805, 0.0106165, 0.0307442, 0.0466129, 0.0408582, - -0.0466218, -0.00108609, 0.0448339, -0.0176936, -0.00619008, -0.00752668, -0.00836617, -0.0182072, - -0.0185282, -0.0351142, 0.0156919, 0.0410905, 0.028794, 0.0296952, -0.0019478, -0.00737658, - -0.0497287, -0.0804701, -0.028536, 0.00617823, 0.0208016, 0.0122223, -0.0116624, -0.0289944, - -0.0185809, -0.00769248, -0.049657, -0.0105338, -0.0136338, -0.0318718, -0.00579806, -0.0141414, - -0.0423346, 0.00531431, -0.029213, -0.00106899, -0.0104407, -0.0311609, 0.0452972, -0.0288284, - -0.000861945, -0.0264658, -0.060526, -0.0221315, -0.0058577, -0.00805579, 0.126322, 0.0137975, - 0.0286371, 0.0189514, 0.0126194, 0.0137927, -3.51434e-05, 0.0184098, -0.0200559, -0.00883375, - 0.0122228, 0.0290598, 0.0135307, -0.0147906, -0.0471683, -0.000711908, -0.0279763, -0.00207475, - -0.0208812, 0.00633825, -0.0057985, -0.0346104, -0.0503356, -0.00016977, -0.00822498, -0.00219097, - 0.00821315, 0.0429233, -0.0253353, -0.049237, -0.037318, -0.0431846, -0.104914, -0.0377205 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p71(hatfit_yaw00_lev2_p71); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p71_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p72.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p72.mh deleted file mode 100755 index b9d96a4..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p72.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p72.mh: - -#ifndef stasm_hat_yaw00_lev2_p72_mh -#define stasm_hat_yaw00_lev2_p72_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p72(const double* const d) // d has 160 elements -{ - const double intercept = 0.0989027; - const double coef[160] = - { - 0.0353764, 0.0277736, 0.04861, 0.04112, 0.0318701, 0.0638361, 0.0247897, 0.0240266, - -0.029073, 0.0102228, 0.0311509, 0.0575003, 0.0473831, -0.0324984, -0.0463012, -0.0206577, - -0.037861, 0.0584556, 0.000544823, 0.0446031, 0.0441769, 0.0171549, 0.0071004, -0.00858692, - -0.0259733, 0.0649289, 0.0597177, 0.0379904, 0.060508, 0.0483501, 0.0606923, 0.0483977, - 0.0661255, 0.0586531, -0.0390427, -0.0124601, 0.00511991, 0.00752953, 0.0470815, 0.0899895, - -0.0509386, -0.0158875, 0.0177365, 0.0503958, 0.0272851, 0.00163617, -0.0573846, -0.032114, - -0.0140886, -0.0360239, -0.0132793, -0.0438912, -0.0533735, -0.0178983, 0.00808064, -0.0037729, - 0.00674255, 0.00883555, -0.0407354, -0.0373997, -0.0647183, -0.048717, -0.0122859, -0.0419641, - -0.0126266, -0.0328703, -0.012028, -0.0100037, -0.0112557, -0.0387492, 0.0066805, -0.0281232, - -0.0138208, -0.0198197, 0.00231299, 0.0379716, 0.0331442, 0.00275953, 0.0226216, 0.0050906, - 0.0396779, 0.00572949, 0.0354563, 0.0213916, -0.0189767, 0.0629411, 0.0430068, -0.001415, - 0.00446211, 0.0394156, -0.02176, -0.0226459, -0.016732, 0.0233161, 0.000864116, 0.00640479, - 0.00623369, 0.0189184, -0.0344753, -0.042294, -0.0352279, -0.00984565, -0.0545616, -0.00547315, - 0.00238742, 0.00755953, -0.00149086, 0.00472792, -0.0127927, 0.0140774, -0.0201612, -0.00222445, - 0.00755303, -0.0167544, -0.0126289, 0.010009, -0.0270465, 0.0279078, 0.0155872, 0.0209598, - -0.0326684, 0.061328, 0.0523704, -0.00903776, -0.0186215, -0.0228648, -0.000452808, 0.0277466, - -0.0358783, -0.0374315, -0.0188875, -0.0180433, -0.0288677, -0.0363021, -0.0697074, -0.0256992, - -0.0105341, -0.000758809, -0.019205, 0.00468453, 0.0167659, -0.0189989, -0.00735232, -0.0126924, - -0.0193627, 0.00313296, -0.0349624, -0.00599344, -0.0143699, -0.0147435, -0.00646707, -0.0132372, - 0.00929204, -0.0217543, -0.00755049, -0.0319638, 0.0274715, -0.0140345, -0.0298341, 0.000378985 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p72(hatfit_yaw00_lev2_p72); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p72_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p73.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p73.mh deleted file mode 100755 index 8d96d83..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p73.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p73.mh: - -#ifndef stasm_hat_yaw00_lev2_p73_mh -#define stasm_hat_yaw00_lev2_p73_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p73(const double* const d) // d has 160 elements -{ - const double intercept = 0.2272; - const double coef[160] = - { - 0.0255893, 0.0398401, 0.0722409, -0.0445891, -0.00470297, 0.0199131, 0.0165382, 0.0502811, - -0.00357428, 0.0267947, 0.0298553, 0.0338194, 0.0115309, 0.0525491, -0.0585943, 0.0168286, - -0.0344251, -0.0135233, 0.00966544, -0.00890617, 0.0219983, 0.0400588, -0.0679062, -0.0236777, - -0.0311951, -0.00646702, -0.00432313, 0.0206786, 0.000559952, 0.0152661, -0.0226117, -0.013479, - -0.0105264, 0.068243, 0.0255499, 0.0686949, 0.0348068, 0.00315771, 0.022277, -0.0270726, - -0.0638634, -0.0465897, 0.000870173, -0.00499389, 0.0135916, -0.0406264, 0.134036, -0.0508613, - 0.0164918, -0.0227687, 0.0123077, 0.0246532, 0.0388393, 0.0162069, 0.0206663, -0.0122329, - 0.0299857, -0.00969451, 0.012411, 0.029231, 2.48269e-05, 0.0192934, 0.0275271, 0.0159747, - 0.00547446, -0.00790329, -0.0158997, -0.0171256, -0.0474391, -0.0183324, 0.00562775, -0.014244, - 0.00208121, 0.014199, -0.0392767, -0.0390247, -0.0773608, -0.0353364, -0.059764, -0.00843707, - 0.0343853, 0.0210175, 0.0667703, -0.0188759, 0.00741526, -0.0248253, 0.0236731, 0.0150207, - 0.02456, 0.011471, -0.00712584, -0.00760106, 0.00412152, -0.00145081, -0.00908071, 0.0340654, - -0.0160172, 0.0134107, -0.033796, -0.0640794, -0.0423164, -0.0309958, -0.0195926, 0.0046965, - -0.0302013, 0.00814257, 0.0109026, -0.00412582, -0.0214709, -0.00833786, -0.0445951, 0.00290581, - -0.0485127, 0.0372803, -0.0382319, -0.037839, -0.0146938, -0.0105336, -0.0543978, -0.0349175, - -0.0338447, -0.0119121, 0.0375504, -0.070027, -0.031661, -0.0501551, -0.0756655, -0.0274004, - 0.0166032, -0.00992744, 0.00897534, 0.0151133, 0.0147912, 0.0192464, 0.0249975, 0.000497542, - -0.0298722, -0.0303016, -0.0064489, 0.0242609, 0.00872472, 0.0181461, -0.00119551, 0.00268649, - -0.022466, -0.00770383, 0.00493488, 0.0351058, 0.0112933, -0.0113295, -0.0163328, -0.00654885, - -0.00769511, -0.00613724, -0.0214477, 0.0156502, 0.00151531, -0.0105068, -0.0139874, -0.00132222 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p73(hatfit_yaw00_lev2_p73); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p73_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p74.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p74.mh deleted file mode 100755 index 84e0683..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p74.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p74.mh: - -#ifndef stasm_hat_yaw00_lev2_p74_mh -#define stasm_hat_yaw00_lev2_p74_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p74(const double* const d) // d has 160 elements -{ - const double intercept = 0.220837; - const double coef[160] = - { - 0.0997616, 0.0125493, 0.0805498, 0.0505776, 0.0241363, -0.0158419, -0.00138413, 0.122373, - -0.0548679, -0.0388266, -0.0205136, 0.00769371, -0.0244587, -0.00259736, -0.0334081, -0.0375006, - -0.000879399, 0.0375804, 0.022773, -0.0364326, -0.0197282, -0.0116901, -0.0067975, 0.0542848, - -0.00496367, 0.00205504, 0.00612758, -0.0245926, -0.00805552, 0.0306298, -0.0388553, -0.00607397, - -0.0344556, 0.00688398, 0.0726518, 0.0611777, 0.0524567, 0.133079, -0.0805806, -0.0304452, - 0.0178677, 0.0146661, -0.0404539, -0.0564941, -0.0251524, -0.00790241, 0.0491951, 0.0209929, - -0.0179925, -0.0133809, 0.0486278, -0.00252625, 0.00212989, -0.0610684, 0.061689, -0.0801673, - -0.0163816, -0.0372453, 0.00362735, -0.0162172, 0.00727025, -0.0274276, 0.0750418, -0.045223, - -0.000489668, -0.00779798, 0.0240939, 0.0361449, 0.0502159, 0.00077348, 0.0667484, -0.0117676, - 0.0332801, 0.00466945, -0.0202147, 0.00608668, -0.000506863, -0.00459854, -0.00812146, 0.0152727, - -0.0425586, -0.0802285, 0.00159375, 0.0558017, -0.00765114, 0.00755221, -0.0865962, -0.0550125, - -0.00236795, -0.020008, 0.0172968, -0.0217609, -0.00662207, -0.00394266, 0.0197515, 0.00845607, - 0.00294191, -0.015641, 0.0306525, -0.0346056, 0.00200094, -0.0243319, -0.0388526, -0.0104735, - 0.0332378, 0.00964622, 0.015311, -0.031667, -0.0026931, -0.0167854, 0.0413121, 0.0305034, - -0.0497629, 0.0223061, -0.0173011, -0.0670779, -0.0373291, -0.0491551, -0.0999961, -0.0247411, - -0.00199409, 0.00331581, -0.00190104, 0.0357631, -0.0189724, -0.0121322, -0.0489254, -0.00806714, - -0.00593859, -0.0420058, -0.00393673, -0.0122627, -0.02622, -0.00047707, 0.00341348, -0.0080613, - -0.0147898, 0.00988879, 0.0294775, -0.025466, -0.0314937, -0.0253052, -0.00229925, -0.0165381, - 0.0120794, -0.000878892, -0.0134628, -0.0299334, -0.000286509, 0.0341773, 0.00942387, 0.01636, - 0.00437037, 0.0138162, -0.00189742, 0.0512054, 0.0145081, -0.0253149, -0.0284283, -0.000407491 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p74(hatfit_yaw00_lev2_p74); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p74_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p75.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p75.mh deleted file mode 100755 index 1ff5063..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p75.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p75.mh: - -#ifndef stasm_hat_yaw00_lev2_p75_mh -#define stasm_hat_yaw00_lev2_p75_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p75(const double* const d) // d has 160 elements -{ - const double intercept = 0.143169; - const double coef[160] = - { - 0.00500872, 0.0788672, 0.0830198, 0.0347642, -0.0187663, -0.0351558, -0.0415346, 0.0104833, - 0.0498593, -0.0189021, -0.00322631, 0.0243254, 0.0296824, 0.0101936, -0.0423976, 0.0253372, - 0.0264438, 0.0109294, 0.00481503, 0.0401891, 0.00785275, 0.0183256, -0.0359458, 0.0222586, - 0.0156764, -0.0259935, 0.0140222, 0.032216, 0.0129041, 0.0165035, 0.0218827, 0.0255931, - -0.000384394, 0.00497098, 0.0593127, 0.0308721, 0.00392444, 0.044366, -0.00035291, -0.00172973, - -0.030345, -0.0104249, -0.0251774, -0.0307689, -0.0132279, 0.0105106, -0.0441885, -0.00590676, - 0.0163224, 0.0580328, 0.0210897, -0.0185961, -0.0262614, 0.0140714, 0.00418796, 0.0559395, - 0.0287848, 0.0198064, 0.0171609, -0.0322414, -0.0331728, -0.0154635, 0.0338829, 0.00292881, - -0.0252734, -0.00853298, -0.011739, -0.00645236, -0.021923, -0.0136072, 0.0177093, -0.0464155, - 0.00499591, -0.0300743, 0.000695989, -0.0423862, -0.0442462, -0.0612181, 0.137093, -0.0412476, - -0.0647362, -0.0389046, 0.00246774, 0.10443, 0.00126402, -0.0269946, -0.0753447, -0.0576863, - -0.0234948, -0.05018, -0.0350569, 0.045086, -0.00129855, 0.0252666, -0.0227364, 0.00152243, - -0.0214684, -0.0347765, -0.0292191, 0.0101462, 0.00576992, 0.034891, -0.0286404, 0.0115731, - 0.0166064, -0.00540362, 0.0170785, -0.000730702, 0.0076479, -0.00579039, 0.000993971, -0.00161051, - -0.0243942, -0.0351045, 0.0418538, -0.0097826, 0.0250171, 0.000271145, 0.0154932, -0.0324622, - 0.0201201, 0.0511685, -0.0276986, -0.0137756, -0.0753459, -0.0498984, -0.0279214, -0.0080389, - 0.0279161, 0.0353108, -0.0087214, -0.00518912, -0.019555, -0.0113267, 0.00225945, 0.00182463, - -0.00303256, -0.009005, -0.0044915, 0.00135642, -0.0402617, -0.000805723, 0.00377508, -0.00364319, - -0.017734, -0.0284965, 0.0101866, 0.0294709, -0.00494104, 0.00568477, 0.0026554, 0.0024603, - 0.0331129, -0.000183846, 0.0391978, -0.0503583, -0.0647342, -0.0203285, -0.071913, -0.00292174 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p75(hatfit_yaw00_lev2_p75); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p75_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p76.mh b/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p76.mh deleted file mode 100755 index e63b8ca..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev2_p76.mh +++ /dev/null @@ -1,54 +0,0 @@ -// hat_yaw00_lev2_p76.mh: - -#ifndef stasm_hat_yaw00_lev2_p76_mh -#define stasm_hat_yaw00_lev2_p76_mh - -namespace stasm { - -// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf -// static const int EYEMOUTH_DIST = 100; -// static const int FACESCALE = 1 -// static const int PYRSCALE = 1 -// static const double SIGMOIDSCALE = 0 -// static const double PYR_RATIO = 2; -// static const int NEGTRAIN_SEED = 2013; -// static const int HAT_PATCH_WIDTH = 19; -// static const int HAT_PATCH_WIDTH_ADJ = -6; -// static const int GRIDHEIGHT = 4; -// static const int GRIDWIDTH = 5; -// static const int BINS_PER_HIST = 8; -// static const double WINDOW_SCALE = 0.5; - -static double hatfit_yaw00_lev2_p76(const double* const d) // d has 160 elements -{ - const double intercept = -0.201853; - const double coef[160] = - { - 0.0611373, 0.0315796, 0.0567915, 0.106684, 0.0484192, 0.0674777, 0.0757485, 0.0605822, - 0.0186337, 0.0519524, 0.0346602, 0.0198745, -0.00704912, -0.00303739, 0.0450818, 0.0361972, - 0.0369279, 0.091747, 0.0269727, 0.0391098, -0.00623467, -0.00886847, -0.0219807, 0.00198184, - -0.00639586, 0.0351891, 0.0215669, 0.0166585, 0.0285714, -0.00488696, -0.0227643, -0.0313198, - 0.0481887, 0.021827, 0.0344451, 0.0295356, 0.0218445, 0.0148926, 0.0491293, 0.0874688, - -0.0506854, 0.00908012, -0.0301636, -0.020028, -0.0276748, -0.0438808, -0.0051665, -0.0169528, - -0.04442, -0.0557306, -0.0222959, -0.0149306, 0.0132545, -0.0284669, -0.0162358, -0.0420221, - -0.0273391, -0.0344512, 0.00447293, -0.0428183, -0.0259566, -0.027002, -0.00397243, 0.00140603, - 0.0180769, 0.0192412, -0.00879481, -0.0152303, -0.0131571, -0.0139515, -0.0280759, 0.0147447, - 0.0135716, 0.0181163, 0.0118787, 0.0380173, -0.0208318, -0.00114229, 0.00245865, -0.00468111, - 0.00239062, -0.0172136, 0.0122535, -0.0113478, 0.0467641, 0.0450793, 0.025304, 0.0200704, - -0.00336887, -0.0417958, -0.0106864, 0.0015939, 0.0052554, 4.45126e-05, -0.043915, -0.0132575, - 0.00779591, 0.0124207, -0.00729038, 0.0235562, 0.0188436, 0.0162366, -0.0049948, 0.0219917, - 0.00685187, 0.00962004, 0.0242144, -0.0208656, -0.00332951, 0.0194852, -0.00885252, 0.0384181, - 0.0336081, 0.0232335, 0.0185163, -0.00383684, 0.0050504, 0.000545654, 0.0614317, 0.0711241, - 0.00410444, -0.00721999, -0.0234826, -0.00556213, -0.00222316, -0.0218519, -0.0229695, -0.0315578, - 0.00101129, 0.00344464, -0.0110083, -0.00632637, -0.0111474, -0.00212928, 0.0064592, -0.00594809, - -0.0431056, -0.0271004, -0.0278623, 0.0168796, -0.0128066, -0.0357533, -0.0304638, -0.0240973, - -0.0122436, 0.0135754, -0.0410427, 0.0175618, -0.036486, -0.00465138, -0.0283021, -0.0328289, - -0.019626, -0.0317221, 0.0607035, 0.0916186, -0.0109209, 0.0271553, -0.00350397, -0.0121741 - }; - return linmod(d, intercept, coef, 160); -} - -static const HatDescMod hat_yaw00_lev2_p76(hatfit_yaw00_lev2_p76); - -} // namespace stasm -#endif // stasm_hat_yaw00_lev2_p76_mh diff --git a/3rdparty/stasm/stasm/stasm/include/hatdesc.h b/3rdparty/stasm/stasm/stasm/include/hatdesc.h deleted file mode 100755 index 5b0a02f..0000000 --- a/3rdparty/stasm/stasm/stasm/include/hatdesc.h +++ /dev/null @@ -1,72 +0,0 @@ -// hatdesc.h: Model for HAT descriptors -// This does a search using the descriptors from hat.cpp. -// -// Copyright (C) 2005-2013, Stephen Milborrow - -#ifndef STASM_HATPATCH_H -#define STASM_HATPATCH_H - -#include "misc.h" -#include "hat.h" -#include "basedesc.h" - -namespace stasm -{ -static const int HAT_MAX_OFFSET = 4; // search grid +-4 pixs from current posn - -static const int HAT_SEARCH_RESOL = 2; // search resolution, search every 2nd pixel - -// Following params must match those used for generating the HAT -// descriptors used to generate the HAT models during training. - -static const int HAT_PATCH_WIDTH = 9*2+1; - // HAT patch is 19 x 19 at pyr lev 0 - -static const int HAT_PATCH_WIDTH_ADJ = -6; - // grid gets smaller for smaller pyr levs - -static const int HAT_START_LEV = 2; // HAT descriptors are for pyr levs 0...2 - // so no need for Hat::Init_ at pyr lev 3 - -// define HatFit: a pointer to a func for measuring fit of HAT descriptor -typedef double(*HatFit)(const double* const); - -Hat InitHatLevData( // init the global HAT data needed for this pyr level - const Image& img, // in - int ilev); // in: pyramid level, 0 is full size - -VEC HatDesc( // used only during training new models - double x, // in - double y); // in - -void HatDescSearch( // search in a grid around the current landmark - double& x, // io: (in: old posn of landmark, out: new posn) - double& y, // io - const HatFit hatfit, // in: func to estimate descriptor match - const Hat &hat, - StasmHash &hash); - -class HatDescMod: public BaseDescMod -{ -public: - virtual void DescSearch_(double& x, double& y, // io - const Image&, const Shape&, // in - int, int, const Hat &hat, StasmHash &hash) const // in - { - HatDescSearch(x, y, hatfit_, hat, hash); - } - - HatDescMod(const HatFit hatfit) // constructor - : hatfit_(hatfit) - { - } - -private: - HatFit const hatfit_; // func to estimate HAT descriptor match - - DISALLOW_COPY_AND_ASSIGN(HatDescMod); - -}; // end class HatDescMod - -} // namespace stasm -#endif // STASM_HATPATCH_H diff --git a/3rdparty/stasm/stasm/stasm/include/landmarks.h b/3rdparty/stasm/stasm/stasm/include/landmarks.h deleted file mode 100755 index c750706..0000000 --- a/3rdparty/stasm/stasm/stasm/include/landmarks.h +++ /dev/null @@ -1,45 +0,0 @@ -// landmarks.h: code for manipulating landmarks -// -// Copyright (C) 2005-2013, Stephen Milborrow - -#ifndef STASM_LANDMARKS_H -#define STASM_LANDMARKS_H - -#include "misc.h" -#include "stasm_lib.h" - -namespace stasm -{ -struct LANDMARK_INFO // landmark information -{ - int partner; // symmetrical partner point, -1 means no partner - - int prev, next; // previous and next point - // special val -1 means prev=current-1 and next=current+1 - // see Milborrow master's thesis Section 5.4.8 "Whisker Directions" - - double weight; // weight of landmark relative to others (for shape mod) - - unsigned bits; // used only during training (AT_Glasses, etc.) -}; - -#include "landtab_muct77.h" // MUCT 77 point shapes - -double MeanPoint( - const Shape& shape, // in - int ipoint1, // in - int ipoint2, // in - int ix); // in: IX or IY - -void PrevAndNextLandmarks( - int& prev, // out - int& next, // out - int ipoint, // in - const Shape& shape); // in - -Shape FlipShape( // flip shape horizontally - const Shape& shape, // in - int imgwidth); // in - -} // namespace stasm -#endif // STASM_LANDMARKS_H diff --git a/3rdparty/stasm/stasm/stasm/include/landtab_muct77.h b/3rdparty/stasm/stasm/stasm/include/landtab_muct77.h deleted file mode 100755 index 384dfba..0000000 --- a/3rdparty/stasm/stasm/stasm/include/landtab_muct77.h +++ /dev/null @@ -1,94 +0,0 @@ -// landtab_muct77.h: definitions for MUCT 77 point shapes -// -// Copyright (C) 2005-2013, Stephen Milborrow - -#ifndef STASM_LANDTAB_MUCT77_H -#define STASM_LANDTAB_MUCT77_H - -#include "atface.h" - -// Note that the AT_Hat bit is ignored if pyr lev > HAT_START_LEV - -static const LANDMARK_INFO LANDMARK_INFO_TAB[77] = // stasm77 points -{ -// par pre next weight bits - { 12, 1, 30, 1., AT_Beard|AT_Glasses }, // 00 L_LTemple - { 11, -1, -1, 1., AT_Beard|AT_Glasses }, // 01 L_LJaw01 - { 10, -1, -1, 1., AT_Beard }, // 02 L_LJawNoseline - { 9, -1, -1, 1., AT_Beard }, // 03 L_LJawMouthline - { 8, -1, -1, 1., AT_Beard }, // 04 L_LJaw04 - { 7, -1, -1, 1., AT_Beard }, // 05 L_LJaw05 - { -1, -1, -1, 1., AT_Beard }, // 06 L_CTipOfChin - { 5, -1, -1, 1., AT_Beard }, // 07 L_RJaw07 - { 4, -1, -1, 1., AT_Beard }, // 08 L_RJaw08 - { 3, -1, -1, 1., AT_Beard }, // 09 L_RJawMouthline - { 2, -1, -1, 1., AT_Beard }, // 10 L_RJawNoseline - { 1, -1, -1, 1., AT_Beard|AT_Glasses }, // 11 L_RJaw11 - { 0, 11, 40, 1., AT_Beard|AT_Glasses }, // 12 L_RTemple - { 15, 12, 14, 0., 0 }, // 13 L_RForehead point is virtually useless - { -1, -1, -1, 0., 0 }, // 14 L_CForehead point is virtually useless - { 13, 0, 14, 0., 0 }, // 15 L_LForehead point is virtually useless - { 23, 17, 21, 0., AT_Glasses|AT_Hat }, // 16 L_LEyebrowTopInner - { 24, -1, -1, 0., AT_Glasses|AT_Hat }, // 17 L_LEyebrowTopOuter - { 25, 0, 17, 0., AT_Glasses|AT_Hat }, // 18 L_LEyebrowOuter - { 26, -1, -1, 0., AT_Glasses|AT_Hat }, // 19 L_LEyebrowBotOuter - { 27, 19, 21, 0., AT_Glasses|AT_Hat }, // 20 L_LEyebrowBotInner - { 22, 1, 11, 0., AT_Glasses|AT_Hat }, // 21 L_LEyebrowInner - { 21, 1, 11, 0., AT_Glasses|AT_Hat }, // 22 L_REyebrowInner - { 16, 22, 24, 0., AT_Glasses|AT_Hat }, // 23 L_REyebrowTopInner - { 17, -1, -1, 0., AT_Glasses|AT_Hat }, // 24 L_REyebrowTopOuter - { 18, 12, 24, 0., AT_Glasses|AT_Hat }, // 25 L_REyebrowOuter - { 19, -1, -1, 0., AT_Glasses|AT_Hat }, // 26 L_REyebrowBotOuter - { 20, 22, 26, 0., AT_Glasses|AT_Hat }, // 27 L_REyebrowBotInner - { 29, 26, 39, 1., AT_Glasses|AT_Eye|AT_Hat }, // 28 L_REyelid - { 28, 19, 38, 1., AT_Glasses|AT_Eye|AT_Hat }, // 29 L_LEyelid - { 40, 32, 36, 1., AT_Glasses|AT_Eye|AT_Hat }, // 30 L_LEyeInner - { 41, -1, -1, 1., AT_Glasses|AT_Eye|AT_Hat }, // 31 L_LEye31 - { 42, -1, -1, 1., AT_Glasses|AT_Eye|AT_Hat }, // 32 L_LEyeTop - { 43, -1, -1, 1., AT_Glasses|AT_Eye|AT_Hat }, // 33 L_LEye33 - { 44, 32, 36, 1., AT_Glasses|AT_Eye|AT_Hat }, // 34 L_LEyeOuter - { 45, -1, -1, 1., AT_Glasses|AT_Eye|AT_Hat }, // 35 L_LEye35 - { 46, -1, -1, 1., AT_Glasses|AT_Eye|AT_Hat }, // 36 L_LEyeBot - { 47, 30, 36, 1., AT_Glasses|AT_Eye|AT_Hat }, // 37 L_LEye37 - { 39, 34, 30, 1., AT_Glasses|AT_Eye|AT_Hat }, // 38 L_LPupil - { 38, 44, 40, 1., AT_Glasses|AT_Eye|AT_Hat }, // 39 L_RPupil - { 30, 42, 46, 1., AT_Glasses|AT_Eye|AT_Hat }, // 40 L_REyeInner - { 31, -1, -1, 1., AT_Glasses|AT_Eye|AT_Hat }, // 41 L_REye41 - { 32, -1, -1, 1., AT_Glasses|AT_Eye|AT_Hat }, // 42 L_REyeTop - { 33, -1, -1, 1., AT_Glasses|AT_Eye|AT_Hat }, // 43 L_REye43 - { 34, 42, 46, 1., AT_Glasses|AT_Eye|AT_Hat }, // 44 L_REyeOuter - { 35, -1, -1, 1., AT_Glasses|AT_Eye|AT_Hat }, // 45 L_REye45 - { 36, -1, -1, 1., AT_Glasses|AT_Eye|AT_Hat }, // 46 L_REyeBot - { 37, 40, 46, 1., AT_Glasses|AT_Eye|AT_Hat }, // 47 L_REye47 - { 50, 40, 62, 1., AT_Glasses|AT_Hat }, // 48 L_RNoseMid - { -1, 1, 11, 1., AT_Glasses|AT_Hat }, // 49 L_CNoseMid - { 48, 30, 62, 1., AT_Glasses|AT_Hat }, // 50 L_LNoseMid - { 53, 1, 11, 1., AT_Hat }, // 51 L_LNostrilTop - { -1, 1, 11, 1., AT_Hat }, // 52 L_CNoseTip - { 51, 1, 11, 1., AT_Hat }, // 53 L_RNostrilTop - { 58, 40, 62, 1., AT_Hat }, // 54 L_RNoseSide - { 57, 1, 11, 1., AT_Hat }, // 55 L_RNostrilBot - { -1, -1, -1, 1., AT_Hat }, // 56 L_CNoseBase - { 55, 1, 11, 1., AT_Mustache|AT_Hat }, // 57 L_LNostrilBot - { 54, 30, 62, 1., AT_Mustache|AT_Hat }, // 58 L_LNoseSide - { 65, 61, 74, 1., AT_Mustache|AT_Hat }, // 59 L_LMouthCorner - { 64, 59, 61, 1., AT_Mustache|AT_Hat }, // 60 L_LMouth60 - { 63, -1, -1, 1., AT_Mustache|AT_Hat }, // 61 L_LMouthCupid - { -1, -1, -1, 1., AT_Mustache|AT_Hat }, // 62 L_CTopOfTopLip - { 61, -1, -1, 1., AT_Mustache|AT_Hat }, // 63 L_RMouthCupid - { 60, 63, 65, 1., AT_Mustache|AT_Hat }, // 64 L_RMouth64 - { 59, 63, 74, 1., AT_Mustache|AT_Hat }, // 65 L_RMouthCorner - { 68, 65, 67, 1., AT_Hat }, // 66 L_RMouth66 - { -1, -1, -1, 1., AT_Hat }, // 67 L_CBotOfTopLip - { 66, 59, 67, 1., AT_Hat }, // 68 L_LMouth68 - { 71, 59, 70, 1., AT_Hat }, // 69 L_LMouth69 - { -1, -1, -1, 1., AT_Hat }, // 70 L_CTopOfBotLip - { 69, 65, 70, 1., AT_Hat }, // 71 L_RMouth71 - { 76, 65, 73, 1., AT_Hat }, // 72 L_RMouth72 - { 75, 72, 74, 1., AT_Hat }, // 73 L_RMouth73 - { -1, -1, -1, 1., AT_Hat }, // 74 L_CBotOfBotLip - { 73, 74, 76, 1., AT_Hat }, // 75 L_LMouth75 - { 72, 59, 75, 1., AT_Hat }, // 76 L_LMouth76 -}; - -#endif // STASM_LANDTAB_MUCT77_H diff --git a/3rdparty/stasm/stasm/stasm/include/pinstart.h b/3rdparty/stasm/stasm/stasm/include/pinstart.h deleted file mode 100755 index 2d9edd7..0000000 --- a/3rdparty/stasm/stasm/stasm/include/pinstart.h +++ /dev/null @@ -1,25 +0,0 @@ -// pinstart.h: utilities for creating a start shape from manually pinned points -// -// Copyright (C) 2005-2013, Stephen Milborrow - -#ifndef STASM_PINSTART_H -#define STASM_PINSTART_H - -#include "misc.h" -#include "asm.h" - -namespace stasm -{ - -void PinnedStartShapeAndRoi( // use the pinned landmarks to init the start shape - Shape& startshape, // out: the start shape (in ROI frame) - Image& face_roi, // out: ROI around face, possibly rotated upright - DetPar& detpar_roi, // out: detpar wrt to face_roi - DetPar& detpar, // out: detpar wrt to img - Shape& pinned_roi, // out: pinned arg translated to ROI frame - const Image& img, // in: the image (grayscale) - const vec_Mod& mods, // in: a vector of models, one for each yaw range - const Shape& pinned); // in: manually pinned landmarks - -} // namespace stasm -#endif // STASM_PINSTART_H diff --git a/3rdparty/stasm/stasm/stasm/include/print.h b/3rdparty/stasm/stasm/stasm/include/print.h deleted file mode 100755 index 3cde787..0000000 --- a/3rdparty/stasm/stasm/stasm/include/print.h +++ /dev/null @@ -1,22 +0,0 @@ -// print.h: printing and logging utilities for the Stasm library -// -// Copyright (C) 2005-2013, Stephen Milborrow - -#ifndef STASM_PRINT_H -#define STASM_PRINT_H - -namespace stasm -{ -extern bool print_g; // true to allow output to stdout - -extern bool trace_g; // true to trace Stasm internal operation - -void OpenLogFile(const char* path = "stasm.log"); -void lputs(const char* s); -void lprintf(const char* format, ...); // args like printf -void lprintf_always(const char* format, ...); -void logprintf(const char* format, ...); -void PrintOnce(int& printed, const char* format, ...); - -} // namespace stasm -#endif // STASM_PRINT_H diff --git a/3rdparty/stasm/stasm/stasm/include/shape17.h b/3rdparty/stasm/stasm/stasm/include/shape17.h deleted file mode 100755 index c50a07d..0000000 --- a/3rdparty/stasm/stasm/stasm/include/shape17.h +++ /dev/null @@ -1,68 +0,0 @@ -// shape17.h: convert a shape to a 17 point shape -// -// Copyright (C) 2005-2013, Stephen Milborrow - -#ifndef STASM_SHAPE17_H -#define STASM_SHAPE17_H - -#include "misc.h" - -namespace stasm -{ -enum LANDMARKS_17 // the 17 points that make up a Shape17 shape -{ - L17_LPupil, // 0 - L17_RPupil, // 1 - L17_LMouthCorner, // 2 - L17_RMouthCorner, // 3 - L17_LEyebrowOuter, // 4 - L17_LEyebrowInner, // 5 - L17_REyebrowInner, // 6 - L17_REyebrowOuter, // 7 - L17_LEyeOuter, // 8 - L17_LEyeInner, // 9 - L17_REyeInner, // 10 - L17_REyeOuter, // 11 - L17_CNoseTip, // 12 - L17_LNostril, // 13 - L17_RNostril, // 14 - L17_CTopOfTopLip, // 15 - L17_CBotOfBotLip // 16 -}; - -#if 0 -static const char* const LANDMARKS_17_NAMES[] = -{ - "LPupil", - "RPupil", - "LMouthCorner", - "RMouthCorner", - "LEyebrowOuter", - "LEyebrowInner", - "REyebrowInner", - "REyebrowOuter", - "LEyeOuter", - "LEyeInner", - "REyeInner", - "REyeOuter", - "CNoseTip", - "LNostril", - "RNostril", - "CTopOTopLip", - "CBotOfBotLip" -}; -#endif - -extern const Shape MEANSHAPE17; // mean 17 point shape - -Shape Shape17OrEmpty( // like Shape17 but return 0 point shape if can't convert - const Shape& shape); // in - -Shape Shape17( // convert an arb face shape to a 17 point shape, err if can't - const Shape& shape); // in - -void SanityCheckShape17( - const Shape& shape17); // in - -} // namespace stasm -#endif // STASM_SHAPE17_H diff --git a/3rdparty/stasm/stasm/stasm/include/shapehacks.h b/3rdparty/stasm/stasm/stasm/include/shapehacks.h deleted file mode 100755 index 10b4bbe..0000000 --- a/3rdparty/stasm/stasm/stasm/include/shapehacks.h +++ /dev/null @@ -1,20 +0,0 @@ -// shapehacks.h: -// -// Copyright (C) 2005-2013, Stephen Milborrow - -#ifndef STASM_SHAPEHACKS_H -#define STASM_SHAPEHACKS_H - -#include "misc.h" - -namespace stasm -{ -static const unsigned SHAPEHACKS_DEFAULT = 0x01; -static const unsigned SHAPEHACKS_SHIFT_TEMPLE_OUT = 0x10; // for frontal models - -void ApplyShapeModelHacks( // adjust shape by applying various hacks - Shape& shape, // io: features possibly adjusted - unsigned hackbits); // in: which hacks to apply, see above constants - -} // namespace stasm -#endif // STASM_SHAPEHACKS_H diff --git a/3rdparty/stasm/stasm/stasm/include/shapemod.h b/3rdparty/stasm/stasm/stasm/include/shapemod.h deleted file mode 100755 index a713330..0000000 --- a/3rdparty/stasm/stasm/stasm/include/shapemod.h +++ /dev/null @@ -1,86 +0,0 @@ -// shapemod.h: the ASM shape model -// -// Copyright (C) 2005-2013, Stephen Milborrow - -#ifndef STASM_SHAPEMODEL_H -#define STASM_SHAPEMODEL_H - -#include "stasm_lib.h" -#include "shapehacks.h" -#include "misc.h" -#include "err.h" - -namespace stasm -{ -class ShapeMod -{ -public: - const Shape ConformShapeToMod_( // return shape conformed to shape mod - VEC& b, // io: eigvec weights - const Shape& shape, // in: shape suggested by the descriptor mods - int ilev) // in: pyramid level (0 is full size) - const; - - const Shape ConformShapeToMod_Pinned_( // like above but allow pinned points - VEC& b, // io: eigvec weights - const Shape& shape, // in: shape suggested by the descriptor mods - int ilev, // in: pyramid level (0 is full size) - const Shape& pinnedshape) // in: pinned landmarks - const; - - ShapeMod( // constructor - const Shape& meanshape, - const VEC& eigvals, - const MAT& eigvecs, - const int neigs, - const double bmax, - const unsigned hackbits) - - : meanshape_(meanshape), - eigvals_(DimKeep(eigvals, neigs, 1)), - eigvecs_(DimKeep(eigvecs, eigvecs.rows, neigs)), // retain neigs cols - // take inverse of eigvecs (by taking transpose) and retain neigs rows - eigvecsi_(DimKeep(eigvecs.t(), neigs, eigvecs.cols)), - bmax_(bmax), - hackbits_(hackbits) - { - if (meanshape.rows != stasm_NLANDMARKS) - Err("meanshape.rows %d != stasm_NLANDMARKS %d", - meanshape.rows, stasm_NLANDMARKS); - CV_Assert(meanshape.cols == 2); - CV_Assert(NSIZE(eigvals) == 2 * stasm_NLANDMARKS); - CV_Assert(eigvecs.rows == 2 * stasm_NLANDMARKS); - CV_Assert(eigvecs.cols == 2 * stasm_NLANDMARKS); - CV_Assert(neigs > 0 && neigs <= 2 * stasm_NLANDMARKS); - CV_Assert(bmax > 0 && bmax < 10); - CV_Assert((hackbits & ~(SHAPEHACKS_DEFAULT|SHAPEHACKS_SHIFT_TEMPLE_OUT)) == 0); - } - - // all data remains constant after ShapeMod construction - - const Shape meanshape_; // mean shape aligned to face det frame - const VEC eigvals_; // neigs x 1 vector - const MAT eigvecs_; // 2n x neigs matrix where n is nbr of landmarks - const MAT eigvecsi_; // neigs x 2n matrix, inverse of eigvecs_ - const double bmax_; // eigvec weight limit, for LimitB() - const unsigned hackbits_; // allowable shape model hacks (e.g. SHAPEHACKS_DEFAULT) - -private: - DISALLOW_COPY_AND_ASSIGN(ShapeMod); - -}; // end class ShapeMod - -VEC PointWeights(void); // return point weights from LANDMARK_INFO_TAB - -Shape ConformShapeToMod( // Return a copy of inshape conformed to the model - VEC& b, // io: eigvec weights - const Shape& inshape, // in: the current position of the landmarks - const Shape& meanshape, // in: n x 2 - const VEC& eigvals, // in: neigs x 1 - const MAT& eigvecs, // in: 2n x neigs - const MAT& eigvecsi, // in: neigs x 2n, inverse of eigvecs - const double bmax, // in: for LimitB - const VEC& pointweights); // in: contribution of each point to the pose - -} // namespace stasm -#endif // STASM_SHAPEMODEL_H diff --git a/3rdparty/stasm/stasm/stasm/include/startshape.h b/3rdparty/stasm/stasm/stasm/include/startshape.h deleted file mode 100755 index 602f68e..0000000 --- a/3rdparty/stasm/stasm/stasm/include/startshape.h +++ /dev/null @@ -1,51 +0,0 @@ -// startshape.h: routines for finding the start shape for an ASM search -// -// Copyright (C) 2005-2013, Stephen Milborrow - -#ifndef STASM_STARTSHAPE_H -#define STASM_STARTSHAPE_H - -#include "stasmcascadeclassifier.h" -#include "misc.h" -#include "asm.h" -#include "facedet.h" - -namespace stasm -{ -// The constant 200 is arbitrary, except that the value used by Stasm -// must match that used by Tasm when training the model. Using 200 instead -// of say, 1, means that the detector average face is displayable at a decent -// size which is useful for debugging. - -static const int DET_FACE_WIDTH = 200; - -double EyeAngle( // eye angle in degrees, INVALID if eye angle not available - const DetPar& detpar); // in: detpar wrt the ROI - -double EyeAngle( // eye angle in degrees, INVALID if eye angle not available - const Shape& shape); // in - -// get the start shape for the next face in the image, and the ROI around it - -bool NextStartShapeAndRoi(// use face detector results to estimate start shape - Shape& startshape, // out: the start shape we are looking for - Image& face_roi, // out: ROI around face, possibly rotated upright - DetPar& detpar_roi, // out: detpar wrt to face_roi - DetPar& detpar, // out: detpar wrt to img - const Image& img, // in: the image (grayscale) - const vec_Mod& mods, // in: a vector of models, one for each yaw range - FaceDet& facedet, - StasmCascadeClassifier cascade); // io: the face detector (internal face index bumped) - -void PinnedStartShapeAndRoi( // use the pinned landmarks to init the start shape - Shape& startshape, // out: the start shape (in ROI frame) - Image& face_roi, // out: ROI around face, possibly rotated upright - DetPar& detpar_roi, // out: detpar wrt to face_roi - DetPar& detpar, // out: detpar wrt to img - Shape& pinned_roi, // out: pinned arg translated to ROI frame - const Image& img, // in: the image (grayscale) - const vec_Mod& mods, // in: a vector of models, one for each yaw range - const Shape& pinned); // in: pinned landmarks - -} // namespace stasm -#endif // STASM_STARTSHAPE_H diff --git a/3rdparty/stasm/stasm/stasm/include/stasm.h b/3rdparty/stasm/stasm/stasm/include/stasm.h deleted file mode 100755 index d72c7de..0000000 --- a/3rdparty/stasm/stasm/stasm/include/stasm.h +++ /dev/null @@ -1,21 +0,0 @@ -// stasm.h: (nearly) all include files for the Stasm package -// -// Copyright (C) 2005-2013, Stephen Milborrow - -#ifndef STASM_H -#define STASM_H - -const char* const stasm_VERSION = "4.1.0"; - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // STASM_H diff --git a/3rdparty/stasm/stasm/stasm/include/stasm_landmarks.h b/3rdparty/stasm/stasm/stasm/include/stasm_landmarks.h deleted file mode 100755 index d2ab538..0000000 --- a/3rdparty/stasm/stasm/stasm/include/stasm_landmarks.h +++ /dev/null @@ -1,93 +0,0 @@ -// stasm_landmarks.h: define the Stasm landmarks for the 77 point model -// -// Copyright (C) 2005-2013, Stephen Milborrow - -#ifndef STASM_STASM_LANDMARKS_H -#define STASM_STASM_LANDMARKS_H - -// All landmark names begin with L_ followed by L, C, or R, -// for left, center, or right. -// Note that left and right are with respect to the viewer, not the subject. - -enum stasm_LANDMARKS_77 // stasm77 landmarks -{ - L_LTemple, // 00 - L_LJaw01, // 01 - L_LJawNoseline, // 02 nose line on left jaw - L_LJawMouthline, // 03 mouth line on left jaw - L_LJaw04, // 04 - L_LJaw05, // 05 - L_CTipOfChin, // 06 - L_RJaw07, // 07 - L_RJaw08, // 08 - L_RJawMouthline, // 09 - L_RJawNoseline, // 10 - L_RJaw11, // 11 - L_RTemple, // 12 - L_RForehead, // 13 - L_CForehead, // 14 - L_LForehead, // 15 - L_LEyebrowTopInner, // 16 - L_LEyebrowTopOuter, // 17 - L_LEyebrowOuter, // 18 - L_LEyebrowBotOuter, // 19 - L_LEyebrowBotInner, // 20 - L_LEyebrowInner, // 21 - L_REyebrowInner, // 22 - L_REyebrowTopInner, // 23 - L_REyebrowTopOuter, // 24 - L_REyebrowOuter, // 25 - L_REyebrowBotOuter, // 26 - L_REyebrowBotInner, // 27 - L_REyelid, // 28 - L_LEyelid, // 29 - L_LEyeInner, // 30 - L_LEye31, // 31 - L_LEyeTop, // 32 - L_LEye33, // 33 - L_LEyeOuter, // 34 - L_LEye35, // 35 - L_LEyeBot, // 36 - L_LEye37, // 37 - L_LPupil, // 38 - L_RPupil, // 39 - L_REyeInner, // 40 - L_REye41, // 41 - L_REyeTop, // 42 - L_REye43, // 43 - L_REyeOuter, // 44 - L_REye45, // 45 - L_REyeBot, // 46 - L_REye47, // 47 - L_RNoseMid, // 48 - L_CNoseMid, // 49 - L_LNoseMid, // 50 - L_LNostrilTop, // 51 - L_CNoseTip, // 52 - L_RNostrilTop, // 53 - L_RNoseSide, // 54 - L_RNostrilBot, // 55 - L_CNoseBase, // 56 - L_LNostrilBot, // 57 - L_LNoseSide, // 58 - L_LMouthCorner, // 59 - L_LMouth60, // 60 - L_LMouthCupid, // 61 - L_CTopOfTopLip, // 62 - L_RMouthCupid, // 63 - L_RMouth64, // 64 - L_RMouthCorner, // 65 - L_RMouth66, // 66 - L_CBotOfTopLip, // 67 - L_LMouth68, // 68 - L_LMouth69, // 69 - L_CTopOfBotLip, // 70 - L_RMouth71, // 71 - L_RMouth72, // 72 - L_RMouth73, // 73 - L_CBotOfBotLip, // 74 - L_LMouth75, // 75 - L_LMouth76 // 76 -}; - -#endif // STASM_STASM_LANDMARKS_H diff --git a/3rdparty/stasm/stasm/stasm/include/stasm_lib.h b/3rdparty/stasm/stasm/stasm/include/stasm_lib.h deleted file mode 100755 index 951d019..0000000 --- a/3rdparty/stasm/stasm/stasm/include/stasm_lib.h +++ /dev/null @@ -1,150 +0,0 @@ -// stasm_lib.h: interface to the Stasm library -// -// The Stasm library interface function and variable names are all prefixed -// by "stasm_". They are not in the stasm namespace. -// -// The library routines return 1 on success, 0 on error (they do not throw -// exceptions). Use stasm_lasterr to get the error string. An example -// error is "Cannot open ../data/haarcascade_frontalface_alt2.xml". -// Errors in OpenCV routines called by Stasm and out-of-memory errors are -// handled in the same way. -// -// Typical usage in multiple face scenario with stasm_search_auto: -// -// stasm_init() -// load image from disk -// optionally present the image to the user -// stasm_open_image() -// while stasm_find_face() finds another face: -// save the face shape (and optionally present the image to the user) -// optionally present the image with all face shapes to the user -// optionally call stasm_search_pinned to correct any bad faces -// -// The interface is defined in vanilla C so can be used by code -// in "any" language. -// -//----------------------------------------------------------------------------- -// -// Stasm License Agreement -// -// Copyright (C) 2005-2013, Stephen Milborrow -// All rights reserved. -// -// Redistribution of Stasm in source and binary forms, with or -// without modification, is permitted provided that the following -// conditions are met: -// * Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimers. -// -// * Redistributions in binary form must reproduce the above copyright notice, -// this list of conditions and the following disclaimers in the documentation -// and/or other materials provided with the distribution. -// -// A SIFT patent restriction may be in conflict with the copyright -// freedoms granted by this license. This license does not give you -// permission to infringe patents. -// -// This software is provided by the copyright holders and contributors "as is" and -// any express or implied warranties, including, but not limited to, the implied -// warranties of merchantability and fitness for a particular purpose are disclaimed. -// In no event shall the copyright holder be liable for any direct, -// indirect, incidental, special, exemplary, or consequential damages -// (including, but not limited to, procurement of substitute goods or services; -// loss of use, data, or profits; or business interruption) however caused -// and on any theory of liability, whether in contract, strict liability, -// or tort (including negligence or otherwise) arising in any way out of -// the use of this software, even if advised of the possibility of such damage. -// -// Note that Stasm versions prior to version 4.0.0 had a different license. -// -//----------------------------------------------------------------------------- - -#ifndef STASM_LIB_H -#define STASM_LIB_H - -#if defined STASM_LIBRARY -# if defined _WIN32 || defined __CYGWIN__ -# define STASM_EXPORT __declspec(dllexport) -# else -# define STASM_EXPORT __attribute__((visibility("default"))) -# endif -#else -# if defined _WIN32 || defined __CYGWIN__ -# define STASM_EXPORT __declspec(dllimport) -# else -# define STASM_EXPORT -# endif -#endif - -#include "stasmcascadeclassifier.h" - -static const char* const STASM_VERSION = "4.0.1"; -static const int stasm_NLANDMARKS = 77; // number of landmarks - -extern const char* const stasm_VERSION; - -STASM_EXPORT int stasm_init( // call once, at bootup - const char* datadir, // in: directory of face detector files - int trace); // in: 0 normal use, 1 trace to stdout and stasm.log - - -STASM_EXPORT int stasm_open_image( // call once per image, detect faces - const char* img, // in: gray image data, top left corner at 0,0 - int width, // in: image width - int height, // in: image height - const char* imgpath, // in: image path, used only for err msgs and debug - int multiface, // in: 0=return only one face, 1=allow multiple faces - int minwidth); // in: min face width as percentage of img width - - -STASM_EXPORT int stasm_search_auto( // call repeatedly to find all faces - int* foundface, // out: 0=no more faces, 1=found face - float* landmarks, // out: x0, y0, x1, y1, ..., caller must allocate - const char* data, - const int width, - const int height, - StasmCascadeClassifier cascade); - - -STASM_EXPORT int stasm_search_single( // wrapper for stasm_search_auto and friends - int* foundface, // out: 0=no face, 1=found face - float* landmarks, // out: x0, y0, x1, y1, ..., caller must allocate - const char* img, // in: gray image data, top left corner at 0,0 - int width, // in: image width - int height, // in: image height - StasmCascadeClassifier cascade, - const char* imgpath, // in: image path, used only for err msgs and debug - const char* datadir); // in: directory of face detector files - - // find landmarks, no OpenCV face detect -STASM_EXPORT int stasm_search_pinned( // call after the user has pinned some points - float* landmarks, // out: x0, y0, x1, y1, ..., caller must allocate - const float* pinned, // in: pinned landmarks (0,0 points not pinned) - const char* data, // in: gray image data, top left corner at 0,0 - int width, // in: image width - int height, // in: image height - const char* imgpath); // in: image path, used only for err msgs and debug - - -STASM_EXPORT const char* stasm_lasterr(void); // return string describing last error - - -STASM_EXPORT void stasm_force_points_into_image( // force landmarks into image boundary - float* landmarks, // io - int ncols, // in - int nrows); // in - - -STASM_EXPORT void stasm_convert_shape( // convert stasm 77 points to given number of points - float* landmarks, // io: return all points zero if can't do conversion - int nlandmarks); // in: 77=nochange 76=stasm3 68=xm2vts 22=ar 20=bioid 17=me17 - -// stasm_printf is like printf but also prints to the file stasm.log if it -// is open. The file stasm.log will be open if stasm_init was called with -// trace=1. This function was added primarily for the programs that test -// the stasm library. - - -STASM_EXPORT void stasm_printf(const char* format, ...); // print to stdout and stasm.log - -#endif // STASM_LIB_H diff --git a/3rdparty/stasm/stasm/stasm/include/stasm_lib_ext.h b/3rdparty/stasm/stasm/stasm/include/stasm_lib_ext.h deleted file mode 100755 index 174d4a9..0000000 --- a/3rdparty/stasm/stasm/stasm/include/stasm_lib_ext.h +++ /dev/null @@ -1,29 +0,0 @@ -// stasm_lib_ext.h: experimental extensions to the Stasm library -// Please don't use these functions, they may change at any time. - -#ifndef STASM_LIB_EXT_H -#define STASM_LIB_EXT_H - -extern "C" // extended version of stasm_init -int stasm_init_ext( // call once, at bootup - const char* datadir, // in: directory of face detector files - int trace, // in: 0 normal use, 1 trace to stdout and stasm.log - void* detparams); // in: NULL or face detector parameters - -extern "C" // extended version of stasm_open_image -int stasm_open_image_ext( // call once per image, detect faces - const char* img, // in: gray image data, top left corner at 0,0 - int width, // in: image width - int height, // in: image height - const char* imgpath, // in: image path, used only for err msgs and debug - int multiface, // in: 0=return only one face, 1=allow multiple faces - int minwidth, // in: min face width as percentage of img width - void* user); // in: NULL or pointer to user abort func - -extern "C" -int stasm_search_auto_ext( // extended version of stasm_search_auto - int* foundface, // out: 0=no more faces, 1=found face - float* landmarks, // out: x0, y0, x1, y1, ..., caller must allocate - float* estyaw); // out: NULL or pointer to estimated yaw - -#endif // STASM_LIB_EXT_H diff --git a/3rdparty/stasm/stasm/stasm/include/stasmcascadeclassifier.h b/3rdparty/stasm/stasm/stasm/include/stasmcascadeclassifier.h deleted file mode 100644 index e2870a5..0000000 --- a/3rdparty/stasm/stasm/stasm/include/stasmcascadeclassifier.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef STASMCASCADECLASSIFIER_H -#define STASMCASCADECLASSIFIER_H - -#include -#include - -class StasmCascadeClassifier -{ - -public: - cv::CascadeClassifier faceCascade; - cv::CascadeClassifier mouthCascade; - cv::CascadeClassifier leftEyeCascade; - cv::CascadeClassifier rightEyeCascade; - - bool load(const std::string &path) { - if (!faceCascade.load(path + "haarcascades/haarcascade_frontalface_alt2.xml") || - !mouthCascade.load(path + "haarcascades/haarcascade_mcs_mouth.xml") || - !leftEyeCascade.load(path + "haarcascades/haarcascade_mcs_lefteye.xml") || - !rightEyeCascade.load(path + "haarcascades/haarcascade_mcs_righteye.xml")) return false; - - return true; - } - -}; - -#endif // STASMCASCADECLASSIFIER_H diff --git a/3rdparty/stasm/stasm/stasm/src/asm.cpp b/3rdparty/stasm/stasm/stasm/src/asm.cpp deleted file mode 100755 index 4f969d9..0000000 --- a/3rdparty/stasm/stasm/stasm/src/asm.cpp +++ /dev/null @@ -1,265 +0,0 @@ -// asm.cpp: Active Shape Model class -// -// Copyright (C) 2005-2013, Stephen Milborrow - -#include "asm.h" -#include "hatdesc.h" -#include "eyedist.h" - -namespace stasm -{ -static void TraceShape( // write an image file showing current shape on the image - const Shape& shape, // in: current search shape - const Image& pyrimg, // in: image scaled to this pyramid level - int ilev, // in: pyramid level (0 is full size) - int iter, // in: model iteration (-1 if start shape) - const char* suffix) // in -{ - (void) shape; - (void) pyrimg; - (void) ilev; - (void) iter; - (void) suffix; -#if TRACE_IMAGES // will be 0 unless debugging (defined in stasm.h) - - static int index; // number images so they appear in order in the directory - // start at index 30 because lower indices have already used for facedet etc. - if (strcmp(suffix, "start") == 0) - index = 30; - Image img; // pyrimg rescaled back to full size image (after rescaling by eyemouth) - const double RESOLUTION = 2; // 1 for no extra resolution, 2 for double resolution - const double rescale = RESOLUTION / GetPyrScale(ilev); - cv::resize(pyrimg, img, cv::Size(), rescale, rescale, cv::INTER_NEAREST); - CImage cimg; cvtColor(img, cimg, CV_GRAY2BGR); // color image - DesaturateImg(cimg); - Shape shape1(RoundMat(shape)); - shape1 += .4; // put shape points in center of rescaled pixels - shape1 *= rescale; - DrawShape(cimg, shape1, C_YELLOW, false, 1); - char path[SLEN]; - if (iter < 0) // start shape? - sprintf(path, "%s_%2.2d_%s.bmp", Base(imgpath_g), index, suffix); - else - sprintf(path, "%s_%2.2d_lev%d_iter%d_%s.bmp", - Base(imgpath_g), index, ilev, iter, suffix); - ImgPrintf(cimg, 10 * RESOLUTION, 20 * RESOLUTION, C_YELLOW, 2, path); - if (iter >= 0) - { - // draw 1D patch boundary at one point (patch is drawn - // horizontal, not rotated to shape boundary as it should be) - // [Thanks to Satish Lokkoju for RoundMat fix] - - Shape shape2(RoundMat(shape)); - int ipoint = 0; - int proflen = 9; // TASM_1D_PROFLEN - int x1 = cvRound(shape2(ipoint, IX)) - proflen / 2; - int x2 = x1 + proflen; - int y1 = cvRound(shape2(ipoint, IY)); - int y2 = y1 + 1; - rectangle(cimg, - cv::Point(cvRound(rescale * x1), cvRound(rescale * y1)), - cv::Point(cvRound(rescale * x2), cvRound(rescale * y2)), - CV_RGB(255,0,0), 1); - - // draw 2D patch boundary at one point - - if (ilev <= HAT_START_LEV) // we use HATs only at upper pyr levs - { - // get position of left eye pupil by first converting to a shape17 - ipoint = 0; // assume we can't get position of left eye pupil - Shape newshape(Shape17OrEmpty(shape2)); - if (newshape.rows) // successfully converted to a shape17? - ipoint = L17_LPupil; - else - newshape = shape2; - #define round2(x) 2 * cvRound((x) / 2) - int patchwidth = HAT_PATCH_WIDTH + round2(ilev * HAT_PATCH_WIDTH_ADJ); - x1 = cvRound(newshape(ipoint, IX)) - patchwidth / 2; - x2 = x1 + patchwidth; - y1 = cvRound(newshape(ipoint, IY)) - patchwidth / 2; - y2 = y1 + patchwidth; - rectangle(cimg, - cv::Point(cvRound(rescale * x1), cvRound(rescale * y1)), - cv::Point(cvRound(rescale * x2), cvRound(rescale * y2)), - CV_RGB(255,0,0), 1); - } - } - lprintf("%s\n", path); - if (!cv::imwrite(path, cimg)) - Err("Cannot write %s", path); - index++; - -#endif // TRACE_IMAGES -} - -#if _OPENMP - -void Mod::SuggestShape_( // args same as non OpenMP version, see below - Shape& shape, // io - int ilev, // in - const Image& img, // in - const Shape& pinned) // in -const -{ - static bool firsttime = true; - int ncatch = 0; - const Shape inshape(shape.clone()); - - // Call the search function DescSearch_ concurrently for multiple points. - // Note that dynamic OpenMP scheduling is faster here than static, - // because the time through the loop varies widely (mainly because - // classic descriptors are faster than HATs). - - #pragma omp parallel for schedule(dynamic) - - for (int ipoint = 0; ipoint < shape.rows; ipoint++) - if (pinned.rows == 0 || !PointUsed(pinned, ipoint)) // skip point if pinned - { - // You are not allowed to jump out of an OpenMP for loop. Thus - // we need this try block, to subsume the global try blocks in - // stasm_lib.cpp. Without this try, a call to Err would cause - // a jump to the global catch. - - try - { - if (firsttime && omp_get_thread_num() == 0) - { - firsttime = false; - logprintf("[nthreads %d]", omp_get_num_threads()); - } - descmods_[ilev][ipoint]-> - DescSearch_(shape(ipoint, IX), shape(ipoint, IY), - img, inshape, ilev, ipoint); - } - catch(...) - { - ncatch++; // a call was made to Err or a CV_Assert failed - } - } - - if (ncatch) - { - if (ncatch > 1) - lprintf_always("\nMultiple errors, only the first will be printed\n"); - // does not matter what we throw, will be caught by global catch - throw "SuggestShape_"; - } -} - -#else // not _OPENMP - -void Mod::SuggestShape_( // estimate shape by matching descr at each point - Shape& shape, // io: points will be moved for best descriptor matches - int ilev, // in: pyramid level (0 is full size) - const Image& img, // in: image scaled to this pyramid level - const Shape& pinned, - const Hat &hat, - StasmHash &hash) -const -{ - const Shape inshape(shape.clone()); - - for (int ipoint = 0; ipoint < shape.rows; ipoint++) - if (pinned.rows == 0 || !PointUsed(pinned, ipoint)) // skip point if pinned - { - // Call the ClassicDescMod or HatDescMod search function - // to update the current point in shape (ipoint). - // For the yaw00 model, yaw00.mh:YAW00_DESCMODS defines which - // descriptor model is used for each point. - - descmods_[ilev][ipoint]->DescSearch_(shape(ipoint, IX), shape(ipoint, IY),img, inshape, ilev, ipoint, hat, hash); - } -} -#endif // not _OPENMP - -void Mod::LevSearch_( // do an ASM search at one level in the image pyr - Shape& shape, // io: the face shape for this pyramid level - int ilev, // in: pyramid level (0 is full size) - const Image& img, // in: image scaled to this pyramid level - const Shape& pinnedshape) // in: if no rows then no pinned landmarks, else - // points except those equal to 0,0 are pinned -const -{ - StasmHash hash; - - TraceShape(shape, img, ilev, 0, "enterlevsearch"); - - const Hat &hat = InitHatLevData(img, ilev); // init internal HAT mats for this lev - - VEC b(NSIZE(shapemod_.eigvals_), 1, 0.); // eigvec weights, init to 0 - - for (int iter = 0; iter < SHAPEMODEL_ITERS; iter++) - { - // suggest shape by descriptor matching at each landmark - - SuggestShape_(shape, ilev, img, pinnedshape, hat, hash); - - TraceShape(shape, img, ilev, iter, "suggested"); - - // adjust suggested shape to conform to the shape model - - if (pinnedshape.rows) - shape = shapemod_.ConformShapeToMod_Pinned_(b, shape, ilev, pinnedshape); - else - shape = shapemod_.ConformShapeToMod_(b, shape, ilev); - - TraceShape(shape, img, ilev, iter, "conformed"); - } -} - -static void CreatePyr( // create image pyramid - vector& pyr, // out: the pyramid, pyr[0] is full size image - const Image& img, // in: full size image - int nlevs) // in -{ - CV_Assert(nlevs >= 1 && nlevs < 10); // 10 is arb - pyr.resize(nlevs); - pyr[0] = img; // pyramid level 0 is full size image - for (int ilev = 1; ilev < nlevs; ilev++) - { - const double scale = GetPyrScale(ilev); - cv::resize(img, pyr[ilev], cv::Size(), scale, scale, cv::INTER_LINEAR); - } -} - -static double GetPrescale( // factor to scale face to standard size prior to search - const Shape& startshape) // in: startshape roughly positioned on face -{ - return EYEMOUTH_DIST / EyeMouthDist(startshape); -} - -Shape Mod::ModSearch_( // returns coords of the facial landmarks - const Shape& startshape, // in: startshape roughly positioned on face - const Image& img, // in: grayscale image (typically just ROI) - const Shape* pinnedshape) // in: pinned landmarks, NULL if nothing pinned -const -{ - Image scaledimg; // image scaled to fixed eye-mouth distance - const double imgscale = GetPrescale(startshape); - - // TODO This resize is quite slow (cv::INTER_NEAREST is even slower, why?). - cv::resize(img, scaledimg, - cv::Size(), imgscale, imgscale, cv::INTER_LINEAR); - - TraceShape(startshape * imgscale, scaledimg, 0, -1, "start"); - - vector pyr; // image pyramid (a vec of images, one for each pyr lev) - CreatePyr(pyr, scaledimg, N_PYR_LEVS); - - Shape shape(startshape * imgscale * GetPyrScale(N_PYR_LEVS)); - - Shape pinned; // pinnedshape scaled to current pyr lev - if (pinnedshape) - pinned = *pinnedshape * imgscale * GetPyrScale(N_PYR_LEVS); - - for (int ilev = N_PYR_LEVS-1; ilev >= 0; ilev--) - { - shape *= PYR_RATIO; // scale shape to this pyr lev - pinned *= PYR_RATIO; - - LevSearch_(shape, ilev, pyr[ilev], pinned); - } - return shape / imgscale; -} - -} // namespace stasm diff --git a/3rdparty/stasm/stasm/stasm/src/classicdesc.cpp b/3rdparty/stasm/stasm/stasm/src/classicdesc.cpp deleted file mode 100755 index c8d6afa..0000000 --- a/3rdparty/stasm/stasm/stasm/src/classicdesc.cpp +++ /dev/null @@ -1,289 +0,0 @@ -// classicdesc.cpp: model for classic ASM descriptors -// -// By "classic descriptor" we mean the Cootes' style one dimensional -// profile along the whisker orthogonal to the shape boundary. -// -// Copyright (C) 2005-2013, Stephen Milborrow - -#include "classicdesc.h" -#include "landmarks.h" - -namespace stasm -{ -static void NormalizeMat( - MAT& mat) // io: normalized so L2 length is 1 -{ - double norm = cv::norm(mat); // L2 norm - if (!IsZero(norm)) - mat /= norm; -} - -static const VEC Bisector( // return normalized bisector of three ordered points - const VEC& prev, // in: x,y coords of previous point (1x2 matrix) - const VEC& point, // in - const VEC& next) // in -{ - VEC u(1, 2); // u is point - prev, rotated by 90 degrees - u(IX) = point(IY) - prev(IY); - u(IY) = prev(IX) - point(IX); - NormalizeMat(u); - - VEC v(1, 2); // v is next - point, rotated by 90 degrees - v(IX) = next(IY) - point(IY); - v(IY) = point(IX) - next(IX); - NormalizeMat(v); - - VEC w(u + v); NormalizeMat(w); - - // are prev and next in the same line? if so, avoid numerical issues - if (IsZero(w(IX)) && IsZero(w(IY))) - { - w = point - prev; - NormalizeMat(w); - } - return w; // w is the direction of the bisector -} - -// get x and y distances to take a single pixel step along the whisker - -static void WhiskerStep( - double& xstep, // out: x dist to move one pix along whisker - double& ystep, // out: y dist to move one pix along whisker - const Shape& shape, // in - int ipoint) // in: index of the current point -{ - int prev, next; PrevAndNextLandmarks(prev, next, ipoint, shape); - - if ((Equal(shape(prev, IX), shape(ipoint, IX)) && - Equal(shape(prev, IY), shape(ipoint, IY))) || - - (Equal(shape(next, IX), shape(ipoint, IX)) && - Equal(shape(next, IY), shape(ipoint, IY)))) - { - // The prev or next point is on top of the current point. - // Arbitrarily point the whisker in a horizontal direction. - // TODO Revisit, this is common at low resolution pyramid levels. - - xstep = 1; - ystep = 0; - } - else - { - const VEC whisker_direction(Bisector(shape.row(prev), - shape.row(ipoint), - shape.row(next))); - xstep = -whisker_direction(IX); - ystep = -whisker_direction(IY); - - // normalize so either xstep or ystep will be +-1, - // and the other will be smaller than +-1 - - const double abs_xstep = ABS(xstep); - const double abs_ystep = ABS(ystep); - if (abs_xstep >= abs_ystep) - { - xstep /= abs_xstep; - ystep /= abs_xstep; - } - else - { - xstep /= abs_ystep; - ystep /= abs_ystep; - } - } -} - -static inline int Step( // return x coord at the given offset along whisker - double x, // in: x coord of center of whisker - double xstep, // in: x dist to move one pixel along whisker - int offset) // in: offset along whisker in pixels -{ - return cvRound(x + (offset * xstep)); -} - -static inline int Pix( // get pixel at ix and iy, forcing ix and iy in range - const Image& img, // in - int ix, // in - int iy) // in -{ - return img(Clamp(iy, 0, img.rows-1), Clamp(ix, 0, img.cols-1)); -} - -// fullprof is the 1D profile along the whisker, including extra elements -// to allow searching away from the current position of the landmark. -// -// shape[ipoint] is the current position of the landmark, -// and the center point of the whisker. -// We also use shape for figuring out the direction of the whisker. - -static VEC FullProf( // return full profile - const Image& img, // in - const MAT& shape, // in - int ipoint, // in: index of the current point - int fullproflen) // in -{ - VEC fullprof(1, fullproflen); - - double xstep; // x axis dist corresponding to one pixel along whisker - double ystep; - WhiskerStep(xstep, ystep, shape, ipoint); - - const double x = shape(ipoint, IX); // center point of the whisker - const double y = shape(ipoint, IY); - - // number of pixs to sample in each direction along the whisker - const int n = (NSIZE(fullprof) - 1) / 2; - - int prevpix = Pix(img, - Step(x, xstep, -n-1), Step(y, ystep, -n-1)); - - for (int i = -n; i <= n; i++) - { - const int pix = Pix(img, - Step(x, xstep, i), Step(y, ystep, i)); - fullprof(i + n) = double(pix - prevpix); // signed gradient - prevpix = pix; - } - return fullprof; -} - -static double SumAbsElems( // return the sum of the abs values of the elems of mat - const MAT& mat) // in -{ - CV_Assert(mat.isContinuous()); - const double* const data = Buf(mat); - double sum = 0; - int i = NSIZE(mat); // number of elements - while (i--) - sum += ABS(data[i]); - return sum; -} - -static VEC SubProf( // return the profile at given offset within fullprof - int offset, // in: offset along whisker in pixels - int proflen, // in - const VEC& fullprof) // in -{ - CV_Assert(proflen > 1 && proflen < 100); // 100 is arb - CV_Assert(proflen % 2 == 1); // prof length must be odd - - VEC prof(1, proflen); // the profile at the given offset along whisker - - // copy the relevant part of fullprof into prof - - memcpy(Buf(prof), - Buf(fullprof) + offset + NSIZE(fullprof)/2 - NSIZE(prof)/2, - NSIZE(prof) * sizeof(prof(0))); - - // normalize prof - - double sum = SumAbsElems(prof); - if (!IsZero(sum)) - prof *= NSIZE(prof) / sum; - - return prof; -} - -VEC ClassicProf( // currently used only when training a new model - const Image& img, // in: the image scaled to this pyramid level - const Shape& inshape, // in: current posn of landmarks (for whisker directions) - int ipoint, // in: index of the current landmark - int proflen) // in -{ - return SubProf(0, proflen, FullProf(img, inshape, ipoint, proflen)); -} - -// This returns a double equal to x.t() * mat * x. -// -// x is a vector (row or column, it doesn't matter). -// -// mat is assumed to be a symmetric matrix -// (but only the upper right triangle of mat is actually used). -// -// mat and x are not modified. -// -// This function is equivalent to x.t() * mat * x(), but is optimized -// for speed and is faster. It's faster because we use the fact that -// mat is symmetric to roughly halve the number of operations. - -static double xAx( - const VEC& x, // in - const MAT& mat) //in: must be symmetric -{ - const int n = NSIZE(x); - CV_Assert(mat.rows == n && mat.cols == n && x.isContinuous()); - const double* px = Buf(x); - double diagsum = 0, sum = 0; - int i = n; - while (i--) - { - const double xi = px[i]; - const double* const rowbuf = mat.ptr(i); - diagsum += rowbuf[i] * SQ(xi); // sum diag elements - for (int j = i+1; j < n; j++) // sum upper right triangle elements - sum += rowbuf[j] * xi * px[j]; - } - return diagsum + 2 * sum; // "2 *" to include lower left triangle elements -} - -// If OpenMP is enabled, multiple instances of this function will be called -// concurrently (each call will have a different value of x and y). Thus this -// function and its callees do not modify any data that is not on the stack. - -void ClassicDescSearch( // search along whisker for best profile match - double& x, // io: (in: old posn of landmark, out: new posn) - double& y, // io: - const Image& img, // in: the image scaled to this pyramid level - const Shape& inshape, // in: current posn of landmarks (for whisker directions) - int ipoint, // in: index of the current landmark - const MAT& meanprof, // in: mean of the training profiles for this point - const MAT& covi) // in: inverse of the covar of the training profiles -{ - const int proflen = NSIZE(meanprof); - CV_Assert(proflen % 2 == 1); // proflen must be odd in this implementation - - // fullprof is the 1D profile along the whisker including the extra - // elements to allow search +-CLASSIC_MAX_OFFSET pixels away from - // the current position of the landmark. - // We precalculate the fullprof for efficiency in the for loop below. - - const int fullproflen = proflen + 2 * CLASSIC_MAX_OFFSET; - CV_Assert(fullproflen % 2 == 1); // fullprof length must be odd - const VEC fullprof(FullProf(img, inshape, ipoint, fullproflen)); - - // move along the whisker looking for the best match - - int bestoffset = 0; - double mindist = FLT_MAX; - for (int offset = -CLASSIC_MAX_OFFSET; - offset <= CLASSIC_MAX_OFFSET; - offset += CLASSIC_SEARCH_RESOL) - { - // Get the profile distance. That is, get the image profile at the given - // offset along the whisker, and return the Mahalanobis distance between - // it and the model mean profile. Low distance means good fit. - - const VEC prof(SubProf(offset, proflen, fullprof)); - - // The following code is equivalent to - // dist = (prof - meanprof).t() * covi * (prof - meanprof) - // but is optimized for speed. - - prof -= meanprof; // for efficiency, use "-=" not "=" with "-" - const double dist = xAx(prof, covi); - - if (dist < mindist) - { - mindist = dist; - bestoffset = offset; - } - } - // change x,y to the best position along the whisker - - double xstep, ystep; - WhiskerStep(xstep, ystep, inshape, ipoint); - x = inshape(ipoint, IX) + (bestoffset * xstep); - y = inshape(ipoint, IY) + (bestoffset * ystep); -} - -} // namespace stasm diff --git a/3rdparty/stasm/stasm/stasm/src/convshape.cpp b/3rdparty/stasm/stasm/stasm/src/convshape.cpp deleted file mode 100755 index f90194a..0000000 --- a/3rdparty/stasm/stasm/stasm/src/convshape.cpp +++ /dev/null @@ -1,345 +0,0 @@ -// convshape.cpp: convert a shape such as stasm 77 point shape to other formats -// -// Copyright (C) 2005-2013, Stephen Milborrow - -#include "stasm_lib.h" -#include "convshape.h" -#include "shape17.h" - -namespace stasm -{ -static void CopyPoint( // copy a point from oldshape to shape - Shape& shape, // io - const Shape& oldshape, // in - int i, // in - int iold) // in -{ - shape(i, IX) = oldshape(iold, IX); - shape(i, IY) = oldshape(iold, IY); -} - -static void InterPoint( // interpolate a point from two nearby oldshape points - Shape& shape, // io - const Shape& oldshape, // in - int i, // in: shape point - double ratio, // in: interpolation ratio, 0 to 1 - int i1, // in: oldshape point 1 - int i2) // in: oldshape point 2 -{ - if (!PointUsed(oldshape, i1) && !PointUsed(oldshape, i2)) - { - shape(i, IX) = 0; - shape(i, IY) = 0; - } - else if (!PointUsed(oldshape, i1)) - { - shape(i, IX) = oldshape(i2, IX) + 1; // +1 is arb, to disambiguate point - shape(i, IY) = oldshape(i2, IY) + 1; - } - else if (!PointUsed(oldshape, i2)) - { - shape(i, IX) = oldshape(i1, IX) + 1; - shape(i, IY) = oldshape(i1, IY) + 1; - } - else - { - CV_Assert(ratio >= 0 && ratio <= 1); - shape(i, IX) = ratio * oldshape(i1, IX) + (1-ratio) * oldshape(i2, IX); - shape(i, IY) = ratio * oldshape(i1, IY) + (1-ratio) * oldshape(i2, IY); - } -} - -static Shape Shape77As20( // return an approximated BioID 20 point shape - const Shape& shape) // in: Stasm 77 point shape -{ - CV_Assert(shape.rows == 77); - - Shape newshape(20, 2); - - CopyPoint(newshape, shape, 0, 38); - CopyPoint(newshape, shape, 1, 39); - CopyPoint(newshape, shape, 2, 59); - CopyPoint(newshape, shape, 3, 65); - CopyPoint(newshape, shape, 4, 18); - CopyPoint(newshape, shape, 5, 21); - CopyPoint(newshape, shape, 6, 22); - CopyPoint(newshape, shape, 7, 25); - CopyPoint(newshape, shape, 8, 0); - CopyPoint(newshape, shape, 9, 34); - CopyPoint(newshape, shape, 10, 30); - CopyPoint(newshape, shape, 11, 40); - CopyPoint(newshape, shape, 12, 44); - CopyPoint(newshape, shape, 13, 12); - CopyPoint(newshape, shape, 14, 52); - CopyPoint(newshape, shape, 15, 51); - CopyPoint(newshape, shape, 16, 53); - CopyPoint(newshape, shape, 17, 62); - CopyPoint(newshape, shape, 18, 74); - CopyPoint(newshape, shape, 19, 6); - -#if MOD_A1 || MOD_A || MOD_A_EMU - const double eyemouth = EyeMouthDist(shape); - newshape(15, IY) += MAX(1, .02 * eyemouth); // move down, into nostril - newshape(16, IY) += MAX(1, .02 * eyemouth); // move down, into nostril -#endif - - return newshape; -} - -static Shape Shape77As22( // return an approximated AR 22 point shape - const Shape& shape) // in: Stasm 77 point shape -{ - CV_Assert(shape.rows == 77); - - // first 20 points same as BioId - Shape newshape = DimKeep(Shape77As20(shape), 22, 2); - - CopyPoint(newshape, shape, 20, 3); - CopyPoint(newshape, shape, 21, 9); - - return newshape; -} - -static Shape Shape77AsXm2vts68( // return an approximated XM2VTS 68 point shape - const Shape& shape) // in: Stasm 77 point shape -{ - CV_Assert(shape.rows == 77); - - Shape newshape(68, 2); - - CopyPoint(newshape, shape, 0, 0); - InterPoint(newshape, shape, 1, .6667, 1, 2); - InterPoint(newshape, shape, 2, .5, 2, 3); - CopyPoint(newshape, shape, 3, 3); - InterPoint(newshape, shape, 4, .3333, 3, 4); - InterPoint(newshape, shape, 5, .6667, 4, 5); - CopyPoint(newshape, shape, 6, 5); - CopyPoint(newshape, shape, 7, 6); - CopyPoint(newshape, shape, 8, 7); - InterPoint(newshape, shape, 9, .3333, 7, 8); - InterPoint(newshape, shape, 10, .6667, 8, 9); - CopyPoint(newshape, shape, 11, 9); - InterPoint(newshape, shape, 12, .5, 9, 10); - InterPoint(newshape, shape, 13, .3333, 10, 11); - CopyPoint(newshape, shape, 14, 12); - CopyPoint(newshape, shape, 15, 25); - CopyPoint(newshape, shape, 16, 24); - CopyPoint(newshape, shape, 17, 23); - CopyPoint(newshape, shape, 18, 22); - CopyPoint(newshape, shape, 19, 27); - CopyPoint(newshape, shape, 20, 26); - CopyPoint(newshape, shape, 21, 18); - CopyPoint(newshape, shape, 22, 17); - CopyPoint(newshape, shape, 23, 16); - CopyPoint(newshape, shape, 24, 21); - CopyPoint(newshape, shape, 25, 20); - CopyPoint(newshape, shape, 26, 19); - CopyPoint(newshape, shape, 27, 34); - CopyPoint(newshape, shape, 28, 32); - CopyPoint(newshape, shape, 29, 30); - CopyPoint(newshape, shape, 30, 36); - CopyPoint(newshape, shape, 31, 38); - CopyPoint(newshape, shape, 32, 44); - CopyPoint(newshape, shape, 33, 42); - CopyPoint(newshape, shape, 34, 40); - CopyPoint(newshape, shape, 35, 46); - CopyPoint(newshape, shape, 36, 39); - InterPoint(newshape, shape, 37, .6667, 30, 40); - newshape(37, IX) = shape(50, IX); - CopyPoint(newshape, shape, 38, 50); - CopyPoint(newshape, shape, 39, 58); - CopyPoint(newshape, shape, 40, 57); - CopyPoint(newshape, shape, 41, 56); - CopyPoint(newshape, shape, 42, 55); - CopyPoint(newshape, shape, 43, 54); - CopyPoint(newshape, shape, 44, 48); - InterPoint(newshape, shape, 45, .3333, 30, 40); - newshape(45, IX) = shape(48, IX); - CopyPoint(newshape, shape, 46, 51); - CopyPoint(newshape, shape, 47, 53); - CopyPoint(newshape, shape, 48, 59); - CopyPoint(newshape, shape, 49, 60); - CopyPoint(newshape, shape, 50, 61); - CopyPoint(newshape, shape, 51, 62); - CopyPoint(newshape, shape, 52, 63); - CopyPoint(newshape, shape, 53, 64); - CopyPoint(newshape, shape, 54, 65); - CopyPoint(newshape, shape, 55, 72); - CopyPoint(newshape, shape, 56, 73); - CopyPoint(newshape, shape, 57, 74); - CopyPoint(newshape, shape, 58, 75); - CopyPoint(newshape, shape, 59, 76); - CopyPoint(newshape, shape, 60, 69); - CopyPoint(newshape, shape, 61, 70); - CopyPoint(newshape, shape, 62, 71); - CopyPoint(newshape, shape, 63, 66); - CopyPoint(newshape, shape, 64, 67); - CopyPoint(newshape, shape, 65, 68); - InterPoint(newshape, shape, 66, .5, 67, 70); - CopyPoint(newshape, shape, 67, 52); - -#if MOD_A1 || MOD_A || MOD_A_EMU - const double eyemouth = EyeMouthDist(shape); - newshape(38, IY) += MAX(1, .05 * eyemouth); // move side of nose down - newshape(44, IY) += MAX(1, .05 * eyemouth); // move side of nose down - newshape(46, IY) += MAX(1, .02 * eyemouth); // move down, into nostril - newshape(47, IY) += MAX(1, .02 * eyemouth); // move down, into nostril -#endif - - return newshape; -} - -static Shape Shape77As68( // return an approximated XM2VTS 68 point shape - const Shape& shape) // in: Stasm 77 point shape -{ - CV_Assert(shape.rows == 77); - - Shape newshape(68, 2); - - CopyPoint(newshape, shape, 0, 0); - InterPoint(newshape, shape, 1, .6667, 1, 2); - InterPoint(newshape, shape, 2, .5, 2, 3); - CopyPoint(newshape, shape, 3, 3); - InterPoint(newshape, shape, 4, .3333, 3, 4); - InterPoint(newshape, shape, 5, .6667, 4, 5); - CopyPoint(newshape, shape, 6, 5); - CopyPoint(newshape, shape, 7, 6); - CopyPoint(newshape, shape, 8, 7); - InterPoint(newshape, shape, 9, .3333, 7, 8); - InterPoint(newshape, shape, 10, .6667, 8, 9); - CopyPoint(newshape, shape, 11, 9); - InterPoint(newshape, shape, 12, .5, 9, 10); - InterPoint(newshape, shape, 13, .3333, 10, 11); - CopyPoint(newshape, shape, 14, 12); - CopyPoint(newshape, shape, 15, 25); - CopyPoint(newshape, shape, 16, 24); - CopyPoint(newshape, shape, 17, 23); - CopyPoint(newshape, shape, 18, 22); - CopyPoint(newshape, shape, 19, 27); - CopyPoint(newshape, shape, 20, 26); - CopyPoint(newshape, shape, 21, 18); - CopyPoint(newshape, shape, 22, 17); - CopyPoint(newshape, shape, 23, 16); - CopyPoint(newshape, shape, 24, 21); - CopyPoint(newshape, shape, 25, 20); - CopyPoint(newshape, shape, 26, 19); - CopyPoint(newshape, shape, 27, 34); - CopyPoint(newshape, shape, 28, 32); - CopyPoint(newshape, shape, 29, 30); - CopyPoint(newshape, shape, 30, 36); - CopyPoint(newshape, shape, 31, 38); - CopyPoint(newshape, shape, 32, 44); - CopyPoint(newshape, shape, 33, 42); - CopyPoint(newshape, shape, 34, 40); - CopyPoint(newshape, shape, 35, 46); - CopyPoint(newshape, shape, 36, 39); - InterPoint(newshape, shape, 37, .6667, 30, 40); - newshape(37, IX) = shape(50, IX); - CopyPoint(newshape, shape, 38, 50); - CopyPoint(newshape, shape, 39, 58); - CopyPoint(newshape, shape, 40, 57); - CopyPoint(newshape, shape, 41, 56); - CopyPoint(newshape, shape, 42, 55); - CopyPoint(newshape, shape, 43, 54); - CopyPoint(newshape, shape, 44, 48); - InterPoint(newshape, shape, 45, .3333, 30, 40); - newshape(45, IX) = shape(48, IX); - CopyPoint(newshape, shape, 46, 51); - CopyPoint(newshape, shape, 47, 53); - CopyPoint(newshape, shape, 48, 59); - CopyPoint(newshape, shape, 49, 60); - CopyPoint(newshape, shape, 50, 61); - CopyPoint(newshape, shape, 51, 62); - CopyPoint(newshape, shape, 52, 63); - CopyPoint(newshape, shape, 53, 64); - CopyPoint(newshape, shape, 54, 65); - CopyPoint(newshape, shape, 55, 72); - CopyPoint(newshape, shape, 56, 73); - CopyPoint(newshape, shape, 57, 74); - CopyPoint(newshape, shape, 58, 75); - CopyPoint(newshape, shape, 59, 76); - CopyPoint(newshape, shape, 60, 69); - CopyPoint(newshape, shape, 61, 70); - CopyPoint(newshape, shape, 62, 71); - CopyPoint(newshape, shape, 63, 66); - CopyPoint(newshape, shape, 64, 67); - CopyPoint(newshape, shape, 65, 68); - InterPoint(newshape, shape, 66, .5, 67, 70); - CopyPoint(newshape, shape, 67, 52); - -#if MOD_A1 || MOD_A || MOD_A_EMU - const double eyemouth = EyeMouthDist(shape); - newshape(38, IY) += MAX(1, .05 * eyemouth); // move side of nose down - newshape(44, IY) += MAX(1, .05 * eyemouth); // move side of nose down - newshape(46, IY) += MAX(1, .02 * eyemouth); // move down, into nostril - newshape(47, IY) += MAX(1, .02 * eyemouth); // move down, into nostril -#endif - - return newshape; -} - -static Shape Shape77As76( // return an approximated MUCT 76 point shape - const Shape& shape) // in: Stasm 77 point shape -{ - // first 68 points same as XM2VTS - Shape newshape = DimKeep(Shape77AsXm2vts68(shape), 76, 2); - - CopyPoint(newshape, shape, 68, 33); // extra eyelid points - CopyPoint(newshape, shape, 69, 31); - CopyPoint(newshape, shape, 70, 37); - CopyPoint(newshape, shape, 71, 35); - CopyPoint(newshape, shape, 72, 43); - CopyPoint(newshape, shape, 73, 41); - CopyPoint(newshape, shape, 74, 47); - CopyPoint(newshape, shape, 75, 45); - - return newshape; -} - -Shape ConvertShape( // return shape with nlandmarks, return no rows if can't - const Shape& shape, // in - int nlandmarks) // in: shape.rows=no change, 17=shape17, anything else return no rows - // if shape.rows=77, treat specially: - // 77=nochange, 76=muct76, 68=xm2vts, 22=ar, 20=bioid, 17=shape17 -{ - Shape newshape; - if (nlandmarks == shape.rows) - newshape = shape.clone(); - else if (nlandmarks == 17) - newshape = Shape17OrEmpty(shape); - else if (shape.rows == 76) // MUCT 76 - { - switch (nlandmarks) - { - case 68: - newshape = DimKeep(shape.clone(), 68, 2); // MUCT 68 and XM2VTS - break; - default: - break; - } - } - else if (shape.rows == 77) // MUCT 77 (Stasm version 4) - { - switch (nlandmarks) - { - case 20: - newshape = Shape77As20(shape); // BioID - break; - case 22: - newshape = Shape77As22(shape); // AR - break; - case 68: - newshape = Shape77As68(shape); // MUCT 68 and XM2VTS - break; - case 76: - newshape = Shape77As76(shape); // MUCT 76 (Stasm version 3) - break; - default: - break; - } - } - CV_Assert(newshape.rows == nlandmarks || newshape.rows == 0); - return newshape; -} - -} // namespace stasm diff --git a/3rdparty/stasm/stasm/stasm/src/err.cpp b/3rdparty/stasm/stasm/stasm/src/err.cpp deleted file mode 100755 index cc35865..0000000 --- a/3rdparty/stasm/stasm/stasm/src/err.cpp +++ /dev/null @@ -1,155 +0,0 @@ -// err.cpp: error handling for Stasm -// -// Don't call internal Stasm functions (i.e. functions in the Stasm namespace -// when not in a try block, because Stasm's error handler (Err) raises an -// exception. You need to catch that exception to avoid a messageless crash. -// -// Your code should look like this (see e.g. stasm_lib.cpp and stasm_main.cpp): -// -// CatchOpenCvErrs(); // tell Stasm to handle CV_Assert as Stasm errors -// try -// { -// ... your code which calls Stasm's internal functions ... -// } -// catch(...) -// { -// // a call was made to Err or a CV_Assert failed -// printf("\n%s\n", stasm_lasterr()); -// exit(1); -// } -// UncatchOpenCvErrs(); // restore OpenCV handler to its previous state -// -// Note that the stasm library function (i.e. the functions prefixed -// by "stasm_") use try blocks internally, and code that calls -// them doesn't have to worry about the above exception. -// -// Copyright (C) 2005-2013, Stephen Milborrow - -#include "err.h" -#include "misc.h" - -#include -#include - -namespace stasm -{ -static char err_g[SBIG]; // err msg saved for retrieval by LastErr and stasm_lasterr - -static vector stack_g(10); // stack of err handlers, 10 is generous - -static int istack_g; // index into stack_g - -//----------------------------------------------------------------------------- - -static void PossiblyEnterDebugger(void) -{ -#if _DEBUG - // requires you to be in a debugger or have set up a just-in-time debugger - printf("\n%s\nDEBUG is true so forcing entry to the debugger\n", err_g); - fflush(stdout); - static volatile int* p = 0; - *p = 99; -#endif // _DEBUG -} - -// This gets called during OpenCV error handling e.g. if a CV_Assert fails. -// Save the error info in our global string err_g. - -static int CV_CDECL CvErrorCallbackForStasm( - int code, // translated to a string e.g. "Assertion failed" - const char* , // unused here - const char* err_msg, // e.g. the contents of the line where assert failed - const char* file_name, // filename where error occurred (if available) - int line, // line number where error occurred - void* ) // unused here -{ - if (err_g[0]) - { - // Recursive, we are already processing an error. - // Not really an issue, only first error will be reported via LastErr. - printf("\nNested error in CvErrorCallbackForStasm\n" - " Current error: %.80s\n New error: %s:%d: %.80s\n", - err_g, - file_name && file_name[0]? file_name: "unknown file", line, err_msg); - } - else - { - char temp[SBIG]; // temporary string needed because err_msg may be err_g - const char* errmsg = cvErrorStr(code); - if (file_name && file_name[0]) - sprintf(temp, "%s(%d) : %s : %s", - BaseExt(file_name), line, errmsg, err_msg); - else - sprintf(temp, "OpenCV %s : %s", errmsg, err_msg); - - STRCPY(err_g, temp); - } - PossiblyEnterDebugger(); - return 0; -} - -void CatchOpenCvErrs(void) // makes CV_Assert work with LastErr and stasm_lasterr -{ - err_g[0] = 0; - cv::ErrorCallback prev = cv::redirectError(CvErrorCallbackForStasm); - if (istack_g < NSIZE(stack_g)) - stack_g[istack_g++] = prev; - else // should never get here (CatchErr regions nested too deeply) - printf("\nCallback stack overpush\n"); -} - -void UncatchOpenCvErrs(void) // restore handler that was active before CatchOpenCvErrs -{ - if (istack_g > 0) - cv::redirectError(stack_g[--istack_g]); - else // should never get here (call to UncatchErr without matching CatchErr) - printf("\nCallback stack overpop\n"); -} - -void Err(const char* format, ...) // args like printf, throws an exception -{ - if (err_g[0]) - { - // Recursive, we are already processing an error. - // Ok, only first error will be reported via LastErr. - // This happens if Err is called to report a stasm_search_auto fail. - } - else - { - char s[SBIG]; // temporary needed because format or ... may be err_g - va_list args; - va_start(args, format); - VSPRINTF(s, format, args); - va_end(args); - STRCPY(err_g, s); - } - PossiblyEnterDebugger(); - throw "Err"; // does not matter what we throw, will be caught by global catch -} - -const char* LastErr(void) // return the last error message, called by stasm_lasterr -{ - if (!err_g[0]) // no error message? - { - // Should never get here unless someone calls LastErr or - // stasm_lasterr incorrectly (i.e. when there has been no error). - // - // TODO But in fact we do actually get here if cv::fastMalloc fails - // (within OpenCV) when allocating a small amount of memory (say 10 bytes, - // large amounts are ok). It seems that when there is very little memory - // remaining, OpenCV does not handle exceptions properly (an exception - // is raised but the OpenCV error callback function is not called). - // To reproduce, put the following in your code: - // volatile void *p; while (1) p = cv::fastMalloc(10); - - STRCPY(err_g, "Invalid call to LastErr"); - } - return err_g; -} - -void ClearLastErr(void) -{ - err_g[0] = 0; -} - -} // namespace stasm diff --git a/3rdparty/stasm/stasm/stasm/src/eyedist.cpp b/3rdparty/stasm/stasm/stasm/src/eyedist.cpp deleted file mode 100755 index e939d50..0000000 --- a/3rdparty/stasm/stasm/stasm/src/eyedist.cpp +++ /dev/null @@ -1,140 +0,0 @@ -// eyedist.cpp: calculate eye-mouth and inter-eye dist -// -// The functions in this file know how to deal with missing points. This -// matters during testing when we are comparing results to manually -// landmarked reference shapes. For example, a reference eye pupil may be -// concealed by the side of the nose. When calculating the inter-eye -// distance, if the pupil is missing we can instead use a point near the -// pupil. We must then adjust the point-to-point distance calculated using -// this surrogate point. We use the mean face shape to figure out the -// adjustment. The accuracy of the resulting estimated inter-eye distance will -// depend upon how similar the proportions of the face are to the mean face. -// -// Copyright (C) 2005-2013, Stephen Milborrow - -#include "eyedist.h" -#include "shape17.h" -#include "landmarks.h" - -namespace stasm -{ -static int TabPoint( // return first used point in tab, -1 if none - const int* tab, // in - int ntab, // in - const Shape& shape) // in -{ - for (int i = 0; i < ntab; i++) - if (PointUsed(shape, tab[i])) - return tab[i]; // note return - - return -1; -} - -static double CanonicalEyeMouthDist( // return 0 if pupils and mouth not avail - const Shape& shape17) // in -{ - if (!PointUsed(shape17, L17_LPupil) || - !PointUsed(shape17, L17_RPupil) || - !PointUsed(shape17, L17_CBotOfBotLip)) - { - return 0; // note return - } - return PointDist( - MeanPoint(shape17, L17_LPupil, L17_RPupil, IX), // eye mid point - MeanPoint(shape17, L17_LPupil, L17_RPupil, IY), - shape17(L17_CBotOfBotLip, IX), // bot of bot lip - shape17(L17_CBotOfBotLip, IY)); -} - -double EyeMouthDist( // eye-mouth distance of a face shape, return 1 if not a face - const Shape& shape) // in -{ - static const int eyes[] = // surrogates for pupil midpoint - { - L17_LPupil, - L17_RPupil, - L17_LEyeOuter, - L17_REyeOuter, - L17_LEyeInner, - L17_REyeInner, - L17_LEyebrowInner, - L17_REyebrowInner, - L17_LEyebrowOuter, - L17_REyebrowOuter - }; - static const int mouths[] = // surrogates for bot of bot lip - { - L17_CBotOfBotLip, - L17_CTopOfTopLip, - L17_LMouthCorner, - L17_RMouthCorner - }; - const Shape shape17(Shape17OrEmpty(shape)); - if (shape17.rows == 0) // could not convert the shape to a Shape17? - return ShapeWidth(shape) / 2; // fallback, note return - double eyemouth = CanonicalEyeMouthDist(shape17); - if (eyemouth == 0) // pupils and mouth not available? - { - const int eye = TabPoint(eyes, NELEMS(eyes), shape17); - const int mouth = TabPoint(mouths, NELEMS(mouths), shape17); - if (eye >= 0 && mouth >= 0) // actual or surrogate points available? - { - eyemouth = PointDist(shape17, eye, mouth) * - CanonicalEyeMouthDist(MEANSHAPE17) / - PointDist(MEANSHAPE17, eye, mouth); - } - } - if (eyemouth == 0) - { - // last resort, estimate eyemouth dist from shape extent - eyemouth = MAX(ShapeWidth(shape17), ShapeHeight(shape17)) * - PointDist(MEANSHAPE17, L17_LPupil, L17_CBotOfBotLip) / - MAX(ShapeWidth(MEANSHAPE17), ShapeHeight(MEANSHAPE17)); - } - CV_Assert(eyemouth > 1 && eyemouth < 1e5); // sanity check - return eyemouth; -} - -double InterEyeDist( // inter-pupil distance of a face shape - const Shape& shape) // in -{ - static const int leyes[] = // surrogates for left pupil - { - L17_LPupil, - L17_LEyeOuter, - L17_LEyeInner, - L17_LEyebrowInner, - L17_LEyebrowOuter - }; - static const int reyes[] = // surrogates for right pupil - { - L17_RPupil, - L17_REyeOuter, - L17_REyeInner, - L17_REyebrowInner, - L17_REyebrowOuter - }; - const Shape shape17(Shape17OrEmpty(shape)); - if (shape17.rows == 0) // could not convert the shape to a Shape17? - return ShapeWidth(shape) / 2; // fallback, note return - double eyedist = 0; - const int leye = TabPoint(leyes, NELEMS(leyes), shape17); - const int reye = TabPoint(reyes, NELEMS(reyes), shape17); - if (leye >= 0 && reye >= 0 && // actual or surrogate points available? - PointDist(shape17, leye, reye) > 1) // surrogates aren't co-located? - { - eyedist = PointDist(shape17, leye, reye) * - PointDist(MEANSHAPE17, L17_LPupil, L17_RPupil) / - PointDist(MEANSHAPE17, leye, reye); - } - else // last resort, estimate inter-pupil distance from shape extent - { - eyedist = MAX(ShapeWidth(shape17), ShapeHeight(shape17)) * - PointDist(MEANSHAPE17, L17_LPupil, L17_RPupil) / - MAX(ShapeWidth(MEANSHAPE17), ShapeHeight(MEANSHAPE17)); - } - CV_Assert(eyedist > 1 && eyedist < 1e5); // sanity check - return eyedist; -} - -} // namespace stasm diff --git a/3rdparty/stasm/stasm/stasm/src/facedet.cpp b/3rdparty/stasm/stasm/stasm/src/facedet.cpp deleted file mode 100755 index 4b0aeda..0000000 --- a/3rdparty/stasm/stasm/stasm/src/facedet.cpp +++ /dev/null @@ -1,221 +0,0 @@ -// facedet.cpp: find faces in images (frontal model version) -// -// Copyright (C) 2005-2013, Stephen Milborrow - -#include "facedet.h" -#include "stasm_lib.h" - -#include - -namespace stasm -{ -typedef vector vec_DetPar; - -//static cv::CascadeClassifier facedet_g; // the face detector - -static const double BORDER_FRAC = .1; // fraction of image width or height - // use 0.0 for no border - -//----------------------------------------------------------------------------- - -void FaceDet::OpenFaceDetector_( // called by stasm_init, init face det from XML file - const char* datadir, // in: directory of face detector files - void*) // in: unused (func signature compatibility) -{ - (void) datadir; - //OpenDetector(facedet_g, "haarcascade_frontalface_alt2.xml", datadir); -} - -// If a face is near the edge of the image, the OpenCV detectors tend to -// return a too-small face rectangle. By adding a border around the edge -// of the image we mitigate this problem. - -static Image EnborderImg( // return the image with a border - int& leftborder, // out: border size in pixels - int& topborder, // out: border size in pixels - const Image& img) // io -{ - Image bordered_img(img); - leftborder = cvRound(BORDER_FRAC * bordered_img.cols); - topborder = cvRound(BORDER_FRAC * bordered_img.rows); - copyMakeBorder(bordered_img, bordered_img, - topborder, topborder, leftborder, leftborder, - cv::BORDER_REPLICATE); - return bordered_img; -} - -void DetectFaces( // all face rects into detpars - vec_DetPar& detpars, // out - const Image& img, // in - int minwidth, - cv::CascadeClassifier cascade) // in: as percent of img width -{ - int leftborder = 0, topborder = 0; // border size in pixels - Image bordered_img(BORDER_FRAC == 0? - img: EnborderImg(leftborder, topborder, img)); - - // Detection results are very slightly better with equalization - // (tested on the MUCT images, which are not pre-equalized), and - // it's quick enough to equalize (roughly 10ms on a 1.6 GHz laptop). - - Image equalized_img; cv::equalizeHist(bordered_img, equalized_img); - - CV_Assert(minwidth >= 1 && minwidth <= 100); - - // TODO smallest bioid faces are about 80 pixels width, hence 70 below - const int minpix = - MAX(minwidth <= 5? 70: 100, cvRound(img.cols * minwidth / 100.)); - - // the params below are accurate but slow - static const double SCALE_FACTOR = 1.1; - static const int MIN_NEIGHBORS = 3; - static const int DETECTOR_FLAGS = 0; - - vec_Rect facerects = // all face rects in image - Detect(equalized_img, cascade, NULL, - SCALE_FACTOR, MIN_NEIGHBORS, DETECTOR_FLAGS, minpix); - - // copy face rects into the detpars vector - - detpars.resize(NSIZE(facerects)); - for (int i = 0; i < NSIZE(facerects); i++) - { - Rect* facerect = &facerects[i]; - DetPar detpar; // detpar constructor sets all fields INVALID - // detpar.x and detpar.y is the center of the face rectangle - detpar.x = facerect->x + facerect->width / 2.; - detpar.y = facerect->y + facerect->height / 2.; - detpar.x -= leftborder; // discount the border we added earlier - detpar.y -= topborder; - detpar.width = double(facerect->width); - detpar.height = double(facerect->height); - detpar.yaw = 0; // assume face has no yaw in this version of Stasm - detpar.eyaw = EYAW00; - detpars[i] = detpar; - } -} -// order by increasing distance from left marg, and dist from top marg within that - -static bool IncreasingLeftMargin( // compare predicate for std::sort - const DetPar& detpar1, // in - const DetPar& detpar2) // in -{ - return 1e5 * detpar2.x + detpar2.y > - 1e5 * detpar1.x + detpar1.y; -} - -// order by decreasing width, and dist from the left margin within that - -static bool DecreasingWidth( // compare predicate for std::sort - const DetPar& detpar1, // in - const DetPar& detpar2) // in -{ - return 1e5 * detpar2.width - detpar2.x < - 1e5 * detpar1.width - detpar1.x; - -} - -// Discard too big or small faces (this helps reduce the number of false positives) - -static void DiscardMissizedFaces( - vec_DetPar& detpars) // io -{ - // constants (TODO These have not yet been rigorously empirically adjusted.) - static const double MIN_WIDTH = 1.33; // as fraction of median width - static const double MAX_WIDTH = 1.33; // as fraction of median width - - if (NSIZE(detpars) >= 3) // need at least 3 faces - { - // sort the faces on their width (smallest first) so can get median width - sort(detpars.begin(), detpars.end(), DecreasingWidth); - const int median = cvRound(detpars[NSIZE(detpars) / 2].width); - const int minallowed = cvRound(median / MIN_WIDTH); - const int maxallowed = cvRound(MAX_WIDTH * median); - // keep only faces that are not too big or small - vec_DetPar all_detpars(detpars); - detpars.resize(0); - for (int iface = 0; iface < NSIZE(all_detpars); iface++) - { - DetPar* face = &all_detpars[iface]; - if (face->width >= minallowed && face->width <= maxallowed) - detpars.push_back(*face); - } - } -} - -#if TRACE_IMAGES // will be 0 unless debugging (defined in stasm.h) - -static void TraceFaces( // write image showing detected face rects - const vec_DetPar& detpars, // in - const Image& img, // in - const char* path) // in -{ - (void) detpars; - (void) img; - (void) path; - - CImage cimg; cvtColor(img, cimg, CV_GRAY2BGR); // color image - for (int iface = 0; iface < NSIZE(detpars); iface++) - { - const DetPar &detpar = detpars[iface]; - - rectangle(cimg, - cv::Point(cvRound(detpar.x - detpar.width/2), - cvRound(detpar.y - detpar.height/2)), - cv::Point(cvRound(detpar.x + detpar.width/2), - cvRound(detpar.y + detpar.height/2)), - CV_RGB(255,255,0), 2); - - ImgPrintf(cimg, // 10 * iface to minimize overplotting - detpar.x + 10 * iface, detpar.y, - C_YELLOW, 1, ssprintf("%d", iface)); - } - lprintf("%s\n", path); - if (!cv::imwrite(path, cimg)) - Err("Cannot write %s", path); -} - -#endif - -void FaceDet::DetectFaces_( // call once per image to find all the faces - const Image& img, // in: the image (grayscale) - const char* imgpath, // in: used only for debugging - bool multiface, // in: if false, want only the best face - int minwidth, // in: min face width as percentage of img width - void* user, // in: unused (match virt func signature) - cv::CascadeClassifier cascade) -{ - (void) imgpath; - (void) user; - DetectFaces(detpars_, img, minwidth, cascade); - DiscardMissizedFaces(detpars_); - - if (multiface) // order faces on increasing distance from left margin - { - sort(detpars_.begin(), detpars_.end(), IncreasingLeftMargin); - } - else - { - // order faces on decreasing width, keep only the first (the largest face) - sort(detpars_.begin(), detpars_.end(), DecreasingWidth); - if (NSIZE(detpars_)) - detpars_.resize(1); - } - iface_ = 0; // next invocation of NextFace_ must get first face -} - -// Get the (next) face from the image. -// If no face available, return detpar.x INVALID. -// Eyes, mouth, and rot in detpar always returned INVALID. - -const DetPar FaceDet::NextFace_(void) -{ - DetPar detpar; // detpar constructor sets all fields INVALID - - if (iface_ < NSIZE(detpars_)) - detpar = detpars_[iface_++]; - - return detpar; -} - -} // namespace stasm diff --git a/3rdparty/stasm/stasm/stasm/src/faceroi.cpp b/3rdparty/stasm/stasm/stasm/src/faceroi.cpp deleted file mode 100755 index 9814bb5..0000000 --- a/3rdparty/stasm/stasm/stasm/src/faceroi.cpp +++ /dev/null @@ -1,203 +0,0 @@ -// faceroi.cpp: face ROI, and translation from image frame to the ROI -// -// Copyright (C) 2005-2013, Stephen Milborrow - -#include "faceroi.h" -#include "landmarks.h" - -namespace stasm -{ -// Rotations less than 5 are treated as zero to minimize image preprocessing. - -static const double ROT_TREAT_AS_ZERO = 5; - -//----------------------------------------------------------------------------- - -// Return a rect which covers the face with enough space around it for an -// ASM search, but also ensuring that the rect is in the image boundaries. - -static Rect RoiRect( - const DetPar& detpar, // in - int nimgcols, // in - int nimgrows, // in - bool flip, // in: mirror the ROI - double botfrac, // in: distance from center to bottom marg - double leftfrac, // in: dist from center to left marg - double topfrac, // in - double rightfrac) // in -{ - int ixmin, ixmax; - if (flip) - { - ixmin = MAX(0, cvRound(detpar.x - rightfrac * detpar.width)); - ixmax = MIN(nimgcols, cvRound(detpar.x + leftfrac * detpar.width)); - } - else - { - ixmin = MAX(0, cvRound(detpar.x - leftfrac * detpar.width)); - ixmax = MIN(nimgcols, cvRound(detpar.x + rightfrac * detpar.width)); - } - const int iymin = MAX(0, cvRound(detpar.y - botfrac * detpar.height)); - const int iymax = MIN(nimgrows, cvRound(detpar.y + topfrac * detpar.height)); - - Rect roi; - - roi.x = ixmin; - roi.y = iymin; - roi.width = ixmax - ixmin; - roi.height = iymax - iymin; - - CV_Assert(roi.width > 0); - CV_Assert(roi.height > 0); - - return roi; -} - -static bool IsRoiEntireImg( - const Rect& roi, // in - int imgcols, // in - int imgrows) // in -{ - return roi.x == 0 && - roi.y == 0 && - roi.width == imgcols && - roi.height == imgrows; -} - -static DetPar ImgDetParToRoiFrame( - const DetPar& detpar, // in - const Rect& rect_roi) // in -{ - DetPar detpar_roi(detpar); - detpar_roi.x -= rect_roi.x; - detpar_roi.y -= rect_roi.y; - Shape eyemouth_shape(5, 2, 0.); - if (Valid(detpar_roi.lex)) - { - eyemouth_shape(0, IX) -= rect_roi.x; - eyemouth_shape(0, IY) -= rect_roi.y; - } - if (Valid(detpar_roi.rex)) - { - eyemouth_shape(1, IX) -= rect_roi.x; - eyemouth_shape(1, IY) -= rect_roi.y; - } - if (Valid(detpar_roi.mouthx)) - { - eyemouth_shape(2, IX) -= rect_roi.x; - eyemouth_shape(2, IY) -= rect_roi.y; - } - if (Valid(detpar.rot) && detpar.rot) - { - // rotate eyes and mouth - const MAT rotmat = getRotationMatrix2D(cv::Point2f(float(detpar_roi.x), - float(detpar_roi.y)), - -detpar.rot, 1.); - TransformShapeInPlace(eyemouth_shape, rotmat); - } - if (Valid(detpar.lex)) - { - detpar_roi.lex = eyemouth_shape(0, IX); - detpar_roi.ley = eyemouth_shape(0, IY); - } - if (Valid(detpar.rex)) - { - detpar_roi.rex = eyemouth_shape(1, IX); - detpar_roi.rey = eyemouth_shape(1, IY); - } - if (Valid(detpar.mouthx)) - { - detpar_roi.mouthx = eyemouth_shape(2, IX); - detpar_roi.mouthy = eyemouth_shape(2, IY); - } - return detpar_roi; -} - -Shape ImgShapeToRoiFrame( // return shape in ROI frame - const Shape& shape, // in: shape in image frame - const DetPar& detpar_roi, // in: detpar wrt the ROI - const DetPar& detpar) // in -{ - Shape outshape(ShiftShape(shape, detpar_roi.x - detpar.x, - detpar_roi.y - detpar.y)); - if (Valid(detpar.rot) && detpar.rot) - { - const MAT rotmat = getRotationMatrix2D(cv::Point2f(float(detpar_roi.x), - float(detpar_roi.y)), - -detpar.rot, - 1.); - TransformShapeInPlace(outshape, rotmat); - } - return outshape; -} - -// In StartShapeAndRoi we selected a ROI and possibly rotated that ROI. -// The search was done on that ROI. Now de-adjust the search results -// to undo the effects of searching on the ROI, not on the actual image. - -Shape RoiShapeToImgFrame( // return shape in image frame - const Shape& shape, // in: shape in roi frame - const Image& face_roi, // in - const DetPar& detpar_roi, // in: detpar wrt the ROI - const DetPar& detpar) // in: detpar wrt the image -{ - Shape outshape(shape.clone()); - if (IsLeftFacing(detpar.eyaw)) - outshape = FlipShape(outshape, face_roi.cols); - if (Valid(detpar.rot) && detpar.rot) - { - const MAT rotmat = - getRotationMatrix2D(cv::Point2f(float(detpar_roi.x), - float(detpar_roi.y)), - detpar.rot, 1.); - TransformShapeInPlace(outshape, rotmat); - } - return ShiftShape(outshape, detpar.x - detpar_roi.x, - detpar.y - detpar_roi.y); -} - -void PossiblySetRotToZero( // this is to avoid rotating the image unnecessarily - double& rot) // io -{ - if (rot >= -ROT_TREAT_AS_ZERO && rot <= ROT_TREAT_AS_ZERO) - rot = 0; -} - -void FaceRoiAndDetPar( // get ROI around the face, rotate if necessary - Image& face_roi, // out - DetPar& detpar_roi, // out: detpar wrt the ROI - const Image& img, // in: original image - const DetPar& detpar, // in: wrt img frame, only x,y,w,h,rot used - bool flip, // in: mirror the ROI? - double botfrac, // in: default ROI_FRAC - double leftfrac, // in: dist from center to left margin - double topfrac, // in - double rightfrac) // in -{ - Rect rect_roi = RoiRect(detpar, img.cols, img.rows, flip, - botfrac, leftfrac, topfrac, rightfrac); - - detpar_roi = ImgDetParToRoiFrame(detpar, rect_roi); - - // following "if"s are for efficiency (avoid rotation etc. when possible). - - if (detpar.rot == 0 && IsRoiEntireImg(rect_roi, img.cols, img.rows)) - face_roi = img; - - else if (!Valid(detpar.rot) || detpar.rot == 0) - face_roi = Image(img, rect_roi); - - else // rotate image so face is upright, results go into face_roi - warpAffine(Image(img, rect_roi), face_roi, - getRotationMatrix2D(cv::Point2f(float(detpar_roi.x), - float(detpar_roi.y)), - -detpar.rot, 1.), - cv::Size(face_roi.cols, face_roi.rows), - cv::INTER_AREA, cv::BORDER_REPLICATE); - - // TODO For efficiency could combine this flip with above rot img when possible? - if (flip) - FlipImgInPlace(face_roi); -} - -} // namespace stasm diff --git a/3rdparty/stasm/stasm/stasm/src/hat.cpp b/3rdparty/stasm/stasm/stasm/src/hat.cpp deleted file mode 100755 index 1f3f013..0000000 --- a/3rdparty/stasm/stasm/stasm/src/hat.cpp +++ /dev/null @@ -1,434 +0,0 @@ -// hat.cpp: Histogram Array Transform descriptors -// -// Rob Hess' opensift implementation was used a reference: -// http://blogs.oregonstate.edu/hess/code/sift -// -// Copyright (C) 2005-2013, Stephen Milborrow - -#include "hat.h" - -namespace stasm -{ -static const int GRIDHEIGHT = 4; // 4 x 5 grid of histograms in descriptor -static const int GRIDWIDTH = 5; - -static const int BINS_PER_HIST = 8; // 8 gives a 45 degree range per bin - -static const double WINDOW_SIGMA = .5; // gaussian window as frac of patch width - // .5 implies patch border downweight is .368 - -static const double FINAL_SCALE = 10; // arb but 10 is good for %g printing of descriptors - -// Get gradient magnitude and orientation of pixels in given img. -// We use a [1,-1] convolution mask rather than [1,0,-1] because it gives as good -// Stasm results and doesn't "waste" pixels on the left and top image boundary. -// Before scaling by bins_per_degree, orientations are from 0 to 359.99... -// degrees, with 0 being due east, and anticlockwise increasing. - -static void InitGradMagAndOrientMats( - MAT& magmat, // out: grad mag mat - MAT& orientmat, // out: grad ori mat - const Image& img) // in: ROI scaled to current pyramid level -{ - const int nrows = img.rows, nrows1 = img.rows-1; - const int ncols = img.cols, ncols1 = img.cols-1; - const double bins_per_degree = BINS_PER_HIST / 360.; - - magmat.create(nrows, ncols); - orientmat.create(nrows, ncols); - - for (int y = 0; y < nrows1; y++) - { - const byte* const buf = (byte*)(img.data) + y * ncols; - const byte* const buf_x1 = (byte*)(img.data) + y * ncols + 1; - const byte* const buf_y1 = (byte*)(img.data) + (y+1) * ncols; - - double* const magbuf = Buf(magmat) + y * ncols; - double* const orientbuf = Buf(orientmat) + y * ncols; - - for (int x = 0; x < ncols1; x++) - { - const byte pixel = buf[x]; - const double xdelta = buf_x1[x] - pixel; - const double ydelta = buf_y1[x] - pixel; - - magbuf[x] = sqrt(SQ(xdelta) + SQ(ydelta)); - - double orient = - RadsToDegrees(atan2(ydelta, xdelta)); // -180 <= orient < 180 - if (orient < 0) - orient += 360; // 0 <= orient < 360 - orientbuf[x] = orient * bins_per_degree; // 0 <= orient < BINS_PER_HIST - } - } - // fill bottom and right edges - magmat.row(nrows1) = 0; - magmat.col(ncols1) = 0; - orientmat.row(nrows1) = 0; - orientmat.col(ncols1) = 0; -} - -// Init the indices which map a patch row,col to the corresponding -// histogram grid row,col. The mapping depends only on the image -// patchwidth and the histogram GRIDHEIGHT and WIDTH. -// -// The first pixel in the image patch maps to histogram grid x coord -0.5. -// Therefore after TrilinearAccumulate, the pixel will be equally smeared -// across histogram bin -1 and histogram bin 0. The histogram row indices -// for this pixel are irow=-1 row_frac=0.5. - -static inline void InitIndices( - vec_int& row_indices, // out - vec_double& row_fracs, // out - vec_int& col_indices, // out - vec_double& col_fracs, // out - vec_double& pixelweights, // out - const int patchwidth) // in: in pixels -{ - CV_Assert(patchwidth % 2 == 1); // patchwidth must be odd in this implementation - - const int npix = SQ(patchwidth); // number of pixels in image patch - - row_indices.resize(npix); - row_fracs.resize(npix); - col_indices.resize(npix); - col_fracs.resize(npix); - pixelweights.resize(npix); - - const int halfpatchwidth = (patchwidth-1) / 2; - - const double grid_rows_per_img_row = GRIDHEIGHT / (patchwidth-1.); - const double row_offset = GRIDHEIGHT / 2. - .5; // see header comment - - const double grid_cols_per_img_col = GRIDWIDTH / (patchwidth-1.); - const double col_offset = GRIDWIDTH / 2. - .5; - - // downweight at border of patch is exp(-1 / (2 * WINDOW_SIGMA)) - const double weight = -1 / (WINDOW_SIGMA * GRIDHEIGHT * GRIDWIDTH ); - - int ipix = 0; - - for (double patchrow = -halfpatchwidth; patchrow <= halfpatchwidth; patchrow++) - { - const double signed_row = patchrow * grid_rows_per_img_row; - const double row = signed_row + row_offset; - const int irow = int(floor(row)); - const double row_frac = row - irow; - - CV_DbgAssert(row >= -.5 && row <= GRIDHEIGHT - .5); // same applies to col below - - for (double patchcol = -halfpatchwidth; patchcol <= halfpatchwidth; patchcol++) - { - row_indices[ipix] = irow; - row_fracs[ipix] = row_frac; - - const double signed_col = patchcol * grid_cols_per_img_col; - const double col = signed_col + col_offset; - const int icol = int(floor(col)); - - col_indices[ipix] = icol; - col_fracs[ipix] = col - icol; - - pixelweights[ipix] = // TODO this weights col and row offsets equally - exp(weight * (SQ(signed_row) + SQ(signed_col))); - - ipix++; - } - } -} - -// Init the data that doesn't change unless the image, patch width, or -// GRIDHEIGHT or WIDTH changes (i.e. for Stasm this must be called -// once per pyramid lev). - -void Hat::Init_( - const Image& img, // in: image scaled to current pyramid level - const int patchwidth) // in: patch will be patchwidth x patchwidth pixels -{ - patchwidth_ = patchwidth; - - InitGradMagAndOrientMats(magmat_, orientmat_, img); - - InitIndices(row_indices_, row_fracs_, col_indices_, col_fracs_, pixelweights_, - patchwidth_); -} - -// Calculate the image patch gradient mags and orients. -// Note that the mag for a pixel out of the image boundaries is set -// to 0 and thus contributes nothing later in TrilinearAccumulate. - -static void GetMagsAndOrients_GeneralCase( - vec_double& mags, // out - vec_double& orients, // out - const int ix, // in: x coord of center of patch - const int iy, // in: y coord of center of patch - const int patchwidth, // in - const MAT& magmat, // in - const MAT& orientmat, // in - const vec_double& pixelweights) // in -{ - const int halfpatchwidth = (patchwidth-1) / 2; - int ipix = 0; - for (int x = iy - halfpatchwidth; x <= iy + halfpatchwidth; x++) - { - const double* const magbuf = Buf(magmat) + x * magmat.cols; - const double* const orientbuf = Buf(orientmat) + x * orientmat.cols; - - for (int y = ix - halfpatchwidth; y <= ix + halfpatchwidth; y++) - { - if (x < 0 || x >= magmat.rows || y < 0 || y >= magmat.cols) - { - mags[ipix] = 0; // off image - orients[ipix] = 0; - } - else // in image - { - mags[ipix] = pixelweights[ipix] * magbuf[y]; - orients[ipix] = orientbuf[y]; - } - ipix++; - } - } - CV_DbgAssert(ipix == NSIZE(mags)); -} - -// Calculate the image patch gradient mags and orients for -// an image patch that is entirely in the image boundaries. - -static inline void GetMagsAndOrients_AllInImg( - vec_double& mags, // out - vec_double& orients, // out - const int ix, // in: x coord of center of patch - const int iy, // in: y coord of center of patch - const int patchwidth, // in - const MAT& magmat, // in - const MAT& orientmat, // in - const vec_double& pixelweights) // in -{ - const int halfpatchwidth = (patchwidth-1) / 2; - int ipix = 0; - for (int x = iy - halfpatchwidth; x <= iy + halfpatchwidth; x++) - { - const double* const magbuf = Buf(magmat) + x * magmat.cols; - const double* const orientbuf = Buf(orientmat) + x * orientmat.cols; - - for (int y = ix - halfpatchwidth; y <= ix + halfpatchwidth; y++) - { - mags[ipix] = pixelweights[ipix] * magbuf[y]; - orients[ipix] = orientbuf[y]; - ipix++; - } - } - CV_DbgAssert(ipix == NSIZE(mags)); -} - -void GetMagsAndOrients( // get mags and orients for patch at ix,iy - vec_double& mags, // out - vec_double& orients, // out - const int ix, // in: x coord of center of patch (may be off image) - const int iy, // in: y coord of center of patch (may be off image) - const int patchwidth, // in: in pixels - const MAT& magmat, // in - const MAT& orientmat, // in - const vec_double& pixelweights) // in -{ - CV_Assert(patchwidth % 2 == 1); // patchwidth must be odd in this implementation - const int npix = SQ(patchwidth); // number of pixels in image patch - const int halfpatchwidth = (patchwidth-1) / 2; - - mags.resize(npix); - orients.resize(npix); - - if (ix - halfpatchwidth < 0 || ix + halfpatchwidth >= magmat.cols || - iy - halfpatchwidth < 0 || iy + halfpatchwidth >= magmat.rows) - { - // Part or all of the patch is out the image area. - - GetMagsAndOrients_GeneralCase(mags, orients, - ix, iy, patchwidth, magmat, orientmat, pixelweights); - } - else - { - // Patch is entirely in the image area. The following function returns - // results identical to GetMagsAndOrients_GeneralCase, but is faster - // because it doesn't have to worry about the edges of the image. - - GetMagsAndOrients_AllInImg(mags, orients, - ix, iy, patchwidth, magmat, orientmat, pixelweights); - } -} - -// Apportion the gradient magnitude of a pixel across 8 orientation bins. -// "Accumulate" is in the func name because we "+=" the interpolated values. -// This routine needs to be fast. - -static inline void TrilinearAccumulate( - double& b000, double& b001, // io: histogram bins - double& b010, double& b011, // io - double& b100, double& b101, // io - double& b110, double& b111, // io - const double mag, // in: the mag that gets apportioned - const double rowfrac, // in - const double colfrac, // in - const double orientfrac) // in -{ - const double - a1 = mag * rowfrac, a0 = mag - a1, - - a11 = a1 * colfrac, a10 = a1 - a11, - a01 = a0 * colfrac, a00 = a0 - a01, - - a111 = a11 * orientfrac, - a101 = a10 * orientfrac, - a011 = a01 * orientfrac, - a001 = a00 * orientfrac; - - b000 += a00 - a001; b001 += a001; - b010 += a01 - a011; b011 += a011; - b100 += a10 - a101; b101 += a101; - b110 += a11 - a111; b111 += a111; -} - -// The dimension of histbins is 1+GRIDHEIGHT+1 by 1+GRIDWIDTH+1 by BINS_PER_HIST+1. -// The extra bins are for fast trilinear accumulation (boundary checks unneeded). -// The final bin in each histogram is for degrees greater than 360, needed as -// degrees less than but near 360 get smeared out by trilinear interpolation. - -static inline int HistIndex(int row, int col, int iorient) // index into histbins -{ - return ((row+1) * (1+GRIDWIDTH+1) + (col+1)) * (BINS_PER_HIST+1) + iorient; -} - -void GetHistograms( // get all histogram bins - vec_double& histbins, // out - const int patchwidth, // in: in pixels - const vec_double& mags, // in - const vec_double& orients, // in - const vec_int& row_indices, // in - const vec_double& row_fracs, // in - const vec_int& col_indices, // in - const vec_double& col_fracs) // in -{ - const int npix = SQ(patchwidth); // number of pixels in image patch - - const int nhistbins = - (1 + GRIDHEIGHT + 1) * (1 + GRIDWIDTH + 1) * (BINS_PER_HIST + 1); - - // resize and clear (the fill is needed if the size of histbins - // doesn't change, because in that case resize does nothing) - histbins.resize(nhistbins); - fill(histbins.begin(), histbins.end(), 0.); - - for (int ipix = 0; ipix < npix; ipix++) - { - const double orient = orients[ipix]; - const int iorient = int(floor(orient)); - CV_DbgAssert(iorient >= 0 && iorient < BINS_PER_HIST); - - const int ibin = - HistIndex(row_indices[ipix], col_indices[ipix], iorient); - - double* const p = &histbins[ibin]; - - TrilinearAccumulate( // apportion grad mag across eight orientation bins - p[0], // ThisOrient - p[1], // NextOrient - p[BINS_PER_HIST + 1], // NextCol ThisOrient - p[BINS_PER_HIST + 2], // NextCol NextOrient - p[(GRIDWIDTH+2) * (BINS_PER_HIST+1)], // NextRow ThisOrient - p[(GRIDWIDTH+2) * (BINS_PER_HIST+1) + 1], // NextRow NextOrient - p[(GRIDWIDTH+3) * (BINS_PER_HIST+1)], // NextRow NextCol ThisOrient - p[(GRIDWIDTH+3) * (BINS_PER_HIST+1) + 1], // NextRow NextCol NextOrient - mags[ipix], // the mag that gets apportioned - row_fracs[ipix], // rowfrac - col_fracs[ipix], // colfrac - orient - iorient); // orientfrac - } -} - -static void WrapHistograms( - vec_double& histbins) -{ - for (int row = 0; row < GRIDHEIGHT; row++) - for (int col = 0; col < GRIDWIDTH; col++) - { - const int ibin = HistIndex(row, col, 0); - histbins[ibin] += histbins[ibin + BINS_PER_HIST]; // 360 wraps to 0 - } -} - -static void CopyHistsToDesc( // copy histograms to descriptor, skipping pad bins - VEC& desc, // out - const vec_double& histbins) // in -{ - for (int row = 0; row < GRIDHEIGHT; row++) - for (int col = 0; col < GRIDWIDTH; col++) - memcpy(Buf(desc) + - (row * GRIDWIDTH + col) * BINS_PER_HIST, - &histbins[HistIndex(row, col, 0)], - BINS_PER_HIST * sizeof(histbins[0])); -} - -static void NormalizeDesc( // take sqrt of elems and divide by L2 norm - VEC& desc) // io -{ - double* const data = Buf(desc); - for (int i = 0; i < NSIZE(desc); i++) - data[i] = sqrt(data[i]); // sqrt reduces effect of outliers - const double norm = cv::norm(desc); // L2 norm - if (!IsZero(norm)) - { - const double scale = FINAL_SCALE / norm; - for (int i = 0; i < NSIZE(desc); i++) - data[i] *= scale; - } -} - -// Hat::Init_ must be called before calling this function. -// -// A HAT descriptor is a vector of doubles of length -// GRIDHEIGHT * GRIDWIDTH * BINS_PER_HIST (currently 4 * 5 * 8 = 160). -// -// The descriptor is a vector of doubles (instead of say bytes) primarily -// so the HatFit function we apply later is fast (because byte-to-double -// type conversions are unneeded when applying the formula). -// -// Note also that a trial implementation that used floats instead of -// doubles (and with a float form of HatFit) was slower. - -VEC Hat::Desc_( // return HAT descriptor, Init_ must be called first - const double x, // in: x coord of center of patch (may be off image) - const double y) // in: y coord of center of patch (may be off image) - const -{ - CV_Assert(magmat_.rows); // verify that Hat::Init_ was called - -#if _OPENMP // can't be static because multiple instances - vec_double mags, orients; - vec_double histbins; -#else // static faster since size rarely changes - static vec_double mags, orients; // the image patch grad mags and orientations - static vec_double histbins; // the histograms -#endif - - GetMagsAndOrients(mags, orients, - cvRound(x), cvRound(y), patchwidth_, - magmat_, orientmat_, pixelweights_); - - GetHistograms(histbins, - patchwidth_, mags, orients, - row_indices_, row_fracs_, col_indices_, col_fracs_); - - WrapHistograms(histbins); // wrap 360 degrees back to 0 - - VEC desc(GRIDHEIGHT * GRIDWIDTH * BINS_PER_HIST, 1); // the HAT descriptor - - CopyHistsToDesc(desc, - histbins); - - NormalizeDesc(desc); - - return desc; -} - -} // namespace stasm diff --git a/3rdparty/stasm/stasm/stasm/src/hatdesc.cpp b/3rdparty/stasm/stasm/stasm/src/hatdesc.cpp deleted file mode 100755 index 00d0b9c..0000000 --- a/3rdparty/stasm/stasm/stasm/src/hatdesc.cpp +++ /dev/null @@ -1,152 +0,0 @@ -// hatdesc.cpp: Model for HAT descriptors. -// This does a grid search using the descriptors defined in hat.cpp. -// It also caches the descriptors for fast reuse. -// -// Copyright (C) 2005-2013, Stephen Milborrow - -#include "hatdesc.h" - -#define CACHE 1 -namespace stasm -{ -// hat_g is global because we initialize the HAT internal data -// (grads and orients etc.) once for the entire pyramid level. -// Initialized in InitHatLevData. - -// static Hat hat_g; - -//----------------------------------------------------------------------------- - -#if CACHE - -// For speed, we cache the HAT descriptors, so we have the descriptor at -// hand if we revisit an xy position in the image, which is very common in ASMs. -// (Note: an implementation with cache_g as a vector was slower.) - -//static hash_map cache_g; // cached descriptors -//static const bool TRACE_CACHE = 0; // for checking cache hit rate -//static int ncalls_g, nhits_g; // only used if TRACE_CACHE - -static unsigned Key(int x, int y) // pack x,y into 32 bits for cache key -{ - return ((y & 0xffff) << 16) | (x & 0xffff); -} - -static double GetHatFit( // args same as non CACHE version, see below - int x, // in - int y, // in - const HatFit hatfit, // in - const Hat &hat, - StasmHash &hash) -{ - const double* descbuf = NULL; // the HAT descriptor - - const unsigned key(Key(x, y)); - - QHash::const_iterator it = hash.find(key); - if (it != hash.end()) { - descbuf = Buf(it.value()); - } else { - const VEC desc(hat.Desc_(x, y)); - hash[key] = desc; // remember descriptor for possible re-use - descbuf = Buf(desc); - } - return hatfit(descbuf); -} - -#else // not CACHE - -// Get the HAT descriptor at the given ipoint and x,y coords, and return -// how well the descriptor matches the model. High fit means good match. - -static double GetHatFit( - int x, // in: image x coord (may be off image) - int y, // in: image y coord (may be off image) - const HatFit hatfit) // in: func to estimate descriptor match -{ - return hatfit(Buf(hat_g.Desc_(x, y))); -} - -#endif // not CACHE - -static int round2(double x) // return closest int to x that is divisible by 2 -{ - return 2 * cvRound(x / 2); -} - -static int PatchWidth( // patchwidth at the given pyramid level - int ilev) // in: pyramid level (0 is full size) -{ - return HAT_PATCH_WIDTH + round2(ilev * HAT_PATCH_WIDTH_ADJ); -} - -Hat InitHatLevData( // init the global HAT data needed for this pyr level - const Image& img, // in - int ilev) // in -{ - Hat hat; - - if (ilev <= HAT_START_LEV) // we use HATs only at upper pyr levs - { - hat.Init_(img, PatchWidth(ilev)); - } - - return hat; -} - -VEC HatDesc( // used only during training new models - double x, // in - double y) // in -{ - Hat hat; - return hat.Desc_(cvRound(x), cvRound(y)); -} - -// Note 1: The image is not passed directly to this function. Instead this -// function accesses the image gradient magnitude and orientation stored in -// fields of the global variable hat_g and previously initialized by the -// call to InitHatLevData. -// -// Note 2: If OpenMP is enabled, multiple instances of this function will be -// called concurrently (each call will have a different value of x and y). Thus -// this function and its callees do not modify any data that is not on the stack. - -void HatDescSearch( // search in a grid around the current landmark - double& x, // io: (in: old position of landmark, out: new position) - double& y, // io: - const HatFit hatfit, // in: func to estimate descriptor match - const Hat &hat, - StasmHash &hash) -{ - // If HAT_SEARCH_RESOL is 2, force x,y positions to be divisible - // by 2 to increase cache hit rate. This increases the mean hit rate - // from about 67% to 88% and barely affects landmark accuracy. - int ix = HAT_SEARCH_RESOL == 2? round2(x): cvRound(x); - int iy = HAT_SEARCH_RESOL == 2? round2(y): cvRound(y); - - double fit_best = -FLT_MAX; - - int xoffset_best = 0, yoffset_best = 0; // in pixels - - for (int yoffset = -HAT_MAX_OFFSET; - yoffset <= HAT_MAX_OFFSET; - yoffset += HAT_SEARCH_RESOL) - { - for (int xoffset = -HAT_MAX_OFFSET; - xoffset <= HAT_MAX_OFFSET; - xoffset += HAT_SEARCH_RESOL) - { - const double fit = GetHatFit(ix + xoffset, iy + yoffset, hatfit, hat, hash); - if (fit > fit_best) - { - fit_best = fit; - xoffset_best = xoffset; - yoffset_best = yoffset; - } - } - } - x += xoffset_best; - y += yoffset_best; -} - -} // namespace stasm diff --git a/3rdparty/stasm/stasm/stasm/src/initasm.cpp b/3rdparty/stasm/stasm/stasm/src/initasm.cpp deleted file mode 100755 index abdcac2..0000000 --- a/3rdparty/stasm/stasm/stasm/src/initasm.cpp +++ /dev/null @@ -1,35 +0,0 @@ -// initasm.cpp: initialize the ASM model -// -// Copyright (C) 2005-2013, Stephen Milborrow - -#include "initasm.h" -#include "yaw00.h" - -namespace stasm -{ -void InitMods( // initialize ASM model - vec_Mod& mods, // out: ASM model (only one model in this version of Stasm) - const char* datadir) // in: directory of face detector files -{ - if (mods.empty()) // models not yet initialized? - { - mods.resize(1); // 1 model - - static const Mod mod_yaw00( // constructor, see asm.h - EYAW00, // eyaw - ESTART_EYES, // estart - datadir, - yaw00_meanshape, - yaw00_eigvals, - yaw00_eigvecs, - 20, // neigs (value from empirical testing) - 1.5, // bmax (value from empirical testing) - SHAPEHACKS_DEFAULT | SHAPEHACKS_SHIFT_TEMPLE_OUT, // hackbits - YAW00_DESCMODS, // defined in yaw00.mh - NELEMS(YAW00_DESCMODS)); - - mods[0] = &mod_yaw00; - } -} - -} // namespace stasm diff --git a/3rdparty/stasm/stasm/stasm/src/landmarks.cpp b/3rdparty/stasm/stasm/stasm/src/landmarks.cpp deleted file mode 100755 index 199434f..0000000 --- a/3rdparty/stasm/stasm/stasm/src/landmarks.cpp +++ /dev/null @@ -1,93 +0,0 @@ -// landmarks.cpp: code for manipulating landmarks -// -// Copyright (C) 2005-2013, Stephen Milborrow - -#include "landmarks.h" -#include "err.h" - -namespace stasm -{ -double MeanPoint( - const Shape& shape, // in - int ipoint1, // in - int ipoint2, // in - int ix) // in: IX or IY -{ - return (shape(ipoint1, ix) + shape(ipoint2, ix)) / 2; -} - -void PrevAndNextLandmarks( - int& prev, // out - int& next, // out - int ipoint, // in - const Shape& shape) // in -{ - const int npoints = shape.rows; - - const LANDMARK_INFO* const info = LANDMARK_INFO_TAB; - - CV_Assert(NELEMS(LANDMARK_INFO_TAB) == npoints); - CV_Assert(ipoint >= 0 && ipoint < npoints); - - prev = info[ipoint].prev; - if (prev < 0) // not specified in table? - prev = (ipoint + npoints - 1) % npoints; - - next = info[ipoint].next; - if (next < 0) - next = (ipoint + 1) % npoints; - - CV_Assert(prev >= 0); - CV_Assert(next >= 0); - CV_Assert(prev < int(shape.rows)); - CV_Assert(next < int(shape.rows)); - CV_Assert(prev != next); - CV_Assert(PointUsed(shape, prev)); - CV_Assert(PointUsed(shape, next)); -} - -static void FlipPoint( - Shape& shape, // io - const Shape& oldshape, // in - int inew, // in - int iold, // in - int imgwidth) // in -{ - if (!PointUsed(oldshape, iold)) - shape(inew, IX) = shape(inew, IY) = 0; - else - { - shape(inew, IX) = imgwidth - oldshape(iold, IX) - 1; - shape(inew, IY) = oldshape(iold, IY); - if (!PointUsed(shape, inew)) // falsely marked unused after conversion? - shape(inew, IX) = XJITTER; // adjust so not marked as unused - } -} - -// Flip shape horizontally. -// Needed so we can use right facing models for left facing faces. - -Shape FlipShape( // flip shape horizontally - const Shape& shape, // in - int imgwidth) // in -{ - const LANDMARK_INFO* info; - switch (shape.rows) - { - case 77: info = LANDMARK_INFO_TAB; break; - default: Err("Do not know how to mirror a %d shape", shape.rows); - } - Shape outshape(shape.rows, 2); - for (int i = 0; i < shape.rows; i++) - { - int partner = info[i].partner; - - if (partner == -1) // no partner e.g. tip of nose - partner = i; - - FlipPoint(outshape, shape, partner, i, imgwidth); - } - return outshape; -} - -} // namespace stasm diff --git a/3rdparty/stasm/stasm/stasm/src/pinstart.cpp b/3rdparty/stasm/stasm/stasm/src/pinstart.cpp deleted file mode 100755 index d5c5206..0000000 --- a/3rdparty/stasm/stasm/stasm/src/pinstart.cpp +++ /dev/null @@ -1,298 +0,0 @@ -// pinstart.cpp: utilities for creating a start shape from manually pinned points -// -// Copyright (C) 2005-2013, Stephen Milborrow - -#include "pinstart.h" -#include "stasm_landmarks.h" -#include "faceroi.h" -#include "err.h" -#include "landmarks.h" -#include "print.h" -#include "shape17.h" - -namespace stasm -{ -// The following model was machine generated by running -// 5pointpose.R on the training shapes and their reflections. - -static double EstYawFrom5PointShape(const double* x) // x has 10 elements (5 points) -{ - return 34.342 - - 7.0267 * MAX(0, x[3] - -0.34708) - + 10.739 * MAX(0, -0.34708 - x[3]) - + 116.29 * MAX(0, x[4] - 0.21454) - - 159.56 * MAX(0, 0.21454 - x[4]) - + 12.513 * MAX(0, x[7] - 0.3384) - + 7.2764 * MAX(0, 0.3384 - x[7]) - + 260.14 * MAX(0, x[3] - -0.34708) * MAX(0, x[5] - -0.010838) - - 160.64 * MAX(0, x[3] - -0.34708) * MAX(0, -0.010838 - x[5]) - - 284.88 * MAX(0, -0.34708 - x[3]) * MAX(0, x[5] - -0.055581) - + 654.54 * MAX(0, -0.34708 - x[3]) * MAX(0, -0.055581 - x[5]) - ; -} - -static void RotShapeInPlace( - Shape& shape, // io - double rot, // in: in-plane rotation angle in degrees, pos is anticlock - double x, // in: rotation origin - double y) // in -{ - CV_Assert(rot >= -360 && rot <= 360); // sanity check, 360 is arb - - const MAT rotmat = - getRotationMatrix2D(cv::Point2f(float(x), float(y)), rot, 1.); - - TransformShapeInPlace(shape, rotmat); -} - -// If shape5 does not have 5 points, return rot and yaw of 0. -// Else assume that the following five points are present, in this order: -// 0 LEyeOuter -// 1 REyeOuter -// 2 CNoseTip -// 3 LMouthCorner -// 4 RMouthCorner - -static void EstRotAndYawFrom5PointShape( - double& rot, // out - double& yaw, // out - const Shape shape5) // in -{ - CV_Assert(shape5.rows == 5); - - Shape workshape(shape5.clone()); // local copy we can modify - - // Derotate shape5 using eye angle as estimate of in-plane rotation. - // We rotate about the shape5 centroid. - // TODO EstYawFrom5PointShape was trained on shapes without this - // derotation, so must retrain the model for best results. - - rot = RadsToDegrees(-atan2(workshape(1, IY) - workshape(0, IY), - workshape(1, IX) - workshape(0, IX))); - - PossiblySetRotToZero(rot); // treat small Rots as zero Rots - - if (rot) - RotShapeInPlace(workshape, - -rot, - SumElems(workshape.col(IX)) / 5, - SumElems(workshape.col(IY)) / 5); - - // mean-center x and y - MAT X(workshape.col(IX)); X -= SumElems(X) / 5; - MAT Y(workshape.col(IY)); Y -= SumElems(Y) / 5; - - // normalize so workshape size is 1 - double norm = 0; - for (int i = 0; i < 5; i++) - norm += SQ(X(i)) + SQ(Y(i)); - workshape /= sqrt(norm); - - yaw = EstYawFrom5PointShape(Buf(workshape)); -} - -static Shape PinMeanShape( // align mean shape to the pinned points - const Shape& pinned, // in: at least two of these points must be set - const Shape& meanshape) // in -{ - CV_Assert(pinned.rows == meanshape.rows); - - int ipoint, nused = 0; // number of points used in pinned - for (ipoint = 0; ipoint < meanshape.rows; ipoint++) - if (PointUsed(pinned, ipoint)) - nused++; - - if (nused < 2) - Err("Need at least two pinned landmarks"); - - // Create an anchor shape (the pinned landmarks) and an alignment shape (the - // points in meanshape that correspond to those pinned landmarks). Do that by - // copying the used points in pinned to pinned_used, and the corresponding - // points in meanshape to meanused. - - Shape pinned_used(nused, 2), mean_used(nused, 2); - int i = 0; - for (ipoint = 0; ipoint < meanshape.rows; ipoint++) - if (PointUsed(pinned, ipoint)) - { - pinned_used(i, IX) = pinned(ipoint, IX); - pinned_used(i, IY) = pinned(ipoint, IY); - mean_used(i, IX) = meanshape(ipoint, IX); - mean_used(i, IY) = meanshape(ipoint, IY); - i++; - } - CV_Assert(i == nused); - - // transform meanshape to pose generated by aligning mean_used to pinned_used - Shape TransformedShape( - TransformShape(meanshape, AlignmentMat(mean_used, pinned_used))); - - return JitterPointsAt00(TransformedShape); -} - -static bool HaveCanonical5Points( - const Shape& pinned17) // in: pinned landmarks -{ - CV_Assert(pinned17.rows == 17); - return PointUsed(pinned17, L17_LEyeOuter) && - PointUsed(pinned17, L17_REyeOuter) && - PointUsed(pinned17, L17_CNoseTip) && - PointUsed(pinned17, L17_LMouthCorner) && - PointUsed(pinned17, L17_RMouthCorner); -} - -static void CopyPoint( // copy a point from oldshape to shape - Shape& shape, // io - const Shape& oldshape, // in - int i, // in - int iold) // in -{ - shape(i, IX) = oldshape(iold, IX); - shape(i, IY) = oldshape(iold, IY); -} - -static Shape Shape5( // return a 5 point shape - const Shape& pinned, // in: pinned landmarks, canonical 5 points are best - const Shape& meanshape) // in: used only if pinned landmarks are not canonical -{ - const Shape pinned17(Shape17(pinned)); - const Shape meanshape17(Shape17(meanshape)); - Shape newpinned17(pinned17); - if (!HaveCanonical5Points(pinned17)) - { - // Not canonical 5 point pinned landmarks. Impute the missing points. - // This is not an optimal situation but will at least allow estimation - // of the pose from an arb set of pinned landmarks. - // TODO Only the Shape17 points are considered. - - newpinned17 = PinMeanShape(pinned17, meanshape17); - } - Shape shape5(5, 2); // 5 point shape - - CopyPoint(shape5, newpinned17, 0, L17_LEyeOuter); - CopyPoint(shape5, newpinned17, 1, L17_REyeOuter); - CopyPoint(shape5, newpinned17, 2, L17_CNoseTip); - CopyPoint(shape5, newpinned17, 3, L17_LMouthCorner); - CopyPoint(shape5, newpinned17, 4, L17_RMouthCorner); - - return shape5; -} - -static void InitDetParEyeMouthFromShape( // fill in eye and mouth fields of detpar - DetPar& detpar, - Shape& shape) -{ - const Shape shape17(Shape17(shape)); - if (PointUsed(shape17, L17_LPupil)) - { - detpar.lex = shape17(L17_LPupil, IX); - detpar.ley = shape17(L17_LPupil, IY); - } - if (PointUsed(shape17, L17_RPupil)) - { - detpar.rex = shape17(L17_RPupil, IX); - detpar.rey = shape17(L17_RPupil, IY); - } - if (PointUsed(shape17, L17_CBotOfBotLip)) - { - detpar.mouthx = shape17(L17_CBotOfBotLip, IX); - detpar.mouthy = shape17(L17_CBotOfBotLip, IY); - } -} - -// We generated the startshape without using the face detector, now "back -// generate" the detpar (the position of this does not have to exactly -// match the detpar that would generate the startshape). This approach -// allows detpar to be handled uniformly in PinnedStartShapeAndRoi. - -static DetPar PseudoDetParFromStartShape( - const Shape& startshape, - double rot, - double yaw, - int nmods) -{ - const Shape shape17(Shape17(startshape)); - const double lex = shape17(L17_LPupil, IX); // left eye - const double ley = shape17(L17_LPupil, IY); - const double rex = shape17(L17_RPupil, IX); // right eye - const double rey = shape17(L17_RPupil, IY); - const double mouthx = shape17(L17_CBotOfBotLip, IX); // mouth - const double mouthy = shape17(L17_CBotOfBotLip, IY); - - CV_Assert(PointUsed(lex, ley)); - CV_Assert(PointUsed(rex, rey)); - CV_Assert(PointUsed(mouthx, mouthy)); - - const double xeye = (lex + rex) / 2; // midpoint of eyes - const double yeye = (ley + rey) / 2; - const double eyemouth = PointDist(xeye, yeye, mouthx, mouthy); - - DetPar detpar; - - detpar.x = .7 * xeye + .3 * mouthx; - detpar.y = .7 * yeye + .3 * mouthy; - detpar.width = 2.0 * eyemouth; - detpar.height = 2.0 * eyemouth; - detpar.lex = lex; - detpar.ley = ley; - detpar.rex = rex; - detpar.rey = rey; - detpar.mouthx = mouthx; - detpar.mouthy = mouthy; - detpar.rot = rot; - detpar.eyaw = DegreesAsEyaw(yaw, nmods); // determines what ASM model to use - detpar.yaw = yaw; - - return detpar; -} - -// Use the given pinned face landmarks to init the start shape. The -// current implementation works best if the pinned landmarks are the five -// canonical pinned landmarks (viz. LEyeOuter, REyeOuter, CNoseTip, -// LMouthCorner, RMouthCorner). This is because it was trained on those -// points. But the routine also works if any two or more points are pinned. - -void PinnedStartShapeAndRoi( // use the pinned landmarks to init the start shape - Shape& startshape, // out: the start shape (in ROI frame) - Image& face_roi, // out: ROI around face, possibly rotated upright - DetPar& detpar_roi, // out: detpar wrt to face_roi - DetPar& detpar, // out: detpar wrt to img - Shape& pinned_roi, // out: pinned arg translated to ROI frame - const Image& img, // in: the image (grayscale) - const vec_Mod& mods, // in: a vector of models, one for each yaw range - const Shape& pinned) // in: manually pinned landmarks -{ - double rot, yaw; - EstRotAndYawFrom5PointShape(rot, yaw, - Shape5(pinned, mods[0]->MeanShape_())); - const EYAW eyaw = DegreesAsEyaw(yaw, NSIZE(mods)); - const int imod = EyawAsModIndex(eyaw, mods); // select ASM model based on yaw - if (trace_g) - lprintf("%-6.6s yaw %3.0f rot %3.0f ", EyawAsString(eyaw), yaw, rot); - pinned_roi = pinned; // use pinned_roi as a temp shape we can change - Image workimg(img); // possibly flipped image - if (IsLeftFacing(eyaw)) // left facing? (our models are for right facing faces) - { - pinned_roi = FlipShape(pinned_roi, workimg.cols); - FlipImgInPlace(workimg); - } - const Mod* mod = mods[ABS(imod)]; - startshape = PinMeanShape(pinned_roi, mod->MeanShape_()); - startshape = mod->ConformShapeToMod_Pinned_(startshape, pinned_roi); - detpar = PseudoDetParFromStartShape(startshape, rot, yaw, NSIZE(mods)); - if (IsLeftFacing(eyaw)) - detpar.rot *= -1; - FaceRoiAndDetPar(face_roi, detpar_roi, workimg, detpar, false); - startshape = ImgShapeToRoiFrame(startshape, detpar_roi, detpar); - pinned_roi = ImgShapeToRoiFrame(pinned_roi, detpar_roi, detpar); - // following line not strictly necessary because don't actually need eyes/mouth - InitDetParEyeMouthFromShape(detpar_roi, startshape); - if (IsLeftFacing(eyaw)) - { - detpar = FlipDetPar(detpar, img.cols); - detpar.rot = -detpar.rot; - detpar_roi.x += 2. * (face_roi.cols/2. - detpar_roi.x); - } -} - -} // namespace stasm diff --git a/3rdparty/stasm/stasm/stasm/src/shape17.cpp b/3rdparty/stasm/stasm/stasm/src/shape17.cpp deleted file mode 100755 index 48e60a2..0000000 --- a/3rdparty/stasm/stasm/stasm/src/shape17.cpp +++ /dev/null @@ -1,329 +0,0 @@ -// shape17.cp: convert a shape to a 17 point shape -// -// We can conveniently work with shapes with differing numbers of points -// (e.g. XM2VTS, BioID) by first converting them to a "Shape17" shape. -// That is, we use Shape17s as a lowest common denominator. A Shape17 -// consists of the 17 points defined by Cristinacce's "me17" measure. - -#include "shape17.h" -#include "err.h" -#include "eyedist.h" -#include "print.h" - -namespace stasm -{ -static const double REF17[] = // mean frontal shape (data from mean MUCT shape) -{ - -44.2, 43.4, // 0 L17_LPupil - 39.0, 48.1, // 1 L17_RPupil - -32.7, -41.6, // 2 L17_LMouthCorner - 37.2, -37.7, // 3 L17_RMouthCorner - -74.6, 57.6, // 4 L17_LEyebrowOuter - -22.0, 63.3, // 5 L17_LEyebrowInner - 14.8, 65.3, // 6 L17_REyebrowInner - 67.6, 65.6, // 7 L17_REyebrowOuter - -59.2, 40.4, // 8 L17_LEyeOuter - -28.4, 42.0, // 9 L17_LEyeInner - 23.6, 44.9, // 10 L17_REyeInner - 54.3, 46.8, // 11 L17_REyeOuter - -0.2, 5.2, // 12 L17_CNoseTip - -13.8, -4.3, // 13 L17_LNostril - 14.4, -2.7, // 14 L17_RNostril - 1.6, -27.7, // 15 L17_CTopOTopLip - 3.3, -56.3 // 16 L17_CBotOfBotLip -}; - -const Shape MEANSHAPE17(17, 2, const_cast(REF17)); - -//----------------------------------------------------------------------------- - -static const int* Shape17Tab( // get appropriate tab to convert to a 17 point shape - const Shape& shape) // in -{ - static const int shape17_tab[17] = // identity transform - { - 0, // 0 L17_LPupil - 1, // 1 L17_RPupil - 2, // 2 L17_LMouthCorner - 3, // 3 L17_RMouthCorner - 4, // 4 L17_LEyebrowOuter - 5, // 5 L17_LEyebrowInner - 6, // 6 L17_REyebrowInner - 7, // 7 L17_REyebrowOuter - 8, // 8 L17_LEyeOuter - 9, // 9 L17_LEyeInner - 10, // 10 L17_REyeInner - 11, // 11 L17_REyeOuter - 12, // 12 L17_CNoseTip - 13, // 13 L17_LNostril - 14, // 14 L17_RNostril - 15, // 15 L17_CTopOfTopLip - 16 // 16 L17_CBotOfBotLip - }; - static const int bioid_tab[17] = // 20 points - { - 0, // 0 L17_LPupil - 1, // 1 L17_RPupil - 2, // 2 L17_LMouthCorner - 3, // 3 L17_RMouthCorner - 4, // 4 L17_LEyebrowOuter - 5, // 5 L17_LEyebrowInner - 6, // 6 L17_REyebrowInner - 7, // 7 L17_REyebrowOuter - 9, // 8 L17_LEyeOuter - 10, // 9 L17_LEyeInner - 11, // 10 L17_REyeInner - 12, // 11 L17_REyeOuter - 14, // 12 L17_CNoseTip - 15, // 13 L17_LNostril - 16, // 14 L17_RNostril - 17, // 15 L17_CTopOfTopLip - 18 // 16 L17_CBotOfBotLip - }; - static const int aflw_tab[17] = // 21 points (AFLW) - { - 7, // 0 L17_LPupil - 10, // 1 L17_RPupil - 17, // 2 L17_LMouthCorner - 19, // 3 L17_RMouthCorner - 0, // 4 L17_LEyebrowOuter - 2, // 5 L17_LEyebrowInner - 3, // 6 L17_REyebrowInner - 5, // 7 L17_REyebrowOuter - 6, // 8 L17_LEyeOuter - 8, // 9 L17_LEyeInner - 9, // 10 L17_REyeInner - 11, // 11 L17_REyeOuter - 14, // 12 L17_CNoseTip - 13, // 13 L17_LNostril not right - 15, // 14 L17_RNostril not right - 18, // 15 L17_CTopOfTopLip not right - 18 // 16 L17_CBotOfBotLip not right - }; - static const int muct_tab[17] = // 68 (XM2VTS) or 76 (MUCT76) points - { // NOTE: not the multi pie 68 points - 31, // 0 L17_LPupil - 36, // 1 L17_RPupil - 48, // 2 L17_LMouthCorner - 54, // 3 L17_RMouthCorner - 21, // 4 L17_LEyebrowOuter - 24, // 5 L17_LEyebrowInner - 18, // 6 L17_REyebrowInner - 15, // 7 L17_REyebrowOuter - 27, // 8 L17_LEyeOuter - 29, // 9 L17_LEyeInner - 34, // 10 L17_REyeInner - 32, // 11 L17_REyeOuter - 67, // 12 L17_CNoseTip - 46, // 13 L17_LNostril - 47, // 14 L17_RNostril - 51, // 15 L17_CTopOfTopLip - 57 // 16 L17_CBotOfBotLip - }; - static const int stasm77_tab[17] = // Stasm 77 points - { - 38, // 0 LPupil - 39, // 1 RPupil - 59, // 2 LMouthCorner - 65, // 3 RMouthCorner - 18, // 4 LEyebrowOuter - 21, // 5 LEyebrowInner - 22, // 6 REyebrowInner - 25, // 7 REyebrowOuter - 34, // 8 LEyeOuter - 30, // 9 LEyeInner - 40, // 10 REyeInner - 44, // 11 REyeOuter - 52, // 12 CNoseTip - 51, // 13 LNostril - 53, // 14 RNostril - 62, // 15 CTopOfTopLip - 74 // 16 CBotOfBotLip - }; - static const int helen_tab[17] = // 194 points (Helen) - { - 144, // 0 LPupil actually eye outer corner, will correct in TweakHelen - 124, // 1 RPupil actually eye outer corner, will correct in TweakHelen - 58, // 2 LMouthCorner - 71, // 3 RMouthCorner - 185, // 4 LEyebrowOuter - 174, // 5 LEyebrowInner - 154, // 6 REyebrowInner - 164, // 7 REyebrowOuter - 144, // 8 LEyeOuter - 134, // 9 LEyeInner - 114, // 10 REyeInner - 124, // 11 REyeOuter - 49, // 12 CNoseTip actually base of nose, will correct in TweakHelen - 47, // 13 LNostril actually base of nostril, will correct in TweakHelen - 51, // 14 RNostril actually base of nostril, will correct in TweakHelen - 64, // 15 CTopOfTopLip - 79 // 16 CBotOfBotLip - }; - static const int put199_tab[17] = // 199 points (extended PUT) - { - 195, // 0 LPupil - 194, // 1 RPupil - 58, // 2 LMouthCorner - 72, // 3 RMouthCorner - 184, // 4 LEyebrowOuter - 174, // 5 LEyebrowInner - 154, // 6 REyebrowInner - 164, // 7 REyebrowOuter - 144, // 8 LEyeOuter - 134, // 9 LEyeInner - 114, // 10 REyeInner - 124, // 11 REyeOuter - 196, // 12 CNoseTip - 197, // 13 LNostril - 198, // 14 RNostril - 65, // 15 CTopOfTopLip - 79 // 16 CBotOfBotLip - }; - const int *tab = NULL; - switch (shape.rows) - { - case 17: tab = shape17_tab; break; // identity transform - case 20: tab = bioid_tab; break; // BioID - case 21: tab = aflw_tab; break; // AFLW - case 22: tab = bioid_tab; break; // AR - case 68: tab = muct_tab; break; // XM2VTS and MUCT68 - case 76: tab = muct_tab; break; // Stasm version 3 (Stasm76 shape) - case 77: tab = stasm77_tab; break; // Stasm version 4 (Stasm77 shape) - case 194: tab = helen_tab; break; // Helen - case 199: tab = put199_tab; break; // PUT with me17 points - default: tab = NULL; break; - } - return tab; -} - -static void TweakAflw( // hacks to more closely approximate a me17 shape from an AFLW shape - Shape& shape17) // io -{ - const double eyemouth = EyeMouthDist(shape17); - // upper and lower lip not available - if (PointUsed(shape17, L17_CTopOfTopLip)) - shape17(L17_CTopOfTopLip, IY) -= .07 * eyemouth; - if (PointUsed(shape17, L17_CBotOfBotLip)) - shape17(L17_CBotOfBotLip, IY) += .07 * eyemouth; - // nostrils not available - if (PointUsed(shape17, L17_LNostril)) - shape17(L17_LNostril, IX) += .1 * eyemouth; - if (PointUsed(shape17, L17_RNostril)) - shape17(L17_RNostril, IX) -= .1 * eyemouth; -} - -static void TweakHelen( // hacks to more closely approximate a me17 shape from a Helen shape - Shape& shape17) // io -{ - // pupils not available in the helen set so use mean of eye corners - if (PointUsed(shape17, L17_LEyeOuter) && PointUsed(shape17, L17_LEyeInner)) - { - shape17(L17_LPupil, IX) = (shape17(L17_LEyeOuter, IX) + - shape17(L17_LEyeInner, IX)) / 2; - - shape17(L17_LPupil, IY) = (shape17(L17_LEyeOuter, IY) + - shape17(L17_LEyeInner, IY)) / 2; - } - if (PointUsed(shape17, L17_REyeOuter) && PointUsed(shape17, L17_REyeInner)) - { - shape17(L17_RPupil, IX) = (shape17(L17_REyeOuter, IX) + - shape17(L17_REyeInner, IX)) / 2; - - shape17(L17_RPupil, IY) = (shape17(L17_REyeOuter, IY) + - shape17(L17_REyeInner, IY)) / 2; - } - // nose tip and nostrils not available, fake it by shifting available points up - if (PointUsed(shape17, L17_LPupil) && PointUsed(shape17, L17_RPupil)) - { - const double shift = .1 * PointDist(shape17, L17_LPupil, L17_RPupil); - if (PointUsed(shape17, L17_CNoseTip)) - shape17(L17_CNoseTip, IY) -= 2 * shift; - if (PointUsed(shape17, L17_LNostril)) - shape17(L17_LNostril, IY) -= shift; - if (PointUsed(shape17, L17_RNostril)) - shape17(L17_RNostril, IY) -= shift; - } -} - -Shape Shape17OrEmpty( // like Shape17 but return zero point shape if can't convert - const Shape& shape) // in -{ - const int* const tab = Shape17Tab(shape); - if (!tab) - { - static int printed; - PrintOnce(printed, - "\nDo not know how to convert a %d point shape to a 17 point face...\n", - shape.rows); - return Shape(0, 2); // note return - } - Shape shape17(17, 2); - for (int i = 0; i < 17; i++) - { - int iold = tab[i]; - CV_Assert(iold >= 0 && iold < NSIZE(shape)); - shape17(i, IX) = shape(iold, IX); - shape17(i, IY) = shape(iold, IY); - } - if (shape.rows == 21) // 21 point AFLW set? - TweakAflw(shape17); - else if (shape.rows == 194) // 194 point Helen set? - TweakHelen(shape17); - - return shape17; -} - -Shape Shape17( // convert an arb face shape to a 17 point shape, err if can't - const Shape& shape) // in -{ - Shape shape17(Shape17OrEmpty(shape)); - if (shape17.rows == 0) - Err("Cannot convert %d point shape to 17 points", shape.rows); - return shape17; -} - -static void CheckX( // check that the point "left" is leftwards of the point "right" - const Shape& shape, // in - int left, // in - int right) // in -{ - if (PointUsed(shape, left) && - PointUsed(shape, right) && - shape(right, IX) < shape(left, IX)) - { - Err("shape17 point %d is to the left of point %d", right, left); - } -} - -static void CheckY( // check that the point "bot" is below the point "top" - const Shape& shape, // in - int top, // in - int bot) // in -{ - if (PointUsed(shape, top) && - PointUsed(shape, bot) && - shape(bot, IY) < shape(top, IY)) - { - Err("shape17 point %d is below point %d", top, bot); - } -} - -void SanityCheckShape17( // check that left pupil is to the left of the right pupil, etc - const Shape& shape17) // in -{ - CV_Assert(shape17.rows == 17); - CheckX(shape17, L17_LPupil, L17_RPupil); - CheckX(shape17, L17_LMouthCorner, L17_RMouthCorner); - CheckX(shape17, L17_LEyebrowOuter, L17_LEyebrowInner); - CheckX(shape17, L17_REyebrowInner, L17_REyebrowOuter); - CheckX(shape17, L17_LEyebrowOuter, L17_REyebrowOuter); - CheckX(shape17, L17_LEyeOuter, L17_LEyeInner); - CheckX(shape17, L17_REyeInner, L17_REyeOuter); - CheckY(shape17, L17_LPupil, L17_LMouthCorner); - CheckY(shape17, L17_RPupil, L17_RMouthCorner); - CheckY(shape17, L17_LPupil, L17_CNoseTip); - CheckY(shape17, L17_CTopOfTopLip, L17_CBotOfBotLip); -} - -} // namespace stasm diff --git a/3rdparty/stasm/stasm/stasm/src/shapehacks.cpp b/3rdparty/stasm/stasm/stasm/src/shapehacks.cpp deleted file mode 100755 index 6dfcd90..0000000 --- a/3rdparty/stasm/stasm/stasm/src/shapehacks.cpp +++ /dev/null @@ -1,130 +0,0 @@ -// shapehacks.cpp: -// -// The shape model sometimes allows implausible point layouts. For -// example, the mouth on the nose, or the chin inside the mouth. The -// functions in this module fix the most egregious cases. These hacks -// don't necessarily make the overall fitness measure (FM29) better, -// but minimize the occurrence of ridiculous shapes, although also -// occasionally worsen a good shape. -// -// Copyright (C) 2005-2013, Stephen Milborrow - -#include "shapehacks.h" -#include "print.h" -#include "stasm_lib.h" -#include "eyedist.h" -#include "stasm_landmarks.h" - -namespace stasm -{ -static const double SHIFT_MOUTH_FROM_NOSE_FRAC = 0.06; // .06 from tuning on D1 set - -static const double CHIN_DOWN_RATIO = 0.5; // chin must be this far from mouth -static const double CHIN_DOWN_SHIFT = 0.2; - -static const double CHIN_UP_RATIO = 2.4; // chin cannot be further than this from mouth -static const double CHIN_UP_SHIFT = 0.1; - -static const double TEMPLE_RATIO = .1; // temple must be this far from eye, 0 disables -static const double TEMPLE_SHIFT = 3; - -//----------------------------------------------------------------------------- - -static void PossiblyPrint(const char* s) // debugging print -{ - if (trace_g) - lprintf("%s ", s); -} - -void ApplyShapeModelHacks( // adjust shape by applying various hacks - Shape& shape, // io: position of features possibly adjusted - unsigned hackbits) // in: which hacks to apply, see SHAPEHACKS defs -{ - if (shape.rows != 77) // the shape hacks assume stasm77 points - return; // NOTE return - - const double eyemouth = EyeMouthDist(shape); - - if (hackbits & SHAPEHACKS_DEFAULT) - { - // Possibly shift the entire mouth down, if it is too close to the nose. - // Useful when the descriptor matchers think the nostrils are the mouth. - - const double nosemouth_gap = - shape(L_CTopOfTopLip, IY) - shape(L_CNoseBase, IY); - if (nosemouth_gap < .1 * eyemouth) - { - PossiblyPrint("ShiftMouthDown"); - for (int i = L_LMouthCorner; i <= L_LMouth76; i++) - shape(i, IY) += SHIFT_MOUTH_FROM_NOSE_FRAC * eyemouth; - } - // Shift the bottom of mouth down if it is above the top of mouth. - - const double gap = shape(L_CTopOfBotLip, IY) - shape(L_CTopOfTopLip, IY); - if (gap < 0) - { - PossiblyPrint("ShiftBottomOfMouthDown"); - for (int i = L_RMouthCorner; i <= L_LMouth76; i++) - shape(i, IY) -= gap; - } - // Possibly shift the chin down or up, if it too close to the mouth. - // Useful when the chin is on the mouth. - - const double y_mouth_center = - (shape(L_CTopOfTopLip, IY) + shape(L_CBotOfBotLip, IY)) / 2; - const double nosemouth_gap1 = - MAX(0, y_mouth_center - shape(L_CNoseBase, IY)); - const double mouthchin_gap = - shape(L_CTipOfChin, IY) - y_mouth_center; - if (mouthchin_gap < CHIN_DOWN_RATIO * nosemouth_gap1) - { - PossiblyPrint("ShiftChinDown"); - double yadjust = CHIN_DOWN_SHIFT * eyemouth; - shape(L_LJaw04, IY) += yadjust; - shape(L_LJaw05, IY) += yadjust; - shape(L_CTipOfChin, IY) += yadjust; - shape(L_RJaw07, IY) += yadjust; - shape(L_RJaw08, IY) += yadjust; - } - if (mouthchin_gap > CHIN_UP_RATIO * nosemouth_gap1) - { - PossiblyPrint("ShiftChinUp"); - double yadjust = CHIN_UP_SHIFT * eyemouth; - shape(L_LJaw04, IY) -= yadjust; - shape(L_LJaw05, IY) -= yadjust; - shape(L_CTipOfChin, IY) -= yadjust; - shape(L_RJaw07, IY) -= yadjust; - shape(L_RJaw08, IY) -= yadjust; - } - } - // Possibly shift the side of face away from eye. - // Useful when the side of face is on the eye. - - if (hackbits & SHAPEHACKS_SHIFT_TEMPLE_OUT) - { - if (shape(L_LTemple, IX) > - shape(L_LEyeOuter, IX) - TEMPLE_RATIO * eyemouth) - { - PossiblyPrint("LTempleOut"); - double xadjust = - TEMPLE_SHIFT * ABS(shape(L_LEyeOuter, IX) - shape(L_LTemple, IX)); - shape(L_LTemple, IX) -= xadjust; - shape(L_LJaw01, IX) -= xadjust; - shape(L_LJawNoseline, IX) -= xadjust; - shape(L_LJawMouthline, IX) -= .5 * xadjust; - } - if (shape(L_RTemple, IX) < - shape(L_REyeOuter, IX) + TEMPLE_RATIO * eyemouth) - { - PossiblyPrint("RTempleOut"); - double xadjust = - TEMPLE_SHIFT * ABS(shape(L_REyeOuter, IX) - shape(L_RTemple, IX)); - shape(L_RTemple, IX) += xadjust; - shape(L_RJaw11, IX) += xadjust; - shape(L_RJawNoseline, IX) += xadjust; - shape(L_RJawMouthline, IX) += .5 * xadjust; - } - } -} - -} // namespace stasm diff --git a/3rdparty/stasm/stasm/stasm/src/shapemod.cpp b/3rdparty/stasm/stasm/stasm/src/shapemod.cpp deleted file mode 100755 index 0cde0ea..0000000 --- a/3rdparty/stasm/stasm/stasm/src/shapemod.cpp +++ /dev/null @@ -1,143 +0,0 @@ -// shapemod.cpp: the ASM shape model -// -// Copyright (C) 2005-2013, Stephen Milborrow - -#include "shapemod.h" -#include "landmarks.h" -#include "asm.h" -#include "print.h" - -namespace stasm -{ -static const int SHAPEHACK_MINPYRLEV = 2; // allow hacks only at coarse pyr levs - -// Limit the values of b to make sure the generated shape is plausible. -// That is, clip each b[i] to bmax * sqrt(lambda_i). -// "b" is the name used for the eigenvector weights in Cootes' papers. - -static void LimitB( - VEC& b, // io: eigvec weights - const VEC& eigvals, // in - double bmax) // in -{ - for (int i = 0; i < NSIZE(eigvals); i++) - { - const double limit = bmax * sqrt(eigvals(i)); - b(i) = Clamp(b(i), -limit, limit); - } -} - -// This implements Section 4.8 of CootesTaylor 2004 -// www.isbe.man.ac.uk/~bim/Mods/app_models.pdf. -// Except that we don't implement tangent spaces. And we don't iterate the -// shape model until convergence. Instead we use the b from the previous -// iteration of the ASM, which gives as good landmark fit results, empirically. - -Shape ConformShapeToMod( // Return a copy of inshape conformed to the model - VEC& b, // io: eigvec weights, 2n x 1 - const Shape& inshape, // in: the current position of the landmarks - const Shape& meanshape, // in: n x 2 - const VEC& eigvals, // in: neigs x 1 - const MAT& eigvecs, // in: 2n x neigs - const MAT& eigvecsi, // in: neigs x 2n, inverse of eigvecs - const double bmax, // in: for LimitB - const VEC& pointweights) // in: contribution of each point to the pose -{ - Shape shape(inshape.clone()); - - // estimate the pose which transforms the shape into the model space - // (use the b from previous iterations of the ASM) - - MAT modelshape(AsColVec(meanshape) + eigvecs * b); - modelshape = DimKeep(modelshape, shape.rows, 2); // redim back to 2 columns - const MAT pose(AlignmentMat(modelshape, shape, Buf(pointweights))); - - // transform the shape into the model space - - modelshape = TransformShape(shape, pose.inv(cv::DECOMP_LU)); - - // update shape model params b to match modelshape, then limit b - - b = eigvecsi * AsColVec(modelshape - meanshape); - LimitB(b, eigvals, bmax); - - // generate conformedshape from the model using the limited b - // (we generate as a column vec, then redim back to 2 columns) - - const Shape conformedshape(DimKeep(eigvecs * b, shape.rows, 2)); - - // back to image space - - return JitterPointsAt00(TransformShape(meanshape + conformedshape, pose)); -} - -VEC PointWeights(void) // return point weights from LANDMARK_INFO_TAB -{ - // default to all points have a weight of 1 - VEC pointweights(MAX(stasm_NLANDMARKS, NELEMS(LANDMARK_INFO_TAB)), 1, 1.); - - if (stasm_NLANDMARKS != NELEMS(LANDMARK_INFO_TAB)) - { - // It's safest to fix this problem and rebuild stasm and tasm. But this is - // a lprintf_always instead of Err to allow tasm to run, to avoid a catch-22 - // situation where we can't create a new model with tasm but don't want the - // old model. - lprintf_always( - "Warning: PointWeights: all points weighted as 1 because " - "stasm_NLANDMARKS %d does not match NELEMS(LANDMARK_INFO_TAB) %d\n", - stasm_NLANDMARKS, NELEMS(LANDMARK_INFO_TAB)); - } - else for (int i = 0; i < NELEMS(LANDMARK_INFO_TAB); i++) - pointweights(i) = LANDMARK_INFO_TAB[i].weight; - - return pointweights; -} - -// wrapper around ConformShapeToMod above - -const Shape ShapeMod::ConformShapeToMod_( // return shape conformed to shape model - VEC& b, // io: eigvec weights from previous iters of ASM - const Shape& shape, // in: shape suggested by the descriptor models - int ilev) // in: pyramid level (0 is full size) -const -{ - // static for efficiency (init once) - static const VEC pointweights(PointWeights()); - - Shape newshape = ConformShapeToMod(b, - shape, meanshape_ * GetPyrScale(ilev), - eigvals_ / pow(SQ(PYR_RATIO), ilev), eigvecs_, eigvecsi_, - bmax_, pointweights); - - JitterPointsAt00InPlace(newshape); // jitter points at 0,0 if any - - if (ilev >= SHAPEHACK_MINPYRLEV) // allow shape hacks only at coarse pyr levs - ApplyShapeModelHacks(newshape, hackbits_); - - return newshape; -} - -// Like ConformShapeToMod_ but with pinned landmarks. Conform the given shape to -// the ASM model, but keeping points in pinnedshape at their original position. - -const Shape ShapeMod::ConformShapeToMod_Pinned_( - VEC& b, // io: eigvec weights from previous iters of ASM - const Shape& shape, // in: shape suggested by the descriptor models - int ilev, // in: pyramid level (0 is full size) - const Shape& pinnedshape) // in: pinned landmarks -const -{ - static const double MAX_DIST = 0.5; - static const int MAX_ITERS = 50; - - Shape outshape(shape.clone()); - double dist = FLT_MAX; - for (int iter = 0; dist > MAX_DIST && iter < MAX_ITERS; iter++) - { - outshape = ConformShapeToMod_(b, outshape, ilev); - dist = ForcePinnedPoints(outshape, pinnedshape); - } - return outshape; -} - -} // namespace stasm diff --git a/3rdparty/stasm/stasm/stasm/src/startshape.cpp b/3rdparty/stasm/stasm/stasm/src/startshape.cpp deleted file mode 100755 index c1d376d..0000000 --- a/3rdparty/stasm/stasm/stasm/src/startshape.cpp +++ /dev/null @@ -1,584 +0,0 @@ -// startshape.cpp: routines for finding the start shape for an ASM search -// -// The model "estart" determines the method we use to create the start shape. -// (The InitMods function initializes estart during Stasm initialization.) -// The current open-source version of Stasm uses estart=ESTART_EYES. -// -// 1. With the model estart=ESTART_RECT_ONLY, the start shape is created by -// aligning the model mean face shape to the face rectangle. (The face -// rectangle is found by the face detector prior to calling routines in -// this file.) -// -// 2. With the model estart=ESTART_EYES (currently used for the frontal -// model), the start shape is created as follows. Using the face rectangle -// found by the face detector, Stasm searches for the eyes in the -// appropriate subregions within the rectangle. If both eyes are found the -// face is rotated so the eyes are horizontal. The start shape is then -// formed by aligning the mean training shape to the eyes. If either eye -// isn't found, the start shape is aligned to the face detector rectangle. -// -// Note however that if the eye angle is less than +-5 degrees, we treat it -// as 0 degrees (and don't rotate the face as described above). This -// is to minimize preprocessing. -// -// 3. With the model estart=ESTART_EYE_AND_MOUTH (currently used for the -// three-quarter models), the start shape is generated as above, but we -// search for the mouth too and use it if is detected. -// -// Copyright (C) 2005-2013, Stephen Milborrow - -#include "startshape.h" -#include "print.h" -#include "landmarks.h" -#include "stasm_landmarks.h" -#include "err.h" -#include "faceroi.h" -#include "eyedet.h" -#include "shape17.h" - -namespace stasm -{ - -// Following used if we did not detect eyes. We empirically get slighter better -// Stasm results if we slightly reduce the size of the detected face rectangle. - -static const double FACERECT_SCALE_WHEN_NO_EYES = .95; - -//----------------------------------------------------------------------------- - -// Align meanshape to the face detector rectangle and return it as startshape -// This ignores the eye and mouth, if any. - -static Shape AlignMeanShapeToFaceDet( - const DetPar& detpar, // in - const Shape& meanshape, // in - double scale, // in: scale the face rectangle - const Image& img) // io: the image (grayscale) -{ - if (trace_g) - lprintf("AlignToFaceDet "); - - DetPar detpar1(detpar); - - if (IsLeftFacing(detpar.eyaw)) - detpar1 = FlipDetPar(detpar, img.cols); - - CV_Assert(meanshape.rows > 0 && meanshape.cols == 2); - - const double xscale = detpar1.width * scale / DET_FACE_WIDTH; - const double yscale = detpar1.height * scale / DET_FACE_WIDTH; - - Shape startshape = TransformShape(meanshape, - xscale, 0, detpar1.x, - 0, yscale, detpar1.y); - - return startshape; -} - -// Return the model meanshape aligned to both eyes and the mouth. -// -// The central idea is to form a triangular shape of the eyes and -// bottom-of-mouth from the face detector params, and align the same -// triangle in the meanshape to this triangle. - -static Shape AlignMeanShapeToBothEyesMouth( - const DetPar& detpar, // in - const Shape& meanshape) // in -{ - if (trace_g) - lprintf("AlignToBothEyesMouth "); - - CV_Assert(NSIZE(meanshape) > 0 && PointUsed(meanshape, 0)); - CV_Assert(Valid(detpar.mouthx)); - CV_Assert(Valid(detpar.lex)); - CV_Assert(Valid(detpar.rex)); - - Shape mean_tri(3, 2), det_tri(3, 2); // triangle of eyes and mouth - - const double x_meanmouth = - (meanshape(L_CTopOfTopLip, IX) + meanshape(L_CBotOfBotLip, IX)) / 2.; - - const double y_meanmouth = - (meanshape(L_CTopOfTopLip, IY) + meanshape(L_CBotOfBotLip, IY)) / 2.; - - const Shape shape17(Shape17(meanshape)); - - mean_tri(0, IX) = shape17(L17_LPupil, IX); // left eye - mean_tri(0, IY) = shape17(L17_LPupil, IY); - mean_tri(1, IX) = shape17(L17_RPupil, IX); // right eye - mean_tri(1, IY) = shape17(L17_RPupil, IY); - mean_tri(2, IX) = x_meanmouth; // mouth - mean_tri(2, IY) = y_meanmouth; - - det_tri(0, IX) = detpar.lex; // left eye - det_tri(0, IY) = detpar.ley; - det_tri(1, IX) = detpar.rex; // right eye - det_tri(1, IY) = detpar.rey; - det_tri(2, IX) = detpar.mouthx; // mouth - det_tri(2, IY) = detpar.mouthy; - - return TransformShape(meanshape, AlignmentMat(mean_tri, det_tri)); -} - -// return the model meanshape aligned to both eyes (mouth is not avail) - -static Shape AlignMeanShapeToBothEyesNoMouth( - const DetPar& detpar, // in - const Shape& meanshape) // in -{ - if (trace_g) - lprintf("AlignToBothEyesNoMouth "); - - CV_Assert(NSIZE(meanshape) > 0 && PointUsed(meanshape, 0)); - CV_Assert(Valid(detpar.lex)); - CV_Assert(Valid(detpar.rex)); - - Shape meanline(2, 2), detline(2, 2); // line from eye to eye - - const Shape shape17(Shape17(meanshape)); - - meanline(0, IX) = shape17(L17_LPupil, IX); // left eye - meanline(0, IY) = shape17(L17_LPupil, IY); - meanline(1, IX) = shape17(L17_RPupil, IX); // right eye - meanline(1, IY) = shape17(L17_RPupil, IY); - - detline(0, IX) = detpar.lex; // left eye - detline(0, IY) = detpar.ley; - detline(1, IX) = detpar.rex; // right eye - detline(1, IY) = detpar.rey; - - return TransformShape(meanshape, AlignmentMat(meanline, detline)); -} - -// return the model meanshape aligned to both eyes (mouth is not avail) - -static Shape AlignMeanShapeToBothEyesEstMouth( - const DetPar& detpar, // in - const Shape& meanshape) // in -{ - // .48 was tested to give slightly better worse case results than .50 - static const double EYEMOUTH_TO_FACERECT_RATIO = .48; - - if (trace_g) - lprintf("AlignToBothEyesEstMouth "); - - CV_Assert(NSIZE(meanshape) > 0 && PointUsed(meanshape, 0)); - CV_Assert(Valid(detpar.lex)); - CV_Assert(Valid(detpar.rex)); - - // estimate the mouth's position - - double x_eyemid = 0; - switch (detpar.eyaw) - { - case EYAW00: // mid point - x_eyemid = .50 * detpar.lex + .50 * detpar.rex; - break; - // TODO The constants below have not been empirically optimized. - case EYAW_45: // closer to left eye - x_eyemid = .30 * detpar.lex + .70 * detpar.rex; - break; - case EYAW_22: // closer to left eye - x_eyemid = .30 * detpar.lex + .70 * detpar.rex; - break; - case EYAW22: // closer to right eye - x_eyemid = .30 * detpar.lex + .70 * detpar.rex; - break; - case EYAW45: // closer to right eye - x_eyemid = .30 * detpar.lex + .70 * detpar.rex; - break; - default: - Err("AlignMeanShapeToBothEyesEstMouth: Invalid eyaw %d", detpar.eyaw); - break; - } - const double y_eyemid = (detpar.ley + detpar.rey) / 2; - - Shape mean_tri(3, 2), det_tri(3, 2); // triangle of eyes and mouth - - const Shape shape17(Shape17(meanshape)); - - mean_tri(0, IX) = shape17(L17_LPupil, IX); // left eye - mean_tri(0, IY) = shape17(L17_LPupil, IY); - mean_tri(1, IX) = shape17(L17_RPupil, IX); // right eye - mean_tri(1, IY) = shape17(L17_RPupil, IY); - mean_tri(2, IX) = shape17(L17_CBotOfBotLip, IX); // mouth - mean_tri(2, IY) = shape17(L17_CBotOfBotLip, IY); - - det_tri(0, IX) = detpar.lex; // left eye - det_tri(0, IY) = detpar.ley; - det_tri(1, IX) = detpar.rex; // right eye - det_tri(1, IY) = detpar.rey; - det_tri(2, IX) = x_eyemid; // mouth - det_tri(2, IY) = y_eyemid + EYEMOUTH_TO_FACERECT_RATIO * detpar.width; - - return TransformShape(meanshape, AlignmentMat(mean_tri, det_tri)); -} - -static Shape AlignMeanShapeToLeftEyeMouth( - const DetPar& detpar, // in - const Shape& meanshape) // in -{ - if (trace_g) - lprintf("AlignToLeftEyeMouth "); - - CV_Assert(NSIZE(meanshape) > 0 && PointUsed(meanshape, 0)); - CV_Assert(Valid(detpar.lex)); // left eye valid? - CV_Assert(!Valid(detpar.rex)); // right eye invalid? (else why are we here?) - CV_Assert(Valid(detpar.mouthx)); // mouth valid? - - Shape meanline(2, 2), detline(2, 2); // line from eye to mouth - - const Shape shape17(Shape17(meanshape)); - - const double x_meanmouth = - (shape17(L17_CTopOfTopLip, IX) + shape17(L17_CBotOfBotLip, IX)) / 2; - - const double y_meanmouth = - (shape17(L17_CTopOfTopLip, IY) + shape17(L17_CBotOfBotLip, IY)) / 2; - - meanline(0, IX) = shape17(L17_LPupil, IX); // left eye - meanline(0, IY) = shape17(L17_LPupil, IY); - meanline(1, IX) = x_meanmouth; // mouth - meanline(1, IY) = y_meanmouth; - - detline(0, IX) = detpar.lex; // left eye - detline(0, IY) = detpar.ley; - detline(1, IX) = detpar.mouthx; // mouth - detline(1, IY) = detpar.mouthy; - - return TransformShape(meanshape, AlignmentMat(meanline, detline)); -} - -static Shape AlignMeanShapeToRightEyeMouth( - const DetPar& detpar, // in - const Shape& meanshape) // in -{ - if (trace_g) - lprintf("AlignToRightEyeMouth "); - - CV_Assert(NSIZE(meanshape) > 0 && PointUsed(meanshape, 0)); - CV_Assert(!Valid(detpar.lex)); // left eye invalid? (else why are we here?) - CV_Assert(Valid(detpar.rex)); // right eye valid? - CV_Assert(Valid(detpar.mouthx)); // mouth valid? - - const Shape shape17(Shape17(meanshape)); - - const double x_meanmouth = - (shape17(L17_CTopOfTopLip, IX) + shape17(L17_CBotOfBotLip, IX)) / 2; - - const double y_meanmouth = - (shape17(L17_CTopOfTopLip, IY) + shape17(L17_CBotOfBotLip, IY)) / 2; - - Shape meanline(2, 2), detline(2, 2); // line from eye to mouth - - meanline(0, IX) = shape17(L17_RPupil, IX); // right eye - meanline(0, IY) = shape17(L17_RPupil, IY); - meanline(1, IX) = x_meanmouth; // mouth - meanline(1, IY) = y_meanmouth; - - detline(0, IX) = detpar.rex; // right eye - detline(0, IY) = detpar.rey; - detline(1, IX) = detpar.mouthx; // mouth - detline(1, IY) = detpar.mouthy; - - return TransformShape(meanshape, AlignmentMat(meanline, detline)); -} - -static void FlipIfLeftFacing( - Shape& shape, // io - EYAW eyaw, // in - int ncols) // in -{ - if (IsLeftFacing(eyaw)) - shape = FlipShape(shape, ncols); -} - -static Shape EstartRectOnly( - const DetPar& detpar_roi, // in: detpar wrt the ROI - const Image& face_roi, // in - const Shape& meanshape) // in -{ - return AlignMeanShapeToFaceDet(detpar_roi, meanshape, - FACERECT_SCALE_WHEN_NO_EYES, face_roi); -} - -static Shape EstartEyes( - const DetPar& detpar_roi, // in: detpar wrt the ROI - const Image& face_roi, // in - const Shape& meanshape) // in -{ - Shape startshape; - Shape meanshape1(meanshape); - if (Valid(detpar_roi.lex) && Valid(detpar_roi.rex)) // both eyes available? - { - FlipIfLeftFacing(meanshape1, detpar_roi.eyaw, face_roi.cols); - // TODO Tune the following code, what approach is best? - if (detpar_roi.eyaw == EYAW00) - startshape = AlignMeanShapeToBothEyesEstMouth(detpar_roi, meanshape1); - else - startshape = AlignMeanShapeToBothEyesNoMouth(detpar_roi, meanshape1); - FlipIfLeftFacing(startshape, detpar_roi.eyaw, face_roi.cols); - } - else // at least one eye is missing, use the face det rectangle - { - startshape = - AlignMeanShapeToFaceDet(detpar_roi, meanshape1, - FACERECT_SCALE_WHEN_NO_EYES, face_roi); - } - return startshape; -} - -static Shape EstartEyeMouth( - const DetPar& detpar_roi, // in: detpar wrt the ROI - const Image& face_roi, // in - const Shape& meanshape) // in -{ - Shape startshape; - Shape meanshape1(meanshape); - if (Valid(detpar_roi.mouthx) && // both eyes and mouth? - Valid(detpar_roi.lex) && - Valid(detpar_roi.rex)) - { - FlipIfLeftFacing(meanshape1, detpar_roi.eyaw, face_roi.cols); - startshape = AlignMeanShapeToBothEyesMouth(detpar_roi, meanshape1); - FlipIfLeftFacing(startshape, detpar_roi.eyaw, face_roi.cols); - } - else if (Valid(detpar_roi.lex) && // both eyes? - Valid(detpar_roi.rex)) - { - FlipIfLeftFacing(meanshape1, detpar_roi.eyaw, face_roi.cols); - // TODO Tune the following code, what approach is best? - if (detpar_roi.eyaw == EYAW00) - startshape = AlignMeanShapeToBothEyesEstMouth(detpar_roi, meanshape1); - else - startshape = AlignMeanShapeToBothEyesNoMouth(detpar_roi, meanshape1); - FlipIfLeftFacing(startshape, detpar_roi.eyaw, face_roi.cols); - } - else if (Valid(detpar_roi.mouthx) && // left eye and mouth? - Valid(detpar_roi.lex)) - { - FlipIfLeftFacing(meanshape1, detpar_roi.eyaw, face_roi.cols); - startshape = AlignMeanShapeToLeftEyeMouth(detpar_roi, meanshape1); - FlipIfLeftFacing(startshape, detpar_roi.eyaw, face_roi.cols); - } - else if (Valid(detpar_roi.mouthx) && // right eye and mouth? - Valid(detpar_roi.rex)) - { - FlipIfLeftFacing(meanshape1, detpar_roi.eyaw, face_roi.cols); - startshape = AlignMeanShapeToRightEyeMouth(detpar_roi, meanshape1); - FlipIfLeftFacing(startshape, detpar_roi.eyaw, face_roi.cols); - } - else // last resort: use the face det rectangle (can't use facial features) - { - startshape = - AlignMeanShapeToFaceDet(detpar_roi, meanshape1, - FACERECT_SCALE_WHEN_NO_EYES, face_roi); - } - return startshape; -} - -// Align the model meanshape to the detpar from the face and feature dets. -// Complexity enters in because the detected eyes and mouth may be useful -// if available. The "left facing" code is needed because our three -// quarter models are for right facing faces (wrt the viewer). - -static Shape StartShapeFromDetPar( - const DetPar& detpar_roi, // in: detpar wrt the ROI - const Image& face_roi, // in - const Shape& meanshape, // in - ESTART estart) // in: use mouth etc. to posn start shape? -{ - Shape startshape; - switch (estart) - { - case ESTART_RECT_ONLY: - startshape = EstartRectOnly(detpar_roi, face_roi, meanshape); - break; - case ESTART_EYES: - startshape = EstartEyes(detpar_roi, face_roi, meanshape); - break; - case ESTART_EYE_AND_MOUTH: - startshape = EstartEyeMouth(detpar_roi, face_roi, meanshape); - break; - default: - Err("Invalid estart %d", estart); - } - return JitterPointsAt00(startshape); -} - -static void TraceEyesMouth( - Image& face_roi, // out: ROI around face, possibly rotated upright - DetPar& detpar_roi) // out: detpar wrt to face_roi -{ - (void) face_roi; - (void) detpar_roi; -#if TRACE_IMAGES // will be 0 unless debugging (defined in stasm.h) - - CImage cimg; cvtColor(face_roi, cimg, CV_GRAY2BGR); // color image - rectangle(cimg, - cv::Point(cvRound(detpar_roi.x - .5 * detpar_roi.width), - cvRound(detpar_roi.y - .5 * detpar_roi.height)), - cv::Point(cvRound(detpar_roi.x + .5 * detpar_roi.width), - cvRound(detpar_roi.y + .5 * detpar_roi.height)), - ToCvColor(C_BLUE), 3); - if (Valid(detpar_roi.lex)) - cv::circle(cimg, - cv::Point(cvRound(detpar_roi.lex), cvRound(detpar_roi.ley)), - MAX(2, face_roi.cols / 40), - cv::Scalar(0, 0, 255), 2); - if (Valid(detpar_roi.rex)) - cv::circle(cimg, - cv::Point(cvRound(detpar_roi.rex), cvRound(detpar_roi.rey)), - MAX(2, face_roi.cols / 40), - cv::Scalar(0, 0, 255), 2); - if (Valid(detpar_roi.mouthx)) - cv::circle(cimg, - cv::Point(cvRound(detpar_roi.mouthx), cvRound(detpar_roi.mouthy)), - MAX(2, face_roi.cols / 40), - cv::Scalar(0, 0, 255), 2); - char s[SLEN]; sprintf(s, "%s_25_eyemouth.bmp", Base(imgpath_g)); - lprintf("%s\n", s); - if (!cv::imwrite(s, cimg)) - Err("Cannot write %s", s); - -#endif -} - -double EyeAngle( // eye angle in degrees, INVALID if eye angle not available - const DetPar& detpar) // in: detpar wrt the ROI -{ - double angle = 0; - if (Valid(detpar.lex) && Valid(detpar.rey)) // both eyes detected? - { - angle = RadsToDegrees( - -atan2(detpar.rey - detpar.ley, - detpar.rex - detpar.lex)); - } - return angle; -} - -double EyeAngle( // eye angle in degrees, INVALID if eye angle not available - const Shape& shape) // in -{ - double angle = INVALID; - - const Shape shape17(Shape17OrEmpty(shape)); - - if (shape17.rows && // converted shape to a Shape17 successfully? - Valid(shape17(L17_LPupil, IX)) && Valid(shape17(L17_RPupil, IX)) && - PointUsed(shape17, L17_LPupil) && PointUsed(shape17, L17_RPupil)) - { - angle = RadsToDegrees( - -atan2(shape17(L17_RPupil, IY) - shape17(L17_LPupil, IY), - shape17(L17_RPupil, IX) - shape17(L17_LPupil, IX))); - } - return angle; -} - -// Get the start shape and the ROI around it, given the face rectangle. -// Depending on the estart field in the model, we detect the eyes -// and mouth and use those to help fit the start shape. -// (Note also that the ROI is flipped if necessary because our three-quarter -// models are right facing and the face may be left facing.) - -static void StartShapeAndRoi( // we have the facerect, now get the rest - Shape& startshape, // out: the start shape we are looking for - Image& face_roi, // out: ROI around face, possibly rotated upright - DetPar& detpar_roi, // out: detpar wrt to face_roi - DetPar& detpar, // io: detpar wrt to img (has face rect on entry) - const Image& img, // in: the image (grayscale) - const vec_Mod& mods, // in: a vector of models, one for each yaw range - // (use only estart, and meanshape) - StasmCascadeClassifier cascade) -{ - PossiblySetRotToZero(detpar.rot); // treat small rots as zero rots - - FaceRoiAndDetPar(face_roi, detpar_roi, // get ROI around face - img, detpar, false); - - DetectEyesAndMouth(detpar_roi, // use OpenCV eye and mouth detectors - face_roi, cascade); - - // Some face detectors return the face rotation, some don't (in - // the call to NextFace_ just made via NextStartShapeAndRoi). - // If we don't have the rotation, then estimate it from the eye - // angle, if the eyes are available. - - if (!Valid(detpar.rot)) // don't have the face rotation? - { - detpar_roi.rot = EyeAngle(detpar_roi); - if (!Valid(detpar_roi.rot)) // eye angle not available? - detpar_roi.rot = 0; - PossiblySetRotToZero(detpar_roi.rot); - detpar.rot = detpar_roi.rot; - if (detpar.rot != 0) - { - // face is rotated: rotate ROI and re-get the eyes and mouth - - // TODO: Prevent bogus OpenCV assert fail face_roi.data == img.data. - face_roi = Image(0,0); - - FaceRoiAndDetPar(face_roi, detpar_roi, - img, detpar, false); - - DetectEyesAndMouth(detpar_roi, // use OpenCV eye and mouth detectors - face_roi, cascade); - } - } - TraceEyesMouth(face_roi, detpar_roi); - if (trace_g) - lprintf("%-6.6s yaw %3.0f rot %3.0f ", - EyawAsString(detpar_roi.eyaw), detpar_roi.yaw, detpar_roi.rot); - else - logprintf("%-6.6s yaw %3.0f rot %3.0f ", - EyawAsString(detpar_roi.eyaw), detpar_roi.yaw, detpar_roi.rot); - - // select an ASM model based on the face's yaw - const Mod* mod = mods[ABS(EyawAsModIndex(detpar_roi.eyaw, mods))]; - - const ESTART estart = mod->Estart_(); - - startshape = StartShapeFromDetPar(detpar_roi, - face_roi, mod->MeanShape_(), estart); - - detpar.lex = detpar_roi.lex; - - if (IsLeftFacing(detpar_roi.eyaw)) - FlipImgInPlace(face_roi); - - JitterPointsAt00InPlace(startshape); -} - -// Get the start shape for the next face in the image, and the ROI around it. -// The returned shape is wrt the ROI frame. -// -// Note that we we previously called the face detector, and the face -// rectangle(s) were saved privately in facedet, and are now ready for -// immediate retrieval by NextFace_. -// -// The following comment applies for three-quarter models (not for frontal -// models): If the three-quarter face is left-facing, we flip the ROI so -// the returned face is right-facing. This is because our three-quarter -// ASM models are for right-facing faces. For frontal faces (the yaw00 -// model), faces are not flipped. - -bool NextStartShapeAndRoi( // use face detector results to estimate start shape - Shape& startshape, // out: the start shape - Image& face_roi, // out: ROI around face, possibly rotated upright - DetPar& detpar_roi, // out: detpar wrt to face_roi - DetPar& detpar, // out: detpar wrt to img - const Image& img, // in: the image (grayscale) - const vec_Mod& mods, // in: a vector of models, one for each yaw range - // (use only estart, and meanshape) - FaceDet& facedet, // io: the face detector (internal face index bumped) - StasmCascadeClassifier cascade) -{ - detpar = facedet.NextFace_(); // get next face's detpar from the face det - - if (Valid(detpar.x)) // NextFace_ returned a face? - StartShapeAndRoi(startshape, face_roi, detpar_roi, detpar, img, mods, cascade); - - return Valid(detpar.x); -} - -} // namespace stasm diff --git a/3rdparty/stasm/stasm/stasm/src/stasm_lib.cpp b/3rdparty/stasm/stasm/stasm/src/stasm_lib.cpp deleted file mode 100755 index b627297..0000000 --- a/3rdparty/stasm/stasm/stasm/src/stasm_lib.cpp +++ /dev/null @@ -1,333 +0,0 @@ -// stasm_lib.cpp: interface to the Stasm library -// -// Copyright (C) 2005-2013, Stephen Milborrow - -#include "stasm_lib.h" -#include "err.h" -#include "misc.h" -#include "asm.h" -#include "print.h" -#include "initasm.h" -#include "faceroi.h" -#include "pinstart.h" -#include "convshape.h" -#include "facedet.h" -#include "startshape.h" - -#include - -using namespace stasm; - -static vec_Mod mods_g; // the ASM model(s) -//static FaceDet facedet_g; // the face detector - -//----------------------------------------------------------------------------- - -namespace stasm -{ -static void CheckStasmInit(void) -{ - if (mods_g.empty()) - Err("Models not initialized (missing call to stasm_init?)"); -} - -static void ShapeToLandmarks( // convert Shape to landmarks (float *) - float* landmarks, // out - const Shape& shape) // in -{ - CV_Assert(shape.rows <= stasm_NLANDMARKS); - int i; - for (i = 0; i < MIN(shape.rows, stasm_NLANDMARKS); i++) - { - landmarks[i * 2] = float(shape(i, IX)); - landmarks[i * 2 + 1] = float(shape(i, IY)); - } - // set remaining unused landmarks if any to 0,0 - for (; i < stasm_NLANDMARKS; i++) - { - landmarks[i * 2] = 0; - landmarks[i * 2 + 1] = 0; - } -} - -static const Shape LandmarksAsShape( // return a Shape - const float* landmarks) // in -{ - Shape shape(stasm_NLANDMARKS, 2); - for (int i = 0; i < stasm_NLANDMARKS; i++) - { - shape(i, IX) = landmarks[i*2]; - shape(i, IY) = landmarks[i*2+1]; - } - return shape; -} - -} // namespace stasm - -//----------------------------------------------------------------------------- - -int stasm_init_ext( // extended version of stasm_init - const char* datadir, // in: directory of face detector files - int trace, // in: 0 normal use, 1 trace to stdout and stasm.log - void* detparams) // in: NULL or face detector parameters -{ - (void) detparams; - - int returnval = 1; // assume success - //CatchOpenCvErrs(); - try - { - print_g = (trace != 0); - trace_g = (trace != 0); - if (mods_g.empty()) // not yet initialized? - { - if (trace) - { - // Open a log file in the current directory (if possible). - // After the log file is opened, lprintf and stasm_printf - // will print to stasm.log (as well as to stdout). - OpenLogFile(); - } - - CV_Assert(datadir && datadir[0] && STRNLEN(datadir, SLEN) < SLEN); - InitMods(mods_g, datadir); // init ASM model(s) - //facedet_g.OpenFaceDetector_(datadir, detparams); - //OpenEyeMouthDetectors(mods_g, datadir); - } - CheckStasmInit(); - } - catch(...) - { - returnval = 0; // a call was made to Err or a CV_Assert failed - } - //UncatchOpenCvErrs(); - return returnval; -} - -int stasm_init( // call once, at bootup (to read models from disk) - const char* datadir, // in: directory of face detector files - int trace) // in: 0 normal use, 1 trace to stdout and stasm.log -{ - return stasm_init_ext(datadir, trace, NULL); -} - -int stasm_open_image_ext( // extended version of stasm_open_image - const char* img, // in: gray image data, top left corner at 0,0 - int width, // in: image width - int height, // in: image height - const char* imgpath, // in: image path, used only for err msgs and debug - int multiface, // in: 0=return only one face, 1=allow multiple faces - int minwidth, // in: min face width as percentage of img width - void* user) // in: NULL or pointer to user abort func -{ - (void) img; - (void) width; - (void) height; - (void) imgpath; - (void) user; - - int returnval = 1; // assume success - //CatchOpenCvErrs(); - try - { - //CV_Assert(imgpath && STRNLEN(imgpath, SLEN) < SLEN); - CV_Assert(multiface == 0 || multiface == 1); - CV_Assert(minwidth >= 1 && minwidth <= 100); - - CheckStasmInit(); - - //img_g = Image(height, width,(unsigned char*)img); - - // call the face detector to detect the face rectangle(s) - //facedet_g.DetectFaces_(img_g, imgpath, multiface == 1, minwidth, user); - } - catch(...) - { - returnval = 0; // a call was made to Err or a CV_Assert failed - } - //UncatchOpenCvErrs(); - return returnval; -} - -int stasm_open_image( // call once per image, detect faces - const char* img, // in: gray image data, top left corner at 0,0 - int width, // in: image width - int height, // in: image height - const char* imgpath, // in: image path, used only for err msgs and debug - int multiface, // in: 0=return only one face, 1=allow multiple faces - int minwidth) // in: min face width as percentage of img width -{ - return stasm_open_image_ext(img, width, height, imgpath, - multiface, minwidth, NULL); -} - -int stasm_search_auto_ext( // extended version of stasm_search_auto - int* foundface, // out: 0=no more faces, 1=found face - float* landmarks, // out: x0, y0, x1, y1, ..., caller must allocate - float* estyaw, // out: NULL or pointer to estimated yaw - const char* data, - const int width, - const int height, - StasmCascadeClassifier cascade) -{ - int returnval = 1; // assume success - *foundface = 0; // but assume no face found - //CatchOpenCvErrs(); - try - { - Shape shape; // the shape with landmarks - Image face_roi; // cropped to area around startshape and possibly rotated - DetPar detpar_roi; // detpar translated to ROI frame - DetPar detpar; // params returned by face det, in img frame - - // Allocate image - Image img = Image(height, width,(unsigned char*)data); - - FaceDet facedet; - - // call the face detector to detect the face rectangle(s) - facedet.DetectFaces_(img, NULL, false, 10, NULL, cascade.faceCascade); - - // Get the start shape for the next face in the image, and the ROI around it. - // The shape will be wrt the ROI frame. - if (NextStartShapeAndRoi(shape, face_roi, detpar_roi, detpar, - img, mods_g, facedet, cascade)) - { - // now working with maybe flipped ROI and start shape in ROI frame - *foundface = 1; - - // select an ASM model based on the face's yaw - const int imod = ABS(EyawAsModIndex(detpar.eyaw, mods_g)); - - // do the actual ASM search - shape = mods_g[imod]->ModSearch_(shape, face_roi); - - shape = RoundMat(RoiShapeToImgFrame(shape, face_roi, detpar_roi, detpar)); - - // now working with non flipped start shape in image frame - ShapeToLandmarks(landmarks, shape); - if (estyaw) - *estyaw = float(detpar.yaw); - } - } - catch(...) - { - returnval = 0; // a call was made to Err or a CV_Assert failed - } - return returnval; -} - -int stasm_search_auto( // call repeatedly to find all faces - int* foundface, // out: 0=no more faces, 1=found face - float* landmarks, // out: x0, y0, x1, y1, ..., caller must allocate - const char *data, - const int width, - const int height, - StasmCascadeClassifier cascade) -{ - return stasm_search_auto_ext(foundface, landmarks, NULL, data, width, height, cascade); -} - -int stasm_search_single( // wrapper for stasm_search_auto and friends - int* foundface, // out: 0=no face, 1=found face - float* landmarks, // out: x0, y0, x1, y1, ..., caller must allocate - const char* img, // in: gray image data, top left corner at 0,0 - int width, // in: image width - int height, // in: image height - StasmCascadeClassifier cascade, - const char* imgpath, // in: image path, used only for err msgs and debug - const char* datadir) // in: directory of face detector files -{ - (void) datadir; - (void) imgpath; - - return stasm_search_auto(foundface, landmarks, img, width, height, cascade); -} - -int stasm_search_pinned( // call after the user has pinned some points - float* landmarks, // out: x0, y0, x1, y1, ..., caller must allocate - const float* pinned, // in: pinned landmarks (0,0 points not pinned) - const char* data, // in: gray image data, top left corner at 0,0 - int width, // in: image width - int height, // in: image height - const char* imgpath) // in: image path, used only for err msgs and debug -{ - (void) width; - (void) height; - (void) imgpath; - - int returnval = 1; // assume success - try - { - CheckStasmInit(); - - Image img = Image(height, width,(unsigned char*)data); - - const Shape pinnedshape(LandmarksAsShape(pinned)); - - Shape shape; // the shape with landmarks - Image face_roi; // img cropped to startshape area and maybe rotated - Shape pinned_roi; // pinned translated to ROI frame - DetPar detpar_roi; // detpar translated to ROI frame - DetPar detpar; // params returned by pseudo face det, in img frame - - PinnedStartShapeAndRoi(shape, face_roi, detpar_roi, detpar, pinned_roi, img, mods_g, pinnedshape); - - // now working with maybe flipped ROI and start shape in ROI frame - const int imod = ABS(EyawAsModIndex(detpar.eyaw, mods_g)); - - shape = mods_g[imod]->ModSearch_(shape, face_roi, &pinned_roi); // ASM search - - shape = RoiShapeToImgFrame(shape, face_roi, detpar_roi, detpar); - // now working with non flipped start shape in image frame - RoundMat(shape); - ForcePinnedPoints(shape, pinnedshape); // undo above RoundMat on pinned points - ShapeToLandmarks(landmarks, shape); - } - catch(...) - { - returnval = 0; // a call was made to Err or a CV_Assert failed - } - return returnval; -} - -const char* stasm_lasterr(void) // same as LastErr but not in stasm namespace -{ - return LastErr(); // return the last error message (stashed in sgErr) -} - -void stasm_force_points_into_image( // force landmarks into image boundary - float* landmarks, // io - int ncols, // in - int nrows) // in -{ - for (int i = 0; i < stasm_NLANDMARKS; i++) - { - landmarks[i * 2] = Clamp(landmarks[i * 2], 0.f, float(ncols-1)); - landmarks[i * 2 + 1] = Clamp(landmarks[i * 2 + 1], 0.f, float(nrows-1)); - } -} - -void stasm_convert_shape( // convert stasm_NLANDMARKS points to given number of points - float* landmarks, // io: return all points zero if can't do conversion - int nlandmarks) // in: see ConvertShape -{ - Shape newshape = ConvertShape(LandmarksAsShape(landmarks), nlandmarks); - if (newshape.rows) - ShapeToLandmarks(landmarks, newshape); - else // cannot convert, set all points to 0,0 - for (int i = 0; i < stasm_NLANDMARKS; i++) - landmarks[i * 2] = landmarks[i * 2 + 1] = 0; -} - -void stasm_printf( // print to stdout and to the stasm.log file if it is open - const char* format, // args like printf - ...) -{ - char s[SBIG]; - va_list args; - va_start(args, format); - VSPRINTF(s, format, args); - va_end(args); - lputs(s); -} diff --git a/3rdparty/stasm/CMakeLists.txt b/3rdparty/stasm4.0.0/CMakeLists.txt index c84e20e..1675828 100644 --- a/3rdparty/stasm/CMakeLists.txt +++ b/3rdparty/stasm4.0.0/CMakeLists.txt @@ -1,14 +1,10 @@ project(stasm) cmake_minimum_required(VERSION 2.8.6) -if(${CMAKE_VERSION} VERSION_GREATER 2.8.11) - cmake_policy(SET CMP0020 NEW) -endif() - # Global Settings set(CPACK_PACKAGE_NAME "Stasm") set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME}) -set(CPACK_PACKAGE_VERSION_MAJOR 4) +set(CPACK_PACKAGE_VERSION_MAJOR 3) set(CPACK_PACKAGE_VERSION_MINOR 1) set(CPACK_PACKAGE_VERSION_PATCH 0) set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") @@ -16,11 +12,13 @@ set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSIO # find the dependencies set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/Modules/") +# Find Qt 5.0.2 set(QT_DEPENDENCIES Concurrent Core Gui Network Sql Svg Widgets Xml) foreach(QT_DEPENDENCY ${QT_DEPENDENCIES}) find_package(Qt5${QT_DEPENDENCY}) endforeach() +# OpenCV 2.4.5 set(OPENCV_DEPENDENCIES calib3d core features2d flann gpu highgui imgproc ml nonfree objdetect photo video) find_package( OpenCV REQUIRED ) @@ -34,6 +32,18 @@ if(MSVC) endif() add_subdirectory(${PROJECT_SOURCE_DIR}/stasm) +if(MSVC) + add_library(stasm STATIC ${SOURCE}) +else() + add_library(stasm SHARED ${SOURCE}) +endif() + +qt5_use_modules(stasm ${QT_DEPENDENCIES}) +set(SOURCE ${SOURCE} PARENT_SCOPE) +target_link_libraries(stasm ${OpenCV_LIBS} ${Qt5Core_QTMAIN_LIBRARIES}) + +install(FILES ${HEADERS} DESTINATION include) +install(TARGETS stasm LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) # Package set(CPACK_BINARY_BUNDLE OFF) diff --git a/3rdparty/stasm/README.txt b/3rdparty/stasm4.0.0/README.txt index 47193b8..47193b8 100755 --- a/3rdparty/stasm/README.txt +++ b/3rdparty/stasm4.0.0/README.txt diff --git a/3rdparty/stasm4.0.0/data/README.txt b/3rdparty/stasm4.0.0/data/README.txt new file mode 100755 index 0000000..655fc64 --- /dev/null +++ b/3rdparty/stasm4.0.0/data/README.txt @@ -0,0 +1,42 @@ +The stasm/data directory holds copies of the OpenCV face and feature +detectors. It also holds a test face image taken from the BioID set. +The detectors were copied from OpenCV version 2.4.0 which has the +following license: + +IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. + + By downloading, copying, installing or using the software you agree to this license. + If you do not agree to this license, do not download, install, + copy or use the software. + + + License Agreement + For Open Source Computer Vision Library + +Copyright (C) 2000-2008, Intel Corporation, all rights reserved. +Copyright (C) 2008-2011, Willow Garage Inc., all rights reserved. +Third party copyrights are property of their respective owners. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * The name of the copyright holders may not be used to endorse or promote products + derived from this software without specific prior written permission. + +This software is provided by the copyright holders and contributors "as is" and +any express or implied warranties, including, but not limited to, the implied +warranties of merchantability and fitness for a particular purpose are disclaimed. +In no event shall the Intel Corporation or contributors be liable for any direct, +indirect, incidental, special, exemplary, or consequential damages +(including, but not limited to, procurement of substitute goods or services; +loss of use, data, or profits; or business interruption) however caused +and on any theory of liability, whether in contract, strict liability, +or tort (including negligence or otherwise) arising in any way out of +the use of this software, even if advised of the possibility of such damage. diff --git a/3rdparty/stasm/data/haarcascade_frontalface_alt2.xml b/3rdparty/stasm4.0.0/data/haarcascade_frontalface_alt2.xml index caa86f6..caa86f6 100755 --- a/3rdparty/stasm/data/haarcascade_frontalface_alt2.xml +++ b/3rdparty/stasm4.0.0/data/haarcascade_frontalface_alt2.xml diff --git a/3rdparty/stasm/data/haarcascade_mcs_lefteye.xml b/3rdparty/stasm4.0.0/data/haarcascade_mcs_lefteye.xml index 47103e5..47103e5 100755 --- a/3rdparty/stasm/data/haarcascade_mcs_lefteye.xml +++ b/3rdparty/stasm4.0.0/data/haarcascade_mcs_lefteye.xml diff --git a/3rdparty/stasm/data/haarcascade_mcs_righteye.xml b/3rdparty/stasm4.0.0/data/haarcascade_mcs_righteye.xml index 7ebd35e..7ebd35e 100755 --- a/3rdparty/stasm/data/haarcascade_mcs_righteye.xml +++ b/3rdparty/stasm4.0.0/data/haarcascade_mcs_righteye.xml diff --git a/3rdparty/stasm4.0.0/data/testface.jpg b/3rdparty/stasm4.0.0/data/testface.jpg new file mode 100755 index 0000000..a1a59a3 --- /dev/null +++ b/3rdparty/stasm4.0.0/data/testface.jpg diff --git a/3rdparty/stasm/doc/HISTORY.txt b/3rdparty/stasm4.0.0/doc/HISTORY.txt index c8af1cb..c8af1cb 100755 --- a/3rdparty/stasm/doc/HISTORY.txt +++ b/3rdparty/stasm4.0.0/doc/HISTORY.txt diff --git a/3rdparty/stasm/doc/LICENSE.txt b/3rdparty/stasm4.0.0/doc/LICENSE.txt index b4aeb33..b4aeb33 100755 --- a/3rdparty/stasm/doc/LICENSE.txt +++ b/3rdparty/stasm4.0.0/doc/LICENSE.txt diff --git a/3rdparty/stasm4.0.0/doc/fm29-medium-res.jpg b/3rdparty/stasm4.0.0/doc/fm29-medium-res.jpg new file mode 100755 index 0000000..4a06ff2 --- /dev/null +++ b/3rdparty/stasm4.0.0/doc/fm29-medium-res.jpg diff --git a/3rdparty/stasm4.0.0/doc/start_shape_call_tree.jpg b/3rdparty/stasm4.0.0/doc/start_shape_call_tree.jpg new file mode 100755 index 0000000..bae8498 --- /dev/null +++ b/3rdparty/stasm4.0.0/doc/start_shape_call_tree.jpg diff --git a/3rdparty/stasm4.0.0/doc/stasm_call_tree.jpg b/3rdparty/stasm4.0.0/doc/stasm_call_tree.jpg new file mode 100755 index 0000000..b7348f6 --- /dev/null +++ b/3rdparty/stasm4.0.0/doc/stasm_call_tree.jpg diff --git a/3rdparty/stasm4.0.0/stasm/CMakeLists.txt b/3rdparty/stasm4.0.0/stasm/CMakeLists.txt new file mode 100644 index 0000000..4b2414b --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/CMakeLists.txt @@ -0,0 +1,10 @@ +# Stasm CMakeLists + +file(GLOB HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/*.h") +file(GLOB HEADERS ${HEADERS} "${CMAKE_CURRENT_SOURCE_DIR}/MOD_1/*.h") + +file(GLOB SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp") +file(GLOB SOURCE ${SOURCE} "${CMAKE_CURRENT_SOURCE_DIR}/MOD_1/*.cpp") + +set(HEADERS ${HEADERS} PARENT_SCOPE) +set(SOURCE ${SOURCE} PARENT_SCOPE) \ No newline at end of file diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/README.txt b/3rdparty/stasm4.0.0/stasm/MOD_1/README.txt new file mode 100755 index 0000000..7f9b826 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/README.txt @@ -0,0 +1,4 @@ +MOD_1/README.txt +---------------- + +This directory contains the models for frontal-face-only version of Stasm. diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/classic/README.txt b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/README.txt new file mode 100755 index 0000000..8f25657 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/README.txt @@ -0,0 +1,3 @@ +These are machine generated fitness function files for classical 1D descriptors. + +milbo berea feb 2013 diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev0_p00.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev0_p00.mh index eb45bc1..bfa40b1 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev0_p00.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev0_p00.mh @@ -3,8 +3,6 @@ #ifndef STASM_CLASSIC_YAW00_LEV0_P00_MH #define STASM_CLASSIC_YAW00_LEV0_P00_MH -#include "classicdesc.h" - namespace stasm { // Generated from muct77_w09.asm diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev0_p01.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev0_p01.mh index 429f66d..429f66d 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev0_p01.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev0_p01.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev0_p02.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev0_p02.mh index 354831f..354831f 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev0_p02.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev0_p02.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev0_p03.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev0_p03.mh index 1460e68..1460e68 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev0_p03.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev0_p03.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev0_p04.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev0_p04.mh index 1645d77..1645d77 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev0_p04.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev0_p04.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev0_p05.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev0_p05.mh index c9a5567..c9a5567 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev0_p05.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev0_p05.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev0_p06.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev0_p06.mh index f9ee033..f9ee033 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev0_p06.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev0_p06.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev0_p07.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev0_p07.mh index 9106566..9106566 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev0_p07.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev0_p07.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev0_p08.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev0_p08.mh index 686c53d..686c53d 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev0_p08.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev0_p08.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev0_p09.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev0_p09.mh index 7aebbe1..7aebbe1 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev0_p09.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev0_p09.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev0_p10.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev0_p10.mh index 7b739eb..7b739eb 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev0_p10.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev0_p10.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev0_p11.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev0_p11.mh index fc24625..fc24625 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev0_p11.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev0_p11.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev0_p12.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev0_p12.mh index f537b5f..f537b5f 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev0_p12.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev0_p12.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev0_p13.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev0_p13.mh index c58a3b5..c58a3b5 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev0_p13.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev0_p13.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev0_p14.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev0_p14.mh index 417c400..417c400 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev0_p14.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev0_p14.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev0_p15.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev0_p15.mh index 329d748..329d748 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev0_p15.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev0_p15.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev1_p00.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev1_p00.mh index 23a0b54..23a0b54 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev1_p00.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev1_p00.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev1_p01.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev1_p01.mh index 6c4230e..6c4230e 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev1_p01.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev1_p01.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev1_p02.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev1_p02.mh index f862757..f862757 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev1_p02.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev1_p02.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev1_p03.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev1_p03.mh index 3494879..3494879 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev1_p03.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev1_p03.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev1_p04.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev1_p04.mh index d6db143..d6db143 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev1_p04.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev1_p04.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev1_p05.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev1_p05.mh index c203485..c203485 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev1_p05.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev1_p05.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev1_p06.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev1_p06.mh index 56c0f41..56c0f41 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev1_p06.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev1_p06.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev1_p07.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev1_p07.mh index e7cc815..e7cc815 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev1_p07.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev1_p07.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev1_p08.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev1_p08.mh index cd2b952..cd2b952 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev1_p08.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev1_p08.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev1_p09.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev1_p09.mh index 0dd5192..0dd5192 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev1_p09.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev1_p09.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev1_p10.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev1_p10.mh index 0d4caa0..0d4caa0 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev1_p10.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev1_p10.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev1_p11.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev1_p11.mh index 579d484..579d484 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev1_p11.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev1_p11.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev1_p12.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev1_p12.mh index 4edd03c..4edd03c 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev1_p12.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev1_p12.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev1_p13.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev1_p13.mh index 916d3dd..916d3dd 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev1_p13.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev1_p13.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev1_p14.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev1_p14.mh index 503e01f..503e01f 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev1_p14.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev1_p14.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev1_p15.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev1_p15.mh index 8ded96d..8ded96d 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev1_p15.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev1_p15.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev2_p00.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev2_p00.mh index c354852..c354852 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev2_p00.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev2_p00.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev2_p01.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev2_p01.mh index 209dfa9..209dfa9 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev2_p01.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev2_p01.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev2_p02.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev2_p02.mh index 4d6fb61..4d6fb61 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev2_p02.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev2_p02.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev2_p03.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev2_p03.mh index bde30cf..bde30cf 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev2_p03.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev2_p03.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev2_p04.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev2_p04.mh index 4d808b2..4d808b2 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev2_p04.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev2_p04.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev2_p05.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev2_p05.mh index 4f0ec49..4f0ec49 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev2_p05.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev2_p05.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev2_p06.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev2_p06.mh index 73f1ba5..73f1ba5 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev2_p06.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev2_p06.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev2_p07.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev2_p07.mh index 6c0315d..6c0315d 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev2_p07.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev2_p07.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev2_p08.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev2_p08.mh index 034d3d1..034d3d1 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev2_p08.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev2_p08.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev2_p09.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev2_p09.mh index e029ece..e029ece 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev2_p09.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev2_p09.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev2_p10.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev2_p10.mh index d644cf8..d644cf8 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev2_p10.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev2_p10.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev2_p11.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev2_p11.mh index 86e3758..86e3758 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev2_p11.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev2_p11.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev2_p12.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev2_p12.mh index a1e884d..a1e884d 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev2_p12.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev2_p12.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev2_p13.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev2_p13.mh index f0dab08..f0dab08 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev2_p13.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev2_p13.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev2_p14.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev2_p14.mh index 20dfabe..20dfabe 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev2_p14.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev2_p14.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev2_p15.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev2_p15.mh index cf3498a..cf3498a 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev2_p15.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev2_p15.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p00.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p00.mh index c741d7f..c741d7f 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p00.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p00.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p01.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p01.mh index 1a5cbaf..1a5cbaf 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p01.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p01.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p02.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p02.mh index 54b7d76..54b7d76 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p02.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p02.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p03.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p03.mh index 6f8bc49..6f8bc49 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p03.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p03.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p04.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p04.mh index 4002bd0..4002bd0 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p04.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p04.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p05.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p05.mh index 583aa14..583aa14 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p05.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p05.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p06.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p06.mh index 1bfe23a..1bfe23a 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p06.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p06.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p07.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p07.mh index becb761..becb761 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p07.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p07.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p08.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p08.mh index 27ba4fc..27ba4fc 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p08.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p08.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p09.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p09.mh index 9c0ac8b..9c0ac8b 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p09.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p09.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p10.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p10.mh index fe09e5d..fe09e5d 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p10.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p10.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p11.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p11.mh index ed20430..ed20430 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p11.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p11.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p12.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p12.mh index 3158073..3158073 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p12.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p12.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p13.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p13.mh index e1f8f5a..e1f8f5a 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p13.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p13.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p14.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p14.mh index faa82d8..faa82d8 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p14.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p14.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p15.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p15.mh index d6dc26f..d6dc26f 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p15.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p15.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p16.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p16.mh index 29b4837..29b4837 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p16.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p16.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p17.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p17.mh index a4515f9..a4515f9 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p17.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p17.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p18.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p18.mh index 6322405..6322405 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p18.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p18.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p19.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p19.mh index e389192..e389192 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p19.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p19.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p20.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p20.mh index 241166e..241166e 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p20.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p20.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p21.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p21.mh index c939b6b..c939b6b 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p21.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p21.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p22.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p22.mh index f7604ea..f7604ea 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p22.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p22.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p23.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p23.mh index d1805d4..d1805d4 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p23.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p23.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p24.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p24.mh index e6ae4e0..e6ae4e0 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p24.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p24.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p25.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p25.mh index 207f897..207f897 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p25.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p25.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p26.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p26.mh index 05a9d55..05a9d55 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p26.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p26.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p27.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p27.mh index 377a23b..377a23b 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p27.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p27.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p28.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p28.mh index 6d38e7c..6d38e7c 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p28.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p28.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p29.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p29.mh index 31b59e6..31b59e6 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p29.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p29.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p30.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p30.mh index 27c643b..27c643b 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p30.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p30.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p31.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p31.mh index 1c57454..1c57454 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p31.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p31.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p32.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p32.mh index d4846a2..d4846a2 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p32.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p32.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p33.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p33.mh index e70df0a..e70df0a 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p33.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p33.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p34.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p34.mh index 0da96fc..0da96fc 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p34.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p34.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p35.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p35.mh index 38d10d2..38d10d2 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p35.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p35.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p36.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p36.mh index bbda4ea..bbda4ea 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p36.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p36.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p37.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p37.mh index ebfa044..ebfa044 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p37.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p37.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p38.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p38.mh index 83274f6..83274f6 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p38.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p38.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p39.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p39.mh index 04f8c8e..04f8c8e 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p39.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p39.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p40.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p40.mh index 0a794ae..0a794ae 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p40.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p40.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p41.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p41.mh index fb5f717..fb5f717 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p41.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p41.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p42.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p42.mh index 326e9d0..326e9d0 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p42.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p42.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p43.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p43.mh index 5d66f49..5d66f49 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p43.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p43.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p44.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p44.mh index d75da7f..d75da7f 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p44.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p44.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p45.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p45.mh index a2df063..a2df063 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p45.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p45.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p46.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p46.mh index c867573..c867573 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p46.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p46.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p47.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p47.mh index ea0e0c3..ea0e0c3 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p47.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p47.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p48.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p48.mh index d77f050..d77f050 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p48.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p48.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p49.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p49.mh index 66d8af9..66d8af9 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p49.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p49.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p50.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p50.mh index adbe24f..adbe24f 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p50.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p50.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p51.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p51.mh index 063872c..063872c 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p51.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p51.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p52.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p52.mh index 40073fd..40073fd 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p52.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p52.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p53.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p53.mh index 4d96b5f..4d96b5f 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p53.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p53.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p54.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p54.mh index 638543a..638543a 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p54.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p54.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p55.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p55.mh index 6c7f8c7..6c7f8c7 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p55.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p55.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p56.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p56.mh index 71114d1..71114d1 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p56.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p56.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p57.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p57.mh index e802fa0..e802fa0 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p57.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p57.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p58.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p58.mh index a3362fe..a3362fe 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p58.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p58.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p59.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p59.mh index 2770496..2770496 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p59.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p59.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p60.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p60.mh index e701a74..e701a74 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p60.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p60.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p61.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p61.mh index 9f76940..9f76940 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p61.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p61.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p62.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p62.mh index 330856a..330856a 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p62.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p62.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p63.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p63.mh index ff24a00..ff24a00 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p63.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p63.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p64.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p64.mh index 0d212db..0d212db 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p64.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p64.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p65.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p65.mh index f159ed6..f159ed6 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p65.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p65.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p66.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p66.mh index 67e66af..67e66af 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p66.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p66.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p67.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p67.mh index d70a274..d70a274 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p67.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p67.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p68.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p68.mh index 9e3f59e..9e3f59e 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p68.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p68.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p69.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p69.mh index e1f796c..e1f796c 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p69.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p69.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p70.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p70.mh index 2998a9c..2998a9c 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p70.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p70.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p71.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p71.mh index 2baa63c..2baa63c 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p71.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p71.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p72.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p72.mh index 28fa123..28fa123 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p72.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p72.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p73.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p73.mh index 6e7af05..6e7af05 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p73.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p73.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p74.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p74.mh index a7952be..a7952be 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p74.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p74.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p75.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p75.mh index f97b34c..f97b34c 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p75.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p75.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p76.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p76.mh index 63be16b..63be16b 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/classic_yaw00_lev3_p76.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/classic_yaw00_lev3_p76.mh diff --git a/3rdparty/stasm/stasm/stasm/include/classic/yaw00_shapemodel.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/yaw00_shapemodel.mh index ef16f43..ef16f43 100755 --- a/3rdparty/stasm/stasm/stasm/include/classic/yaw00_shapemodel.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/classic/yaw00_shapemodel.mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/facedet.cpp b/3rdparty/stasm4.0.0/stasm/MOD_1/facedet.cpp new file mode 100755 index 0000000..a2e730a --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/facedet.cpp @@ -0,0 +1,219 @@ +// facedet.cpp: find faces in images (frontal model version) +// +// Copyright (C) 2005-2013, Stephen Milborrow + +#include "../stasm.h" + +namespace stasm +{ +typedef vector vec_DetPar; + +//static cv::CascadeClassifier facedet_g; // the face detector + +static double BORDER_FRAC = 0.1; // fraction of image width or height + // use 0.0 for no border + +//----------------------------------------------------------------------------- + +void FaceDet::OpenFaceDetector_( // called by stasm_init, init face det from XML file + const char* datadir, // in: directory of face detector files + void*) // in: unused (func signature compatibility) +{ + (void) datadir; + //OpenDetector(facedet_g, "haarcascade_frontalface_alt2.xml", datadir); +} + +// If a face is near the edge of the image, the OpenCV detectors tend to +// return a too-small face rectangle. By adding a border around the edge +// of the image we mitigate this problem. + +static Image EnborderImg( // return the image with a border + int& leftborder, // out: border size in pixels + int& topborder, // out: border size in pixels + const Image& img) // io +{ + Image bordered_img(img); + leftborder = cvRound(BORDER_FRAC * bordered_img.cols); + topborder = cvRound(BORDER_FRAC * bordered_img.rows); + copyMakeBorder(bordered_img, bordered_img, + topborder, topborder, leftborder, leftborder, + cv::BORDER_REPLICATE); + return bordered_img; +} + +void DetectFaces( // all face rects into detpars + vec_DetPar& detpars, // out + const Image& img, // in + int minwidth, + cv::CascadeClassifier cascade) // in: as percent of img width +{ + int leftborder = 0, topborder = 0; // border size in pixels + Image bordered_img(BORDER_FRAC == 0? + img: EnborderImg(leftborder, topborder, img)); + + // Detection results are very slightly better with equalization + // (tested on the MUCT images, which are not pre-equalized), and + // it's quick enough to equalize (roughly 10ms on a 1.6 GHz laptop). + + Image equalized_img; cv::equalizeHist(bordered_img, equalized_img); + + CV_Assert(minwidth >= 1 && minwidth <= 100); + + int minpix = MAX(100, cvRound(img.cols * minwidth / 100.)); + + // the params below are accurate but slow + static const double SCALE_FACTOR = 1.1; + static const int MIN_NEIGHBORS = 3; + static const int DETECTOR_FLAGS = 0; + + vec_Rect facerects = // all face rects in image + Detect(equalized_img, &cascade, NULL, + SCALE_FACTOR, MIN_NEIGHBORS, DETECTOR_FLAGS, minpix); + + // copy face rects into the detpars vector + + detpars.resize(NSIZE(facerects)); + for (int i = 0; i < NSIZE(facerects); i++) + { + Rect* facerect = &facerects[i]; + DetPar detpar; // detpar constructor sets all fields INVALID + // detpar.x and detpar.y is the center of the face rectangle + detpar.x = facerect->x + facerect->width / 2.; + detpar.y = facerect->y + facerect->height / 2.; + detpar.x -= leftborder; // discount the border we added earlier + detpar.y -= topborder; + detpar.width = double(facerect->width); + detpar.height = double(facerect->height); + detpar.yaw = 0; // assume face has no yaw in this version of Stasm + detpar.eyaw = EYAW00; + detpars[i] = detpar; + } +} + +// order by increasing distance from left marg, and dist from top marg within that + +static bool IncreasingLeftMargin( // compare predicate for std::sort + const DetPar& detpar1, // in + const DetPar& detpar2) // in +{ + return 1e5 * detpar2.x + detpar2.y > + 1e5 * detpar1.x + detpar1.y; +} + +// order by decreasing width, and dist from the left margin within that + +static bool DecreasingWidth( // compare predicate for std::sort + const DetPar& detpar1, // in + const DetPar& detpar2) // in +{ + return 1e5 * detpar2.width - detpar2.x < + 1e5 * detpar1.width - detpar1.x; + +} + +// Discard too big or small faces (this helps reduce the number of false positives) + +static void DiscardMissizedFaces( + vec_DetPar& detpars) // io +{ + // constants (TODO These have not yet been rigorously empirically adjusted.) + const double MIN_WIDTH = 1.33; // as fraction of median width + const double MAX_WIDTH = 1.33; // as fraction of median width + + if (NSIZE(detpars) >= 3) // need at least 3 faces + { + // sort the faces on their width (smallest first) so can get median width + sort(detpars.begin(), detpars.end(), DecreasingWidth); + const int median = cvRound(detpars[NSIZE(detpars) / 2].width); + const int minallowed = cvRound(median / MIN_WIDTH); + const int maxallowed = cvRound(MAX_WIDTH * median); + // keep only faces that are not too big or small + vec_DetPar all_detpars(detpars); + detpars.resize(0); + for (int iface = 0; iface < NSIZE(all_detpars); iface++) + { + DetPar* face = &all_detpars[iface]; + if (face->width >= minallowed && face->width <= maxallowed) + detpars.push_back(*face); + else if (trace_g || TRACE_IMAGES) + lprintf("[discard %d of %d]", iface, NSIZE(all_detpars)); + } + } +} + +#if TRACE_IMAGES // will be 0 unless debugging (defined in stasm.h) + +static void TraceFaces( // write image showing detected face rects + const vec_DetPar& detpars, // in + const Image& img, // in + const char* path) // in +{ + (void) detpars; + (void) img; + (void) filename; + + CImage cimg; cvtColor(img, cimg, CV_GRAY2BGR); // color image + for (int iface = 0; iface < NSIZE(detpars); iface++) + { + const DetPar &detpar = detpars[iface]; + + rectangle(cimg, + cv::Point(cvRound(detpar.x - detpar.width/2), + cvRound(detpar.y - detpar.height/2)), + cv::Point(cvRound(detpar.x + detpar.width/2), + cvRound(detpar.y + detpar.height/2)), + CV_RGB(255,255,0), 2); + + ImgPrintf(cimg, // 10 * iface to minimize overplotting + detpar.x + 10 * iface, detpar.y, 0xffff00, 1, ssprintf("%d", iface)); + } + + lprintf("%s\n", path); + if (!cv::imwrite(path, cimg)) + Err("Cannot write %s", path); +} + +#endif + +void FaceDet::DetectFaces_( // call once per image to find all the faces + const Image& img, // in: the image (grayscale) + const char*, // in: unused (match virt func signature) + bool multiface, // in: if false, want only the best face + int minwidth, // in: min face width as percentage of img width + void* user, // in: unused (match virt func signature) + cv::CascadeClassifier cascade) +{ + CV_Assert(user == NULL); + //CV_Assert(!facedet_g.empty()); // check that OpenFaceDetector_ was called + + DetectFaces(detpars_, img, minwidth, cascade); + DiscardMissizedFaces(detpars_); + if (multiface) // order faces on increasing distance from left margin + { + sort(detpars_.begin(), detpars_.end(), IncreasingLeftMargin); + } + else + { + // order faces on decreasing width, keep only the first (the largest face) + sort(detpars_.begin(), detpars_.end(), DecreasingWidth); + if (NSIZE(detpars_)) + detpars_.resize(1); + } + iface_ = 0; // next invocation of NextFace_ must get first face +} + +// Get the (next) face from the image. +// If no face available, return detpar.x INVALID. +// Eyes, mouth, and rot in detpar always returned INVALID. + +const DetPar FaceDet::NextFace_(void) +{ + DetPar detpar; // detpar constructor sets all fields INVALID + + if (iface_ < NSIZE(detpars_)) + detpar = detpars_[iface_++]; + + return detpar; +} + +} // namespace stasm diff --git a/3rdparty/stasm/stasm/stasm/include/facedet.h b/3rdparty/stasm4.0.0/stasm/MOD_1/facedet.h index 6c5eea4..101e250 100755 --- a/3rdparty/stasm/stasm/stasm/include/facedet.h +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/facedet.h @@ -5,8 +5,7 @@ #ifndef STASM_FACEDET_H #define STASM_FACEDET_H -#include "misc.h" -#include "print.h" +#include namespace stasm { @@ -29,16 +28,17 @@ public: void DetectFaces_( // call once per image to find all the faces const Image& img, // in: the image (grayscale) - const char* imgpath, // in: used only for debugging + const char* imgpath, // in: unused (match virt func signature) bool multiface, // in: if false, want only the best face int minwidth, // in: min face width as percent of img width void* user, - cv::CascadeClassifier cascade); + cv::CascadeClassifier cascade); // in: unused (match virt func signature) const DetPar NextFace_(void); // get next face from faces found by DetectFaces_ FaceDet() {} // constructor + private: vector detpars_; // all the valid faces in the current image diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/README.txt b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/README.txt new file mode 100755 index 0000000..c10872b --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/README.txt @@ -0,0 +1,3 @@ +These are machine generated fitness function files for HAT descriptors. + +milbo berea feb 2013 diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p16.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p16.mh index edef39c..b40c290 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p16.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p16.mh @@ -3,8 +3,6 @@ #ifndef stasm_hat_yaw00_lev0_p16_mh #define stasm_hat_yaw00_lev0_p16_mh -#include "hatdesc.h" - namespace stasm { // tasm -V1 /b/stasm/train/conf/tasm_muct77.conf diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p17.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p17.mh index 0f71e4b..0f71e4b 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p17.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p17.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p18.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p18.mh index fe1c662..fe1c662 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p18.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p18.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p19.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p19.mh index 8e3ad42..8e3ad42 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p19.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p19.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p20.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p20.mh index 3bc8e61..3bc8e61 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p20.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p20.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p21.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p21.mh index c5bfddc..c5bfddc 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p21.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p21.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p22.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p22.mh index 8e3eb64..8e3eb64 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p22.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p22.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p23.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p23.mh index 5d27d2a..5d27d2a 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p23.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p23.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p24.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p24.mh index e963cea..e963cea 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p24.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p24.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p25.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p25.mh index 2e06bdb..2e06bdb 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p25.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p25.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p26.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p26.mh index d67798e..d67798e 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p26.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p26.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p27.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p27.mh index c14733d..c14733d 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p27.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p27.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p28.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p28.mh index 66c51e8..66c51e8 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p28.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p28.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p29.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p29.mh index 16460bb..16460bb 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p29.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p29.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p30.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p30.mh index d311e9b..d311e9b 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p30.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p30.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p31.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p31.mh index 3862162..3862162 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p31.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p31.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p32.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p32.mh index f0267da..f0267da 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p32.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p32.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p33.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p33.mh index 9ba0094..9ba0094 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p33.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p33.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p34.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p34.mh index 32d9ea7..32d9ea7 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p34.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p34.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p35.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p35.mh index cda3afa..cda3afa 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p35.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p35.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p36.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p36.mh index cba5363..cba5363 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p36.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p36.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p37.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p37.mh index 059d97a..059d97a 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p37.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p37.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p38.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p38.mh index 3dae6f9..3dae6f9 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p38.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p38.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p39.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p39.mh index f69aac3..f69aac3 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p39.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p39.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p40.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p40.mh index 22a28ce..22a28ce 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p40.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p40.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p41.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p41.mh index d79e934..d79e934 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p41.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p41.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p42.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p42.mh index 56501b7..56501b7 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p42.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p42.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p43.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p43.mh index 70dfc65..70dfc65 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p43.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p43.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p44.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p44.mh index 0f55a9b..0f55a9b 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p44.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p44.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p45.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p45.mh index ec6ca2b..ec6ca2b 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p45.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p45.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p46.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p46.mh index f483477..f483477 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p46.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p46.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p47.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p47.mh index b8f259a..b8f259a 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p47.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p47.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p48.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p48.mh index 376b350..376b350 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p48.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p48.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p49.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p49.mh index 1c3e974..1c3e974 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p49.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p49.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p50.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p50.mh index 0726e51..0726e51 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p50.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p50.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p51.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p51.mh index 034e7e1..034e7e1 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p51.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p51.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p52.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p52.mh index 2a7a839..2a7a839 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p52.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p52.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p53.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p53.mh index 2acc330..2acc330 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p53.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p53.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p54.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p54.mh index a7266df..a7266df 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p54.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p54.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p55.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p55.mh index 0ad9404..0ad9404 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p55.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p55.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p56.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p56.mh index 24899f1..24899f1 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p56.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p56.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p57.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p57.mh index b8fa5ce..b8fa5ce 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p57.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p57.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p58.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p58.mh index 3e95624..3e95624 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p58.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p58.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p59.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p59.mh index 7bd0453..7bd0453 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p59.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p59.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p60.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p60.mh index a99e716..a99e716 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p60.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p60.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p61.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p61.mh index 2f11e84..2f11e84 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p61.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p61.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p62.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p62.mh index eece009..eece009 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p62.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p62.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p63.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p63.mh index 8c36743..8c36743 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p63.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p63.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p64.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p64.mh index 4caa5c9..4caa5c9 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p64.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p64.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p65.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p65.mh index 3ec6c56..3ec6c56 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p65.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p65.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p66.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p66.mh index d6a86b4..d6a86b4 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p66.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p66.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p67.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p67.mh index bc3c886..bc3c886 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p67.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p67.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p68.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p68.mh index 1aff8c0..1aff8c0 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p68.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p68.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p69.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p69.mh index 9019d3b..9019d3b 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p69.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p69.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p70.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p70.mh index 337b9cf..337b9cf 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p70.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p70.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p71.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p71.mh index f7a82e4..f7a82e4 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p71.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p71.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p72.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p72.mh index 0645143..0645143 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p72.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p72.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p73.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p73.mh index 8521fbf..8521fbf 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p73.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p73.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p74.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p74.mh index 207b2b7..207b2b7 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p74.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p74.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p75.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p75.mh index 029a09c..029a09c 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p75.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p75.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p76.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p76.mh index e81a7c6..e81a7c6 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev0_p76.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev0_p76.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p16.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p16.mh index 9f6261a..9f6261a 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p16.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p16.mh diff --git a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p17.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p17.mh index a1f3cce..a1f3cce 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat/hat_yaw00_lev1_p17.mh +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p17.mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p18.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p18.mh new file mode 100755 index 0000000..7f9a543 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p18.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p18.mh: + +#ifndef stasm_hat_yaw00_lev1_p18_mh +#define stasm_hat_yaw00_lev1_p18_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p18(const double* const d) // d has 160 elements +{ + const double intercept = -0.448753; + const double coef[160] = + { + -0.0498749, -0.0295384, -0.0622896, 0.0356942, -0.0292167, 0.0283713, 0.00836971, -0.0121596, + 0.0209972, 0.00382417, 0.050891, -0.0164777, 0.0242696, -0.00391463, -0.0277812, -0.0138764, + 0.072988, -0.0271966, -0.0908054, -0.0734843, -0.0604963, 0.0136477, -0.0727193, 0.0275438, + 0.0110599, 0.0588015, 0.00201384, 0.0164636, -0.00199381, 0.0922571, 0.0699612, 0.0217522, + -0.00142602, -0.00528477, 0.00603293, 0.0617398, -0.0417845, 0.0516238, -0.0569251, 0.0888432, + 0.0420806, 0.0498754, 0.0839362, 0.0110966, 0.0596055, 0.0101679, 0.00859569, -0.021343, + 0.0153672, -0.0383215, -0.0905357, -0.00618441, 0.0649987, -0.0654346, -0.0405493, 0.0329732, + -0.09689, 0.0202469, 0.0330359, 0.0379222, 0.179394, 0.0828963, 0.130292, 0.0730782, + -0.0308012, 0.108059, 0.0110634, -0.0114949, -0.084209, -0.0632223, 0.00555993, 0.00827395, + -0.0322704, 0.0254536, 0.0448415, -0.0122099, 0.0581972, -0.0255867, -0.00141774, -0.0369018, + -0.00161121, 0.00661957, -0.045868, -0.0756884, -0.0735135, -0.0600961, 0.0242683, -0.0197821, + 0.0745215, -0.0585634, -0.0179505, 0.0547213, -0.0345571, -0.025263, 0.0334299, 0.00947121, + 0.051453, 0.0639829, 0.0359268, 0.0210573, -0.0619948, -0.0628176, -0.0306752, -0.051822, + 0.0126318, -0.0452903, -0.01876, 0.00772562, -0.00129544, 0.0511064, -0.0106129, -0.00556659, + 0.0426059, 0.032925, 0.0212555, 0.0334898, -0.0357824, -0.00509332, 0.0150316, 0.00836535, + 0.0260177, 0.0158509, 0.0215553, 0.0268927, 0.0590347, 0.0190613, 0.0199399, -0.0514828, + -0.00742887, -0.0419478, 0.00628358, 0.0638355, -0.00724743, 0.0347969, -0.00623699, -0.0583069, + -0.0161296, -0.037127, 0.0168519, 0.0147875, -0.00326895, 0.0385574, -0.0158858, 0.0614535, + -0.0200043, 0.00139308, 0.013431, -0.0543626, 0.0576407, -0.0165498, -0.0840573, 0.0222336, + 0.0296575, -0.00278878, 0.00448438, -0.00359893, 0.0102988, 0.106763, 0.090092, 0.0431567 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p18(hatfit_yaw00_lev1_p18); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p18_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p19.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p19.mh new file mode 100755 index 0000000..5fbe7a2 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p19.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p19.mh: + +#ifndef stasm_hat_yaw00_lev1_p19_mh +#define stasm_hat_yaw00_lev1_p19_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p19(const double* const d) // d has 160 elements +{ + const double intercept = -0.262195; + const double coef[160] = + { + 0.0570257, 0.0367344, -0.0570711, -0.011802, -0.0167134, 0.101382, -0.0180198, 0.00963814, + -0.0279159, 0.00725883, -0.0390742, -0.0731636, -0.0300552, 0.0610662, -0.0564866, -0.00215811, + 0.0331278, -0.0245061, -0.0190675, 0.0308108, 0.0597088, -0.0582475, 0.0068199, -0.0045789, + 0.0112172, -0.0042283, -0.0460313, -0.0683531, 0.0490784, 0.0357457, 0.0513087, 0.065163, + 0.0120269, 0.0846221, -0.0103265, 0.0475844, 0.00477526, 0.0399056, 0.0540089, -0.0564785, + -0.07569, -0.0260325, -0.0242496, -0.0162332, -0.01269, 0.0115391, 0.144577, 0.0917523, + -0.0031184, 0.0494672, 0.0600518, 0.0757492, 0.0268476, -0.0358991, -0.0714125, -0.0217126, + -0.0619601, 0.00266571, 0.0342395, 0.0499819, 0.0149065, -0.0327131, -0.0215528, -0.0440197, + -0.0420585, -0.0419247, 0.0676071, 0.0562871, -0.00336289, -0.0189186, -0.0412871, -0.063268, + -0.0263585, -0.139443, 0.050477, -0.0565013, -0.0138931, 0.00646753, 0.0454679, 0.0638653, + 0.00880726, 0.0693776, -0.00639578, 0.0123959, -0.0768389, 0.0366207, -0.0836684, -0.0324729, + -0.000682837, 0.0349943, 0.000274644, -0.00886348, 0.00739915, 0.00832502, 0.0206392, -0.0190099, + 0.0570095, 0.033442, -0.00262595, 0.0070713, 0.00129516, 0.0143729, 0.0452677, 0.00304362, + 0.00623422, 0.0423643, 0.00203898, -0.0335307, 0.0291394, -0.0161017, 0.00515308, 0.0344269, + 0.00664613, -0.020668, -0.0448438, 0.0866967, 0.0269182, 0.0468494, 0.0656892, 0.00646981, + -0.0383485, -0.00762912, -0.0750351, 0.0130538, 0.0269591, -0.0112271, -0.0624056, 0.0493525, + 0.0296482, -0.0213624, 0.0267932, 0.0117763, -0.0091476, 0.0151417, -0.00320312, 0.0152537, + -0.0114015, -0.00710413, 0.00773785, -0.00463671, -0.034757, 0.0182189, 0.0225663, 0.0463874, + 0.0323866, 0.0080666, 0.0581044, 0.0524154, 0.0108156, -0.0567258, -0.0227012, -0.048997, + 0.0646889, -0.0463338, -0.0283976, -0.0935714, 0.0225522, -0.0529328, 0.11244, -0.0702994 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p19(hatfit_yaw00_lev1_p19); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p19_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p20.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p20.mh new file mode 100755 index 0000000..3288679 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p20.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p20.mh: + +#ifndef stasm_hat_yaw00_lev1_p20_mh +#define stasm_hat_yaw00_lev1_p20_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p20(const double* const d) // d has 160 elements +{ + const double intercept = -0.40301; + const double coef[160] = + { + -0.044357, 0.065885, -0.100565, -0.0292176, 0.0431703, 0.0559038, 0.0422983, 0.0677039, + 0.0111116, 0.0543616, -0.00831535, 0.0316774, -0.0405766, 0.0545119, 0.0547792, 0.00707303, + -0.0118569, 0.0359603, 0.000738419, -0.00720546, 0.0159878, -0.0454474, -0.00219371, -0.0321887, + -0.00711376, -0.0118625, -0.031807, 0.0318091, 0.0721441, -0.00390437, 0.000654461, -0.00217822, + 0.0136697, -0.0564804, -0.0142228, 0.0489046, 0.0135339, 0.0265044, 0.0836901, -0.0131859, + 0.0193591, -0.0579067, 0.143029, 0.0854465, -0.0273751, -0.0743443, -0.00470803, -0.0470495, + 0.0284289, -0.0908781, -0.0390148, 0.0216415, 0.0237698, -0.00135428, 0.0883609, 0.0570308, + -0.0190371, 0.0543571, -0.0426702, -0.0233553, -0.062339, -0.0680657, -0.0296903, 0.0182473, + -0.0275637, 0.031327, 0.0632576, -0.0441019, -0.0551259, -0.0493404, -0.0933736, 0.0139715, + 0.0351187, 0.201519, 0.109671, -0.0436287, 0.0343854, 0.0617872, 0.00231902, 0.131171, + -0.0447616, 0.0471011, -0.0241846, -0.130945, -0.00283226, 0.0292567, -0.0124652, 0.00699345, + -0.00646692, 0.00169924, 0.0120173, 0.0392728, -0.027388, 0.0654505, 0.0643972, -0.0154942, + -0.0480685, -0.0210734, -0.0285767, 0.0874262, 0.0749026, 0.0901079, 0.0342709, -0.0234091, + 0.0509444, -0.014923, -0.0252291, 0.0453003, 0.0172163, -0.0234517, 0.0583706, -0.00834267, + -0.128634, -0.0329519, 0.0279247, -0.0235598, -0.00885352, -0.0981358, -0.0500313, -0.0635172, + 0.0233945, -0.051642, -0.0143921, 0.0752504, 0.0105108, -0.022365, 0.0275288, -0.0364368, + 0.0413996, -0.0392726, 0.0157608, -0.0648484, 0.0178105, -0.0352664, 0.0258897, -0.0719777, + 0.0267576, 0.019921, 0.000531101, 0.00717289, -0.0355602, -0.0040235, 0.0217799, -0.0267584, + -0.00189987, 0.0767193, 0.0513729, 0.0696818, 0.0447269, -0.00696514, 0.0455562, 0.0813045, + -0.0438993, 0.0213466, -0.0743853, 0.0140133, 0.0300957, 0.042562, -0.0818879, 0.0010326 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p20(hatfit_yaw00_lev1_p20); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p20_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p21.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p21.mh new file mode 100755 index 0000000..4c3a4f9 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p21.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p21.mh: + +#ifndef stasm_hat_yaw00_lev1_p21_mh +#define stasm_hat_yaw00_lev1_p21_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p21(const double* const d) // d has 160 elements +{ + const double intercept = -0.360611; + const double coef[160] = + { + -0.0436506, -0.054941, -0.00971474, 0.0521024, 0.00206954, 0.0185906, -0.00413247, -0.024137, + -0.0462877, -0.04999, -0.0126494, -0.0039948, 0.0150353, 0.0313915, 0.0540088, -0.0256915, + -0.128476, -0.0262562, 0.0509892, 0.00366824, -0.00866948, 0.0298188, -0.00831123, 0.0105693, + -0.0529987, -0.0259216, -0.00600078, -0.0230685, 0.0339906, 0.0307667, -0.0178926, 0.0698492, + 0.0722452, -0.0227056, -0.00609198, 0.0519129, 0.0620325, 0.0588752, 0.00577859, 0.00438022, + 0.0282987, 0.0421252, 0.0104122, -0.018805, -0.102164, -0.0445192, -0.0648688, 0.0809432, + 0.0950726, 0.117475, 0.0853208, 0.0458148, -0.0171331, 0.0300579, -0.0406555, 0.0118699, + 0.0976135, 0.0484639, -0.033011, 0.0899271, 0.0202407, 0.0261913, -0.00930254, 0.0461875, + 0.0378907, -0.0493307, -0.0274167, -0.0190517, -0.0107293, -0.0157886, 0.0123958, 0.0879697, + 0.00302485, 0.0109669, -0.0332263, -0.0316753, -0.0598432, -0.0198672, 0.0300908, -0.0590955, + -0.0598014, -0.0300721, -0.0144178, 0.00587939, -0.0163208, -0.010562, 0.0622535, -0.0122884, + -0.0888054, 0.00986846, 0.0480497, -0.0690815, 0.0316751, -0.0658706, -0.017178, 2.19983e-05, + -0.031337, 0.12937, 0.00135608, 0.00324541, -0.0383022, -0.0209004, 0.012759, -0.0579081, + -0.022554, -0.0243307, -0.161701, -0.0383884, -0.0341709, 0.0256652, 0.0349183, 0.0408659, + -0.0589702, 0.0420497, 0.069216, 0.0258794, 0.0283805, -0.0236499, -0.00459621, 0.0139046, + 0.0328212, 0.0585561, 0.0112508, 0.0231436, 0.0542301, -0.00382625, 0.045863, 0.0514639, + -0.00793891, -0.0151828, -0.0451044, 0.00866035, -0.0408645, 0.00331327, -0.080927, -0.085434, + 0.0547401, 0.0158916, 0.0294454, 0.0202408, 0.0291153, 0.0326214, 0.0244101, 0.0986617, + 0.0364547, -0.0604266, 0.0127313, -0.0474485, 0.0555188, 0.0124198, -0.0257955, 0.0798925, + 0.124739, -0.0247137, 0.0450575, 0.0279182, -0.005408, 0.00205407, -0.0160856, -0.0509189 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p21(hatfit_yaw00_lev1_p21); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p21_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p22.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p22.mh new file mode 100755 index 0000000..81d362c --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p22.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p22.mh: + +#ifndef stasm_hat_yaw00_lev1_p22_mh +#define stasm_hat_yaw00_lev1_p22_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p22(const double* const d) // d has 160 elements +{ + const double intercept = -0.283461; + const double coef[160] = + { + 0.113408, 0.028207, 0.0103549, -0.0219927, 0.0431519, 0.00919302, -0.0021129, 0.0822461, + -0.0605805, -0.0288046, 0.00869981, 0.00197979, -0.091122, 0.00543819, -0.0875602, -0.0096333, + -0.0140809, -0.00180853, 0.0272279, -0.0408326, -0.108702, 0.0415715, 0.057489, 0.0631665, + 0.0449359, 0.00809672, -0.0378282, -0.040463, -0.0505169, -0.0300831, 0.0435633, -0.0196153, + 0.0188522, 0.0430165, -0.013274, -0.00146621, -0.0787595, -0.0382562, 0.00339013, -0.0244168, + -0.109492, -0.0534605, 0.0150209, 0.00353936, 0.0185733, -0.0188727, 0.0288706, -0.044357, + 0.0503095, 0.0649049, -0.0550787, -0.0715569, 0.0863819, 0.0590576, 0.00904189, 0.051242, + 0.0460924, 0.0585139, -0.0128731, 0.064008, 0.0780372, 0.0710941, 0.0145533, 0.0773075, + -0.0980892, 0.0193442, 0.0810367, 0.13997, 0.0733226, 0.0512428, -0.103792, 0.0650737, + -0.0728885, -0.012266, 0.023387, -0.00658721, 0.0246795, 0.0391211, -0.0425422, -0.0452243, + 0.0327159, -0.00046799, -0.00746934, 0.041174, -0.0191744, -0.00525241, 0.00667091, -0.044836, + -0.0405409, -0.106829, -0.153472, -0.00257772, -0.0275851, 0.0490619, 0.0456676, 0.0148601, + -0.0409661, 0.0154871, 0.0948287, 0.105885, -0.0128939, -0.0611814, -0.00809154, -0.0978214, + 0.0252439, -0.0215762, -0.0285384, -0.018451, -0.0553872, -0.0160569, 0.00576589, -0.109376, + -0.00953276, -0.0124028, -0.00071097, -0.00153849, -0.043606, -0.0358039, 0.0836616, 0.0602529, + 0.0487441, 0.0265395, 0.0409188, 0.00543898, 0.0838617, -0.0281679, -0.0813627, 0.00686685, + -0.0205098, -0.0206478, -0.0149907, -0.0498131, 0.0185005, 0.0928399, 0.0517432, -0.00931367, + 0.0553956, -0.000987589, 0.0256532, 0.0190481, 0.0120548, 0.0256755, -0.0056007, 0.0773276, + -0.0299009, 0.0231982, -0.0541054, -0.0363423, -0.00481595, -0.0450222, -0.0591807, 0.0140353, + 0.0115709, 0.051797, 0.00671813, 0.060524, 0.0404935, 0.0628342, 0.0301882, -0.0445167 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p22(hatfit_yaw00_lev1_p22); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p22_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p23.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p23.mh new file mode 100755 index 0000000..ce9f12c --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p23.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p23.mh: + +#ifndef stasm_hat_yaw00_lev1_p23_mh +#define stasm_hat_yaw00_lev1_p23_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p23(const double* const d) // d has 160 elements +{ + const double intercept = -0.130233; + const double coef[160] = + { + 0.0472834, 0.00781718, 0.00785787, 0.0540163, -0.026445, 0.116213, -0.0237177, 0.0424393, + 0.0187807, -0.024349, -0.0246988, 0.0576934, 0.0111652, 0.0538067, -0.121513, 0.0500683, + -0.00359233, -0.0209018, -0.00154044, 0.0619222, 0.0839956, 0.070999, -0.0467736, 0.0184966, + 0.00613903, 0.00382141, -0.0737772, 0.00515294, -0.00382716, 0.0400579, 0.00606548, 0.0256581, + 0.0594181, 0.0186452, 0.0815342, 0.0398505, 0.00194601, 0.0017904, -0.0349286, 0.106442, + -0.018651, 0.00312345, -0.0059111, -0.0568959, -0.0328872, -0.148534, 0.104767, 0.0236835, + 0.00637615, 0.0115255, 0.0801526, -0.00868843, 0.00586364, -0.10412, -0.0490881, -0.0593897, + -0.00372443, 0.00618455, 0.0371041, -0.0521332, -0.00660873, -0.0285671, 0.131414, -0.0504068, + -0.0296972, -0.0634493, 0.0637341, -0.0350294, 0.0066418, -0.00762099, -0.0144002, -0.0300104, + -0.0378424, -0.0719849, -0.0839801, -0.0249018, -0.0853061, 0.0688983, 0.103192, -0.0620734, + 0.0151431, 0.0111592, -0.0657549, 0.0352495, 0.0105818, 0.246062, 0.0820122, 0.0520822, + 0.0462958, 0.0629337, 0.0883106, 0.0716172, -0.073364, -0.0192448, -0.109873, -0.0512651, + -0.0390072, -0.00551202, -0.0114683, 0.0342657, 0.0128699, 0.0191531, -0.0255654, 0.0133674, + 0.0513161, 0.0279945, -0.0674543, -0.00280994, 0.0383715, -0.0308886, 0.101607, 0.102294, + -0.00181516, 0.0832472, 0.0175008, 0.0196384, 0.0216818, -0.070902, -0.0207262, 0.0160676, + -0.0254123, -0.0816697, 0.0283321, 0.125951, -0.0731279, 0.0101732, -0.0494108, 0.00338782, + -0.051712, 0.0155175, 0.0158018, -0.0212249, -0.00432322, -0.0379499, -0.0358608, -0.00421285, + 0.0108169, 0.0207882, -0.0720815, -0.0455948, -0.0374766, -0.049237, 0.0186335, 0.0110743, + -0.0458633, 0.0435132, 0.0137485, -0.0760113, 0.0111323, -0.00146219, 0.0642206, -0.0233832, + -0.0129117, -0.0448585, 0.0893718, -0.0306933, -0.00994433, 0.0235545, -0.0486931, -0.0471647 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p23(hatfit_yaw00_lev1_p23); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p23_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p24.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p24.mh new file mode 100755 index 0000000..04fbd78 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p24.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p24.mh: + +#ifndef stasm_hat_yaw00_lev1_p24_mh +#define stasm_hat_yaw00_lev1_p24_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p24(const double* const d) // d has 160 elements +{ + const double intercept = -0.209957; + const double coef[160] = + { + 0.0329241, 0.0204195, -0.0457593, 0.0501425, -0.00613224, 0.00723748, 0.00753633, -0.00218967, + 0.0567324, 0.0279709, 0.044728, 0.00627779, 0.0202298, 0.00300185, -0.0439539, 0.0484225, + 0.0599061, -0.0229727, -0.0046023, -0.0425072, -0.0265741, -0.0402482, -0.0184064, -0.0400436, + 0.129868, 0.0186916, -0.0187492, -0.0279144, -0.00644049, -0.0152003, -0.019119, 0.0695958, + -0.0579541, 0.0241296, 0.0301872, -0.0184226, -0.0375482, 0.00369089, -0.067679, 0.0316725, + -0.055719, -0.0459733, 0.130253, 0.0100149, 0.0523362, -0.0390752, 0.049506, -0.0562703, + -0.0882681, -0.0460667, -0.0540077, -0.0063019, 0.00833983, -0.0356212, 0.0579247, -0.0667233, + -0.0917908, -0.0543343, -0.0344169, -0.0230161, -0.00531222, 0.0843524, 0.07836, 0.0221333, + -0.139507, 0.007516, 0.0603828, 0.0806264, 0.0404374, -0.00715456, 0.088454, 0.0628061, + 0.0829363, -0.0348646, -0.0190776, 0.00782911, 0.0738113, 0.0218468, -0.133212, -0.109976, + 0.0430187, 0.0600624, -0.0250504, 0.0394135, -0.105551, 0.0274974, 0.0425897, 0.0730274, + 0.0721941, 0.0543258, -0.00415248, -0.0637805, -0.0302164, 0.0400649, -0.0335531, 0.0165375, + 0.0569047, 0.0575467, 0.0384013, 0.0282555, -0.0193094, 0.0499828, -0.10377, 0.0923725, + 0.018542, -0.0432079, -0.0109277, 0.00175565, -0.028568, 0.0184082, -0.0969235, 0.0896471, + -0.0161893, 0.0327373, -0.004733, 0.00905427, -0.0520759, 0.0635459, 0.152796, 0.000308197, + -0.0354366, -0.00113181, 0.061364, -0.128608, 0.00421285, -0.0287593, 0.0243545, -0.052208, + 0.000375558, -0.0167535, 0.00873265, 0.0752245, 0.00744216, -0.0119389, 0.0225206, -0.0189916, + -0.0253872, 0.00905674, -0.00873364, 0.00526114, 0.0448877, -0.0580581, 0.00681423, -0.0637524, + -0.0370372, -0.0561434, -0.00836047, 0.0433733, -0.0140024, 0.000233554, 0.00309609, -0.0161593, + 0.0248977, 0.0330903, 0.0336645, 0.0216872, 0.0263714, 0.072331, -0.0283138, 0.0637294 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p24(hatfit_yaw00_lev1_p24); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p24_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p25.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p25.mh new file mode 100755 index 0000000..8efc458 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p25.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p25.mh: + +#ifndef stasm_hat_yaw00_lev1_p25_mh +#define stasm_hat_yaw00_lev1_p25_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p25(const double* const d) // d has 160 elements +{ + const double intercept = -0.343956; + const double coef[160] = + { + 0.00760984, 0.00677376, -0.0254998, -0.0180962, -0.0163319, 0.0787102, -0.0501463, 0.109694, + 0.0324034, 0.0167922, -0.0197681, 0.0290643, -0.0292062, 0.0780218, 0.0643669, 0.0284101, + -0.0255905, -0.0887582, -0.00245165, 0.000299687, 0.0577481, 0.0246098, -0.0493255, 0.0317641, + 0.0699807, 0.00365498, -0.0248711, -0.0952788, -0.0441012, -0.00877127, -0.030372, 0.025457, + 0.00123633, 0.00568069, 0.0530734, 0.0160453, -0.0228293, -0.0383732, -0.0202062, 0.00138904, + -0.0311672, -0.0647133, -0.011528, 0.0200126, -0.0633424, -0.0168273, 0.01839, -0.0474396, + 0.0407186, 0.0366202, 0.0856484, 0.190433, 0.0179868, 0.00304538, 0.0494411, -0.0136479, + 0.111389, 0.0899019, -0.0682664, -0.0100893, -0.06274, 0.0846425, 0.0863926, 0.0344789, + -0.00408501, -0.0395417, -0.0479772, 0.0403961, 0.0353354, 0.0277053, -0.0834275, -0.0522247, + 0.0280733, 0.0182633, 0.0412811, 0.030988, 0.0378751, -0.029654, 0.0410781, -0.0249082, + 0.00416055, 0.018964, 0.0161914, 0.0459608, 0.0419443, 0.000767701, 0.00510756, 0.0379706, + -0.0847118, -0.00462727, -0.00259532, -0.0472359, 0.019949, -0.015067, -0.0199384, -0.00995159, + -0.0998395, 0.0710568, 0.0364557, 0.0287091, 0.0888186, -0.0355493, -0.041063, -0.0758328, + -0.0759168, -0.0295297, -0.0642619, -0.030304, 0.0497545, 0.0141481, 0.0492566, -0.00652294, + -0.0226196, -0.0498264, -0.0234137, -0.0373272, -0.00606085, -0.00196313, -0.0231809, -0.0233476, + -0.00804062, 0.0100827, -0.0173219, 0.010049, 0.0315197, 0.0323537, 0.113683, 0.111685, + 0.050072, -0.0252066, 0.0313543, -0.0228036, -0.0584108, 0.0153078, -0.0722343, -0.0497144, + 0.0357457, 0.0532115, -0.0072414, -0.0434428, -0.035532, -0.00558749, -0.0402508, 0.0592584, + 0.0665029, 0.0417867, 0.00392788, -0.0309772, 0.00040911, -0.0210691, 0.0148444, 0.0146238, + 0.0102926, 0.0166917, 0.0144286, 0.0537487, 0.000804561, -0.0208786, -0.0339195, 0.0450666 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p25(hatfit_yaw00_lev1_p25); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p25_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p26.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p26.mh new file mode 100755 index 0000000..be11363 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p26.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p26.mh: + +#ifndef stasm_hat_yaw00_lev1_p26_mh +#define stasm_hat_yaw00_lev1_p26_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p26(const double* const d) // d has 160 elements +{ + const double intercept = -0.258416; + const double coef[160] = + { + -0.00350965, -0.00176727, 0.0280615, 0.100582, 0.0516356, -0.014299, 0.0969119, 0.0611335, + 0.0505389, -0.0141772, -0.072076, -0.0704732, 0.0288541, 0.0270603, 0.0417463, 0.012438, + -0.026474, 0.0106418, -0.0192412, 0.00922146, -0.0171761, 0.000301015, -0.0321873, -0.0131573, + 0.0106071, -0.0488669, -0.0599012, 0.0174829, 0.025597, -0.0133362, -0.104343, 0.184658, + 0.00435425, -0.0187789, -0.0399474, 0.0455359, -0.0288366, 0.0699611, 0.0333399, -0.0800692, + 0.0122853, 0.00344305, 0.0364898, -0.151364, -0.0852088, -0.00178568, 0.0316897, -0.0305154, + 0.00425055, 0.0301504, 0.0282844, -0.0151934, -0.0699295, -0.0299469, 0.0155334, -0.0324951, + 0.0297988, 0.0744955, 0.0666288, 0.0450893, -0.0617183, -0.0574214, -0.0496704, -0.0188076, + -0.0436869, -0.0200248, 0.0252562, 0.0178969, -0.047149, 0.00292977, -0.062868, -0.0842954, + 0.043477, 0.0700997, -0.00511285, 0.00301757, -0.0417495, 0.0746707, 0.129842, 0.0575271, + -0.0194383, 0.0668798, -0.0348481, -0.0217796, 0.0407116, 0.00766602, 0.0684383, 0.00838842, + 0.00132244, -0.0290873, 0.0186756, 0.0560339, 0.0317368, 0.045016, 0.0153503, 0.0255243, + -0.0127486, -0.0204903, -0.0369487, 0.0489509, 0.076522, 0.0118913, 0.0292849, 0.0308702, + 0.0262609, 0.00018022, -0.00272539, 0.00638587, -0.00702837, -0.0447886, -0.00564197, 0.0424315, + -0.0743288, -0.00477299, 0.0350454, 0.0938537, 0.0271551, 0.0364917, -0.0451706, 0.0142219, + 0.0136303, -0.0614797, -0.0208402, -0.0323582, 0.0512702, -0.0464986, 0.0845153, -0.00519982, + -0.0139982, 0.0406294, 0.0316932, -0.0047094, -0.00554515, -0.00944887, -0.057371, -0.0618004, + -0.0259082, 0.0238172, 0.0214687, -0.0108454, -0.00737554, 0.0388521, 0.0486423, -0.015575, + -0.0425036, -0.0370336, -0.0227926, 0.0054459, -0.00637709, 0.0188067, 0.0420747, 0.0616357, + 0.0455921, 0.0453217, -0.0197868, -0.0337423, 0.00859838, 0.00324809, -0.110627, -0.0217408 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p26(hatfit_yaw00_lev1_p26); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p26_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p27.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p27.mh new file mode 100755 index 0000000..555f46f --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p27.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p27.mh: + +#ifndef stasm_hat_yaw00_lev1_p27_mh +#define stasm_hat_yaw00_lev1_p27_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p27(const double* const d) // d has 160 elements +{ + const double intercept = -0.27113; + const double coef[160] = + { + 0.0659569, 0.0464331, -0.103289, -0.0413934, -0.0712755, 0.0346774, 0.0776075, 0.00796679, + 0.0563323, 0.0349391, 0.00432435, 0.0186805, -0.0227768, -0.0411882, 0.0180095, -0.0299084, + -0.00206588, 0.0248174, 0.00940869, 0.0292864, 0.036919, -0.0294685, 0.0153051, -0.00761443, + 0.0207946, -0.020588, -0.0167524, 0.0681632, 0.0617253, -0.0113329, 0.0781032, 0.120613, + 0.0584448, 0.00895681, -0.0797661, 0.0199725, -0.091961, 0.0210085, -0.0103899, -0.0277577, + -0.0227788, -0.0613546, 0.129852, 0.213951, 0.0422787, 0.13874, -0.00840513, 0.0306937, + -0.0819338, -0.0682186, -0.000161617, 0.0264743, -0.0361697, -0.00122901, -0.0812425, -0.0483864, + -0.0367527, 0.00506988, -0.0264522, 0.028902, -0.0366666, 0.0396858, -0.0272568, -0.0785532, + -0.0198807, 0.0610862, -0.025964, -0.14049, -0.00583712, 0.0220212, 0.0874111, -0.0149439, + -0.0559577, 0.00576425, 0.140836, 0.0080078, 0.0273005, -0.0369856, -0.00886448, -0.0916488, + 0.0144509, 0.0354737, 0.0483817, -0.0442041, -0.131503, -0.0762792, -0.0897255, -0.127158, + 0.0441685, 0.0695112, -0.074735, -0.0137479, 0.0393981, -0.00539789, 0.128842, 0.0522683, + 0.0255804, 0.047649, -0.00367784, -0.0202382, 0.00898913, -0.0726423, 0.0113562, 0.11802, + -0.0330782, -0.0250013, 0.0268071, 0.0255662, -0.0229084, 0.0101128, 0.0254925, 0.0043954, + 0.0369233, -0.0643779, -0.032985, 0.0624686, -0.0150503, 0.0408147, -0.0230252, 0.0894271, + -0.0239848, 0.0469918, -0.0968045, -0.0127922, -0.0347748, 0.0538083, -0.115578, 0.00181725, + -0.012524, 0.0620152, 0.0521556, 0.0723663, 0.0223458, 0.0462425, 0.0593311, -0.0103422, + 0.0260298, -0.0407782, 0.0141628, 0.0185399, 0.0204076, -0.028273, 0.0340808, -0.0169075, + 0.0207457, -0.00554604, -0.0227777, -0.0297453, 0.0190428, -0.042317, 0.0355453, -0.0367405, + -0.0275647, 0.0482755, 0.0201301, -0.03366, 0.024693, -0.02327, 0.00295774, -0.0371129 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p27(hatfit_yaw00_lev1_p27); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p27_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p28.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p28.mh new file mode 100755 index 0000000..935c0d0 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p28.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p28.mh: + +#ifndef stasm_hat_yaw00_lev1_p28_mh +#define stasm_hat_yaw00_lev1_p28_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p28(const double* const d) // d has 160 elements +{ + const double intercept = -0.367265; + const double coef[160] = + { + -0.0491177, 0.0231859, -0.0192595, 0.0330815, -0.0576877, 0.0225005, -0.0189693, -0.073541, + -0.0359155, 0.0280567, 0.058852, -0.021962, -0.0898127, 0.00992803, -0.105721, -0.0758356, + -0.0399572, -0.00768943, -0.00834162, -0.0527198, -0.00505285, 0.0574883, 0.0495735, 0.0353355, + 0.00565149, -0.0138252, 0.0275444, -0.0166165, -0.0180696, 0.0225599, 0.00422979, 0.0218285, + 0.0106431, -0.00438759, -0.0253353, 0.0531471, -0.00232429, 0.0125946, -0.0443213, 0.0380441, + 0.0545565, -0.0245121, -0.0243301, -0.0125267, 0.00408049, 0.0140579, 0.0684684, 0.0430101, + 0.0634023, 0.0491572, 0.00547892, -0.00679154, 0.0471163, -0.0927548, 0.0349607, 0.144998, + 0.0668455, 0.0199738, 0.0526352, -0.0139169, 0.0229871, -0.054652, -0.0295048, -0.00122264, + 0.015289, 0.0322566, 0.0218405, 0.0401696, 0.0214872, 0.00197294, -0.010518, -0.0242283, + -0.0318135, -0.00595729, 0.0123801, -0.064379, -0.0093272, -0.047988, 0.0772107, -0.0524223, + -0.0844024, -0.000671938, -0.0151113, -0.0149563, -0.0036049, 0.083559, -0.0754542, -0.0956407, + -0.035109, -0.0375144, 0.0130195, -0.0312299, -0.0114591, 0.055766, 0.120315, -0.0705052, + -0.09633, -0.011542, 0.0518571, 0.00872181, 0.0032912, -0.103982, 0.0191252, 0.000668796, + -0.0401536, -0.0493773, 0.0168348, 0.01139, 0.00740454, 0.039254, -0.0362172, 0.02814, + 0.014249, 0.0354089, -0.0336193, -0.0126663, -0.0140059, 0.0756294, 0.0198288, 0.0730499, + -0.0297365, 0.16755, 0.0359386, 0.111478, -0.0208914, 0.0188063, -0.041303, 0.0697762, + 0.0757622, -0.134472, 0.0145896, 0.133626, 0.109506, -0.00747391, 0.0592377, -0.0418491, + 0.158857, -0.0764913, -0.0324145, -0.0740956, -0.0123833, 0.021435, 0.0274086, 0.0530061, + -0.0218357, 0.158698, -0.0228227, -0.102267, -0.0387576, -0.0172159, -0.0725893, -0.113119, + -0.0698103, -0.0334452, 0.0718383, 0.153521, 0.0144299, 0.0119134, 0.0590488, 0.0985707 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p28(hatfit_yaw00_lev1_p28); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p28_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p29.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p29.mh new file mode 100755 index 0000000..443c0bf --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p29.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p29.mh: + +#ifndef stasm_hat_yaw00_lev1_p29_mh +#define stasm_hat_yaw00_lev1_p29_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p29(const double* const d) // d has 160 elements +{ + const double intercept = -0.424705; + const double coef[160] = + { + -0.0101392, 0.0594769, -0.0503994, -0.0217849, -0.0176289, 0.0145377, -0.0522176, 0.00121116, + 0.00360008, -0.0637196, 0.0524819, 0.00122919, 0.00585721, 0.0379185, 0.0118428, 0.0235596, + -0.00853191, -0.0297745, -0.0191564, 0.0336039, -0.0503812, -0.018574, 0.0527383, 0.0650683, + -0.0243727, -0.0434241, 0.00644921, -0.0300497, 0.00796432, -0.0536368, -0.0621528, 0.0279038, + -0.00738354, 0.0727482, 0.0549024, 0.0158414, -0.0583833, -0.0326461, -0.0674633, 0.0371455, + -0.00235584, -0.115486, 0.0571597, 0.0360401, 0.0540954, -0.0771664, 0.0161136, -0.035354, + 0.0430979, 0.0319481, 0.0163812, 0.0243459, 0.0489217, 0.0122026, 0.0135831, -0.000182662, + 0.0122186, -0.00370179, 0.0199094, -0.00179121, 0.0482769, 0.0688446, -0.0269516, -0.12388, + -0.00352889, 0.0219264, -0.00611725, 0.0666546, 0.0573278, 0.107485, 0.106329, -0.0893211, + -0.0891537, -0.0652508, -0.0010934, -0.00372103, 0.0410134, -0.00465645, 0.0239861, 0.0364478, + 0.0299715, 0.0630202, -0.0419831, -0.0686255, -0.0778967, 0.0467799, 0.0227674, 0.0657124, + 0.027953, 0.0426046, 0.0358549, -0.0399428, -0.0516945, 0.00788335, -0.00547867, -0.048281, + -0.0345903, -0.0463522, 0.0183776, -0.0318859, -0.0904243, -0.0961235, 0.071241, -0.0241751, + 0.0132324, 0.0117648, 0.0641096, 0.0415856, -0.00481538, -0.07176, 0.0348739, 0.107626, + 0.0708185, 0.0693277, -0.0641239, -0.0530838, -0.0661927, 0.0143412, -0.0828503, 0.0556659, + -0.142306, 0.110705, -0.0279635, 0.149666, -0.0350018, 0.0168867, 0.0640467, 0.0316187, + 0.0633347, -0.158517, 0.1008, 0.0477829, 0.111661, -0.0384688, -0.0385956, -0.0884942, + 0.092242, -0.028367, -0.0673696, -0.0897616, 0.061894, 0.10119, 0.0367397, 0.0390003, + 0.00781926, 0.135441, -0.000614327, -0.0771375, -0.107391, 0.0188102, -0.0536738, -0.0515374, + -0.0620133, -0.0284957, 0.0837494, 0.185942, 0.135109, -0.0251174, 0.0389205, 0.114206 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p29(hatfit_yaw00_lev1_p29); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p29_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p30.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p30.mh new file mode 100755 index 0000000..57b0c46 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p30.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p30.mh: + +#ifndef stasm_hat_yaw00_lev1_p30_mh +#define stasm_hat_yaw00_lev1_p30_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p30(const double* const d) // d has 160 elements +{ + const double intercept = -0.0531596; + const double coef[160] = + { + -0.116102, -0.0172225, 0.0454119, -0.0262966, -0.0207222, -0.0427532, 0.103657, 0.02224, + 0.0453501, -0.0014315, -0.0386289, -0.0456763, -0.0244043, 0.0208895, -0.0248768, 0.0451056, + -0.0245413, 0.0127505, 0.0329261, -0.00134255, -0.0140381, -0.0259175, -0.0684072, -0.0488436, + -0.0394765, -0.0451636, -0.0680844, -0.0211025, -0.00292934, 0.0674798, -0.00288135, 0.0395926, + 0.00930007, 0.0408055, 0.0158728, -0.0368503, -0.00486911, 0.0206787, -0.0960855, 0.0674777, + 0.146507, 0.0597985, -0.0785504, -0.0352399, -0.0553251, 0.0498531, -0.0510412, -0.05066, + -0.0637962, 0.0197599, 0.0860904, 0.19492, 0.16902, -0.0177371, 0.0311064, 0.0233502, + 0.0702246, 0.0475911, -0.09766, -0.0689293, -0.00937745, 0.00158015, 0.113499, 0.129597, + 0.0206268, 0.0119381, 0.0850598, 0.015194, -0.0276467, -0.0842619, 0.00383884, -0.00787932, + 0.016834, 3.43563e-05, 0.0220212, 0.0351324, -0.013533, 0.00399515, -0.0409508, -0.0654589, + -0.032318, 0.0819506, -0.0245304, -0.127415, -0.0202418, 0.00750139, 0.103719, 0.027766, + -0.00622414, -0.0615687, 0.0384051, -0.00782071, -0.109777, -0.0693072, -0.030324, -0.0384596, + -0.0193364, -0.0411026, 0.113159, 0.0408849, -0.0170671, 0.0279579, -0.0372294, -0.0214017, + 0.0114996, 0.0578027, -0.0615514, 0.0152347, 0.0460153, 0.111419, 0.0514752, 0.0416284, + -0.00200971, -0.00390233, -0.0450069, -0.023482, 0.0194326, -0.0105444, -0.0657913, -0.0614153, + -0.00685912, -0.0665019, -0.0477235, 0.0210051, 0.0345011, 0.0562563, 0.0548732, 0.00697098, + -0.0315075, -0.0138438, 0.00567381, -0.0284875, 0.00999239, -0.00871022, -0.0646768, -0.0581475, + -0.0023445, 0.0307289, -0.0300773, -0.0644101, 0.012134, -0.0145632, -0.0152647, 0.0761716, + -0.0944007, -0.00998309, 0.0451726, 0.0128116, 0.025647, -0.0153354, -0.0149689, 0.0425286, + 0.00340354, 0.0453019, -0.0248344, 0.0279366, -0.0537908, -0.00810353, -0.0232331, -0.0725048 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p30(hatfit_yaw00_lev1_p30); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p30_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p31.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p31.mh new file mode 100755 index 0000000..f3392ae --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p31.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p31.mh: + +#ifndef stasm_hat_yaw00_lev1_p31_mh +#define stasm_hat_yaw00_lev1_p31_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p31(const double* const d) // d has 160 elements +{ + const double intercept = -0.388448; + const double coef[160] = + { + 0.0395692, -0.000582387, 0.0396386, 0.00866431, 0.0319535, 0.0041876, -0.0354922, -0.0104189, + -0.0310756, -0.0246819, 0.0131718, 0.0140588, -0.0118571, 0.0396711, 0.00573793, -0.0420841, + -0.0392253, 0.00435255, 0.0107915, 0.0484352, 0.069234, 0.0120039, -0.0142504, -0.0481674, + -0.0288146, -0.0300535, 0.0359163, 0.0134041, 0.0314277, -0.0117238, 0.0785214, 0.0631591, + -0.0130544, -0.0264549, -0.05275, -0.012083, 0.0545285, 0.00115459, -0.0312022, 0.0219239, + -0.0323945, -0.0122762, 0.015471, -0.0308729, -0.0539241, -0.0488238, 0.12595, -0.111672, + -0.0124925, 0.00426807, 0.0116804, -0.00775668, 0.039259, -0.0806952, 0.061823, 0.0456183, + 0.0410691, 0.0470852, 0.0510043, -0.00393638, -0.0729619, -0.0124941, 0.0428558, 0.122023, + 0.0525826, 0.0228482, -0.0453305, -0.0276555, -0.0690039, 0.00233118, -0.0920037, -0.011254, + -0.0476996, -0.00179941, -0.00906979, -0.0290895, 0.00247007, 0.0122311, -0.0150106, -0.0317769, + 0.099511, -0.102523, 0.0281903, 0.0553347, 0.119371, 0.0605233, -0.0784847, 0.0330739, + 0.0753692, 0.0859453, -0.0625154, -0.0926569, -0.0918532, 0.109675, -0.0501109, 0.0111423, + -0.049514, 0.0157422, 0.0406392, 0.105897, 0.038947, -0.0269157, -0.0732481, -0.134709, + -0.0132958, -0.0224088, 0.0157976, 0.0838067, 0.120186, 0.0517959, 0.105812, 0.130127, + 0.0182283, 0.052454, -0.0116218, -0.0192446, -0.0667099, -0.0212154, 0.0318632, -0.00745494, + 0.00943903, -0.0745027, 0.0762356, -0.00904315, -0.017699, -0.0561609, 0.0252819, 0.00907982, + -0.0613076, 0.0518035, 0.0243614, -0.0599225, 0.0215072, 0.00576192, 0.00735767, -0.0274716, + 0.0246765, 0.0444133, -0.000244459, -0.0395511, -0.0331652, -0.0164145, 0.0816089, 0.0400588, + -0.0199769, -0.102558, -0.0129884, -0.0170645, -0.0686559, -0.0387113, -0.0817568, -0.0127845, + -0.00316126, 0.0933731, 0.0331108, 0.0268358, 0.0409501, 0.0787449, 0.0206058, 0.0677994 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p31(hatfit_yaw00_lev1_p31); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p31_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p32.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p32.mh new file mode 100755 index 0000000..a76f1ee --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p32.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p32.mh: + +#ifndef stasm_hat_yaw00_lev1_p32_mh +#define stasm_hat_yaw00_lev1_p32_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p32(const double* const d) // d has 160 elements +{ + const double intercept = -0.320639; + const double coef[160] = + { + -0.00911108, -0.0479156, -0.00740632, -0.012859, 0.0309539, 0.00489859, -0.00624756, -0.020108, + 0.0677567, -0.0155136, 0.0678659, 0.00147824, 0.0438044, 0.00549171, 0.0268882, -0.00297623, + 0.0467355, -0.000569183, 0.0496245, 0.014699, 0.0616936, 0.00263958, -0.0395147, -0.0297785, + 0.0126961, -0.00781382, 0.000625079, 0.0178607, 0.0226246, 0.0655686, 0.0337088, -0.0304876, + -0.0257202, -0.0219612, -0.0213103, 0.0194326, 0.0577388, -0.0477398, 0.0466768, 0.0194634, + 0.0182962, -0.0162236, -0.00055095, -0.0110111, -0.0190531, -0.0274738, -0.0244005, 0.066355, + -0.0631781, 0.0319185, 0.00377789, 0.00719412, -0.0578098, 0.0220575, -0.0130465, -0.0338156, + -0.0718547, -0.0406409, -0.0248472, -0.0471251, -0.0763616, -0.0305719, 0.0872795, -0.04342, + -0.0291223, 0.0174219, 0.0140269, 0.0152528, -0.00418056, -0.0340391, 0.0826187, 0.0677038, + 0.0170003, -0.00907442, -0.0291512, -0.0377432, -0.0488433, 0.0483225, -0.100243, 0.034457, + -0.106342, 0.12952, 0.0241453, 0.0446246, -0.0607043, 0.0811712, 0.0895215, -0.0504978, + 0.122301, -0.0768722, 0.0214746, -0.0429019, 0.0439603, -0.0422063, 0.0225263, -0.0368518, + 0.0926311, 0.02738, -0.0239644, 0.0229243, 0.0579599, 0.0101616, -0.00726972, -0.000649471, + 0.0135215, 0.0385566, 0.0175664, -0.0460473, -0.050476, 0.0167167, -0.040066, 0.0147113, + -0.00118741, 0.042841, 0.0631771, 0.145191, 0.0466015, -0.0373302, 0.0596687, 0.106164, + 0.0088616, 0.0634729, -0.0771898, 0.0459812, 0.0167569, -0.0705409, -0.0386409, 0.112283, + -0.0571554, -0.168199, 0.0226604, 0.034943, 0.0155652, 0.0234396, -0.0123834, 0.00107804, + 0.0273647, 0.033714, 0.0945813, -0.0809198, 0.0404793, 0.0308191, -0.00997607, -0.0276745, + 0.0276755, 0.0481048, -0.101447, -0.0905513, -0.0451026, 0.0491422, 0.0664234, -0.0265713, + -0.040285, -0.0443237, 0.0464626, 0.0769965, 0.0259644, -0.0342793, -0.0543196, -0.0928784 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p32(hatfit_yaw00_lev1_p32); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p32_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p33.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p33.mh new file mode 100755 index 0000000..36a056d --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p33.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p33.mh: + +#ifndef stasm_hat_yaw00_lev1_p33_mh +#define stasm_hat_yaw00_lev1_p33_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p33(const double* const d) // d has 160 elements +{ + const double intercept = -0.0187845; + const double coef[160] = + { + 0.0128283, -0.055128, 0.010886, -0.0231225, -0.0305408, 0.00461099, 0.0104216, 0.0271656, + -0.00228586, 0.0483301, -0.0136487, 0.0271316, 0.0564309, -0.0270776, 0.043211, -0.0112379, + 0.0231918, -0.0112949, 0.036762, -0.00612861, -0.00486995, -0.0342318, -0.0290889, -0.0106391, + 0.000312558, 0.0285837, 0.0235095, -0.028434, 0.00831803, 0.0265148, -0.050084, -0.0117228, + 0.00236049, -0.041693, -0.026685, 0.0302716, 0.00699107, 0.0666115, 0.037568, -0.003785, + -0.0251941, 0.0411825, -0.122721, -0.0247136, -0.0390895, 0.0417399, -0.0253207, -0.0118569, + -0.0162393, -0.0527942, 0.0783038, -0.00984112, -0.0233633, -0.000284128, -0.0400959, 0.0280783, + -0.0313475, 0.0260252, 0.00081784, -0.00324565, -0.0279781, 0.044135, 0.040844, 0.0306354, + 0.0187744, -0.0480202, 0.00757192, -0.00948626, -0.0589132, -0.0367085, 0.0597323, -0.108456, + -0.0430326, -0.0269714, 0.0392287, -0.00913477, 0.0286522, -0.137626, 0.0983528, 0.0694479, + 0.0673885, -0.0641448, 0.0966714, 0.0478503, 0.0526654, 0.105189, 0.0627519, -0.00105678, + -0.0623832, 0.134875, -0.0582099, -0.0352066, -0.0525147, 0.00990412, 0.0244933, 0.0171214, + 0.0367176, -0.0621222, 0.0158906, 0.0668107, -0.0107779, -0.0596686, -0.0566563, -0.0810594, + 0.0323834, 0.0121392, 0.0145543, -0.00650743, 0.114811, 0.0771221, -0.0600683, 0.0573055, + 0.0851473, 0.0814111, -0.0693027, -0.0160514, -0.0557765, 0.096182, -0.0552072, -0.0662288, + -0.029029, -0.0104541, 0.00859579, -0.0230395, -0.00224977, -0.0723467, -0.113479, -0.0628757, + 0.0067731, -0.000458681, -0.0301224, -0.00614874, -0.0341254, 0.00474058, 0.0300139, 0.0479876, + -0.0236848, -0.0624128, -0.0471116, 0.0415574, 0.0389746, 0.00909709, 0.102794, 0.0861245, + -0.0197406, -0.0237167, 0.164457, -0.0215144, -0.0320249, -0.0882093, -0.0687686, -0.0792362, + -0.0391014, 0.0326003, -0.031806, -0.111365, 0.0365271, 0.00928061, 0.0847804, 0.066844 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p33(hatfit_yaw00_lev1_p33); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p33_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p34.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p34.mh new file mode 100755 index 0000000..e1812de --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p34.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p34.mh: + +#ifndef stasm_hat_yaw00_lev1_p34_mh +#define stasm_hat_yaw00_lev1_p34_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p34(const double* const d) // d has 160 elements +{ + const double intercept = 0.178305; + const double coef[160] = + { + 0.0332668, -0.0545706, -0.0397769, -0.102727, -0.0513047, -0.0280496, 0.0212568, 0.100975, + 0.0147986, 0.0945098, 0.0225728, 0.0163496, -0.0706498, 0.0135124, -0.0338867, -0.00292602, + -0.0117578, -0.0228322, -0.0991631, -0.0196783, -0.0715382, -0.0609741, -0.0451959, -0.00996876, + -0.0218956, 0.0405813, 0.0512725, -0.0304816, -0.0346735, 0.0410437, -0.0599454, 0.0278405, + -0.00430012, -0.0515526, 0.0408474, -0.0180384, -0.0375938, -0.050297, 0.0854439, -0.065132, + -0.0480776, -0.00851022, -0.0311825, -0.0125235, 0.10003, 0.0265117, -0.0932129, -0.0905405, + -0.0179596, -0.0783844, 0.0545748, 0.0983039, 0.112361, 0.103802, 0.000276691, -0.000181198, + 0.0260529, 0.0539351, 0.0215641, -0.0677932, 0.000667061, 0.145442, 0.129529, -0.000832013, + -0.0467681, 0.0241408, 0.0423294, 0.121797, -0.0189404, -0.12473, -0.00636875, -0.0269607, + 0.0997501, -0.0567658, -0.0953586, -0.0093058, 0.0775357, 0.0544267, -0.0465235, -0.0602757, + 0.0582786, -0.0635637, -0.027749, -0.0187748, -0.0546626, -0.149418, 0.043224, 0.0541148, + 0.0228059, 0.0306246, 0.00155719, -0.0412755, 0.032523, -0.0587637, -0.0013374, 0.0502265, + -0.0342482, 0.038831, 0.110763, -0.0240828, -0.0316851, -0.083598, -0.0966767, 0.00540257, + 0.0175222, -0.0453235, -0.0782324, 0.0424939, 0.0441882, -0.00707829, 0.0587061, 0.0676098, + -0.0898869, -0.0279974, 0.112122, -0.0175998, 0.0104283, -0.00582047, 0.00140559, 0.0392947, + -0.0652298, 0.0749545, 0.0544736, 0.0131598, 0.0152306, 0.0831729, -0.0200888, -0.0612296, + -0.0401844, -0.0736851, -0.079223, 0.0341835, -0.0466979, 0.0652963, -0.0215782, 0.0160373, + -0.00665171, 0.0425585, -0.0160073, 0.0448272, 0.00451256, 0.00694954, -0.00332655, -0.00627149, + -0.0135419, 0.00919265, 0.0027794, -0.00835187, -0.0440384, 0.0110796, -0.000867199, -0.00321809, + 0.0543303, -0.0137353, -0.0224532, -0.0320376, -0.0150772, 0.00407994, 0.0127847, -0.0176401 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p34(hatfit_yaw00_lev1_p34); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p34_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p35.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p35.mh new file mode 100755 index 0000000..b04fecc --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p35.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p35.mh: + +#ifndef stasm_hat_yaw00_lev1_p35_mh +#define stasm_hat_yaw00_lev1_p35_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p35(const double* const d) // d has 160 elements +{ + const double intercept = -0.128463; + const double coef[160] = + { + 0.0548922, -0.0110683, -0.142114, -0.061709, -0.0739904, 0.0729181, 0.00372399, -0.0401665, + -0.0617821, 0.0601517, 0.0413927, -0.0297843, -0.0801413, 0.00486967, 0.0463089, 0.0182653, + 0.0368233, -0.00796331, 0.00955545, -0.0470071, -0.0327957, -0.0484237, 0.00205177, -0.0591226, + 0.0825365, 0.0521992, 0.00709222, 0.0413314, 0.026715, 0.0396009, 0.05337, -0.0870864, + 0.0624343, -0.0520468, 0.0297113, 0.0155546, 0.0373713, -0.0259624, -0.00302342, 0.0722519, + -0.012865, -0.0359395, 0.201415, 0.0834435, 0.131066, 0.0488908, -0.0165508, -0.0287044, + -0.0236077, 0.0360244, -0.0465815, 0.0298103, -0.0507475, -0.0381212, -0.00291925, 0.066679, + -0.0280296, -0.116999, -0.0653786, 0.138842, 0.135875, 0.00553319, 0.0729103, 0.0155418, + -0.0202042, -0.0540844, 0.101567, -0.051419, 0.0423417, 0.0287684, -0.123131, 0.0581658, + 0.0604602, 0.113075, -0.0644531, -0.0664801, -0.0592592, 0.0547968, 0.0039087, -0.0837654, + -0.0117236, 0.0236007, -0.146423, -0.0754925, -0.0932447, -0.0715713, -0.0024796, 0.001342, + 0.00909714, 0.0537925, -0.0105599, -0.0726132, -0.0738913, 0.023578, 0.0422188, -0.0206054, + 0.0173315, 0.0659782, 0.0403875, 1.06256e-05, -0.0569155, -0.00761777, 0.00587271, 0.0149728, + -0.0151301, 0.0470131, 0.0320093, 0.0175039, -0.0121165, -0.051231, 0.0608582, -0.0104416, + -0.0912704, 0.00771752, 0.0291578, -0.0629806, 0.0279452, -0.0162268, -0.0166928, 0.0858329, + -0.0414572, -0.00935215, -0.00984813, 0.0352476, 0.0321423, 0.0210393, -0.0371691, 0.0191584, + -0.0362629, -0.0497132, 0.00950301, 0.0912439, 0.0447469, 0.0326298, -0.0463132, 0.0560467, + 0.0252251, -0.0729444, -0.00413866, -0.0123862, 0.0247588, -0.0158056, 0.017215, -0.0253207, + 0.0436535, -0.0472254, 0.0386084, -0.0160216, 0.00108055, 0.00200998, 0.0146819, 0.00212591, + 0.0759401, -0.0456016, 0.0433273, -0.0109767, 0.00185021, 0.0298317, -0.018552, -0.128413 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p35(hatfit_yaw00_lev1_p35); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p35_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p36.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p36.mh new file mode 100755 index 0000000..9902dcf --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p36.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p36.mh: + +#ifndef stasm_hat_yaw00_lev1_p36_mh +#define stasm_hat_yaw00_lev1_p36_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p36(const double* const d) // d has 160 elements +{ + const double intercept = -0.1457; + const double coef[160] = + { + -0.0564536, 0.0914242, 0.00271123, -0.00182844, -0.0633129, -0.00733241, 0.0999422, -0.0477681, + 0.0764352, -0.0870852, -0.0486103, -0.0607736, -0.000435941, 0.00508668, -0.00500671, -0.0702268, + 0.128733, 0.0442575, 0.00878972, 0.0700395, 0.0473909, 0.0543005, -0.0111132, 0.013342, + 0.0205181, -0.0355777, -0.0151112, -0.0472716, -0.0856515, -0.0205877, -0.052943, -0.0136666, + 0.0069465, -0.0149346, -0.011358, 0.12753, 0.0984476, -0.0389193, 0.0579468, 0.0582624, + -0.0110768, 0.0444154, 0.00744086, 0.0866081, 0.0722389, -0.0573269, 0.0403181, 0.0920937, + -0.0364049, -0.115042, -0.00983702, 0.0596673, 0.0885667, 0.0310721, 0.00586564, 0.0468913, + -0.017122, -0.000325935, 0.0991339, -0.116244, -0.00667895, -0.0376603, -0.0678163, -0.0170879, + 0.0636697, 0.176845, -0.0927495, -0.091466, -0.0301194, 0.0528387, 0.0603075, 0.0012436, + -0.023938, 0.0278906, 0.172167, 0.0984494, 0.0194545, -0.024253, 0.0253562, -0.0318126, + -0.0194975, -0.0336116, -0.0267596, -0.0570041, -0.114461, 0.049068, -0.0356616, -0.0641071, + -0.00190114, 0.0505992, 0.0442466, 0.0142396, 0.00045172, 0.00117748, 0.064219, 0.00253523, + -0.0195815, -0.0274017, -0.0863983, -0.00886134, 0.030472, 0.0307451, 0.0463506, 0.0257106, + -0.0510129, -0.0619829, 0.0429726, 0.00240901, 0.0356966, 0.0180151, 0.0145302, 0.0191548, + -0.00199986, -0.0803635, -0.0330699, -0.0717274, -0.111292, -0.0742702, -0.0968331, -0.0140921, + -0.00389644, -0.0145533, 0.0115622, 0.0453926, 0.0300503, -0.0389438, -0.0292711, 0.0364436, + 0.0649299, -0.0437214, 0.0145625, -0.0366767, -0.00301135, -0.0164178, 0.0228936, -0.0039428, + 0.0138233, -0.059277, 0.0865879, -0.0358495, 0.0105995, -0.00712132, -0.0193304, -0.0165668, + 0.030437, -0.0192797, -0.0634831, -0.010421, -0.0251347, 0.0561532, 0.0426267, -0.0252875, + -0.0555928, 0.101112, 0.0649617, 0.0141765, 0.0842734, 0.00376744, -0.076665, -0.0297095 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p36(hatfit_yaw00_lev1_p36); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p36_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p37.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p37.mh new file mode 100755 index 0000000..f2343ca --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p37.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p37.mh: + +#ifndef stasm_hat_yaw00_lev1_p37_mh +#define stasm_hat_yaw00_lev1_p37_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p37(const double* const d) // d has 160 elements +{ + const double intercept = -0.210055; + const double coef[160] = + { + 0.0950493, -0.00935139, 0.01181, 0.0394899, 0.0811007, 0.0275117, 0.0722424, -0.0881804, + 0.0348525, -0.0485876, -0.0160258, -0.0341514, -0.0305043, 0.0101718, -0.015857, 0.0402802, + -0.0377945, -0.0019027, 0.072919, 0.0842745, 0.000222965, -0.0380939, -0.0246376, -0.00424166, + 0.0194486, -0.0349667, -0.0273841, 0.0305295, 0.0636758, 0.00705299, 0.0305668, 0.0398521, + -0.118265, -0.0584037, -0.10794, -0.0415925, -0.0515304, -0.0127716, -0.0253359, -0.0407751, + 0.0420787, -0.148058, 0.0641812, 0.0268058, 0.0528418, -0.0247641, -0.0671391, 0.0818132, + 0.0311401, 0.128031, -0.0883229, -0.153532, -0.0651225, 0.034562, -0.00306306, -0.0456042, + 0.0944498, 0.100044, -0.000950214, 0.0151305, -0.0213224, -0.00808936, 0.0587715, -0.0295509, + -0.0385254, 0.034971, 0.0858179, 0.0599195, 0.0747935, -0.0450389, 0.00131876, 0.0261896, + 0.169738, 0.154491, 0.100171, 0.012634, -1.95869e-05, 0.0209616, 0.0390095, 0.102296, + -0.0308072, 0.0561644, 0.0242179, 0.0230298, -0.0307823, -0.00846482, 0.0667324, -0.0606024, + -0.0581933, -0.0114812, -0.0133874, -0.0071245, 0.0813445, 0.0274338, 0.0280443, 0.0464938, + -0.0905175, -0.0693952, 0.00853314, -0.00178364, -0.0380305, 0.00459273, 0.0106825, 0.0111277, + -0.0120436, -0.117429, -0.0235661, -0.0397598, -0.101663, -0.0520093, -0.0944389, 0.000748769, + -0.11383, -0.000200208, -0.0660839, -0.0318683, 0.00202877, 0.0629289, 0.0393827, -0.0105708, + 0.0631688, -0.108595, 0.0667351, -0.0726672, 0.0300087, -0.00349452, 0.00734037, 0.031999, + 0.0497461, 0.00735207, 0.00306494, 0.014219, -0.0212763, 0.00729894, 0.0156232, -0.0397873, + 0.0196028, 0.0102293, -0.0297117, -0.0220887, 0.011573, 0.0196214, -0.0306056, -0.0356663, + 0.0183344, 0.0707345, 0.0325791, -0.00904613, 0.0610273, 0.0230972, -0.0134933, -0.00580341, + -0.00179494, 0.0261325, 0.0439199, 0.0950851, 0.0437041, -0.0344384, -0.0711167, 0.0268441 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p37(hatfit_yaw00_lev1_p37); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p37_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p38.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p38.mh new file mode 100755 index 0000000..73ca407 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p38.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p38.mh: + +#ifndef stasm_hat_yaw00_lev1_p38_mh +#define stasm_hat_yaw00_lev1_p38_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p38(const double* const d) // d has 160 elements +{ + const double intercept = 0.00825774; + const double coef[160] = + { + 0.020407, 0.00890872, -0.0169787, -0.00204599, 0.00584481, 0.00639558, -0.0849912, 0.00116488, + -0.0601776, 0.00297223, 0.0121289, -0.000996734, -0.0504259, 0.0155576, 0.0171136, -0.0268562, + -0.113227, -0.0539823, -0.00137992, -0.0682175, -0.054388, -0.029641, 0.056121, -0.0473043, + -0.0266457, 0.0332315, -0.0335831, 0.0421327, 0.0238765, 0.0182142, 0.0496482, 0.0712496, + -0.00973039, 0.0157489, 0.0170978, -0.0118249, -0.00446035, 0.00864153, -0.085431, 0.0142116, + -0.0440188, 0.0403919, 0.0950656, 0.0150426, -0.0402887, -0.00466724, 0.0537792, 0.00106359, + 0.0897128, -0.0689607, -0.0521427, -0.0517765, 0.030659, -0.0411972, 0.0376676, -0.082132, + 0.127533, 0.0719542, 0.00061304, 0.0947038, 0.0898292, 0.05316, 0.0314538, 0.053163, + -0.00890308, -0.0451384, 0.0111458, -0.10212, -0.0509414, -0.0147361, -0.0346506, -0.0219878, + 0.00741214, 0.0021788, 0.0244155, 0.101578, 0.0200075, -0.0234641, 0.0230619, 0.0857225, + -0.0198343, 0.0936703, -0.0537956, 0.0921753, 0.138995, -0.0724931, 0.0615286, 0.0941637, + -0.0237765, -0.164809, 0.0134797, -0.00604466, -0.0255852, 0.0324988, -0.1069, 0.0255736, + -0.0514497, -0.0090038, 0.0936203, -0.0991071, 0.00258113, -0.0100746, -0.00428397, -0.0354388, + 0.0905338, 0.142749, -0.142989, -0.0846769, -0.0825498, 0.0805062, -0.00189693, -0.0404901, + -0.00501544, -0.0170325, 0.104385, 0.133965, 0.0772667, -0.076081, 0.040041, -0.0423703, + -0.0192534, 0.00365024, -0.00859575, -0.021672, -0.0746258, 0.0422147, 0.00830109, -0.00595983, + -0.00282683, 0.0146986, 0.0234629, 0.0102508, 0.00175921, 0.0115853, 0.0428529, -0.0050183, + -0.0154206, -0.0336309, 0.0154812, -0.0383404, 0.0251418, -0.0212968, -0.0185515, 0.0357765, + -0.0842346, -0.022264, -0.00279582, 0.00169226, 0.056891, 0.056779, 0.0231415, 0.0348637, + -0.0464232, -0.0307553, -0.00421516, -0.0536781, -0.0807341, -0.0179894, -0.0516063, 0.0255976 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p38(hatfit_yaw00_lev1_p38); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p38_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p39.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p39.mh new file mode 100755 index 0000000..5dd53ad --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p39.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p39.mh: + +#ifndef stasm_hat_yaw00_lev1_p39_mh +#define stasm_hat_yaw00_lev1_p39_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p39(const double* const d) // d has 160 elements +{ + const double intercept = -0.02697; + const double coef[160] = + { + -0.0137683, 0.0311045, -0.00576306, -0.0245337, -0.02928, 0.0415028, -0.107335, -0.016224, + -0.0457684, -0.00847157, 0.00116153, -0.0267579, -0.0351215, 0.010888, 0.05105, -0.00561323, + -0.0823366, -0.0528186, -0.0139097, -0.0424504, -0.0681589, -0.0593362, 0.0631822, -0.0315455, + -0.0168791, 0.0661379, 0.00162439, 0.00656767, 0.0131466, 0.0123653, 0.0107543, -0.00464072, + -0.0276494, 0.0165671, -0.0178021, 0.0154676, -0.0178779, 0.0137792, -0.0560624, 0.0100809, + -0.0397822, 0.0332191, 0.0806629, 0.106174, -0.0112653, 0.00187161, 0.017389, 0.0214195, + 0.089707, -0.0532137, -0.0466615, -0.0195368, 0.0441674, -0.0145126, 0.0705208, -0.0387176, + 0.116554, 0.0654563, 0.00963125, 0.0722848, 0.113763, 0.0196434, 0.0266145, 0.0757253, + -0.0426398, -0.109253, 0.000972455, -0.070805, -0.068536, -0.00561257, -0.0636282, -0.0180017, + 0.0597286, -0.0306022, 0.0558584, 0.0753626, 0.0085934, -0.0378896, 0.067625, 0.0802456, + -0.0274845, 0.162607, -0.0419922, 0.0483271, 0.123508, -0.0646426, 0.0586254, 0.0346976, + 0.0291506, -0.159534, -0.0188968, 0.0379708, 0.0134742, 0.029137, -0.0647252, 0.029742, + -0.0261874, -0.0465041, 0.143266, -0.088367, -0.0551904, -0.00386277, -0.0299972, -0.0609167, + 0.00441822, 0.154191, -0.129404, -0.0879472, -0.0580239, 0.0599026, -0.0028995, -0.0540687, + 0.0144118, -0.0158184, 0.0417359, 0.0837592, 0.0243108, 0.00549566, 0.0503914, -0.0967733, + -0.0229701, -0.073099, -0.0420856, -0.0503984, -0.111204, 0.0354666, -0.0518395, -0.0114431, + 0.0396234, 0.025096, 0.0130838, 0.056822, -0.0405526, -0.00781527, 0.073553, 0.00667156, + 0.000719109, -0.0457464, -0.00136307, -0.0379476, -0.0192339, -0.0586512, -0.0390123, 0.0188078, + -0.0139295, 0.0144688, 0.0327322, 0.0454937, 0.0938609, 0.0331601, 0.050297, 0.0423592, + -0.0363346, -0.010519, -0.00131118, -0.0415203, -0.0498438, -0.00662749, -0.0168949, 0.0644758 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p39(hatfit_yaw00_lev1_p39); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p39_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p40.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p40.mh new file mode 100755 index 0000000..6e71e5e --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p40.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p40.mh: + +#ifndef stasm_hat_yaw00_lev1_p40_mh +#define stasm_hat_yaw00_lev1_p40_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p40(const double* const d) // d has 160 elements +{ + const double intercept = -0.0617577; + const double coef[160] = + { + 0.0156052, -0.0459866, -0.00696063, 0.0189737, 0.0265626, 0.0491555, -0.068995, 0.0519549, + 0.0218703, 0.00595397, -0.048948, -0.0240862, -0.0436321, 0.0146736, 0.00315227, 0.0799594, + -0.0552814, -0.00730044, -0.0093325, -0.0324573, -0.0363188, -0.0184091, -0.0983743, -0.0142322, + -0.0277883, -0.0040611, 0.0201635, 0.0043392, -0.0182613, 0.0492748, -0.0425199, -0.0311676, + -0.0198514, -0.0524871, 0.0234489, -0.0173401, -0.0654155, -0.0320293, 0.136825, 0.00609792, + 0.0312316, 0.0166199, 0.0998807, -0.0362655, -0.00310585, -0.103129, -0.0359893, -0.0347384, + -0.125087, -0.0814028, -0.00221715, 0.057648, 0.0746448, 0.00398399, 0.0274751, -0.0829248, + 0.0451593, 0.0611274, -0.0543719, 0.00362775, 0.00348841, 0.154784, 0.0544589, -0.000858817, + 0.0289775, 0.116359, 0.0488896, 0.0798694, 0.0394962, -0.0692173, 0.0532962, 0.0636297, + 0.088678, -0.0533548, -0.0582863, -0.000803631, 0.109162, 0.00118488, -0.059963, -0.0239472, + 0.0771359, 0.0276344, -0.0882249, 0.0688487, -0.00748756, -0.0326405, -0.0178754, -0.00313541, + 0.0451601, 0.043886, 0.0659399, -0.059189, 0.0788565, 0.0218061, 0.0332941, 0.108433, + -0.0465029, -0.0203694, 0.0980137, -0.0546819, -0.0378287, -0.03932, -0.00657228, -0.018022, + -0.0559456, -0.00620295, -0.0316693, 0.00968451, -0.0135787, 0.0130518, -0.00506395, -0.00892536, + -0.0593109, -0.104716, 0.0508358, 0.060059, -0.00030429, 0.0226462, 0.069877, 0.0195314, + -0.0268644, 0.00339959, 0.00963795, 0.0229593, -0.0540894, -0.0612055, -0.0395579, -0.0376664, + 0.0072953, 0.0102422, -0.0257972, 0.0812377, -0.110344, 0.046166, 0.0147895, -0.0229899, + 0.00976963, -0.0256674, -0.0210554, 0.00772394, -0.00608955, 0.00331062, -0.0475402, 0.0181648, + 0.0137614, -0.000236305, -0.0178339, -0.0104172, -0.0305334, -0.0299109, -0.0491962, -0.0191575, + 0.057466, 0.0412388, -0.034844, -0.0256005, -0.00917834, 0.00792608, 0.0468386, 0.021432 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p40(hatfit_yaw00_lev1_p40); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p40_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p41.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p41.mh new file mode 100755 index 0000000..3368ddf --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p41.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p41.mh: + +#ifndef stasm_hat_yaw00_lev1_p41_mh +#define stasm_hat_yaw00_lev1_p41_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p41(const double* const d) // d has 160 elements +{ + const double intercept = -0.262799; + const double coef[160] = + { + 0.0594156, -0.0187286, -0.0323565, -0.0226788, -0.055155, 0.0173702, -0.033518, -0.0434084, + 0.0596953, 0.04228, -0.00726641, 0.0119526, -0.0537957, 0.0293668, 0.100588, 0.000491553, + 0.0307966, 0.0224319, 0.00512161, -0.0152303, 0.00408469, -0.0856581, -0.0283398, 0.0343747, + 0.0086871, 0.0207789, 0.0469816, -0.038938, 0.00391296, -0.0168281, -0.0427036, 0.00361286, + 0.0179812, 0.0169613, 0.00572675, 0.0304129, -0.00196809, 0.0418755, -0.00682326, -0.00526619, + -0.051209, 0.00270587, -0.0942246, -0.032416, -0.0220637, -0.00783117, -0.0169596, 0.0714794, + -0.0995697, -0.0152599, 0.0286164, 0.00709659, 0.0347345, 0.0513593, -0.132293, -0.0621502, + -0.0369908, 0.00803909, 0.0541353, 0.049953, -0.00213287, 0.0951546, 0.0857773, -0.00410647, + -0.0191665, -0.0381783, -0.0355435, -0.0131754, -0.00711061, -0.0496656, 0.0938031, -0.0537285, + -0.0575811, -0.0393168, 0.0567432, 0.00969633, 0.00741533, -0.0857071, 0.0651419, 0.0182334, + -0.0445946, -0.078534, 0.0226902, 0.00333909, 0.0361221, 0.0670708, 0.0128299, -0.0734256, + 0.0400354, 0.166504, 0.0157823, -0.00584887, -0.0352993, 0.0117685, 0.0264848, 0.0966697, + 0.0356856, -0.0375088, 0.0058627, 0.0673025, 0.0384437, -0.0679526, -0.0509106, -0.00267304, + 0.0892667, 0.0126181, 0.0327518, 0.0443882, 0.073673, 0.0527703, -0.0464817, 0.0490703, + 0.0459133, 0.0243223, -0.0656711, -0.0428812, -0.0567108, 0.0741543, -0.0408965, -0.0359412, + 0.00660457, 0.0337438, 0.084027, 0.00664404, 0.00537387, 0.00442322, -0.016303, 0.0799516, + -0.0276819, -0.0329564, -0.0322236, -0.0538003, -0.0247828, -0.0352706, -0.00563658, -0.0606449, + -0.0264253, -0.0629177, -0.0583771, 0.0590368, -0.00873518, 0.0266721, 0.0847975, 0.0309815, + 0.00688709, -0.0389876, 0.132531, -0.0169061, -0.0111577, -0.0763632, -0.0418102, -0.0389548, + -0.00804132, 0.0567647, 0.00484636, -0.0533848, 0.0127496, 0.00782392, 0.079095, 0.0268384 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p41(hatfit_yaw00_lev1_p41); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p41_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p42.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p42.mh new file mode 100755 index 0000000..f128ecf --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p42.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p42.mh: + +#ifndef stasm_hat_yaw00_lev1_p42_mh +#define stasm_hat_yaw00_lev1_p42_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p42(const double* const d) // d has 160 elements +{ + const double intercept = -0.267832; + const double coef[160] = + { + 0.0250589, 0.0223719, -0.0531637, 0.0118598, -0.0518864, 0.0149485, 0.0560363, 0.000827213, + 0.0652895, 0.0216623, 0.0213494, -0.00431385, 0.0155663, -0.0697053, 0.0143104, 0.0269714, + 0.0717636, 0.0164198, 0.0651081, -0.00678762, 0.0217544, 0.0433132, -0.0405112, 0.0233288, + 0.0368319, -0.00987942, 0.0394593, 0.0363214, 0.0098887, -0.032322, -0.0148654, -0.0114874, + 0.0167995, -0.0430063, -0.00212365, -0.0600111, -0.0100988, 0.00564683, 0.00651138, 0.0223506, + -0.0475533, -0.017191, -0.0231814, -0.0394015, 0.0183108, 0.056735, -0.0773495, -0.0186808, + -0.10888, -0.01172, -0.012778, -0.0280946, -0.023565, 0.0426887, 0.0803558, -0.00555116, + -0.0821078, -0.0211481, 0.0114963, 0.0126135, -0.0138914, -0.0961712, 0.0534635, -0.0237414, + -0.0627828, 0.0069159, -0.0124681, -0.0437366, -0.015536, 0.0277698, 0.00946747, -0.0386741, + -0.00681303, 0.0287985, -0.0146775, -0.00106336, -2.09394e-05, 0.0529079, 0.0153303, 0.00134007, + -0.0475712, 0.150543, 0.0663932, 0.110781, -0.0139091, 0.0487534, -0.00906667, -0.00264463, + 0.105522, -0.0986673, 0.00944924, 0.044035, 0.0759185, -0.00941136, 0.0772422, -0.0080406, + 0.0982731, 0.009884, -0.0309918, 0.00527481, 0.0366586, -0.0249879, -0.00944553, 0.0612417, + -0.0196947, 0.0219406, -0.00881142, -0.0202785, -0.0113854, 0.0112294, -0.0726931, -0.00253419, + 0.0140862, -0.0546059, 0.0840347, 0.104682, -0.0256582, -0.038651, 0.0835034, 0.136506, + 0.00104366, 0.0249283, -0.0248792, 0.00766329, 0.0371655, -0.0961918, 0.0151661, 0.0401377, + 0.000438639, -0.108393, -0.0157583, 0.0281483, 0.0234077, 0.0413021, -0.0310684, 0.00633404, + 0.0395615, -0.0197817, 0.0962121, -0.0522614, -0.042909, 0.027851, 0.0400732, -0.00705579, + 0.0100766, 0.082584, -0.0489721, -0.0849357, -0.0251572, 0.0194749, -0.0308505, -0.074304, + -0.0790463, -0.0262516, -0.024485, 0.0603077, 0.0270147, 0.0375003, 0.00448266, -0.0809277 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p42(hatfit_yaw00_lev1_p42); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p42_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p43.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p43.mh new file mode 100755 index 0000000..625323d --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p43.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p43.mh: + +#ifndef stasm_hat_yaw00_lev1_p43_mh +#define stasm_hat_yaw00_lev1_p43_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p43(const double* const d) // d has 160 elements +{ + const double intercept = -0.109739; + const double coef[160] = + { + 0.0570196, -0.00816288, -0.0396789, -0.0691714, -0.0147693, -0.0113571, 0.0238471, 0.0654756, + 0.0127259, 0.0262569, 0.0713755, 0.0551583, -0.00408789, 7.70712e-06, -0.0481539, -0.0185502, + -0.0290117, -0.0125839, -0.00523495, 0.0186073, 0.0100473, 0.00134032, -0.0158129, -0.0650889, + -0.00211844, 0.0373439, 0.00656235, 0.0406139, 0.0121945, -0.0274831, 0.0764015, 0.0587713, + -0.00853797, -0.0345838, -0.00964707, -0.0727974, 0.00889578, 0.0503037, -0.0333862, -0.034163, + -0.0827511, -0.0471695, -0.0346255, -0.0385785, -0.00680009, -0.023391, 0.180779, -0.110075, + -0.0308566, 0.00913772, 0.0667521, -0.0236769, 0.0473191, -0.114058, -0.00661101, 0.0277845, + 0.00833675, -0.0048789, 0.0638954, -0.00843914, -0.00834834, 0.0313403, 0.00101895, 0.0332497, + -0.00245061, -0.0320165, -0.0555559, -0.111136, -0.0490009, 0.056839, 0.00416749, -0.0448449, + -0.0293516, 0.031744, -0.0351489, 0.113501, 0.00559084, -0.0416646, -0.011213, 0.0752133, + 0.163951, -0.0631562, 0.0117438, 0.0983181, 0.129859, 0.0358397, -0.0592237, 0.0938551, + 0.0407702, 0.016116, -0.0669065, -0.0705481, -0.0925694, 0.0770623, -0.06897, -0.0108773, + -0.038666, 0.106142, 0.0032002, 0.0526937, -0.0260607, -0.0476551, -0.0931545, -0.0581646, + -0.0213479, -0.0944708, 0.0764147, 0.155, 0.0953724, 0.00644171, 0.0818339, 0.098784, + 0.0583541, 0.0385834, 0.014567, -0.151929, 0.0651872, 0.0237393, 0.0354186, 0.0701812, + -0.00868975, -0.120429, 0.0431517, 0.00308768, -0.0856116, -0.0145191, 0.036296, -0.0410546, + -0.0409622, 0.0470182, 0.0770556, -0.0371906, 0.0159651, -0.0274052, 0.0122354, -0.030157, + -0.0336936, 0.0396808, -0.0337803, -0.0324049, 0.0169184, 0.0412101, 0.0850196, 0.0202203, + -0.0207872, -0.0314282, 0.00840539, -0.0183683, -0.036961, 0.00315037, -0.0447284, -0.0183713, + 0.00828758, 0.0171499, -0.0376258, -0.00846203, -0.0420137, -0.0241747, -0.0150662, -0.0478079 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p43(hatfit_yaw00_lev1_p43); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p43_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p44.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p44.mh new file mode 100755 index 0000000..e474deb --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p44.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p44.mh: + +#ifndef stasm_hat_yaw00_lev1_p44_mh +#define stasm_hat_yaw00_lev1_p44_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p44(const double* const d) // d has 160 elements +{ + const double intercept = 0.109008; + const double coef[160] = + { + -0.0945362, -0.0449524, 0.0660333, -0.0246236, 0.0158696, -0.0471226, 0.0447189, -0.0258553, + 0.025887, -0.0135329, -0.0214826, -0.0206675, 0.013636, 0.0741179, -0.0320414, 0.0372598, + -0.0704824, -0.0233604, -0.00317469, -0.00842793, -0.00341977, 0.00219688, -0.0954223, -0.0554482, + -0.0525299, -0.0333753, 0.0021748, 0.074139, 0.0360935, 0.00534435, 0.0684776, 0.0403155, + -0.0192615, -0.0568851, -0.0342091, -0.0741966, -0.00925542, 0.052715, -0.0159705, -0.0190257, + 0.0881149, 0.0554443, -0.077389, -0.0955993, -0.0563765, 0.0634231, -0.0891371, 0.0688448, + -0.0877472, -0.0258642, 0.0407242, 0.157993, 0.0400953, -0.127256, -0.0189779, -0.0743465, + 0.113783, 0.0492693, 0.0370564, -0.010719, 0.0538533, 0.0681946, 0.16568, 0.173489, + 0.104194, 0.0467617, 0.0189704, -0.0376701, 0.00528474, -0.0861354, -0.00434834, 0.122647, + 0.0184847, -0.00775123, -0.0450692, 0.0104375, -0.0201632, -0.0271411, -0.0935868, -0.0408573, + -0.0339742, 0.12917, 0.0588921, -0.0593483, -0.0471046, 0.00587893, 0.0765586, -0.0184146, + -0.0654201, -0.0186158, -0.0343246, -0.0380061, -0.036993, 0.0425709, -0.00783674, -0.0133803, + 0.00813309, -0.0370071, 0.10609, 0.0397922, -0.0274873, -0.021436, -0.0703765, -0.0782073, + -0.0418972, -0.00730855, -0.0399368, -0.00838882, 0.00432808, 0.0418548, 0.0388093, -0.133597, + -0.032826, -0.0237243, -0.0124979, -0.0523122, 0.0277924, 0.0076101, -0.00757488, -0.080163, + -0.0339697, -0.0814072, -0.024809, -0.0294447, 0.0479387, 3.89295e-05, 0.0361916, 0.00560784, + 0.00638087, 0.0103722, -0.0058001, 0.0313552, -0.0131113, 0.0205947, -0.0219136, 0.000589408, + -0.0214051, 0.0924824, -0.0379552, 0.00046803, -0.0307971, 0.0155563, -0.0262803, 0.0326664, + -0.0468105, -0.00447329, -0.0346878, -0.0124326, -0.0402621, 0.0115866, -0.0451612, 0.138228, + 0.0480731, 0.01717, 0.0404243, 0.0616278, -0.0362902, -0.0333519, 0.0372897, 0.0130936 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p44(hatfit_yaw00_lev1_p44); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p44_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p45.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p45.mh new file mode 100755 index 0000000..ad60533 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p45.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p45.mh: + +#ifndef stasm_hat_yaw00_lev1_p45_mh +#define stasm_hat_yaw00_lev1_p45_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p45(const double* const d) // d has 160 elements +{ + const double intercept = -0.25172; + const double coef[160] = + { + 0.138588, 0.0320257, 0.0356155, 0.0724541, 0.120651, -0.0189986, 0.106301, -0.0298257, + 0.0350613, -0.0742858, -0.00626365, -0.0366956, 0.00288059, -0.0262773, -0.0335548, 0.0513913, + -0.0487848, -0.0594982, 0.0626344, 0.0553294, -0.0107779, -0.0238063, -0.0467799, -0.0179865, + -0.0237511, -0.0537311, 0.00119416, 0.0220104, 0.0691962, 0.0204227, 0.0969524, 0.0179205, + -0.0370185, -0.0426937, -0.100493, 0.0102081, 0.0312435, 0.00265713, -0.0234102, 0.122252, + 0.0547786, -0.107252, 0.111451, 0.0475615, 0.0537575, -0.00080478, -0.0791252, 0.0088121, + 0.0253345, 0.0846276, -0.108816, -0.130749, -0.10341, 0.0592801, -0.0318539, -0.0249449, + -0.010017, 0.192572, -0.0720721, -0.0648521, -0.0571078, 0.0111925, 0.0666735, -0.0547617, + -0.0309815, -0.0215697, 0.109581, 0.0672603, 0.011995, -0.00119004, -0.0238963, 0.0618288, + 0.146923, 0.133224, 0.0838379, -0.0742575, -0.0287099, -0.00583805, 0.0450488, -0.0666454, + -0.0188749, -0.0366709, 0.037215, 0.0536543, -0.100444, -0.0419477, 0.0163139, -0.0565705, + -0.0278959, 0.000975454, 0.0281221, 0.049062, 0.102175, 0.0226027, 0.0645185, 0.0349713, + -0.0826408, -0.0749836, 0.0577827, 0.0822353, 0.0798172, 0.0386831, -0.0101139, 0.0461214, + 0.00293569, -0.0776405, -0.0391742, 0.0176803, -0.00405256, -0.0141349, 0.0250607, 0.00126634, + -0.111324, -0.0221828, -0.11046, 0.0129321, 0.0242276, 0.00152692, -0.00077143, 0.0251926, + 0.0453204, -0.0121045, 0.09637, -0.0769084, 0.0588002, -0.0329975, -0.0250022, 0.0456485, + -0.0177055, -0.0139467, -0.0054085, -0.0442463, -0.0385275, -0.020766, -0.00469496, -0.0233761, + 0.0459073, 0.0279808, -0.0103614, -0.0883182, -0.0111125, 4.03714e-05, 0.0135568, -0.062711, + -0.00610121, 0.0899954, 0.00370827, -0.0199731, -0.043631, 0.0366049, 0.0242956, 0.0318513, + 0.0163144, -0.0494192, 0.00613827, -0.0128951, -0.0382535, -0.0117383, -0.0496041, -0.0232795 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p45(hatfit_yaw00_lev1_p45); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p45_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p46.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p46.mh new file mode 100755 index 0000000..2f576a5 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p46.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p46.mh: + +#ifndef stasm_hat_yaw00_lev1_p46_mh +#define stasm_hat_yaw00_lev1_p46_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p46(const double* const d) // d has 160 elements +{ + const double intercept = -0.1262; + const double coef[160] = + { + -0.0247898, 0.0725981, 0.00940554, 0.0052597, 0.00695337, -0.0227812, 0.0829615, -0.0182238, + 0.0912312, -0.0397266, -0.00802797, 0.0164496, 0.050756, -0.00600232, -0.0175702, -0.03503, + 0.147221, 0.0160325, -0.00482178, 0.0407726, 0.0537962, 0.020743, 0.0355159, 0.057278, + -0.0217205, -0.0576563, -0.0685952, -0.0518904, -0.0855381, -0.0101204, -0.0816496, -0.00958126, + -0.017169, -0.0468333, 0.0395461, 0.0787189, 0.0362518, -0.0288426, 0.0762642, 0.0955865, + -0.0407962, 0.0912819, 0.00170931, 0.111283, 0.0747911, 0.0214694, 0.0356399, 0.0678785, + -0.0119807, -0.125812, 0.0183076, 0.0566146, 0.0650642, 0.043017, -0.0296444, 0.0171253, + -0.0139448, -0.0234206, 0.0995859, -0.0773336, -0.0337063, -0.0184082, -0.0234433, -0.0469514, + -0.0159479, 0.164123, -0.0909827, -0.0802733, -0.0225864, 0.0681187, 0.0216672, -0.0506549, + -0.0686634, 0.0314723, 0.0919573, 0.053391, 0.0320703, 0.052185, 0.0490161, -0.0794547, + -0.0305819, -0.0936891, -0.0178693, -0.0513525, -0.0980818, -0.00498728, -0.074374, -0.0999793, + 0.00662704, 0.0383561, 0.00845843, 0.0425148, -0.0533615, 0.0118851, 0.0324261, -0.00552462, + 0.0162779, -0.0513451, -0.0764762, -0.00473995, 0.000206355, 0.00314181, 0.0385827, 0.0602592, + -0.0351145, -0.0386392, 0.0498369, 0.0366033, 0.0440881, 0.0136349, 0.0225003, 0.0527547, + 0.00338717, -0.0367825, -0.0426791, -0.0226034, -0.0303609, -0.0594028, -0.0347768, 0.0730718, + 0.0173539, 0.0453047, 0.0667917, 0.0466438, -0.0243697, -0.0156744, -0.101598, 0.0479361, + 0.0261366, -0.0550373, -0.0107337, -0.0677039, 0.00929147, 0.0117664, 0.0345724, 0.0198759, + -0.0534636, 0.0071773, 0.0380319, -0.051799, 0.0129421, -0.00628485, -0.00436391, 0.0113728, + 0.0319683, -0.0269471, 0.0113978, -0.0513272, 0.0395217, -0.00380428, 0.0259736, -0.0518657, + 0.014918, 0.0633155, -0.00548257, 0.0103552, -0.04868, 0.0484848, -0.00154793, -0.102005 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p46(hatfit_yaw00_lev1_p46); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p46_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p47.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p47.mh new file mode 100755 index 0000000..3fa31a0 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p47.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p47.mh: + +#ifndef stasm_hat_yaw00_lev1_p47_mh +#define stasm_hat_yaw00_lev1_p47_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p47(const double* const d) // d has 160 elements +{ + const double intercept = -0.118965; + const double coef[160] = + { + -0.0440492, -0.0836416, -0.141257, -0.0910721, -0.110534, -0.00214304, -0.0472487, 0.00261588, + -0.0335697, 0.0914798, 0.0305937, 0.00916225, -0.0435401, 0.0723333, -0.040065, -0.0185088, + 0.0401661, -0.0159768, 0.0349517, 0.0174412, 0.00390451, -0.0429541, 0.0773829, -0.038843, + 0.0832298, 0.0353028, 0.0146736, 0.0350658, 0.0369444, -0.00336594, -0.0110071, -0.00688144, + 0.0573221, -0.0910749, -0.0130102, 0.0147298, -0.00252087, -0.0223729, 0.0463613, 0.0419724, + 0.0217844, 0.0157986, 0.163274, 0.102168, 0.131031, 0.106365, -0.00268922, -0.0544499, + -0.0149947, 0.135501, 0.0304682, 0.0334622, 0.0114081, -0.039136, 0.0350434, 0.0430796, + -0.0425841, -0.110417, -0.0606183, 0.0744933, 0.134342, 0.0286298, 0.0279522, 0.0449863, + 0.0347973, -0.0419459, 0.0857313, -0.0128635, 0.0381703, -0.00587311, -0.0681089, -0.0187003, + -0.00328471, 0.0941593, -0.0736437, -0.128757, -0.04768, 0.0727935, 0.0273488, -0.0977504, + -0.023949, -0.0421614, -0.0286373, -0.0653269, -0.0963842, -0.0483031, 0.0505979, 0.0368761, + -0.0125742, -0.0706676, -0.0430058, -0.0963538, -0.0924971, -0.0266817, -0.0941927, -0.0325834, + 0.00716453, 0.0209282, 0.00390391, 0.0369161, -0.0915738, 0.00390245, 0.0418545, -0.0403939, + 0.00975892, -0.0248716, -0.0255247, 0.0214165, -0.0274118, -0.0254147, 0.0207873, 0.00385507, + -0.0257841, 0.0125612, 0.034636, 0.0482864, 0.0363408, -0.0167484, 0.0397208, 0.11034, + 0.0580511, 0.0643112, 0.00275626, 0.0200438, 0.0397158, -0.00459059, -0.0624459, -0.0130516, + 0.0194177, 0.0302497, 0.0528601, 0.0954436, 0.0441685, -0.000957178, 0.0123102, -0.0159973, + 0.0208708, 0.00253739, 0.00969131, 0.00487447, 0.0228892, -0.00806758, -0.0474296, 0.0435123, + 0.0126327, -0.0250043, -0.0049342, -0.0446558, 0.00411561, 0.0215649, 0.01054, -0.0185998, + 0.000267183, -0.0528733, 0.0212056, -0.0966146, 0.00481207, -0.00617578, 0.0559641, -0.0571265 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p47(hatfit_yaw00_lev1_p47); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p47_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p48.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p48.mh new file mode 100755 index 0000000..14ed789 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p48.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p48.mh: + +#ifndef stasm_hat_yaw00_lev1_p48_mh +#define stasm_hat_yaw00_lev1_p48_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p48(const double* const d) // d has 160 elements +{ + const double intercept = -0.348712; + const double coef[160] = + { + -0.0199642, -0.016524, 0.0185488, 0.0753993, 0.0220202, 0.0315148, -0.0563141, -0.00505819, + 0.00273267, -0.0239206, -0.0834737, -0.0285988, 0.0565259, -0.00569715, 0.0483493, -0.0712883, + -0.0712879, -0.00462779, 0.0462177, 0.0520587, -0.020654, -0.0252241, 0.0488485, 0.0282503, + 0.00559442, 0.0144023, -0.0132484, 0.0254584, 0.0395418, 0.0306705, -0.0352704, -0.0166598, + -0.00170908, -0.0370785, -0.0203859, 0.0144599, -0.0146208, -0.01403, -0.00723498, -0.00876678, + 0.0327493, -0.0113121, 0.0448436, -0.0526941, 0.0259987, 0.0262766, -0.0312069, -0.000567117, + 0.013922, 0.0441781, 0.0086888, 0.0547899, 0.0423473, 0.00918695, -0.0101297, -0.0328613, + 0.0691136, 0.00758904, 0.0224273, -0.0291462, -0.0939671, 0.0324741, 0.0354135, -0.0303462, + 0.0356238, -0.0387213, -0.0665426, -0.0383849, -0.0274669, -0.0220878, 0.0289407, -0.00507145, + 0.111319, 0.0215501, 0.0416781, -0.0171691, 0.00257299, -0.0688882, 0.0220108, -0.0918581, + 0.0105098, 0.0140829, 0.0724206, 0.0268746, -0.0194448, -0.029022, -0.0317727, -0.0115339, + 0.00787806, 0.00153147, -0.133061, -0.0171583, 0.060793, -0.0497396, 0.0178434, 0.0115849, + 0.0521507, 0.0308188, 0.0278041, 0.087127, 0.0105865, -0.00899581, -0.00784267, 0.0185296, + 0.0018345, -0.0473944, -0.0727011, -0.06032, 0.0167443, 0.0669789, 0.0532385, 0.0856828, + -0.0457355, 0.0439268, 0.0353426, 0.0279889, -0.0711119, 0.00938103, -0.0660489, -0.00674734, + 0.0124368, -0.0648288, 0.0244971, 0.00933523, -0.0561851, 0.0146086, 0.00783616, 0.0405319, + 0.0264534, -0.0114669, 0.042876, 0.0869413, 0.030355, 0.0372803, -0.0117394, -0.0308215, + -0.0666074, -0.000140927, -0.050663, -0.0559189, -0.0074306, 0.00361242, 0.0232975, 0.0355665, + -0.0388373, 0.0357383, 0.115658, 0.0711105, -0.0131747, -0.0143666, -0.0302213, -0.080427, + 0.0653268, 0.0254734, 0.0134195, 0.121503, 0.142421, 0.0482576, 0.0452815, 0.0540552 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p48(hatfit_yaw00_lev1_p48); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p48_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p49.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p49.mh new file mode 100755 index 0000000..7a851cc --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p49.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p49.mh: + +#ifndef stasm_hat_yaw00_lev1_p49_mh +#define stasm_hat_yaw00_lev1_p49_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p49(const double* const d) // d has 160 elements +{ + const double intercept = 0.337902; + const double coef[160] = + { + 0.0114154, -0.0726488, -0.0778797, -0.0423141, -0.101282, -0.0447445, 0.0436873, -0.0644333, + 0.0624447, 0.0491255, -0.0232039, -0.0278307, 0.0139972, -0.0112907, -0.0322537, 0.0502897, + -0.098117, 0.0451549, 0.103961, 0.087829, -0.0385551, -0.0336443, -0.0132464, -0.0463502, + 0.0256201, -0.0661301, -0.0965179, 0.00416883, 0.12706, 0.0554865, -0.0172941, -0.0300243, + -0.101453, -0.0254417, -0.0144953, -0.011406, -0.065835, -0.0178107, 0.0889139, -0.0244951, + -0.0274361, -0.0272035, -0.0302713, 0.02199, 0.0393062, 0.0542217, 0.0382146, 0.00430417, + -0.0252084, 0.0177507, 0.0837669, -0.020463, 0.023539, -0.0222531, -0.033568, 0.0405018, + 0.0366544, 0.0219979, 0.0433826, 0.0337518, -0.0382937, 0.026798, 0.0155538, 0.022436, + 0.022377, -0.0522834, 0.00202955, -0.0484192, 0.0382646, 0.00632605, -0.0541592, -0.0216834, + 0.0718766, 0.0921278, 7.72105e-05, -0.0248985, -0.121145, 0.0050598, 0.0584069, 0.0625849, + 0.0341806, 0.0432261, -0.0717361, 0.019553, -0.00874797, -0.0566127, -0.035232, -0.0217414, + 0.0112061, -0.0173741, -0.0251796, -0.061976, 0.00953155, 0.0346141, -0.0552639, -0.0386179, + -0.049074, 0.0114269, 0.0481586, 0.0266696, -0.0454927, -0.0340543, -0.0192265, -0.0198516, + 0.0283237, -0.00680941, -0.00792814, -0.00371509, 0.0451747, -0.00511052, -0.038361, 0.042594, + -0.0624682, -0.0839768, -0.125767, 0.0346305, 0.0854665, -0.0188636, 0.012889, -0.0784834, + 0.0532098, 0.00439309, -0.00386652, -0.0325034, -0.00939869, 0.00199078, -0.00463391, 0.00874155, + -0.0679019, 0.0341406, 0.107982, 0.0298168, 0.0419922, 0.00153954, 0.036435, -0.011819, + 0.0351083, -0.0217196, -0.0573149, -0.0786371, -0.0240665, 0.0144203, -0.0828524, 0.0440092, + 0.0234886, -0.003938, 0.048797, 0.0791573, -0.0599733, -0.0299365, 0.0744551, 0.0195751, + -0.0408867, 0.0259072, 0.00605974, -0.0173957, 0.0276731, 0.016588, -0.0502496, 0.0181499 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p49(hatfit_yaw00_lev1_p49); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p49_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p50.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p50.mh new file mode 100755 index 0000000..e440e3c --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p50.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p50.mh: + +#ifndef stasm_hat_yaw00_lev1_p50_mh +#define stasm_hat_yaw00_lev1_p50_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p50(const double* const d) // d has 160 elements +{ + const double intercept = -0.354588; + const double coef[160] = + { + -0.0230603, -0.00406651, -0.00636519, -0.0227412, 0.00548503, -0.0184082, -0.0141572, 0.0294223, + -0.00797574, 0.0429883, 0.00673783, 0.00372198, -0.0629349, -0.00877111, -0.0495952, -0.0169266, + -0.0011404, 0.0479142, 0.0259209, -0.0259865, -0.0192255, 0.0396561, 0.0876463, 0.0230926, + 0.166111, -0.0461354, -0.0703753, -0.0448939, -0.0629481, -0.0580323, -0.0453387, -0.0270917, + -0.0884495, 0.140163, 0.0784775, 0.0228562, 0.024435, -0.0254433, 0.00177285, 0.0505875, + 0.0343714, -0.0174439, -0.0160221, -0.00753022, 0.117415, -0.0406816, 0.0532156, -0.0788673, + -0.108941, -0.0483069, -0.00519991, -0.0256438, 0.0142451, -0.040349, -0.0169156, -0.0526813, + 0.00228688, -0.0658973, -0.0337889, -0.0172707, 0.0379358, 0.0414351, 0.0617095, 0.0538789, + -0.0267418, 0.0563266, 0.0380729, 0.0618607, 0.0620722, -0.0352426, -0.0599867, 0.0257612, + 0.0177003, -0.0275431, 0.0416884, -0.00144024, 0.059808, 0.0194098, 0.026223, 0.0179042, + -0.0544042, 0.0229145, 0.0554572, 0.0782817, 0.00250939, -0.0428284, 0.0150715, -0.0411066, + 0.105643, -0.0499674, -0.073674, -0.0294076, -0.0109432, 0.120955, 0.0618048, 0.104465, + 0.00742026, 0.104745, -0.0396997, 0.0703248, 0.0415391, -0.0242536, 0.00578664, -0.0406675, + 0.0587635, -0.021202, -0.0501602, -0.0246371, -0.0119139, -0.00216564, -0.0159471, -0.0599296, + -0.0168455, 0.0184902, 0.0463801, 0.023843, -0.0373052, -0.0362718, -0.033582, -0.00780508, + 0.112369, 0.133683, 0.0611724, -0.058416, 0.00130038, 0.0465242, -0.011343, 0.0759481, + -0.0879834, 0.0318877, 0.0545767, 0.0623571, -0.00027041, -0.0773191, -0.00461445, -0.0368097, + 0.0221211, -0.0317399, -0.0332144, -0.0194702, -0.0366173, 0.0686429, 0.000139026, 0.0184993, + 0.00466772, 0.0430889, 0.0650156, 0.00889211, 0.0384161, -0.0229575, 0.0181281, 0.0296131, + -0.0204703, -0.0082565, -0.00745633, -0.0388592, -0.0328784, 0.0540064, -0.0102891, -0.0235745 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p50(hatfit_yaw00_lev1_p50); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p50_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p51.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p51.mh new file mode 100755 index 0000000..9683559 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p51.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p51.mh: + +#ifndef stasm_hat_yaw00_lev1_p51_mh +#define stasm_hat_yaw00_lev1_p51_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p51(const double* const d) // d has 160 elements +{ + const double intercept = 0.0230474; + const double coef[160] = + { + 0.0663473, 0.000903765, -0.0568126, -0.0645652, -0.0530415, -0.0268245, -0.0218149, 0.0366416, + -0.014686, 0.000853658, 0.0810107, -0.00321661, -0.066158, -0.0160669, 0.00472433, -0.0332292, + 0.0330697, -0.00830061, -0.038049, 0.0414012, -0.025938, -0.0337634, -0.0624311, -0.0666223, + 0.0190076, 3.00099e-05, -0.0131323, -0.000139539, -0.0129442, -0.00751247, -0.00130726, -0.0481927, + -0.0262949, -0.0109233, 0.0115115, -0.00923386, 0.023316, 0.0373891, 0.0673234, 0.00609755, + -0.0574537, 0.0107934, -0.00300931, 0.00542485, 0.079916, 0.0676615, -0.0268088, 0.11462, + -0.0158615, -0.00119364, -0.0246292, 0.028597, 0.0300322, 0.00761411, 0.061184, -0.145516, + -0.00567826, 0.050977, 0.0545752, 0.0137527, -0.00676976, 0.0184424, 0.196666, 0.144337, + 0.0411955, 0.00197774, 0.0394365, -0.00925136, 0.0421624, -0.105268, -0.0782102, 0.115249, + 0.00126801, -0.0217805, -0.074432, -0.0324334, -0.0274283, -0.0287226, -0.0339885, -0.010246, + 0.0325106, -0.00227297, -0.0941444, -0.00635483, -0.0408689, -0.0332418, 0.0612756, -0.0524843, + 0.0355948, -0.0014673, 0.0306843, 0.0577673, 0.0199915, -0.0467922, -0.0840219, 0.0587219, + -0.0329374, -0.0208942, 0.0176221, -0.0472118, 0.0111347, 0.0012257, -0.0930815, -0.0833302, + -0.00729518, 0.0645366, -0.0184519, 0.0540724, 0.0145464, 0.0883286, -0.00444572, -0.0526893, + -0.000339233, -0.0349865, 0.0208982, 0.0190641, -0.0156414, 0.031688, 0.0360566, 0.0317097, + -0.0217811, -0.0349732, -0.00390683, 0.0259709, 0.00449953, 0.0655442, 0.00876421, 0.0173605, + -0.035843, -0.0170143, 0.0354342, -0.0122638, -0.00324034, 0.0223394, -0.00597277, -0.0410188, + 0.00998847, 0.0325441, -0.0168173, 0.0160914, -0.011555, 0.00730345, 0.0483929, 0.0374363, + 0.0135017, -0.0115598, -0.0202782, -0.0114978, -0.0321284, -0.0731003, -0.0334655, -0.00437303, + 0.0197171, -0.0246698, 0.0248675, -0.0169994, -0.000349178, -0.000402507, 0.0187988, 0.000184288 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p51(hatfit_yaw00_lev1_p51); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p51_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p52.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p52.mh new file mode 100755 index 0000000..b193f51 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p52.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p52.mh: + +#ifndef stasm_hat_yaw00_lev1_p52_mh +#define stasm_hat_yaw00_lev1_p52_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p52(const double* const d) // d has 160 elements +{ + const double intercept = 0.260475; + const double coef[160] = + { + -0.0122162, 0.0115179, -0.0394977, -0.0273243, 0.0081333, -0.0292732, -0.0272394, -0.0629533, + -0.0160925, -0.0153455, 0.0233635, 0.00893212, 0.0156689, -0.00794567, -0.0215812, 0.0127846, + 0.00154317, -0.0295031, -0.0112134, -0.0471515, -0.0387776, 0.00687466, -0.0651829, -0.00330553, + -0.00238385, 0.0168992, -0.0253943, 0.0126812, -0.00885185, -0.0310302, 0.0462275, -0.0090145, + 0.0199466, -0.00959636, 0.0223492, -0.043071, 0.00604921, -0.0458674, -0.0598643, -0.0317473, + 0.041322, 0.0243245, -0.0333469, 0.00167273, -0.0231955, 0.0280683, -0.0408995, 0.0521944, + 0.0471815, 0.0195343, 0.0768077, 0.0138787, 0.0532719, 0.0308796, 0.0358051, -0.040371, + -0.0161893, -0.000882692, 0.00726768, -0.00207923, -0.0419194, 0.0167848, 0.0744163, 0.0413397, + 0.00373214, 0.0212196, 0.0661876, 0.106068, 0.0905908, 0.0277513, -0.0535409, 0.0355472, + 0.00544559, -0.0416627, -0.0741092, 0.0324289, -0.0080518, 0.0432406, 0.015265, -0.0241128, + -0.0894882, -0.0119182, 0.0450217, 0.0378082, 0.0401644, -0.0560642, -0.0292303, 0.093536, + -0.0402295, -0.0737898, -0.0504552, -0.0355426, -0.0623674, 0.0272413, -0.0698962, 0.0609242, + -0.0243137, -0.0250455, -0.0456399, -0.00184349, 0.010865, -0.0160513, 0.0462055, -0.00131114, + 0.00717732, -0.0360419, 0.00377416, -0.100877, -0.150282, 0.102032, -0.119642, -0.0398214, + -0.0127371, 0.0342076, 0.0148993, -0.0137932, -0.0433186, 0.00366693, 0.0356687, 0.0112555, + 0.0687725, 0.0916713, 0.00660631, 0.0305018, 0.0272057, -0.0504018, 0.0325087, -0.0239357, + 0.0155957, -0.0185372, 0.00141619, -0.0305813, 0.0167892, 0.0193565, -0.00279585, 0.0248534, + -0.0360369, -0.0333261, 0.0219202, -0.00153852, -0.0756654, -0.0493757, -0.00439795, -0.0429899, + -0.00114111, 0.0156505, -0.0395002, -0.00583805, 0.0881942, 0.0363239, 0.0082846, 0.0303329, + 0.0175637, 0.0392368, -0.00202269, 0.0581765, 0.030248, -0.0268457, 0.0116774, -0.0235466 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p52(hatfit_yaw00_lev1_p52); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p52_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p53.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p53.mh new file mode 100755 index 0000000..1b223f5 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p53.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p53.mh: + +#ifndef stasm_hat_yaw00_lev1_p53_mh +#define stasm_hat_yaw00_lev1_p53_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p53(const double* const d) // d has 160 elements +{ + const double intercept = 0.00632593; + const double coef[160] = + { + 0.0162556, -0.016435, 0.0339606, 0.0190099, -0.00390404, 0.0151999, 0.0530393, 0.052145, + -0.00404482, -0.0094945, -0.0652414, -0.00307563, 0.0279835, -0.0286695, -0.00707483, -0.0602497, + -0.0578366, 0.00570518, 0.00521795, -0.0343149, 0.0021638, -0.0576883, -0.0745119, 0.019378, + -0.0841465, -0.0374895, 0.101069, 0.0372186, -0.00409056, 0.00763705, -0.0176534, -0.0721434, + -0.00235338, -0.0460276, -0.105931, -0.00206172, 0.126004, 0.0340346, 0.00308281, 0.0239345, + 0.00935259, -0.026381, -0.0517119, -0.0346371, 0.0437243, 0.0277076, -0.0788865, -0.0669713, + -0.0392242, 0.00309652, 0.0151427, 0.0303108, -0.0255152, 0.144139, -0.0251527, -0.0566317, + 0.00885491, 0.0283135, 0.037537, 0.0185783, -0.0110133, 0.00417545, 0.230708, 0.0531011, + 0.0907433, 0.0775194, -0.0214501, 0.011126, 0.0125839, -0.0929108, 0.00861834, 0.0431739, + 0.0294098, -0.00786103, 0.0294776, -0.0266784, -0.0651989, 0.0573041, -0.0222599, 0.0342067, + -0.00935431, 0.0617671, 0.0254821, -0.0025932, -0.0126894, 0.0202708, 0.0160974, 0.065353, + 0.0739513, -0.0176589, -0.0373128, 0.0569696, -0.0255352, -0.056134, -0.00311956, 0.0397551, + -0.00707641, 0.00840045, 0.0395881, -0.0274419, -0.000901333, 0.0115174, -0.11227, -0.0630251, + -0.0277898, 0.0103932, -0.0382606, 0.00752723, 0.0198304, 0.0285424, -0.0162424, -0.0462255, + -0.0205232, -0.00646888, -0.0418055, 0.0165335, 0.0309852, -0.0296247, 0.0262914, -0.0154413, + 0.00808804, -0.0302165, 0.0269277, -0.0276307, 0.00803103, 0.00727718, 0.00967092, -0.0103951, + -0.0485179, -0.0149506, -0.0186684, 0.0197415, 0.00151862, -0.0135448, -0.0159554, -0.0411914, + 0.0203195, 0.00491663, 0.00384737, -0.00418953, -0.000701313, -0.00528702, 0.030757, 0.0292946, + -0.0010533, -0.0195983, 0.0331644, -0.0196452, -0.0326561, -0.0333651, -0.00118972, 0.0528589, + 0.00832532, 0.00903297, -0.0053677, -0.0299995, 0.0035794, 0.0148879, 0.0135945, 0.0180385 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p53(hatfit_yaw00_lev1_p53); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p53_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p54.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p54.mh new file mode 100755 index 0000000..7268853 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p54.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p54.mh: + +#ifndef stasm_hat_yaw00_lev1_p54_mh +#define stasm_hat_yaw00_lev1_p54_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p54(const double* const d) // d has 160 elements +{ + const double intercept = -0.327895; + const double coef[160] = + { + -0.0260285, -0.0305355, -0.0270729, 0.0336952, 0.0120556, -0.0589881, 0.0423471, -0.0165861, + 0.0533515, 0.0665271, -0.00661282, -0.011853, -0.0202604, 0.0660017, 0.0285465, 0.00870395, + 0.011837, -0.00816245, 0.0137459, -0.0274992, -0.040575, -0.0637543, -0.0130194, 0.0133845, + 0.0178475, 0.0405467, 0.0289009, 0.0209144, 0.0200407, 0.0257918, 0.0374848, 0.0275908, + 0.0136018, -0.0102763, 0.00641704, -0.00874899, 0.00182998, -0.0147132, 0.009265, -0.0220378, + -0.00638297, -0.0385975, 0.0624042, 0.0211003, -0.0707084, -0.0690531, -0.0210087, -0.0194916, + -0.0478112, -0.0269841, -0.0424758, 0.0264064, 0.142619, -0.00246511, 0.0361538, -0.0312128, + 0.0834964, -0.0165381, -0.0157382, -0.0939294, 0.0240593, 0.0854562, 0.0349298, 0.14353, + -0.0906933, -0.0340672, 0.0548739, 0.0571566, -0.0687595, -0.0800209, -0.0813809, -0.0359659, + -0.00366757, -0.0117603, -0.0208327, -0.0119305, 0.0182508, -0.00730518, 0.00837606, 0.0256656, + 0.0411851, 0.0630306, 0.0979421, 0.0441905, -0.00305332, 0.00201647, -0.0361447, -0.0198163, + 0.00723425, -0.0100551, -0.110571, -0.0993676, -0.00957446, 0.0802569, 0.128686, 0.0888631, + 0.0427143, 0.0464205, 0.0483508, 0.0942419, 0.0700467, -0.018517, -0.103884, -0.116386, + -0.0176959, 0.0100904, -0.0232444, -0.0174606, 0.00793912, -0.00859066, 0.0853811, 0.00499183, + 0.0240163, 0.00380892, 0.00422997, -0.0257352, 0.0227225, 0.00677831, -0.0593922, 0.0328476, + 0.00827972, 0.0692015, 0.0431744, 0.0373662, -0.0140093, 0.0106239, 0.0258463, 0.0208192, + -0.0546277, 0.0957585, -0.0963772, -0.027162, 0.00231769, 0.0486463, 0.0512952, 0.00430508, + -0.0114316, 0.00979404, 0.0511977, -0.0338667, 0.00809882, -0.0153916, -0.0599761, 0.0148887, + 0.00670799, -0.0197052, -0.0426134, 0.0297467, -0.0830705, -0.0143339, -0.0152399, -0.00805109, + 0.00354804, 0.0101011, 0.0160634, 0.0429957, -0.0188213, 0.0160184, -0.0033741, 0.046853 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p54(hatfit_yaw00_lev1_p54); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p54_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p55.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p55.mh new file mode 100755 index 0000000..1602318 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p55.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p55.mh: + +#ifndef stasm_hat_yaw00_lev1_p55_mh +#define stasm_hat_yaw00_lev1_p55_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p55(const double* const d) // d has 160 elements +{ + const double intercept = -0.141314; + const double coef[160] = + { + -0.0184455, -0.0496397, -0.0592839, -0.00129605, 0.0152698, 0.00895235, 0.0198226, -0.0277392, + 0.00174921, 0.0466079, 0.136804, -0.0408086, -0.0219539, -0.0515463, 0.0376534, 0.0197422, + 0.0264812, -0.0747326, -0.0189345, -0.0108892, 0.12583, -0.050607, 0.0287181, 0.0893428, + 0.0338705, -0.0305728, -0.0605811, -0.123117, 0.0530918, 0.0561058, -0.0661859, 0.0142702, + 0.0222033, 0.00274117, 0.0488894, 0.00854528, -0.0357957, -0.0137169, -0.0860731, 0.0804902, + 0.0155904, -0.0489535, 0.110207, 0.0279448, 0.0146425, 0.0608853, -0.0478279, -0.0360042, + -0.0253087, 0.0520949, 0.00854192, 0.0698672, 0.0728003, 0.0192769, 0.0532905, -0.0539675, + 0.0194983, 0.0686626, -0.14808, -0.00330555, -0.0603803, 0.161152, 0.125227, 0.0176252, + -0.0489934, 0.129008, 0.0143522, 0.0924871, -0.0940712, 0.0170069, -0.0504719, -0.0804901, + -0.0535133, 0.0471255, 0.0155013, 0.041728, 0.0464161, -0.0309468, 0.022264, -0.0485352, + -0.0161353, 0.00673767, -0.069235, -0.0269012, -0.0468631, -0.0286551, 0.0185527, 0.00926746, + 0.0816668, 0.0315413, -0.0115304, 0.00704217, -0.081754, -0.0394356, -0.0400905, 0.0372851, + -0.0783434, -0.00330682, 0.0511188, -0.0193499, 0.0811155, -0.090431, -0.0156567, 0.0132851, + -0.0127041, -0.119106, 0.0548832, -0.0584279, 0.0635739, -0.0258336, 0.0090243, -0.00490429, + 0.0567433, -0.0508576, -0.0229306, 0.00359339, -0.0406265, -0.0266562, 0.00501218, 0.0391647, + -0.0125267, -0.00340731, 0.0125769, 0.0486265, 0.0777279, 0.00933577, -0.00487516, -0.0130414, + -0.0285719, -0.0331306, 0.00711141, -0.0199061, 0.0080499, 0.0135002, 0.0017077, -0.0214639, + 0.0445958, -0.0085222, 0.006994, 0.00919682, -0.0502234, 0.0181756, -0.0122827, 0.0353963, + -0.00204672, 0.0618339, -0.0356547, -0.000447894, -0.0157183, 0.00273223, -0.000334279, -0.0068244, + -6.21048e-05, -0.0152627, 0.000293438, 0.0261028, 0.0310108, 0.0125394, 0.0326627, 0.00563211 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p55(hatfit_yaw00_lev1_p55); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p55_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p56.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p56.mh new file mode 100755 index 0000000..47fdda9 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p56.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p56.mh: + +#ifndef stasm_hat_yaw00_lev1_p56_mh +#define stasm_hat_yaw00_lev1_p56_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p56(const double* const d) // d has 160 elements +{ + const double intercept = 0.017971; + const double coef[160] = + { + 0.00383981, 0.132936, 0.051431, 0.0241506, 0.0525363, -0.0220713, 0.0264425, 0.162811, + 0.010563, -0.024777, -0.0376598, -0.00827839, 0.00969403, 0.00935741, -0.0604863, 0.0154237, + -0.0274918, -0.0916428, -0.0771056, -0.0789401, -0.0175398, -0.0618622, 0.0553185, 0.000933057, + 0.016674, 0.0419166, -0.0552628, -0.010995, -0.000659341, 0.111832, -0.113944, -0.0251928, + 0.0213259, 0.0239533, 0.0910532, 0.124619, 0.00420422, 0.0613157, 0.0784614, 0.0147032, + -0.0502116, -0.00272015, -0.0218368, 0.0310639, -0.0254734, 0.0358821, -0.0424754, -0.0367543, + 0.034152, -0.0402477, 0.00443733, 0.0517393, -0.0272244, -0.0217685, 0.0550534, 0.0378432, + -0.0246521, 0.0384891, 0.112565, 0.0140988, 0.0115197, -0.0149323, -0.0195592, -0.0719281, + -0.0191504, 0.0050603, -0.00609517, 0.00456367, -0.0230841, 0.0247522, 0.0545905, -0.000413494, + 0.0194383, 0.0112078, -0.0309524, -0.0159333, -0.0384538, -0.0252684, -0.0531839, -0.0135636, + 0.0280733, -0.0273113, -0.0108497, -0.0499342, -0.0281279, -0.0259257, -0.0200306, -0.0279048, + 0.00745871, -0.00630893, -0.0226936, -0.0506898, 0.0313296, -0.00117594, -0.00321243, 0.00721248, + 0.0305157, 0.00244387, 0.0234044, 0.0174985, -0.0430736, -0.0159342, -0.033331, -0.0123217, + 0.0225584, -0.0402171, -0.028357, -0.0100419, 0.0292749, 0.00170746, 0.00587944, 0.0203983, + -0.0195129, -0.0348478, -0.00877047, -0.0150409, -0.0216345, -0.0229652, -0.0295588, 0.0128356, + 0.0211214, 0.0382187, -0.0154869, 0.0121175, -0.00290521, 0.00593086, 0.0205967, 0.0272012, + -0.0202218, -0.035515, 0.0315396, 0.0916433, 0.0619819, 0.00402121, -0.00515144, 0.0165358, + -0.0207477, 0.00806855, 0.00542765, -0.0761913, -0.0252847, 0.0203587, -0.0169178, 0.00516717, + 0.0370735, 0.0901672, -0.00499778, 0.0357751, 0.00468033, 0.0309109, -0.0129976, -0.0110622, + -0.0403696, -0.0231525, 0.0128741, 0.0240667, 0.0221441, 0.0157496, 0.0360906, -0.0192411 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p56(hatfit_yaw00_lev1_p56); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p56_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p57.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p57.mh new file mode 100755 index 0000000..b23935f --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p57.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p57.mh: + +#ifndef stasm_hat_yaw00_lev1_p57_mh +#define stasm_hat_yaw00_lev1_p57_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p57(const double* const d) // d has 160 elements +{ + const double intercept = -0.167239; + const double coef[160] = + { + 0.0260893, -0.0208531, 0.0851417, 0.0640984, 0.0395397, 0.0832486, -0.106037, -0.00565412, + 0.135724, -0.112393, -0.0760649, -0.0727544, 0.0301193, 0.0232471, -0.0351258, 0.0368426, + 0.0011005, -0.0139854, -0.0151755, -0.0914272, -0.00952267, 0.0704949, 0.0125235, -0.0656696, + 0.0163932, -0.0335675, 0.111352, 0.0753735, -0.00554281, -0.0227295, 0.0323614, -0.017804, + 0.0300734, 0.0112641, -0.0658481, -0.0309896, -0.0172728, -0.0217191, 0.0190975, 0.0200581, + -0.0304982, 0.111991, -0.030698, 0.014727, -0.0765688, -0.112386, -0.0101198, -0.0275647, + -0.0291291, 0.0641304, 0.0141026, 0.131626, 0.0186017, -0.0385728, 0.0421381, 0.0855096, + 0.0213613, 0.0420065, -0.102038, 0.0681566, 0.0273364, 0.00325661, 0.109219, 0.137224, + 0.0491412, 0.088167, 0.0714511, -0.0240283, -0.0108067, -0.02918, -0.00819857, 0.00807906, + -0.000642976, 0.0220372, 0.0679965, -0.0029879, -0.00222426, 0.00558169, -0.0326685, 0.0492872, + -0.0260234, -0.0484975, -0.0112216, -0.0918971, 0.020581, 0.0441363, -0.0100994, -0.0226429, + 0.0423898, -0.0759438, 0.0145201, -0.0784476, -0.110442, -0.0174169, 0.0110941, -0.0645113, + -0.0452308, -0.038347, 0.0775638, 0.0521202, 0.0446646, 0.0411368, -0.0421825, -0.0853063, + -0.0442879, -0.0157349, -0.0467638, -0.0149989, 0.0432842, 0.0192302, -0.0305666, -0.0181959, + -0.0200714, -0.035937, -0.0330333, 0.00311701, -0.0224627, -0.026858, 0.0243919, -0.00885834, + 0.0217909, 0.0593707, -0.0167115, 0.0215884, 0.0155522, -0.0263219, 0.0362682, -0.0223162, + -0.0338701, 0.0206674, -0.0189506, 0.0452908, 0.0427534, 0.0569601, -0.00517576, 0.0232792, + -0.0144103, 0.0177986, -0.00841608, -0.0333067, -0.0267299, -0.00136334, -0.00993319, 0.0110416, + 0.0370933, 0.0113945, -0.020208, -0.0220435, -0.0428138, -0.0156631, 0.0366901, 0.00527689, + 0.0700923, 0.0280007, 0.0391572, 0.0324461, 0.0177147, -0.00531412, -0.0189824, -0.0167404 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p57(hatfit_yaw00_lev1_p57); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p57_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p58.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p58.mh new file mode 100755 index 0000000..18448a5 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p58.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p58.mh: + +#ifndef stasm_hat_yaw00_lev1_p58_mh +#define stasm_hat_yaw00_lev1_p58_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p58(const double* const d) // d has 160 elements +{ + const double intercept = -0.387439; + const double coef[160] = + { + 0.0251959, -0.031358, 0.0248397, -0.0131824, 0.013193, 0.00977301, 0.0348601, -0.0349634, + -0.0411533, 0.0159114, 0.0200665, 0.0543823, -0.00285392, -0.0164136, -0.0131662, -0.0514869, + -0.0336987, -0.0299794, -0.0270398, 0.0109185, 0.0625347, 0.0464263, 0.0578354, 0.00233093, + -0.010815, 0.0476417, 0.0163326, 0.0303621, 0.01894, -0.00207762, 0.0393991, 0.0221854, + 0.0233303, 0.0113982, -0.0423612, -0.00875855, -0.0287951, -0.0320702, 0.0137407, -0.0522144, + 0.0268739, 0.0237628, -0.0114081, -0.0225842, -0.0248982, 0.0488374, -0.0460236, -0.00664693, + -0.145548, -0.00911589, 0.0412094, -0.0239402, -0.0495942, -0.0117525, -0.0624228, -0.0266718, + 0.16983, 0.00188042, -0.0316957, 0.0227592, 0.0206071, 0.0874189, 0.0592865, 0.0821602, + -0.0523558, -0.0319036, 0.00421973, -0.111092, -0.0440164, 0.0161895, -0.0261552, -0.00754087, + 0.0331884, 0.0112931, 0.0394848, 0.0335052, 0.000709858, -0.0220998, 0.010377, -0.065032, + -0.00952658, 0.00141604, 0.000973108, 0.00853263, 0.0150984, -0.0348417, -0.0396614, 0.0344867, + 0.0216721, 0.0202387, -0.0365127, -0.0293635, -0.00677211, 0.0411506, 0.0676114, 0.016138, + 0.127968, 0.025489, 0.0839619, 0.105465, 0.0564818, -0.10753, -0.0982015, -0.0440012, + -0.0646146, -0.0759671, -0.141105, -0.0364377, 0.00156565, 0.0914474, 0.140688, 0.105158, + 0.0291594, 0.0630341, 0.146519, 0.0441008, 0.0494588, -0.0256931, -0.0515613, 0.0123743, + -0.0393184, 0.0750014, -0.0384452, -0.0162481, 0.029397, 0.0409304, 0.0106834, -0.00793491, + -0.0516883, -0.041537, -0.00348172, 0.0114551, -0.0441435, 0.00598323, -0.0702927, -0.0302706, + 0.0455167, -0.0145394, -0.0133603, 0.0211058, -0.000153093, -0.0450269, 0.0275393, 0.00331146, + -0.0536648, -0.0167442, -0.0187828, 0.0685981, 0.0143649, 0.0544769, 0.00699127, 0.0343859, + -0.0182254, 0.0574156, 0.0272669, 0.0274204, 0.00861177, -0.0038009, 0.0266157, 0.038463 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p58(hatfit_yaw00_lev1_p58); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p58_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p59.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p59.mh new file mode 100755 index 0000000..0f1e06f --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p59.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p59.mh: + +#ifndef stasm_hat_yaw00_lev1_p59_mh +#define stasm_hat_yaw00_lev1_p59_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p59(const double* const d) // d has 160 elements +{ + const double intercept = -0.107774; + const double coef[160] = + { + 0.0426851, 0.0262278, -0.00991465, -0.000978476, 0.0458819, 0.0860606, 0.0126212, 0.0351958, + -0.0108269, 0.0156452, -0.00403915, -0.0589473, -0.0503682, -0.0320335, 0.00120433, -0.021901, + 0.0165196, 0.00485185, -0.0632538, -0.033039, -0.0857811, -0.0409284, -0.0988562, -0.0239078, + -0.0159283, 0.0137357, 0.0167643, 0.0372145, -0.0532216, -0.00210648, -0.0560769, -0.0308524, + -0.00231797, -0.00864326, -0.0076651, -0.0200123, -0.00891805, 0.0118245, -0.0131865, 0.00115877, + -0.0157525, 0.00356822, 0.0567132, 0.0403024, 0.0292255, -0.0482951, -0.0460269, -0.0327407, + -0.0675029, -0.0684373, -0.109158, 0.0287362, 0.0815637, 0.084078, -0.13562, -0.0559729, + -0.0141325, -0.00702409, 0.114953, 0.0541443, 0.100854, 0.170284, 0.183675, 0.146337, + -0.0231098, 0.0221174, 0.0281214, 0.0233031, -0.017274, -0.0041107, 0.0963267, 0.00364101, + 0.014492, 0.00786082, -0.00316655, 0.00596734, 0.0241714, -0.000496014, -0.00440175, -0.0178358, + 0.00585745, 0.0161528, -0.0458383, -0.00903678, -0.0375578, -0.0417482, -0.00357475, 0.0374616, + 0.0654028, 0.0913228, -0.0561372, -0.0271866, -0.0859397, -0.109589, -0.00593507, 0.052015, + 0.012834, 0.0383004, 0.0439461, 0.0182694, -0.0531884, -0.0306476, -0.0185561, 0.0390919, + 0.0141079, -0.0136812, 0.0498581, 0.0531345, -0.0225092, -0.044298, -0.0679187, -0.0250561, + 0.00712008, 0.00510321, -0.0365955, -0.0117867, -0.000928219, -0.019591, 0.00284898, -0.00144887, + 0.000711874, 0.000233623, -0.0184974, 0.00654051, 0.0396035, 0.0526651, 0.04285, 0.00770713, + -0.0319265, 0.0147321, 0.0456475, 0.00415368, 0.0131458, 0.0349704, -0.0124635, -0.0340754, + -0.0113526, -0.0312564, -0.022371, 0.0178618, 0.042623, 0.0281632, 0.0326478, -0.0512589, + -0.0159272, -0.0205289, -0.00583209, -0.00745363, 0.020593, -0.0142671, 0.0127739, -0.000311366, + 0.0624123, 0.00682976, 0.00476288, 0.00296209, -0.0286042, 0.00250046, -0.00978856, 0.0134617 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p59(hatfit_yaw00_lev1_p59); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p59_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p60.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p60.mh new file mode 100755 index 0000000..f8adb0f --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p60.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p60.mh: + +#ifndef stasm_hat_yaw00_lev1_p60_mh +#define stasm_hat_yaw00_lev1_p60_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p60(const double* const d) // d has 160 elements +{ + const double intercept = -0.116653; + const double coef[160] = + { + -0.00800115, -0.019492, 0.00130996, 0.093303, 0.0040077, 0.00293987, 0.0207828, 0.0148185, + -0.00817948, -0.0597545, 0.0187817, -0.0230762, 0.0288565, 0.0880908, -0.0261195, -0.0208943, + -0.0786128, -0.110647, -0.000169552, 0.0230022, -0.0147655, 0.02944, -0.07112, 0.00319348, + 0.0383762, 0.00837539, -0.0543089, -0.138768, -0.0885013, 0.00156443, -0.0660238, -0.00148416, + 0.189822, 0.067456, 0.0813394, 0.0406543, 0.018721, 0.000646743, 0.0077848, -0.0197932, + -0.0269575, -0.017093, -0.00285546, -0.0457437, -0.00899611, -0.102345, -0.0712876, 0.0432109, + 0.0359983, 0.056176, -0.0205152, 0.0611076, -0.018347, -0.0684581, 0.0147728, -0.00519016, + 0.0229803, 0.0944576, -0.0201227, -0.0464451, -0.00871038, 0.0315791, 0.0922994, 0.0030201, + -0.0269314, 0.0528, 0.0333682, -0.00605027, -0.030852, 0.04281, 0.0665199, -0.0700912, + -0.101844, -0.0220294, -0.0188747, 0.0615306, 0.0196525, -0.0799243, 0.0370941, 0.0902844, + 0.0416295, 0.052584, 0.0186824, 0.0684195, -0.0496191, 0.0324619, 0.13132, 0.0186903, + 0.0444294, 0.0309525, 0.00405779, 0.00128988, -0.0657186, 0.112942, 0.0240502, -0.00600384, + -0.0561522, -0.0562045, -0.0645724, -0.0383953, -0.0717917, -0.0210858, -0.0221317, 0.0233049, + -0.00346189, -0.0171532, 0.0635409, 0.0106124, 0.0421655, -0.0798043, -0.0581925, -0.0148507, + -0.0014853, -0.0312885, 0.00728589, -0.0465815, 0.00556272, -0.0347748, 0.0110482, -0.0348356, + 0.0195249, -0.00102007, 0.0754928, 0.0908389, 0.0423783, 0.0519425, 0.0120671, -0.00592963, + -0.0746104, -0.0188304, -0.109229, -0.0357286, -0.0569914, -0.0486546, -0.019758, -0.0133699, + 0.0361224, 0.0025763, 0.0344059, 0.0643234, 0.04667, 0.0730196, -0.0286662, -0.0235946, + 0.0214739, 0.0315117, -0.034062, 0.017128, -0.000353135, 0.054981, -0.0163462, 0.0336397, + 0.063106, 0.0276215, 0.0973305, 0.0433355, -0.0436393, -0.0243513, 0.0297241, 0.013637 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p60(hatfit_yaw00_lev1_p60); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p60_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p61.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p61.mh new file mode 100755 index 0000000..e64022a --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p61.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p61.mh: + +#ifndef stasm_hat_yaw00_lev1_p61_mh +#define stasm_hat_yaw00_lev1_p61_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p61(const double* const d) // d has 160 elements +{ + const double intercept = -0.355452; + const double coef[160] = + { + 0.00140287, -0.0316798, 0.0380944, 0.0396429, -0.00327414, 0.0534538, -0.0514958, 0.0113563, + 0.0628189, -0.0527768, -0.0827135, -0.00429168, -0.0555817, -0.0224312, -0.0407113, -0.00936148, + 0.117758, 0.0172411, -0.0474983, -0.0391484, -0.00839861, 0.0452208, -0.0689015, 0.0234783, + -0.0403392, 0.0229358, 0.0537275, 0.0364107, -0.0132679, 0.00101861, -0.0318202, 0.0280393, + -0.00788005, -0.0354963, 0.00622629, -0.0649081, 0.0307974, 0.0258964, -0.0857159, 0.0242797, + -0.040267, 0.0102513, -0.0156274, -0.102174, -0.0138545, -0.0322275, -0.0188658, -0.0404741, + 0.0330834, 0.0739416, 0.0376474, -0.0476424, 0.00287154, 0.00264503, 0.0639759, 0.0475915, + 0.0401054, -0.00781034, 0.0559358, 0.150539, 0.0994351, -0.0272158, 0.141554, 0.0275502, + 0.0128532, -0.0504704, 0.0469205, 0.0449008, 0.0408228, -0.0276349, -0.0209576, -0.0231619, + 0.072671, 0.12655, 0.0367423, -0.075046, -0.00881941, 0.0092089, 0.0531118, -0.0610395, + -0.0308093, 0.0767906, 0.0426318, 0.0265518, -0.0121348, 0.0626648, 0.1149, -0.0153465, + -0.0529852, -0.0242805, -0.0290872, -0.0384416, 0.0343093, -0.0252964, -0.0554503, -0.0615641, + -0.106664, -0.0378279, 0.00787081, 0.0156845, -0.0198557, -0.0269115, -0.0297493, 0.0352897, + -0.0297293, -0.0573563, -0.0150174, -0.00484731, -0.000683478, -0.0495411, 0.0360824, 0.16726, + -0.0293956, 0.00953138, 0.00360933, -0.0400254, -0.0715633, 0.142315, 0.0342854, -0.177897, + 0.0310687, -0.0126615, -0.0606509, 0.00786516, -0.0250216, 0.0461068, -0.041784, 0.0340997, + 0.0534171, 0.0510974, 0.0264472, 0.0273428, 0.00988166, -0.00606464, 0.0777458, 0.0387601, + 0.066705, 0.0378485, 0.0927968, 0.000296498, 0.00404288, -0.0435417, -0.0159648, -0.061769, + 0.00421003, -0.0703772, -0.062171, 0.017123, -0.0279047, 0.0872595, -0.00249575, 0.0153716, + -0.00386909, 0.0423806, 0.0198908, -0.00423521, 0.0487592, -0.0326987, -0.0145375, 0.0613222 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p61(hatfit_yaw00_lev1_p61); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p61_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p62.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p62.mh new file mode 100755 index 0000000..80d3416 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p62.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p62.mh: + +#ifndef stasm_hat_yaw00_lev1_p62_mh +#define stasm_hat_yaw00_lev1_p62_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p62(const double* const d) // d has 160 elements +{ + const double intercept = -0.401911; + const double coef[160] = + { + 0.184278, -0.00880947, -0.0685209, 0.00358168, -0.0459728, 0.0232556, -0.0864801, -0.00469044, + 0.0310894, 0.0243865, 0.0258792, 0.00859373, -0.00994606, 0.0328219, 0.00173091, 0.0121548, + -0.0353948, -0.036784, 0.0429776, -0.0300712, -0.0116732, -0.0122296, -0.108762, -0.0247855, + -0.0145263, 0.0219631, -0.00113074, 0.0309911, 0.107029, 0.0123373, 0.0532587, 0.069205, + -0.0494749, -0.0244451, -0.0697308, -0.0338787, 0.0873429, 0.0171967, -0.130104, 0.0204336, + -0.088184, 0.0317872, -0.00989599, -0.015471, 0.0552868, -0.0243923, 0.0858775, 0.0686318, + -0.0481306, -0.0770413, 0.0589144, 0.168037, 0.0945978, -0.0524547, 0.0839754, 0.124417, + 0.0480366, 0.0590726, 0.0667549, -0.0894952, -0.0230222, -0.0171754, -0.0533098, -0.0684075, + 0.0712733, 0.142855, -0.00189312, -0.00863717, -0.0647512, 0.101509, 0.0666608, -0.0918015, + -0.000196614, -0.0658736, 0.0204404, 0.0705559, -0.0270679, -0.0141069, 0.126831, -0.019163, + -0.0343151, 0.00672472, 0.03967, -0.0291874, 0.0336686, -0.0107086, -0.0043349, -0.0798378, + -0.0110414, -0.0650645, -0.0318544, -0.027198, -0.0480764, -0.0918649, -0.0143225, 0.107353, + -0.0130905, -0.00631972, -0.0110005, -0.0352918, 0.0152812, 0.102473, 0.0223577, -0.00408579, + -0.037512, -0.0288581, -0.0172214, -0.0453225, -0.0328941, -0.0150905, 0.0194013, -0.050533, + 0.0512633, 0.00142581, 0.0276191, 0.0555792, -0.0250743, -0.049271, -0.0158396, 0.00580838, + 0.0759738, 0.0489876, 0.00899392, -0.0250023, -0.0139366, -0.00691351, 0.069753, 0.02297, + -0.010819, -0.0195435, 0.0379298, 0.0638778, 0.00869268, 0.0244828, -0.0468469, -0.0425572, + 0.0265019, -0.00503489, -0.0229935, -0.0391067, 0.00398011, 0.0506024, 0.0196865, 0.0822405, + -0.0331631, 0.0331953, 0.0364992, 0.0264935, 0.0194893, -0.0485401, -0.0526263, -0.0288017, + -0.000343949, -0.00305366, 0.0195557, 0.00916105, 0.0849109, 0.0622262, 0.0617623, 0.0296367 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p62(hatfit_yaw00_lev1_p62); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p62_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p63.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p63.mh new file mode 100755 index 0000000..ebdf6f0 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p63.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p63.mh: + +#ifndef stasm_hat_yaw00_lev1_p63_mh +#define stasm_hat_yaw00_lev1_p63_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p63(const double* const d) // d has 160 elements +{ + const double intercept = -0.327027; + const double coef[160] = + { + 0.00117412, -0.0265293, 0.0414526, -0.00446532, -0.000780244, 0.0309753, -0.126524, 0.0273416, + -0.0422317, -0.00609733, 0.00825351, 0.00790836, 0.0291014, 0.0441713, -0.0145854, 0.0137382, + -0.00831013, -0.0526895, -0.037661, -0.00968318, 0.116618, 0.0103253, -0.0595431, 0.0496003, + -0.0665721, 0.00702109, -0.109901, -0.0827082, -0.00936522, -0.00162648, -0.0562617, -0.0153416, + -0.0065123, 0.0472623, 0.0634004, -0.0196607, -0.019769, -0.00566076, -0.0607523, 0.0749408, + -0.00611749, -0.0276194, 0.114619, 0.084836, 0.00815514, -0.0555772, 0.0391078, 0.0414358, + 0.121184, 0.147412, -0.0318164, -0.145786, 0.00704808, -0.0110287, 0.0164001, -0.0621218, + 0.0149256, 0.0808699, 0.0804086, 0.106282, 0.0405482, 0.0330293, 0.12561, -0.0589569, + 0.0224142, -0.108786, -0.00491116, 0.0465216, 0.0453282, 0.0296043, 0.0982771, 0.0627282, + 0.0506193, -0.0174854, 0.0256419, -0.0266217, -0.0465652, -0.0619258, -0.0532835, -0.0785362, + -0.0161707, -0.0490527, 0.0143398, -0.0138499, 0.020052, -0.0703482, 0.0590368, 0.134647, + -0.049885, -0.00266826, -0.0244827, -0.111946, -0.0878235, 0.15595, -0.000659438, -0.154788, + 0.00297078, 0.0132703, 0.0115521, 0.0331993, -0.0966483, -0.0545614, -0.026128, 0.0150231, + -0.0128654, -0.0320918, -0.0591223, -0.0218507, -0.0361654, -0.0115635, -0.0273279, -0.0585035, + -0.0352849, 0.0301985, 0.0714253, 0.0790165, 0.0457336, 0.00843746, 0.113132, 0.10087, + 0.0580212, -0.0135828, 0.00489927, 0.0153762, -0.0217218, 0.0638703, 0.000115968, 0.0334685, + -0.0241135, 0.00384658, -0.0261348, -0.0454305, 0.0297893, -0.0343742, -0.036355, 0.0349305, + -0.0196957, 0.00692413, 0.075663, 0.0631312, 0.0852203, -0.0199816, 0.0110331, -0.0218748, + 0.0535471, 0.0363862, 0.0293074, -0.00509621, 0.0277587, 0.0447058, 0.0520932, 0.00976812, + -0.00756772, -0.0466398, -0.0370653, -0.0200316, 0.0236178, 0.0165199, -0.0315377, 0.0236377 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p63(hatfit_yaw00_lev1_p63); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p63_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p64.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p64.mh new file mode 100755 index 0000000..6b196a9 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p64.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p64.mh: + +#ifndef stasm_hat_yaw00_lev1_p64_mh +#define stasm_hat_yaw00_lev1_p64_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p64(const double* const d) // d has 160 elements +{ + const double intercept = -0.221659; + const double coef[160] = + { + 0.0364118, -0.0340164, 0.0407147, 0.113031, 0.190778, 0.0314938, 0.0342179, 0.015366, + -0.0132611, -0.0636244, -0.040571, -0.081486, -0.0900368, -0.0268184, -0.089493, -0.0174274, + 0.0183977, 0.0234542, 0.0288216, -0.0624968, -0.0524316, -0.0307032, -0.0639346, 0.0857077, + -0.0308074, 0.00837735, -0.00453838, -0.0611632, -0.0128637, 0.0077273, -0.0417138, 0.0219363, + 0.00718579, 0.0559161, 0.000579146, -0.0125301, 0.0297841, -0.0235627, 0.0463869, 0.0387731, + -0.0562936, -0.0190806, 0.0087306, 0.0261748, -0.0659872, 0.00151971, 0.0554092, -0.0774134, + -0.0402783, -0.0251337, 0.00201256, 0.053982, 0.0628297, -0.00454475, 0.0813841, 0.0984645, + 0.0291425, 0.0222582, 0.0444502, 0.0767124, 0.0390445, 0.051904, 0.0941079, -0.00941949, + 0.00284052, 0.0111219, -0.0460434, 0.0373575, -0.00560822, -0.0544922, 0.00609882, -0.141022, + -0.024522, -0.0432508, -0.0190956, -0.0165462, -0.0313735, 0.0506585, -0.0642271, -0.0219566, + 0.0127945, -0.0164266, -0.01266, -0.0571315, -0.042462, -0.0443998, -0.0256433, -0.0906727, + 0.0369999, -0.00749289, 0.0305802, -0.0199618, -0.0398645, -0.012479, 0.0293881, -0.0915479, + -0.0875018, -0.0522991, -0.0300075, -0.0293367, 0.00304054, -0.0153113, -0.0852418, 0.0606356, + -0.0508301, 0.0473317, -0.00559567, -0.0145069, 0.0155352, 0.0937862, 0.0419105, 0.107439, + -0.0132481, 0.0641715, 0.0312028, 0.0733368, 0.0265372, 0.0135173, 0.106767, 0.0236229, + 0.00246322, 0.0206615, 0.10063, 0.0451973, 0.030797, 0.0583173, 0.00928432, -0.0118978, + 0.0111116, 0.0528778, -0.0254398, -0.00435345, 0.0536206, 0.0278869, -0.0166692, 0.118701, + 0.0105538, 0.0128111, 0.0164439, 0.0130927, 0.00129399, -0.0440021, -0.0115579, -0.019537, + -0.0620245, -0.0291088, -0.110246, -0.0248473, -0.0256739, -0.0519484, -0.000626873, -0.0129347, + 0.0514691, 0.105352, 0.0998094, 0.0253072, 0.0281183, 0.0241761, -0.00190695, 0.061081 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p64(hatfit_yaw00_lev1_p64); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p64_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p65.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p65.mh new file mode 100755 index 0000000..05ea80b --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p65.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p65.mh: + +#ifndef stasm_hat_yaw00_lev1_p65_mh +#define stasm_hat_yaw00_lev1_p65_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p65(const double* const d) // d has 160 elements +{ + const double intercept = -0.175002; + const double coef[160] = + { + -0.0277865, -0.00461839, 0.000804702, -0.00666069, -0.000353549, -0.00788238, -0.00938188, 0.0222033, + -0.050188, 0.00359491, 0.00366198, -0.0166296, 0.000297359, 0.00483099, -0.0825797, 0.000643547, + -0.0630764, -0.0659505, -0.0102977, 0.0360068, 0.0127702, -0.0259893, -0.0789133, -0.0683098, + -0.00482564, -0.0310966, 0.00995508, -0.0132953, 0.00953184, 0.0175084, 0.00165241, 0.00201592, + 0.0766108, -0.0181389, -0.0332234, 0.0332517, 0.0219349, 0.0512349, 0.0322202, 0.046018, + 0.0169466, 0.0146008, -0.0477406, 0.019435, -0.0121325, -0.0332415, 0.00211002, 0.00113552, + -0.00347845, 0.0185526, 0.0799375, 0.0184735, -0.0247489, 0.0306522, 0.132248, -0.00205819, + 0.13069, 0.115871, 0.0506738, -0.0372212, -0.0175758, 0.0684921, 0.122341, 0.269659, + 0.0665379, -0.0155841, -0.0518629, -0.0142568, -0.0944692, -0.088548, -0.11378, 0.01854, + 0.0115034, 0.0424948, 0.0296922, 0.0247563, 0.00335754, -0.00599567, -0.0309015, -0.0741586, + -0.0465119, -0.00161941, -0.0021765, -0.00246838, 0.0341996, 0.00583213, -0.0227952, -0.0198427, + -0.0189341, 0.0117395, 0.0318078, -0.0215246, -0.0300004, -0.00681776, -0.0461987, -0.0623052, + -0.0844771, 0.000542585, 0.0246798, 0.0770029, 0.0857678, 0.0739165, 0.0184543, -0.0843127, + -0.0576231, -0.0629255, -0.0450643, 0.00599557, 0.0455094, 0.0537528, 0.00473172, -0.0845924, + 0.0150027, 0.0171967, -0.0127595, 0.00703861, -0.0182145, -0.0213446, -0.00797504, -0.0245089, + -0.0192921, 0.0136112, 0.0116631, 0.00265455, -0.000741286, 0.0304773, -0.02086, -0.00264433, + 0.0204618, 0.0387465, -0.0510006, -0.041918, -0.0177707, -0.0228606, 0.0180372, -0.00552248, + 0.0331364, -0.00103725, -0.00155859, 0.00364934, -0.030725, -0.0601593, -0.00316454, 0.0510012, + 0.024794, 0.0200472, 0.0260482, 0.03692, 0.00540666, -0.012112, 0.012476, 0.0372805, + 0.0373335, -0.00687078, 0.0080672, -0.0159034, 0.0101183, 0.0374216, 0.0163694, 0.0310197 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p65(hatfit_yaw00_lev1_p65); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p65_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p66.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p66.mh new file mode 100755 index 0000000..7cf1ef9 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p66.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p66.mh: + +#ifndef stasm_hat_yaw00_lev1_p66_mh +#define stasm_hat_yaw00_lev1_p66_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p66(const double* const d) // d has 160 elements +{ + const double intercept = -0.114908; + const double coef[160] = + { + 0.0621479, 0.148664, -0.0808057, -0.0734325, -0.0779598, 0.112303, 0.0691012, -0.0734984, + -0.0891871, -0.0303359, -0.0296288, 0.0653355, 0.057726, -0.0747313, -0.0389204, 0.030748, + -0.0376043, -0.0242851, 0.00215944, -0.0128589, 0.0526175, -0.0154007, -0.0356016, 0.00790394, + 0.0393551, 0.0121278, 0.0740665, 0.101692, 0.0326844, 0.00688292, 0.0422339, 0.107239, + 0.0503345, 0.00995021, -0.0509846, 0.0117855, -0.0384774, 0.031577, 0.00134269, -0.127872, + -0.0709863, -0.149595, 0.00666169, -0.000596597, -0.0462128, 0.0550865, -0.0638316, -0.0380512, + 0.0592485, 0.0172013, 0.0699331, 0.0563683, -0.0446237, -0.0296292, 0.0829031, -0.0981408, + -0.00211501, -0.0287852, 0.0204565, -0.0160499, -0.0508642, -0.0430687, 0.0686544, -0.0860575, + -0.109292, -0.0432463, -0.0627935, -0.0897644, -0.0565552, -0.0392803, -0.0675007, -0.0981836, + -0.110825, -0.00265412, -0.024454, 0.00582448, 0.0328972, 0.0868582, 0.151676, 0.157909, + 0.0173907, 0.0769144, 0.0790404, -0.024212, 0.0882533, -0.0252413, 0.0427054, 0.0565396, + -0.00320091, 0.043672, -0.00638487, 0.015961, 0.0536973, 0.0572533, -0.0228992, 0.00460968, + 0.0530984, 0.0482597, 0.0217364, 0.0170837, 0.0227786, 0.0455684, -0.0356677, 0.14438, + 0.0971565, 0.0352834, 0.0686218, 0.0613583, 0.0810098, -0.0496866, -0.085401, 0.0643533, + -0.0701281, -0.0474367, -0.0551886, 0.0374986, 0.0114636, 0.0147769, 0.0209621, -0.0237301, + -0.0613557, -0.048417, -0.0312429, -0.0513667, -0.04645, -0.0179482, 0.0837733, -0.0114909, + 0.0243065, 0.00229574, 0.0533605, 0.0381334, 0.00564831, -0.00935319, -0.0554278, -0.015606, + -0.0499693, -0.00343467, 0.00644126, -0.00769993, 0.0214419, 0.017018, 0.00379739, -0.0394817, + -0.0649387, 0.00961401, -0.0294862, -0.047631, -0.0189085, -0.0200228, -0.0206836, 0.0113553, + 0.0340622, 0.0568404, -0.030138, -0.026374, -0.0548503, -0.0599922, 0.0537001, -0.0145433 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p66(hatfit_yaw00_lev1_p66); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p66_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p67.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p67.mh new file mode 100755 index 0000000..58885e7 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p67.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p67.mh: + +#ifndef stasm_hat_yaw00_lev1_p67_mh +#define stasm_hat_yaw00_lev1_p67_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p67(const double* const d) // d has 160 elements +{ + const double intercept = -0.113909; + const double coef[160] = + { + -0.0188617, 0.00316902, -0.0739061, 0.0282265, 0.003645, -0.057957, 0.0050709, 0.0242442, + -0.123112, -0.0885432, -0.0231802, 0.0524963, 0.145596, -0.0695975, 0.0542611, 0.213012, + 0.0771955, 0.0859766, 0.112913, 0.00182485, -0.041207, 0.0709448, -0.133451, -0.0534433, + 0.0443474, 0.0526311, -0.0920123, -0.0394857, -0.110341, 0.114107, 0.105256, -0.104847, + -0.0502754, -0.019576, -0.0423652, 0.00980916, 0.0210069, -0.0375084, -0.00186543, -0.0165352, + -0.068461, 0.033185, 0.0545209, -0.0520722, 0.0253465, -0.0047908, 0.0872255, -0.0718019, + 0.0179633, -0.0174179, 0.0828479, 0.0307566, -0.0581829, -0.0772103, -0.0863097, 0.0172761, + -0.0636419, -0.0857602, -0.225817, -0.129229, -0.0221761, 0.049664, 0.0880692, -0.0322266, + -0.00965428, -0.0102029, 0.113926, 0.0290924, -0.0104373, -0.0425892, -0.0732669, -0.0120473, + 0.0358277, -0.0121853, 0.0111512, 0.0297736, -0.0455152, -0.0421967, 0.106585, -0.0538339, + 0.119307, 0.0605931, 0.0337106, -0.0143666, -0.000475732, -0.00033312, -0.016137, 0.0540146, + -3.17965e-05, -0.0643621, -0.0239138, 0.0592346, 0.0313051, 0.0205812, 0.00707053, -0.00760147, + 0.0728607, 0.0906611, 0.112247, 0.0393033, 0.057346, 0.044609, 0.0267728, 0.111261, + -0.0273771, 0.0108312, -0.0310528, -0.0753102, 0.00676557, -0.00323801, -0.00547113, -0.042993, + 0.0217995, 0.000293362, 0.0527807, 0.052532, 0.0965316, 0.0762126, -0.050425, 0.0904335, + -0.00995776, -0.0420223, -0.0163665, -0.00787983, -0.0444523, -0.0292807, 0.00134789, -0.00916903, + -0.0439685, -0.00308172, 0.0153934, 0.0264436, -0.0139337, 0.0130059, 0.0210779, -0.0585686, + 0.00739594, -0.0367863, 0.016144, -0.0448992, -0.0466312, 0.00240427, 0.0113582, 0.0102517, + 0.000421868, 0.00283884, -0.0185146, -0.00344203, 0.00447471, -0.0599441, 0.0294516, -0.0166099, + -0.039928, 0.0147255, 0.0114217, 0.0182585, 0.000694995, 0.0165909, -0.0146478, -0.022212 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p67(hatfit_yaw00_lev1_p67); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p67_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p68.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p68.mh new file mode 100755 index 0000000..e4d551b --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p68.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p68.mh: + +#ifndef stasm_hat_yaw00_lev1_p68_mh +#define stasm_hat_yaw00_lev1_p68_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p68(const double* const d) // d has 160 elements +{ + const double intercept = -0.0472535; + const double coef[160] = + { + -0.0333984, 0.0656835, 0.0106519, 0.0399759, 0.0837495, -0.0590801, -0.0354664, 0.000401582, + 0.0507861, 0.0305926, -0.0299797, -0.0280611, -0.0375379, 0.0890645, 0.0991353, -0.0119074, + 0.0500358, 0.0327039, 0.0326631, 0.0156037, -0.0896013, -0.0172661, -0.0611493, -0.0487139, + -0.0158553, -0.0170312, -0.0675439, 0.0393561, -0.0252104, -0.0245059, -0.0460004, -0.00717333, + -0.0699404, -0.0325669, -0.0441731, 0.122475, 0.114906, -0.00302238, 0.0638788, 0.0975657, + 0.0238194, -0.0122492, 0.00939505, -0.0268166, -0.161655, 0.0738256, 0.133678, 0.0601642, + -0.0502025, -0.0815136, -0.0643104, -0.0445671, -0.0357928, -0.0869471, -0.0474168, -0.0431398, + -0.0825893, -0.0275855, 0.0356601, -0.0646219, 0.033888, -0.0717098, 0.0574178, -0.0301816, + -0.00499705, 0.0727134, 0.0824336, -0.0235041, 0.0235093, -0.0639051, 0.0631396, -0.0419611, + -0.037852, -0.0387067, -0.0240848, -0.111232, -0.0691031, -0.0380525, -0.0390921, 0.099562, + -0.00279045, 0.0328427, -0.0615046, -0.0442496, -0.0400743, 0.00526195, 0.00243521, 0.0295069, + 0.0521513, 0.0641226, 0.040687, 0.0798061, 0.0492278, 0.12391, -0.076507, -0.00658683, + 0.0782203, 0.0321287, 0.0274339, 0.0559232, 0.0188869, 0.0718778, -0.0556092, 0.0221964, + 0.0632411, 0.0219449, -0.0251334, 0.0464636, -0.0239108, -0.0166778, 0.0142018, 0.0594118, + 0.0749457, -0.0632603, 0.094559, 0.077424, 0.0532179, 0.0567741, 0.02659, -0.0608049, + -0.010741, -0.037765, -0.02709, 0.0687838, 0.0112361, 0.0066147, 0.0325352, -0.0838491, + -0.00727761, -0.00590156, -0.0304007, -0.00232171, -0.0285817, -0.0194663, -0.0117951, 0.0231252, + -0.000157544, 0.0139116, 0.00777066, -0.00782038, -0.00366661, -0.023865, -0.0216654, 0.0361765, + -0.00748849, 0.00483604, 0.0402628, 0.00263971, -0.0368632, -0.0121392, -0.00152512, -0.0232155, + -0.0494068, -0.0315213, -0.0389766, -0.00911571, -0.0881912, -0.00859301, 0.0414033, -0.0362998 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p68(hatfit_yaw00_lev1_p68); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p68_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p69.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p69.mh new file mode 100755 index 0000000..0b19712 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p69.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p69.mh: + +#ifndef stasm_hat_yaw00_lev1_p69_mh +#define stasm_hat_yaw00_lev1_p69_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p69(const double* const d) // d has 160 elements +{ + const double intercept = 0.138467; + const double coef[160] = + { + 0.0727278, 0.0410694, -0.0121286, 0.10934, -0.0571606, 0.039361, 0.0798405, 0.00142393, + 0.0423685, -0.0694792, -0.08714, -0.00116926, -0.0417457, 0.00768107, -0.0147799, -0.0480903, + 0.0175646, -0.0171768, -0.0445522, -0.00384396, -0.0298101, -0.0217389, -0.0199785, -0.0402522, + -0.0202302, 0.053779, 0.0185913, 0.0391604, 0.0158164, -0.0631713, -0.0215226, -0.013408, + -0.0493236, -0.0716819, -0.0305592, -0.00565181, 0.0295756, -0.0225791, -0.0125007, 0.0718176, + 0.0186186, 0.0286526, 0.0436904, -0.019139, -0.0522052, -0.00536649, 0.0472919, 0.0208337, + -0.0203697, 0.0782312, 0.0839855, 0.090479, 0.0706644, 0.0731851, -0.0965635, -0.0463428, + -0.0293672, -0.00786047, 0.0409683, -0.0374142, 0.0901149, 0.0818718, 0.0673608, 0.0438763, + 0.0559625, 0.0183026, 0.0521258, -0.00613286, 0.0426728, -0.00262783, 0.0623643, 0.0629963, + 0.0465622, -0.0554452, -0.000150035, -0.0175842, -0.00246682, 0.0739301, 0.0362838, 0.00592763, + -0.12026, -0.00668744, -0.0786816, -0.0647531, -0.0321518, -0.0100294, -0.0490275, -0.029289, + 0.0413105, 0.0238406, -0.0300419, -0.0638156, -0.110498, -0.0941771, -0.0253184, 0.0428704, + 0.0438465, 0.0224067, -0.0342461, 0.0399161, -0.0840878, -0.0685666, -0.0208694, -0.0306758, + 0.00892258, -0.00213832, 0.032049, 0.0173309, -0.0638428, -0.0443805, -0.0341364, -0.0546695, + -0.0353043, -0.0557252, 0.00519504, 0.0286246, -0.044046, -0.014966, 0.0130059, -0.0170023, + -0.0490745, -0.0462449, -0.0301219, 0.0728487, -0.00719909, -0.0244057, -0.014565, -0.0500982, + -0.0102718, -0.0382015, 0.0355018, -0.0108327, 0.0390334, 0.0880404, 0.0422387, 0.0559269, + 0.0475343, 0.0106384, 0.060598, 0.00438707, 0.021236, 0.0164531, -0.112987, 0.0802725, + -0.00106202, 0.0180457, 0.0100923, -0.0175058, 0.0423891, 0.0244042, -0.0349724, -0.0170408, + -0.0506162, -0.0169565, -0.0853738, -0.0504872, -0.0229947, -0.00657965, 0.132349, -0.025945 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p69(hatfit_yaw00_lev1_p69); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p69_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p70.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p70.mh new file mode 100755 index 0000000..b1e76b6 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p70.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p70.mh: + +#ifndef stasm_hat_yaw00_lev1_p70_mh +#define stasm_hat_yaw00_lev1_p70_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p70(const double* const d) // d has 160 elements +{ + const double intercept = -0.133387; + const double coef[160] = + { + 0.0424555, 0.0670308, 0.0010174, -0.0308677, 0.0528108, -0.070897, 0.0448855, -0.000525556, + -0.100123, -0.0861334, 0.0316145, 0.0169901, 0.0901615, -0.0500279, -0.0376332, 0.0427404, + 0.0720401, 0.0227514, -0.106129, -0.0212751, -0.0379922, 0.063484, 0.0188433, 0.0395767, + 0.0301117, -0.0215064, 0.0471855, -0.0341529, -0.0803298, -0.0145573, -0.0235636, -0.105323, + 0.0193279, 0.0311169, -0.0481364, 0.11473, 0.0624199, 0.0110681, 0.0336379, 0.00642461, + 0.0422275, 0.0139292, 0.155419, 0.0669998, -0.0508135, -0.00343256, -0.0168017, 0.0231051, + 0.0575028, -0.0536568, -0.0718591, 0.000673625, -0.0521534, 0.0252803, -0.00296366, -0.0187603, + -0.00851754, 0.0395557, 0.100741, 0.00741312, 0.0600377, 0.0807008, 0.0521776, 0.0797571, + -0.0629093, -0.00673294, -0.0946586, -0.116795, 0.0606276, -0.00622547, 0.0292151, 0.0388462, + -0.0109681, 0.0554172, 0.240807, -0.0162847, 0.0303524, 0.0470641, -0.0465172, 0.00661341, + -0.0431188, -0.0139805, -0.0778138, -0.0917159, -0.0543887, -0.0126208, 0.0157767, -0.0381842, + -0.0601245, -0.0132269, 0.0229161, 0.0946917, 0.0333466, -0.0432457, 0.00767451, 0.0313255, + 0.00869893, 0.0124194, 0.0200126, -0.0542009, -0.0419267, -0.0324422, -0.0361022, -0.0342807, + 0.0285237, -0.00941491, 0.042298, 0.0531628, -0.0579588, -0.00360975, 0.0202182, -0.0463113, + -0.0217165, -0.0558329, -0.10461, 0.000644266, 0.0265933, -0.0190376, -0.0139198, -0.0177487, + 0.042957, 0.0337059, 0.0435429, 0.0366932, 0.0356663, 0.0708965, -0.112017, 0.0768778, + -0.0748603, -0.02778, -0.0439688, -0.0396568, -0.0230837, 0.0124313, 0.140415, -0.0556834, + 0.000653722, -0.070152, 0.00936496, -0.058654, -0.0223955, -0.0612233, 0.00818948, -0.0656468, + -0.00210204, 0.0253095, -0.0739135, -0.00608692, 0.00664508, -0.0317965, 0.123874, 0.0472496, + 0.00864499, 0.017566, 0.100338, 0.0076835, 0.0248831, 0.089721, -0.121064, 0.0594471 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p70(hatfit_yaw00_lev1_p70); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p70_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p71.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p71.mh new file mode 100755 index 0000000..ce2385d --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p71.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p71.mh: + +#ifndef stasm_hat_yaw00_lev1_p71_mh +#define stasm_hat_yaw00_lev1_p71_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p71(const double* const d) // d has 160 elements +{ + const double intercept = 0.266632; + const double coef[160] = + { + -0.00323948, -0.0113591, -0.0336446, -0.0710632, -0.0705223, 0.062828, -0.0251187, -0.0602036, + 1.21336e-05, 0.0550747, 0.00732572, 0.0563387, -0.0153524, -0.0419621, -0.00887493, -0.0643784, + -0.0137269, -0.024181, -0.0454399, -0.00608388, 0.0322647, -0.0382676, -0.00581657, -0.016338, + -0.0108501, 0.0256067, -0.0825346, -0.032075, 0.013924, -0.0233511, -0.0214738, 0.0280752, + -0.107449, 0.0538449, -0.0324866, 0.0252568, 0.0629976, 0.0207773, 0.0430119, 0.0273273, + -0.014923, -0.0388074, 0.00823292, -0.045255, 0.0650417, 0.0443541, 0.0635936, 0.083295, + 0.0382236, 0.000554167, 0.0419841, 0.0106936, 0.0110228, 0.0459013, 0.00467543, 0.0332924, + 0.0945127, 0.0472357, 0.0382225, -0.0225111, -0.0164956, 0.0434837, 0.0606323, 0.118943, + 0.0227736, 0.0480948, 0.082012, 0.0256161, 0.0113917, -0.0481997, -0.073957, 0.00668885, + -0.0322754, -0.019252, 0.0818042, 0.00733527, 0.0100666, 0.00991564, 0.0338835, 0.000509096, + -0.0388687, -0.00841774, 0.0167134, -0.0761158, -0.0143569, -0.00907291, 0.0220304, -0.0468844, + -0.0292457, -0.000624045, 0.0446416, 0.0363924, -0.00851759, -0.0481172, -0.0102748, -0.0435456, + -0.133599, -0.0498851, -0.0371449, 0.0411598, 0.0312921, -0.00926869, -0.0673707, -0.0917156, + -0.042758, -0.0852033, -0.0295567, 0.059162, -0.0074855, 0.0215083, -0.0329871, -0.0651943, + -0.0189135, -0.00652077, -0.11006, 0.032581, -0.102509, -0.0305093, -0.00925267, -0.0128011, + 0.0166546, -0.0709906, -0.0983723, -0.0197508, -0.0533792, -0.0488329, 0.141153, 0.0443988, + 0.00938893, 0.0266859, 0.0275815, 0.0470291, 0.0272184, 0.0654562, -0.107629, 0.0189209, + 0.0634252, 0.0416836, 0.071386, -0.00291001, -0.0148239, 0.0567805, -0.071365, 0.0271712, + -0.0311755, 0.0128937, 0.00768441, -0.0793778, -0.0645176, -0.0124901, 0.0369286, 0.0268296, + 0.0126682, 0.0331465, -0.0406404, -0.0143453, -0.0388306, -0.0232577, -0.0152349, -0.00314514 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p71(hatfit_yaw00_lev1_p71); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p71_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p72.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p72.mh new file mode 100755 index 0000000..7e45765 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p72.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p72.mh: + +#ifndef stasm_hat_yaw00_lev1_p72_mh +#define stasm_hat_yaw00_lev1_p72_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p72(const double* const d) // d has 160 elements +{ + const double intercept = 0.298111; + const double coef[160] = + { + 0.0659044, -0.0136349, -0.000657047, -0.0524316, 0.0093208, 0.0259109, 0.0627028, -0.00903453, + 0.0274928, 0.0297302, 0.0694621, 0.0678002, 0.0654913, -0.0031269, 0.00777132, 0.0435105, + -0.0336438, -0.00949334, -0.0201626, 0.0315994, 0.0374407, -0.0292693, -0.0488771, -0.0692642, + -0.0778231, 0.0947238, 0.0986332, 0.0204165, 0.0653812, 0.0855347, 0.10902, 0.0990798, + 0.0252731, 0.0228385, -0.0354786, -0.0257165, 0.00979335, 0.0133789, -0.011996, 0.122096, + -0.116807, 0.03751, 0.0182167, 0.072391, 0.0461229, 0.0279572, -0.0575722, -0.0174644, + -0.110995, -0.0872117, -0.044589, -0.0274898, -0.0213475, -0.0663374, -0.0594111, -0.038104, + 0.0225458, 0.0143709, -0.0475647, -0.0176696, -0.0952845, -0.0270043, -0.0115237, -0.013899, + 0.0440536, -0.0365961, -0.0699315, -0.0686312, -0.0798702, -0.0546913, -0.00454662, -0.0516614, + -0.021318, -0.0627624, 0.0824855, 0.0662995, 0.0526493, -0.0404413, 0.0253183, -0.010623, + 0.0509673, -0.0313634, 0.0580512, 0.036311, 0.00554113, 0.0408745, -0.0538253, -0.0556542, + -0.0161722, 0.0340043, -0.0203796, -0.0764515, -0.0650205, 0.0578113, 0.091688, 0.00397961, + 0.0227092, -0.012721, -0.0121066, -0.0237495, 0.000210238, 0.00523915, 0.00866707, 0.0416126, + -0.00888034, 0.0335162, 0.00281285, 0.000216386, 0.0195712, -0.00883568, -0.0601433, -0.0224163, + 0.0219169, -0.0063463, -0.0157962, 0.0198269, 0.00410662, 0.00975731, -0.0218908, 0.0454962, + -0.0155503, 0.0988849, 0.0463098, -0.0100967, -0.0268059, 0.0566602, 0.072615, 0.0740009, + -0.0333233, -0.0182402, -0.0706448, 0.0125493, -0.040476, -0.0350976, -0.137625, 0.00128251, + -0.0558219, -0.00671415, -0.0848036, 0.0173377, -0.0294549, -0.000625941, -0.0863849, -0.0417296, + -0.00513088, -0.0261223, 0.0074173, -0.0278166, -0.0170869, 0.00271093, 0.0106674, 0.0273419, + -0.0100846, 0.00562695, -0.00600253, 0.0216703, -0.00989039, -0.00382208, 0.0260593, -0.000255542 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p72(hatfit_yaw00_lev1_p72); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p72_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p73.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p73.mh new file mode 100755 index 0000000..1a6731b --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p73.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p73.mh: + +#ifndef stasm_hat_yaw00_lev1_p73_mh +#define stasm_hat_yaw00_lev1_p73_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p73(const double* const d) // d has 160 elements +{ + const double intercept = 0.444151; + const double coef[160] = + { + -0.020546, 0.0161181, 0.0654594, -0.0948747, 0.0285488, 0.0408993, -0.0211689, 0.0247758, + -0.00582393, 0.0185156, 0.0725341, 0.00802478, 0.0177493, 0.0507399, 0.0132491, 0.00144042, + -0.0140682, 0.0033576, -0.000123129, -0.0115809, -0.00328298, 0.0253079, -0.0533519, 0.0387285, + -0.00350354, -0.0703206, 0.0106172, -0.0374575, 0.0282741, 0.0254831, -0.0700683, -0.0170526, + -0.0364723, 0.0324261, -0.0404725, 0.0728566, 0.00123376, -0.01443, 0.0143197, -0.0289, + -0.044168, -0.0394531, -0.0453126, -0.0427691, -0.0969554, -0.104084, 0.0706115, -0.0336697, + -0.0357658, -0.00877757, -0.018146, 0.0280338, 0.0330396, -0.0116376, -0.0718934, -0.0169607, + -0.00429307, -0.00922947, -0.0148544, 0.0603271, 0.0430832, 0.0702863, -0.0180784, -0.0242528, + -0.0409658, 0.0116987, 0.0459699, 0.0121752, -0.0819474, -0.00677367, 0.0379443, -0.0223598, + -0.0292117, 0.000454892, -0.0194356, -0.031597, -0.109613, -0.0242186, -0.00652066, 0.0350001, + -0.012082, 0.0091048, 0.065266, -0.0128821, 0.028678, 0.00238832, 0.182173, -0.0143746, + 0.0724319, 0.0371631, 0.0456258, 0.0132541, 0.031683, -0.0492994, 0.0593304, 0.0549378, + 0.0210115, 0.00293678, -0.0423056, -0.0732382, -0.0307535, 0.00439763, -0.0169179, 0.0584682, + -0.00417461, -0.000920001, -0.0323396, -0.0243903, -0.0290335, -0.0224079, -0.0441952, 0.0355719, + 0.00940746, 0.0466832, -0.0271315, -0.0411812, 0.00951903, -0.0392041, -0.112846, -0.0197858, + 0.0278604, 0.00782806, -0.0426082, -0.0257704, 0.0161067, 0.0148668, -0.128532, -0.0126304, + 0.0221653, -0.0646441, 0.00312968, -0.0427131, -0.0420398, -0.021803, -0.0280242, 0.00798578, + -0.0327944, -0.0170829, -0.0214821, 0.058862, 0.0327726, 0.00170463, -0.029606, 0.0144036, + -0.0451911, -0.0545393, -0.0336726, 0.0161638, -0.0212735, 0.00839933, 0.00677629, -0.0399395, + -0.0440208, 0.0470579, 0.01285, 0.0786805, 0.00188622, -0.00854256, 0.00466533, -0.00454773 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p73(hatfit_yaw00_lev1_p73); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p73_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p74.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p74.mh new file mode 100755 index 0000000..f7dcbd7 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p74.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p74.mh: + +#ifndef stasm_hat_yaw00_lev1_p74_mh +#define stasm_hat_yaw00_lev1_p74_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p74(const double* const d) // d has 160 elements +{ + const double intercept = -0.0861693; + const double coef[160] = + { + 0.0377272, -0.052074, 0.0842496, 0.0269239, -0.0173226, -0.0148563, -0.0387223, 0.0620431, + -0.0304301, -0.0629466, -0.011215, 0.0698194, -0.0163436, 0.0618149, -0.0107698, 0.00857855, + 0.0154768, 0.0553717, 0.0201951, -0.0199971, 0.0157546, 0.0529829, -0.0227046, 0.0993725, + -0.00917861, 0.0140864, 0.0278605, -0.0611641, -0.0496295, -0.0369097, -0.00715461, 0.0107413, + -0.00622658, -0.00358566, 0.0699447, -0.027576, 0.0455637, 0.125504, -0.0768594, 0.0122902, + 0.0925916, 0.0657672, -0.020839, -0.0717925, -0.0366377, -0.0562988, 0.0310773, 0.0800754, + -0.0604142, -0.0229939, 0.00696296, -0.00243065, 0.0139147, -0.0643964, 0.0709301, -0.0999129, + -0.0211337, -0.0358355, -0.02303, -0.0486519, -0.0799998, -0.0850369, 0.0285144, -0.0695838, + -0.0289704, 0.000604421, -0.00804623, -0.0119128, 0.013159, -0.0179008, 0.0642296, -0.0752543, + -0.0255169, -0.0183058, 0.0117462, 0.111172, 0.0510885, 0.0540716, 0.00467105, -0.00388082, + -0.0727964, -0.0721001, -0.0465695, 0.0430624, -0.0273294, 0.141421, -0.119877, -0.0860733, + 0.0234302, 0.004918, 0.106259, -0.0271116, 0.0233788, -0.0203192, 0.135544, 0.0318046, + 0.0164929, -0.0175186, 0.0115526, 0.000396585, 0.0416848, 0.0269781, 0.00863606, -0.0310569, + 0.0687198, 0.0206739, 0.124923, 0.0268222, 0.0208457, -0.0239115, 0.129879, 0.0822653, + 0.0138962, 0.0317609, -0.0513746, -0.0950611, -0.00748574, -0.0715021, -0.146752, 0.101075, + 0.0161374, 0.0291443, -0.0163718, -0.00827008, 0.0423341, -0.0263848, -0.0503185, -0.00127387, + 0.00326663, -0.0664793, 0.00148467, 0.031439, -0.00665274, 0.00286052, -0.0226317, 0.00987852, + -0.0108395, 0.0167889, -0.0189328, -0.00941313, 0.0100464, 0.00736375, -0.0125995, 0.0145155, + -0.0128805, 0.0106394, -0.0727996, -0.0944875, -0.0211638, 0.040031, -0.0387772, -0.0253539, + 0.0236832, -0.0159759, 0.0388389, 0.0955583, -0.0130999, -0.0450405, -0.026158, -0.0274946 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p74(hatfit_yaw00_lev1_p74); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p74_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p75.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p75.mh new file mode 100755 index 0000000..9d6c29f --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p75.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p75.mh: + +#ifndef stasm_hat_yaw00_lev1_p75_mh +#define stasm_hat_yaw00_lev1_p75_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p75(const double* const d) // d has 160 elements +{ + const double intercept = 0.244095; + const double coef[160] = + { + -0.000899974, 0.0353078, 0.0145825, -0.0121622, -0.00485157, -0.0256038, -0.0205757, -0.00587983, + 0.0199168, -0.0300858, -0.0231304, -0.0156234, -0.0188123, 0.0105047, -0.0780988, 0.0180119, + 0.0160617, -0.0164322, 0.0267275, 0.0324825, 0.0183688, 0.0275049, -0.0196376, 0.0290752, + 0.0127766, 0.00365792, 0.074349, 0.0197182, -0.00756497, -0.0135765, -0.00210256, 0.0444623, + 0.0134508, -0.0655841, 0.0336806, 0.0269161, -0.0119017, 0.0793009, -0.00775912, 0.0461052, + -0.115087, -0.0353255, 0.0132794, 0.00745167, -0.0310263, 0.0243837, 0.00809966, -0.00518043, + 0.0636831, 0.037696, 0.0776245, -0.0330936, 0.000981091, -0.00115743, 0.0407476, 0.0586357, + 0.0680963, 0.0492938, -0.00274996, -0.00482297, -0.0331305, -0.0555758, -0.0430299, 0.0130458, + -0.00616732, -0.0500856, -0.0828604, -0.0381615, -0.0566974, -0.0150602, 0.0302092, -0.0708142, + -0.0398492, 0.00213115, 0.00406433, -0.00636538, -0.0487779, -0.0669123, 0.0364117, -0.0910838, + -0.017267, -0.033364, -0.0169948, 0.0431293, 0.0316849, -0.0475541, -0.10673, -0.085643, + -0.0627401, -0.022714, -0.0650185, 0.060876, -0.0126668, 0.0498532, -0.0311162, -0.00631595, + -0.0592686, -0.0217015, -0.0353328, 3.01015e-05, 0.00939841, 0.0838227, -0.0118762, 0.046194, + -0.0344715, 0.010483, 0.0423841, 0.0120006, 0.0735342, 0.0507255, 0.0291151, -0.0374105, + 0.0230171, -0.0427561, 0.0774957, -0.0130141, 0.0157903, -0.0284648, 0.205693, -0.00952433, + -0.00556125, 0.0859779, 0.0195645, 0.000381589, -0.0186602, -0.0494488, -0.0101716, 0.00144208, + 0.0220583, 0.00610326, -0.0362644, -0.0273198, -0.0653834, -0.0249836, 0.0135337, 0.0338374, + 0.0109754, 0.0187904, -0.0189524, -0.0386528, -0.00947884, -0.0129014, -0.0440307, -0.0168492, + 0.00959161, -0.0341214, 0.00378802, 0.0197966, 0.0237692, 0.00692549, -0.0449733, 0.0142163, + 0.0276045, 0.0132254, -0.0378692, -0.0531314, -0.0021312, 0.0143778, -0.106118, 0.0143603 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p75(hatfit_yaw00_lev1_p75); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p75_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p76.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p76.mh new file mode 100755 index 0000000..ef0902e --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev1_p76.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev1_p76.mh: + +#ifndef stasm_hat_yaw00_lev1_p76_mh +#define stasm_hat_yaw00_lev1_p76_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev1_p76(const double* const d) // d has 160 elements +{ + const double intercept = 0.167083; + const double coef[160] = + { + 0.0178567, 0.00471566, -0.00311486, 0.0590848, 0.018484, 0.109937, 0.0273678, 0.0385779, + 0.0964948, 0.0198502, 0.0733013, 0.0630774, -0.0975216, 0.0475847, 0.141174, 0.055912, + 0.0450708, 0.102869, -0.0110608, 0.0225142, -0.00837921, -0.0446967, -0.0637368, -0.0486541, + 0.007223, 0.0421737, 0.0486142, 0.035173, 0.0203823, 0.0383853, 0.00289787, -0.0133363, + 0.00970628, -0.0349687, 0.0170089, -0.0533628, 0.0531978, 0.000440911, 0.046605, 0.0487779, + 0.000617105, 0.0353907, 0.0273192, -0.092682, -0.0704793, -0.0155085, -0.0217113, -0.0631617, + -0.112172, -0.0802243, -0.0608824, 0.0123457, 0.101898, -0.0345389, 0.00356435, -0.0256903, + -0.0861817, -0.0318411, -0.00801122, -0.0602708, -0.0648524, -0.0169876, -0.0223819, -0.0399834, + 0.0246939, -0.00651791, -0.025922, -0.0122764, -0.0152515, -0.074221, -0.0428134, 0.0231071, + 0.0214263, 0.0464157, -0.00333684, 0.0686476, -0.0726611, -0.01918, -0.0510255, -0.0121835, + 0.0251027, 0.017702, -0.020816, 0.0256276, 0.062492, 0.031742, 0.0160975, 0.0905406, + -0.00495778, -0.0248092, -0.0028224, 0.00834231, -0.0172717, -0.0282789, -0.0644648, -0.091834, + 0.0375562, -0.00619002, -0.00536505, 0.020868, 0.032814, 0.0248805, 0.0170806, 0.0586391, + -0.0149593, -0.0445147, 0.0531902, -0.0218665, -0.0289037, 0.065172, 0.0438367, 0.017724, + 0.0487856, 0.0179788, 0.0317689, -0.0629089, 0.0142979, -0.051581, -0.00846684, 0.0634947, + -0.0244065, 0.00798281, 0.0281053, -0.0294804, 0.00115965, 0.0110325, 0.0143852, -0.0351062, + -0.0154878, -0.0199757, -0.0262725, 0.00266283, -0.0202465, 0.0119766, -0.0192617, 0.0439345, + -0.0650565, -0.0194041, -0.0956524, -0.0440435, -0.00749312, -0.0431471, -0.067371, -0.054401, + -0.0463175, 0.0219669, -0.0384754, 0.0520812, -0.0308316, -0.0167847, -0.100874, 0.0112061, + -0.0256602, -0.0237249, 0.0170488, 0.0909679, -0.0136034, 0.0805518, 0.0374694, 0.0708242 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev1_p76(hatfit_yaw00_lev1_p76); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev1_p76_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p16.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p16.mh new file mode 100755 index 0000000..d1fa3ee --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p16.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p16.mh: + +#ifndef stasm_hat_yaw00_lev2_p16_mh +#define stasm_hat_yaw00_lev2_p16_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p16(const double* const d) // d has 160 elements +{ + const double intercept = 0.201199; + const double coef[160] = + { + 0.0479748, -0.00784569, -0.0839676, -0.0402904, -0.00990121, -0.0161831, 0.0171531, 0.0633562, + 0.0458178, 0.038718, -0.00229275, -0.00807225, -0.00097018, -0.0167164, -0.0218175, 0.0212908, + 0.0483748, 0.0306654, 0.00668657, -0.0368009, 0.00499699, -0.0319757, -0.0424916, 0.0178991, + 0.0126939, 0.0156106, -0.0195705, -0.0524409, 0.00303049, -0.00036784, -0.0339076, -0.00650181, + -0.00221962, 0.0418911, 0.0109849, -0.0273736, -0.026405, 0.0189485, -0.0374008, -0.0135253, + -0.0509223, -0.017173, -0.00960212, -0.00728783, 0.0171797, 0.0235679, 0.11178, 0.00767195, + -0.0532631, -0.0134703, 0.0251553, 0.0296362, 0.0100125, -0.00951279, 0.0175886, -0.0152258, + -0.0643198, -0.00778827, 0.0185586, 0.0440405, 0.0352242, 0.000335484, 0.0510853, -0.0333015, + -0.0664789, -0.022523, 0.0492345, 0.0635387, 0.0590402, -0.0214514, 0.0291401, -0.0576358, + -0.0595315, -0.0602438, -0.0498133, -0.00367544, 0.0452483, -0.0124489, 0.125025, 0.0170502, + -0.0049248, -0.0393945, 0.0171818, 0.0114648, -0.0132102, -0.016775, 0.0096432, -0.0147961, + 0.0331186, 0.00980842, -0.0214262, -0.0321873, -0.0313714, -0.0137095, -0.0132678, 0.0154735, + 0.0614494, 0.0190023, 0.00482608, -0.0350526, -0.0510161, -0.04975, -0.0354202, 0.0309835, + 0.0550816, 0.0681949, 0.0527185, -0.0125734, -0.0319863, -0.0356415, -0.0373618, 0.0207985, + 0.0501947, 0.0225517, -0.0432618, 0.00168456, -0.00521152, -0.013559, 0.00523639, 0.094479, + -0.00574153, -0.0537307, 0.0131248, -0.00685395, -0.0151087, 0.00691375, -0.00111654, -0.0486872, + -0.014142, -0.0469476, 0.00942551, 0.0237295, 0.0337823, 0.0245199, 0.0387013, -0.0252803, + -0.0613539, -0.0400444, 0.0029828, 0.00468973, 0.00446706, 0.0299791, 0.00778386, -0.0241703, + -0.0407481, -0.00160535, 0.00760824, 0.00280452, -0.0209072, -0.0135813, -0.030542, -0.0249088, + -0.0641581, 0.0137424, -0.0494603, -0.0549461, -0.0140327, 0.010657, -0.0297539, -0.0048274 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p16(hatfit_yaw00_lev2_p16); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p16_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p17.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p17.mh new file mode 100755 index 0000000..dec1d34 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p17.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p17.mh: + +#ifndef stasm_hat_yaw00_lev2_p17_mh +#define stasm_hat_yaw00_lev2_p17_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p17(const double* const d) // d has 160 elements +{ + const double intercept = 0.0641183; + const double coef[160] = + { + 0.00548101, -0.0278398, -0.0529979, -0.0184241, -0.0244758, 0.00750857, -0.0870743, -0.0408273, + 0.0191316, -0.0132359, -0.0197415, -0.0282264, -0.0230354, -0.0469168, 0.00305976, 0.00509154, + 0.0337102, 0.0317416, -0.0147772, -0.0521098, -0.0298594, -0.0364094, 0.00320256, -0.00965839, + 0.0502111, 0.0040414, -0.0186344, -0.00963626, -0.00643085, -0.0348256, 0.0274904, 0.0428869, + 0.0423164, 0.0703478, 0.0436876, -0.043167, -0.0155584, -0.0627262, -0.0910627, -0.0270945, + 0.0381986, 0.0170332, -0.0378051, -0.0305759, -0.0101497, 0.0294837, 0.0541005, 0.0204143, + -0.0107043, 0.0141293, -0.000124892, -0.00228929, -0.00584688, 0.0562794, 0.029545, 0.0289569, + -0.0294728, -0.00693026, -0.00502799, -0.0220686, 0.017127, 0.0168838, 0.0372847, 0.035913, + -0.0387757, -0.00677981, 0.0154889, 0.00584213, 0.0138248, 0.022448, 0.0259633, -0.000267879, + -0.0199762, 0.0355431, 0.0268489, 0.059433, 0.0371466, -0.0195291, 0.0631884, 0.0154288, + -0.0666278, -0.0212345, 0.00775835, -0.0203998, -0.00585601, 0.118692, 0.0160203, 0.00520236, + -0.0245992, -0.0205268, 0.0347002, 0.0146157, 0.021682, 0.0334895, -0.0537345, -0.0151598, + -0.0188597, -0.0376348, 0.0303035, 0.0415455, 0.0246958, 0.0142054, -0.0206932, 0.00589225, + -0.0151944, -0.0372652, 0.00272563, -0.00158859, 0.0128479, 0.00141992, -0.0375236, -0.0219545, + -0.0257391, -0.0161181, 0.0355049, -0.0246824, -0.0230046, -0.0200004, 0.00343231, 0.0139045, + -0.00558463, 0.0414232, -0.0391887, -0.048578, -0.0148066, 0.00240101, -0.0306445, 0.0222875, + 0.0113709, 0.0243018, 0.0126473, -0.0107071, -0.028586, -0.0114096, 0.00955817, 0.00577993, + 0.00295543, -0.00017432, -0.00483328, -0.00866622, -0.0210113, -0.00407164, 0.00779089, -0.0204989, + 0.0224204, -0.0126428, 0.0216603, 0.0197888, -0.00295644, -0.000934317, 0.0240641, -0.0132466, + 0.0069265, -0.0727936, 0.0252536, 0.0185129, -0.00494405, 0.00818837, 0.0187053, -0.0385674 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p17(hatfit_yaw00_lev2_p17); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p17_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p18.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p18.mh new file mode 100755 index 0000000..2aa4ba4 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p18.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p18.mh: + +#ifndef stasm_hat_yaw00_lev2_p18_mh +#define stasm_hat_yaw00_lev2_p18_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p18(const double* const d) // d has 160 elements +{ + const double intercept = -0.464167; + const double coef[160] = + { + -0.0070516, -0.0138885, -0.00838615, 0.0241183, 0.00800509, -0.0107691, -0.0318889, -0.0226589, + 0.0601676, -0.0169016, -0.00575287, -0.0394743, 0.0451446, -0.0203331, -0.0540854, -0.0105876, + 0.0294445, -0.0333346, -0.0331402, -0.0444691, 0.0121001, 0.0844445, 0.041568, 0.0562884, + -0.0322616, 0.0360436, 0.00921021, -0.013502, -0.0027091, 0.0523874, 0.0272614, 0.012032, + 0.000168089, 0.0174628, 0.0798083, 0.0276852, 0.0135955, 0.0296484, 0.0129555, 0.0806812, + 0.0500424, 0.00710139, -0.00429781, -0.0238927, 0.00206671, -0.0204532, 0.0172665, -0.000815265, + -0.00492949, -0.00120939, -0.0317968, -0.00504358, 0.00071816, -0.00772781, 0.00686577, 0.0260517, + -0.028403, 0.0759707, 0.0504597, 0.0504078, 0.0332929, -0.00196605, -0.000229055, -0.0222047, + 0.0165769, 0.0412389, -0.00796234, -0.00544252, -0.0125328, -0.0431626, -0.00170195, -0.0120648, + -0.0211015, 0.00974593, 0.0316203, 0.0240425, -0.00954887, 0.0135305, 0.0313708, -0.0139964, + 0.00818618, -0.0291873, -0.0385677, -0.0388603, -0.00953679, -0.0185117, 0.00438256, -0.0280945, + 0.00657028, -0.0137535, 0.0160152, 0.0283693, 0.0329595, -0.00655665, 0.0025663, -0.00771347, + 0.0294882, 0.0260856, 0.00637648, -0.00866566, -0.040871, -0.0224035, -0.00895485, -0.00151325, + 0.00673054, -0.0275637, -0.0518765, -0.0346669, -0.0177936, 0.0449881, 0.0065214, 0.00766954, + 0.0429394, 0.0386208, 0.0464108, 0.00573303, -0.0410096, 0.00386441, 0.0278229, 0.0230318, + 0.0152115, -0.0100685, 0.0293164, 0.0540824, 0.0292131, 0.0355769, 0.000325612, -0.0256946, + -0.0172053, -0.00233631, 0.00716747, 0.0294623, -0.00225413, -0.0271301, -0.037571, -0.00656058, + -0.00636178, -0.0178503, -0.0179586, 0.0090866, 0.0361297, 0.00409523, -0.0119827, -0.0166724, + 0.00418527, -0.00409336, 0.00976438, 0.0118843, 0.0649968, 0.00491458, -0.0490295, 0.00522135, + -0.0017874, 0.00497965, -0.0123665, 0.0632608, 0.0561797, 0.0983509, 0.126985, 0.0707482 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p18(hatfit_yaw00_lev2_p18); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p18_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p19.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p19.mh new file mode 100755 index 0000000..c0c45d2 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p19.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p19.mh: + +#ifndef stasm_hat_yaw00_lev2_p19_mh +#define stasm_hat_yaw00_lev2_p19_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p19(const double* const d) // d has 160 elements +{ + const double intercept = -0.240635; + const double coef[160] = + { + 0.0168096, -0.0442579, -0.070338, -0.0473302, -0.0222136, 0.0957758, 0.0164518, 0.00523625, + 0.00195702, -0.0127086, -0.00720966, -0.00891624, -0.0226743, 0.0302098, -0.00206097, 0.00197536, + 0.0119359, -0.010845, 0.0263878, 0.0103592, 0.0269128, 0.0031775, 0.00825071, 0.0185765, + -0.00863547, -0.0109844, -0.0088456, -0.026454, -0.0136792, 0.02238, 0.0159833, 0.0229814, + 0.00676278, 0.0356278, 0.0243659, -0.0483941, -0.00029279, -0.0285899, 0.0724552, 0.0293844, + -0.0628865, 0.0278929, 0.0492395, -0.00819929, -0.00417028, -0.0135682, -0.00638027, -0.00104148, + -0.0277807, 0.0166524, 0.0453805, 0.00800668, 0.0257926, -0.0182616, -0.0193732, -0.0185252, + -0.0363109, -0.00320665, 0.0598099, 0.0404136, -0.000212925, -0.0243272, -0.00412736, -0.0254325, + 0.00665958, -0.0315541, 0.0232733, 0.0193451, 0.0184404, 0.00400625, 0.0300885, -0.00994864, + -0.0271101, -0.0865407, 0.064576, 0.0308198, -0.0193159, -0.00973269, -0.0206604, -0.0100628, + 0.0268986, 0.0501878, -0.0267205, -0.0220307, -0.0236678, 0.0160175, -0.0324663, -0.00533803, + 0.0409558, -0.00325867, -0.0142667, -0.0142876, -0.0127697, 0.0148601, 0.0163897, 0.00407631, + 0.0428517, 0.0201913, -0.0215948, -0.00872995, -0.00192159, 0.008682, 0.0154782, -0.00524282, + 0.00842598, -0.00765053, 0.00464852, 6.63136e-05, 0.014949, 0.00761466, 0.0266099, -0.00830669, + 0.0452914, -0.0164204, -0.031957, 0.0121778, 0.028522, 0.0417206, 0.0588211, -0.0239453, + -0.00447031, -0.00836715, -0.036449, 0.0202073, 0.0334947, 0.0145783, -0.0586885, 0.0168487, + -0.00579858, 0.0101248, 0.0214281, 0.00176611, 0.000148868, 0.0413324, 0.0124326, 0.0215377, + 0.0165895, 0.00406493, 0.0232231, 0.0357304, -0.00316806, -0.00542247, 0.0273935, 0.0283702, + 0.0246317, -0.0173005, 0.0102101, 0.00916052, -0.00898166, -0.0394295, -0.00401933, -0.0383193, + 0.0141222, 0.0139724, -0.0176987, -0.0316665, -0.00812724, 0.00615176, 0.0640168, 0.00201298 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p19(hatfit_yaw00_lev2_p19); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p19_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p20.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p20.mh new file mode 100755 index 0000000..d9c0510 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p20.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p20.mh: + +#ifndef stasm_hat_yaw00_lev2_p20_mh +#define stasm_hat_yaw00_lev2_p20_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p20(const double* const d) // d has 160 elements +{ + const double intercept = -0.57973; + const double coef[160] = + { + -0.00205481, -0.0137214, -0.00309148, -0.0185552, -0.0044485, -0.00405411, 0.0980302, 0.0258474, + 0.0441372, 0.0271223, -0.022722, -0.0374453, -0.00967222, 0.00451008, 0.0400823, 0.0441306, + 0.0282369, 0.0376717, 0.00993434, -0.00164766, -0.0277478, -0.0452401, 0.0094723, 0.0245945, + -0.00383547, 0.0326884, 0.0353405, 0.0255885, 0.0267886, 0.0080378, 0.0145145, 0.0248141, + 0.0470777, -0.0160207, 0.0149831, 0.0101602, 0.0657714, -0.0467214, 0.102737, 0.0984535, + 0.0310132, -0.0311305, 0.095894, 0.0438843, 0.00138908, -0.0255201, 0.00320738, -0.00878598, + -0.00080174, -0.0433443, 0.00994268, 0.0442605, 0.0359996, 0.0168742, 0.0266655, -0.015031, + -0.0108812, -0.0152446, 0.0306542, -0.0408367, -0.0200448, -0.0219055, -0.00829048, -0.0299107, + 0.00286763, 0.0235611, 0.0619527, -0.00629094, -0.0349205, -0.0349401, -0.0219735, -0.0223126, + -0.0190521, 0.0522663, 0.0175953, -0.0569897, -0.0104982, 0.0112655, -0.0351287, -0.0102906, + -0.020444, -0.0218077, -0.0230517, -0.0435241, -0.00586253, 0.0243467, 0.023879, -0.031373, + 0.00837013, -0.0207039, 0.00489612, 0.0227467, 0.00429101, 0.0393884, 0.0267815, -0.0161819, + 0.00150121, -0.0100761, -0.0098574, 0.058646, 0.0332048, 0.0457629, 0.0414061, -0.000192158, + 0.0113764, -0.0175181, -0.00533787, 0.0196774, 0.0189207, 0.00725609, 0.0267366, 0.0193298, + -0.0244301, -0.0107281, -0.0358781, -0.0160337, 0.00206874, -0.0594505, -0.0192336, 0.00931433, + 0.0467891, -0.0349222, 0.0139858, 0.0436247, -0.00253807, 0.003628, 0.0264592, -0.0351408, + 0.0164997, 0.0299346, -0.0112387, -0.049508, -0.00414905, -0.0249483, 0.0164856, -0.0237207, + 0.0292897, 0.0463837, 0.00937479, 0.00963005, 0.0212507, 0.00877913, 0.0395294, 0.0149616, + 0.00562129, 0.0367735, 0.0154453, 0.0195445, 0.0171127, 0.0147879, 0.0285341, 0.0203778, + -0.0326154, 0.0306668, -0.00174604, 0.0345561, 0.0300234, 0.0564806, -0.0346435, 0.0125497 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p20(hatfit_yaw00_lev2_p20); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p20_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p21.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p21.mh new file mode 100755 index 0000000..68ae1d7 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p21.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p21.mh: + +#ifndef stasm_hat_yaw00_lev2_p21_mh +#define stasm_hat_yaw00_lev2_p21_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p21(const double* const d) // d has 160 elements +{ + const double intercept = -0.137371; + const double coef[160] = + { + -0.00236509, -0.00904201, 0.0482622, 0.0424488, 0.0565872, -0.0327647, 0.0570792, 0.0605706, + -0.0128233, -0.0312516, 0.0244441, 0.0247274, 0.0639721, 0.00583817, 0.051489, 0.0328103, + -0.0583378, -0.0380139, 0.0164458, 0.0317571, 0.0424508, 0.0116324, 0.0200214, 0.0590078, + -0.0306806, -0.0405981, -0.00652414, 0.00700168, 0.0290531, 0.0100532, -0.0120271, 0.0226684, + -0.0112358, 0.00504471, -0.0403399, -0.0153419, -0.0315861, 0.0165162, 0.00592848, 0.0118801, + 0.0344096, 0.0426078, 0.0536365, -0.0266674, -0.0599532, -0.0454601, -0.0507451, -0.0308664, + 0.00734138, 0.0751499, 0.00975933, 0.0111379, -0.00815451, 0.00552466, -0.0422937, -0.0288442, + 0.0361002, 0.0313253, -0.0258745, 0.000885331, -0.0193726, 0.00598507, -0.0090692, -0.00433989, + 0.0222115, -0.00361573, -0.0331707, -0.030468, -0.0244275, -0.00293196, 0.0322258, 0.0321031, + -0.0104847, -0.0303236, 0.00775746, -0.00491881, -0.00907141, 0.003709, -0.00123734, -0.0289989, + -0.0653049, -0.0366091, -0.0253084, -0.0427656, -0.0227685, -0.0113534, 0.0215344, 0.000436021, + 0.00641436, 0.011706, -0.0162955, -0.0391898, -0.0397683, -0.0374501, 0.0154038, 0.0331744, + 0.0310901, 0.0396808, -0.0369438, -0.0320113, -0.0365431, -0.0231747, 0.00364888, 0.0506336, + 0.00216586, 0.00920747, 4.29333e-06, -0.0160827, -0.0171278, -0.00370237, -0.0198794, 0.0251668, + -0.0425848, 0.0218599, 0.0425504, 0.0306612, -0.0116232, -0.030963, -0.0149334, -0.0128814, + 0.0366718, 0.0230035, -0.0129825, 0.0180202, 0.0178947, 0.0340951, 0.020461, 0.0255292, + -0.0281736, 0.00630762, 0.0147464, 0.0573448, 0.0240933, 0.0175706, -0.0213692, -0.022618, + 0.0105691, -0.0263521, -0.00420126, 0.0318987, 0.037116, 0.0379115, -0.00468657, 0.0204243, + 0.062086, -0.0372716, -0.0137724, -0.00837101, 0.0258512, 0.00812403, -0.0121935, 0.0185915, + 0.085514, -0.0301003, 0.0350227, 0.0149268, -0.00248905, 0.000797402, -0.0177684, -0.00654257 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p21(hatfit_yaw00_lev2_p21); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p21_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p22.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p22.mh new file mode 100755 index 0000000..ce2b58b --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p22.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p22.mh: + +#ifndef stasm_hat_yaw00_lev2_p22_mh +#define stasm_hat_yaw00_lev2_p22_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p22(const double* const d) // d has 160 elements +{ + const double intercept = 0.0117697; + const double coef[160] = + { + -0.0178546, -0.00507232, -0.00537885, -0.0530472, -0.0562883, 0.0296127, -0.0548014, -0.000823639, + 0.015926, 0.00988827, 0.00843378, -0.0217375, -0.0385913, 0.0506703, -0.00520324, -0.0104024, + -0.000330601, 0.00924059, -0.0198405, -0.0429418, -0.0654977, 0.0470837, 0.0526988, -0.0131279, + 0.018024, 0.0390424, 0.0101875, 0.0238801, -0.00712584, 0.0535957, 0.0522608, 0.0102155, + -0.0226839, 0.0148612, 0.0226066, 0.0162535, -0.0285434, 0.0257833, 0.0471718, -0.0458596, + 0.000277075, 0.00620342, -0.0221676, -0.00461481, 0.0636075, 0.00634243, 0.00543572, 0.0105987, + 0.00897372, -0.0190757, -0.0626532, -0.0109301, 0.0265744, 0.00603106, 0.00160259, 0.0368236, + -0.00140971, -0.0150079, 0.0203465, 0.0625984, 0.0503313, -0.00942197, -0.0263503, 0.00727295, + -0.0242728, -0.0137839, 0.0411412, 0.0404335, 0.0170111, -0.0161308, -0.0472095, -0.00676737, + -0.0562529, -0.0229003, 0.0162299, -0.00866833, -0.00391738, -0.0337265, -0.0379058, -0.0230986, + -0.0253698, 0.00212937, -0.00591203, 0.0584039, -0.0129678, 0.00929018, -0.0232662, -0.0520017, + -0.0194294, -0.053814, -0.0157562, -0.00375296, 0.00727014, 0.0407859, 0.0240675, -0.0271583, + -0.0294064, -0.0145298, 0.0048997, 0.0142413, -0.0138544, 0.00606824, 0.0031445, -0.0401113, + -0.0231949, -0.024332, -0.0455487, -0.0347302, -0.0593698, 0.0135033, 0.0127122, -0.0139138, + 0.0174126, 0.010852, -0.00842191, -0.0195408, -0.0233637, -0.0315422, 0.0133297, 0.0701624, + 0.0198514, 0.0102554, 0.00782285, -0.0285294, 0.104508, -0.00569995, -0.0339732, 5.90907e-05, + 0.0168465, 0.00239644, -0.0307843, -0.0371566, -0.0234185, 0.00555857, 0.00332544, 0.0340692, + 0.0329612, 0.0234823, -0.000965576, 0.00522464, -0.00789185, -0.0021173, -0.00775234, 0.0164451, + 0.0117572, 0.0227539, 0.00524717, 0.00727862, 0.0275104, 0.0121523, -0.020892, 0.00706355, + -0.0286189, 0.0186815, -0.0136882, 0.051597, 0.0459619, 0.0245787, 0.0183904, -0.0107941 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p22(hatfit_yaw00_lev2_p22); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p22_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p23.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p23.mh new file mode 100755 index 0000000..c4fb6cc --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p23.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p23.mh: + +#ifndef stasm_hat_yaw00_lev2_p23_mh +#define stasm_hat_yaw00_lev2_p23_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p23(const double* const d) // d has 160 elements +{ + const double intercept = 0.242677; + const double coef[160] = + { + 0.000810244, -0.0477374, 0.0151243, 0.0792231, 0.043766, 0.000172928, -0.075201, 0.00877918, + 0.015561, -0.0270447, -0.0130295, 0.0234744, 0.0498321, 0.0208237, -0.0278933, -0.0238794, + 0.00150402, -0.0242494, -0.0122306, 0.0299458, 0.0606751, 0.0493692, -0.0425213, -0.0218249, + -0.0176783, -0.027917, -0.0168181, 0.012025, 0.0191672, 0.0318289, -0.00528081, -0.0383298, + 0.0343618, -0.0327522, -0.0511107, -0.0318691, -0.00791867, 0.0300615, 0.0169818, -0.00332896, + 0.0518194, 0.0364182, -0.0303691, -0.0891738, -0.108781, -0.0286836, 0.128743, -0.0317241, + 0.0213597, 0.0567028, 0.04782, 0.02951, -0.0305566, -0.0470166, 0.0357719, -0.02154, + -0.0043653, 0.0199172, 0.0119268, -0.0062304, -0.0498879, -0.0364475, 0.0605531, -0.0401511, + -0.0210481, 0.0142989, 0.0170633, 0.0183518, -0.00906584, -0.00979833, 0.020948, -0.0205823, + -0.019643, -0.0211283, -0.0295402, 0.00603548, -0.0146838, 0.0189525, 0.131104, 0.065143, + -0.0461765, -0.0538791, -0.0125012, 0.0887613, 0.0478228, 0.1007, -0.0118974, -0.0282087, + -0.0355892, -0.0213169, 0.00692103, 0.0126706, 0.00220347, 0.00400608, -0.0346168, -0.0361555, + -0.0238473, -0.0127767, -0.00240078, 0.00380214, 0.013514, 0.00170848, -0.0348666, -0.0270525, + 0.0167837, 0.00526975, -0.0129707, -0.0673188, -0.0227539, -0.0285314, 0.0154404, 0.0236957, + -0.015565, -0.00533645, 0.017867, -0.014366, 0.000218929, -0.00643451, -0.0288213, -0.0261644, + -0.00861372, -0.0167076, -0.0179646, -0.0232297, -0.0938334, -0.0352466, -0.0660536, -0.0109894, + 0.00404062, 0.0396702, -0.00151376, -0.00703396, -0.029871, -0.0304434, 0.0106963, 0.0171258, + 0.00310458, 0.00955822, 0.00599693, -0.0508966, -0.0324266, -0.0448106, 0.0169098, 0.0349014, + -0.0102038, -0.00315048, -0.00164872, -0.0324597, 0.00105539, -0.014407, 0.0222697, 0.00200826, + -0.00475663, -0.0406545, 0.046732, -0.00708498, 0.01835, -9.08009e-05, 0.00659241, 0.0128114 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p23(hatfit_yaw00_lev2_p23); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p23_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p24.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p24.mh new file mode 100755 index 0000000..df1912a --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p24.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p24.mh: + +#ifndef stasm_hat_yaw00_lev2_p24_mh +#define stasm_hat_yaw00_lev2_p24_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p24(const double* const d) // d has 160 elements +{ + const double intercept = -0.290285; + const double coef[160] = + { + -0.00391734, -0.0373713, 0.0296847, 0.0856366, 0.0680252, -0.0141347, -0.056779, -0.0639785, + -0.0345783, -0.0245752, -0.00601101, 0.0248511, 0.0549668, -0.0103632, 0.0176319, -0.0324854, + 0.0277483, -0.0459327, -0.0292241, -0.0201631, 0.018909, 0.0133223, 0.0299505, -0.0124793, + 0.0329833, 0.0094125, -0.0165424, -0.0104312, 0.00643773, -0.00469624, -0.0291954, 0.027616, + -0.0116333, -0.0426014, -0.00213712, -0.0557142, -0.00217717, -0.0468454, -0.0729048, -0.0447836, + -0.0144842, 0.0405147, 0.0584253, 0.0787079, -0.00218177, 0.00945018, 0.0511602, -0.043676, + -0.0145351, -0.00977988, 0.00578833, -0.0117745, -0.0274247, 0.0305891, 0.0285472, 0.0443184, + -0.050581, -0.0244408, -0.0281909, 0.0058221, 0.00330261, 0.0454032, 0.0898193, 0.0662471, + -0.0216286, -0.013524, 0.00069891, 0.0404074, 0.0169764, 0.0274654, 0.0459739, 0.0206503, + 0.0152971, 0.0228002, -0.0187678, 0.0247393, 0.0265094, 0.0373614, -0.0228019, -0.00311044, + 0.024944, 0.0275463, 0.0259327, -0.0799705, -0.082091, -0.0391279, 0.0124728, 0.033311, + 0.0487404, 0.0302635, 0.0271769, -0.0397876, -0.0402077, -0.0282224, -0.0541014, -0.00161753, + 0.0762442, 0.0214009, 0.04125, 0.00345349, -0.0299646, 0.00257046, -0.0469857, 0.0344531, + 0.0353149, 0.00880637, 0.0149039, -0.00547696, -0.022949, 0.0183402, 0.0309907, 0.0685378, + 0.0257068, 0.00948362, 0.022245, 0.00982482, -0.0307185, 0.0381942, 0.013981, 0.0019222, + -0.0234243, -0.0100864, 0.0290335, -0.0571687, 0.0195604, -0.0328423, 0.0471029, 0.0198729, + -0.00538831, -0.025955, 0.0340384, 0.0245018, 0.0335489, -0.00632678, 0.0119202, 0.00663611, + -0.029499, -0.0505394, 0.0100067, 0.0302057, 0.0131081, -0.00547969, 0.0186686, -0.00161012, + -0.00888793, -0.0391302, 0.00500464, 0.0354366, 0.0211353, 0.0240429, 0.00906457, -0.024416, + -0.000141046, 0.0398088, -0.0288674, 0.00956516, 0.0214225, 0.0303871, -0.0272088, 0.020084 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p24(hatfit_yaw00_lev2_p24); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p24_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p25.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p25.mh new file mode 100755 index 0000000..d46ebfc --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p25.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p25.mh: + +#ifndef stasm_hat_yaw00_lev2_p25_mh +#define stasm_hat_yaw00_lev2_p25_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p25(const double* const d) // d has 160 elements +{ + const double intercept = -0.48192; + const double coef[160] = + { + 0.080069, 0.0254212, 0.0698047, 0.0172652, -0.0437604, 0.0533673, 0.0479497, 0.0707692, + 0.028919, 0.0218598, -2.02511e-05, 0.0177421, 0.0252949, 0.0957902, 0.0679331, 0.0477211, + 0.015103, -0.0350397, -0.0226795, -0.0309532, 0.0196631, 0.0314508, -0.0098721, 0.026174, + 0.00875322, -0.0102275, 0.00161853, -0.0244689, -0.00217672, -0.0258021, -0.0712362, -0.0247072, + 0.0169485, -0.00647493, 0.00909959, -0.00290298, -0.0018975, -0.00785463, 0.0170031, -0.00405343, + -0.0453393, -0.0316815, 0.00553392, 0.0467984, 0.013018, 0.00286137, 0.0641622, -0.0108293, + 0.0106426, 0.0659868, 0.0619154, 0.0683916, 0.00400672, -0.0316998, -0.0439017, -0.0531982, + 0.0227195, 0.0171857, 0.0149441, 0.0469003, 0.0509676, 0.0393706, 0.0125297, -0.0131728, + 0.00232523, -0.043456, -0.0545071, -0.0356114, 0.0232419, 0.00208771, -0.0142744, -0.0270206, + 0.00372195, -0.00702677, 0.00791299, -0.0125764, 0.016542, 0.000498141, 0.0112614, -0.00637377, + -0.0150705, -0.0661879, 0.000954137, 0.00578005, 0.0330873, 0.0207243, 0.0608699, 0.0118893, + 0.00744177, 0.0285924, -0.0143176, -0.0313716, 0.00486059, -0.0034366, -0.00624046, 0.0333263, + 0.00123777, 0.0434691, 0.0071437, -0.00841325, -0.00695282, -0.0243996, -0.0220286, -0.0228198, + 0.00216731, -0.0135737, -0.0088714, -0.0068874, 0.021012, -0.0209814, 0.00917872, 0.0201832, + 0.03023, -0.0125052, -0.00717798, 0.0265657, 0.0205816, 0.00318955, -0.00975955, 0.00153578, + 0.0342051, 0.0493117, -0.0221902, 0.0290784, -0.00464809, 0.060173, 0.170815, 0.107283, + -0.0163555, -0.0098902, -0.0120301, -0.0361608, -0.0128753, -0.0265617, -0.0919782, -0.0455791, + 0.0263706, 0.0432768, -0.00306199, 0.00291669, 0.0149201, -0.019987, -0.0236052, 0.0239656, + 0.0316036, 0.010793, 0.0203367, 0.0120483, 0.00752219, -0.0246316, 0.00150752, -0.0318513, + 0.00499792, -0.00242502, 0.03601, 0.000732988, 0.0184117, -0.0522315, 0.00194238, 0.0259723 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p25(hatfit_yaw00_lev2_p25); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p25_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p26.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p26.mh new file mode 100755 index 0000000..224cc7c --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p26.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p26.mh: + +#ifndef stasm_hat_yaw00_lev2_p26_mh +#define stasm_hat_yaw00_lev2_p26_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p26(const double* const d) // d has 160 elements +{ + const double intercept = -0.433871; + const double coef[160] = + { + -0.0129694, -0.0362405, 0.0456953, 0.00806892, 0.0332427, 0.0166249, 0.0858091, -0.021537, + 0.0121069, -0.00958319, 0.00183791, -0.0445408, -0.00691424, 0.0149946, 0.0484259, 0.0455105, + 0.042137, -0.000148501, 0.0187582, 0.000764644, 0.00677489, 0.00827639, -0.0203425, 0.0730549, + 0.0487964, -0.0258577, -0.0323376, 0.0132528, 0.0104709, 0.0293409, 0.0351007, 0.0678395, + 0.0204265, -0.0113785, -0.0333476, -0.0144913, -0.0179195, 0.0584139, -0.0229801, -0.0179397, + 0.0227342, 0.0295118, 0.0340656, -0.100074, -0.0846886, -0.0443842, 0.0208676, -0.00939233, + 0.000832701, 0.0194225, 0.0593964, 0.0382799, -0.010556, -0.0222984, -0.00961312, -0.0178815, + 0.00109992, 0.00598413, 0.0445235, 0.03007, -0.0509595, -0.0385867, 0.00564818, -0.0411887, + -0.0344969, -0.0066254, 0.061847, 0.0286021, -0.0345655, 0.00151497, -0.0380565, -0.0705052, + 0.00740955, 0.020345, -0.00978735, 0.00859556, -0.0107584, 0.0208075, 0.0526561, 0.0167182, + -0.00683639, -0.00606006, -0.0112797, 0.010233, 0.0705434, 0.00259656, 0.0712719, 0.0468567, + 0.00622382, -0.0110342, -0.026088, 0.0169622, 0.036032, 0.00953248, 0.00938651, 0.0240754, + 0.00729027, -0.0263141, -0.0345428, -0.00845764, 0.0462167, 0.0211959, 0.0531272, 0.0379018, + 0.0424938, 0.0160658, -0.00649713, 0.021857, 0.0325163, -0.0139418, 0.00759465, 0.0524858, + -0.0168994, 0.0164893, 0.022728, 0.0323317, 0.0331378, 0.00548303, -0.0425947, -0.0101325, + -0.0124091, -0.00910286, -0.00862779, -0.049988, 0.0218122, -0.0166035, 0.0570387, -0.0150303, + -0.0109328, 0.0141641, 0.0296191, 0.00220599, 0.00667076, 0.00647957, 0.00102784, -0.02686, + -0.0170128, 0.019061, 0.00824237, 0.0392189, 0.00182692, 0.03255, 0.0341041, 0.0186872, + 0.000108326, -0.00739809, -0.0118376, 0.00302759, 0.00874007, 0.0298719, 0.0378712, 0.0260831, + 0.0143321, 0.0357566, -0.0302584, -0.0210763, -0.00892332, -0.0329427, -0.0798826, -0.0461567 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p26(hatfit_yaw00_lev2_p26); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p26_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p27.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p27.mh new file mode 100755 index 0000000..5225077 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p27.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p27.mh: + +#ifndef stasm_hat_yaw00_lev2_p27_mh +#define stasm_hat_yaw00_lev2_p27_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p27(const double* const d) // d has 160 elements +{ + const double intercept = -0.306931; + const double coef[160] = + { + 0.0262349, -0.0455742, -0.0345448, 0.0296043, -0.0368644, 0.105961, 0.0917271, -0.0349775, + -0.0118083, 0.00226836, 0.0315588, 0.0651592, 0.0192105, 4.45677e-05, 0.0111032, -0.0301818, + -0.0235868, -0.026485, -0.00434409, 0.0180196, 0.0351823, 0.0192955, 0.0241057, -0.0337034, + 0.00146458, -0.019946, -0.00849322, -0.0249317, 0.00794208, 0.00548202, 0.0600154, 0.0171288, + 0.00478391, 0.0128435, 0.0206005, -0.0152299, -0.00785918, -0.000263394, 0.0517713, 0.0416178, + -0.0400955, -0.0371783, 0.0589854, 0.0327506, -0.0189932, -0.0248052, -0.0847246, -0.0425839, + -0.0294927, 0.00193715, 0.0270183, -0.0242868, -0.02323, -0.0221412, -0.0299839, -0.0253512, + 0.0019324, 0.032574, 0.011557, -0.0437154, -0.0286583, -0.028798, 0.0130759, -0.00196222, + 0.00783066, 0.0246079, 0.0314151, -0.0433835, -0.0152253, -0.00376657, 0.0137829, -0.0141508, + -0.0185663, -0.0270969, 0.0763604, 0.032464, -0.00457786, -0.00714493, -0.00839772, -0.0471893, + -0.0304596, 0.0113046, -0.0575614, -0.04895, -0.0555437, -0.0118463, -0.0287419, -0.0226617, + 0.0476703, 0.0541762, -0.0129649, -0.0181623, -0.00457971, 0.0050365, 0.048555, 0.0856549, + 0.00916771, 0.0128563, 0.00436323, -0.00929648, 0.00355898, -0.0264574, 0.0298014, 0.048906, + 0.00256579, -0.0139028, 0.0214163, 0.0158788, 0.0410612, -0.0213137, 0.0133411, 0.0239583, + 0.0212723, -0.014747, -0.0303819, -0.00101849, 0.0202947, -0.00473982, 0.000768866, 0.0634918, + 0.0272171, 0.0606848, -0.0083977, 0.0323225, 0.00269824, 0.0622742, -0.0492059, 0.0108266, + -0.0245984, -0.00360764, 0.0335002, 0.0621516, 0.0580589, 0.0152602, 0.062728, 0.00257798, + 0.00265603, -0.0211292, -0.00126619, 0.0229256, 0.0381987, -0.00541837, 0.02072, -0.0247069, + -0.00978707, 0.00263283, -0.00619977, -0.0417827, 0.00227379, -0.0141621, 0.0218684, -0.0106956, + -0.0028489, 0.0407164, 0.00786468, 0.00379042, 0.0117465, -0.002769, 0.00417461, 0.00823767 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p27(hatfit_yaw00_lev2_p27); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p27_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p28.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p28.mh new file mode 100755 index 0000000..6f76b98 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p28.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p28.mh: + +#ifndef stasm_hat_yaw00_lev2_p28_mh +#define stasm_hat_yaw00_lev2_p28_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p28(const double* const d) // d has 160 elements +{ + const double intercept = -0.911282; + const double coef[160] = + { + 0.0238533, 0.0397944, -0.00203305, -0.0376938, -0.0576054, 0.0102932, -0.00350282, -0.0347154, + 0.0114035, 0.0375278, 0.0576787, -0.011191, -0.00113305, -0.00862682, 0.015185, -0.00437239, + 0.0307686, 0.0196598, 0.0440094, -0.0379801, -0.0141113, -0.0120627, 0.0393276, 0.0134787, + 0.0370115, 0.000457543, 0.0603269, -0.00987555, 0.0105079, -0.00996932, 0.019966, 0.0060897, + 0.0304525, -0.0284774, 0.0406466, 0.0226233, -0.00374561, -0.00344988, -0.0165723, 0.00456927, + 4.77179e-05, -0.0215519, -0.0611072, -0.0461596, -0.0359187, 0.00475347, 0.0589447, 0.0603199, + 0.015611, 0.0302667, 0.012469, -0.0101909, 0.0232281, -0.058931, 0.0315346, 0.0487677, + -0.0218948, 0.0241924, 0.0431596, 0.00191124, 0.0400794, -0.0415914, 0.00944237, 0.000643755, + -0.032809, 0.013452, 0.0403323, 0.0361078, 0.0355794, -0.0115256, -0.037264, -0.031884, + -0.042228, -0.0211665, -0.0310247, -0.0319164, 0.00456799, 0.0271444, 0.0618117, 0.0108998, + -0.0234185, 0.0129911, 0.00094152, 0.0555492, 0.0407842, 0.0751483, -0.00163825, -0.0359983, + -0.062111, -0.018929, 0.0249147, 0.00943173, 0.0418229, -0.00747328, 0.0690318, -0.0227955, + -0.0198671, -0.00218184, 0.0446939, 0.00229586, 0.053604, -0.0153666, 0.0320683, 0.0248043, + 0.00287477, 0.00778391, 0.0331717, 0.00229524, 0.00562737, 0.0154625, 0.0164591, 0.0400992, + 0.0425685, 0.000193887, 0.00597018, -0.0136202, -0.00538856, 0.0131999, 0.0261254, 0.123714, + 0.0643788, 0.0452873, 0.0716094, 0.159596, 0.0741898, 0.056755, 0.0376108, 0.0507256, + 0.0697902, -0.0516756, 0.0169421, 0.0447843, 0.0417189, 0.00326605, 0.00592841, -0.0132248, + 0.0556151, 0.0180181, -0.0209075, -0.0826685, -0.0280024, 0.025601, -0.00580471, -0.0237519, + 0.00913779, 0.0706989, 0.0126799, 0.00300497, -0.00981312, -0.0168915, -3.9095e-05, -0.0625823, + -0.00544378, 0.0403442, 0.0135646, 0.0797236, 0.0384641, 0.0289419, 0.0494675, -0.00505185 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p28(hatfit_yaw00_lev2_p28); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p28_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p29.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p29.mh new file mode 100755 index 0000000..2fe1275 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p29.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p29.mh: + +#ifndef stasm_hat_yaw00_lev2_p29_mh +#define stasm_hat_yaw00_lev2_p29_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p29(const double* const d) // d has 160 elements +{ + const double intercept = -1.05057; + const double coef[160] = + { + 0.0182463, -0.0164278, 0.0793519, 0.0203683, 0.0103424, -0.00468872, 0.00376642, 0.00789167, + 0.0365452, -0.0296432, 0.0316379, 0.0281642, 0.0264598, 0.00896892, 0.0389974, 0.00696295, + 0.0210673, -0.0165715, 0.0249197, 0.0415189, 0.0234516, 0.0039805, 0.0282824, 0.019377, + 0.0136788, 0.0078962, 0.0400487, 0.0247874, 0.0484899, -0.00169232, 0.0157129, 0.00810864, + 0.00254052, 0.004636, 0.0127591, 0.023789, 0.00420449, -0.0383569, -0.0112375, 0.0181937, + 0.0123328, -0.00178604, -0.0273803, -0.0125259, -0.00871021, 0.00392074, 0.0347972, -0.00844315, + 0.0058953, 0.0156757, 0.029977, 0.014578, 0.00275342, 0.000159312, -0.00132859, -0.0674545, + -0.0131045, -0.0125819, 0.0371212, 0.0165592, 0.0301665, 0.0350271, 0.0262243, -0.0768821, + -0.0251874, -0.00765544, 0.0265035, 0.022286, 0.0165599, 0.0398895, 0.0171191, -0.00820294, + -0.0258373, -0.0408784, -0.0487514, -0.0316219, 0.0193729, 0.05273, 0.0415007, 0.0334458, + 0.00916367, 0.00382008, 0.0153757, 0.00359487, -0.0514642, 0.0857362, 0.0547107, 0.00137235, + 0.0347672, 0.00346709, 0.00981953, 0.0124956, -0.00603081, -0.0447948, 0.0584001, -0.0200425, + 0.0510406, 0.031761, 0.0119073, -0.0177227, -0.041249, -0.0484298, 0.0517662, 0.0266991, + 0.0669104, 0.0763834, 0.0368872, 0.0240411, 0.0134583, -0.0205295, 0.0445935, 0.0713025, + 0.0204831, 0.0253047, -0.0104218, -0.0282662, -0.0465509, 0.013753, -0.0597406, 0.0126048, + 0.0241487, 0.0263117, 0.034671, 0.116738, 0.0671411, 0.00670641, 0.042299, 0.0235448, + 0.0144205, -0.0647902, 0.0507454, 0.00526156, 0.0375987, 0.00463127, -0.0314179, -0.0293136, + 0.0496903, 0.0400285, -0.0293638, -0.0647404, 0.0175175, 0.0611509, 0.0215046, 0.0172993, + -0.0101004, 0.0569459, -0.00413199, 0.0193916, 0.0152643, 0.00874664, -0.0093991, -0.0254695, + -0.00236696, 0.0810356, 0.085522, 0.09974, 0.0918543, 0.0265118, 0.081347, 0.0256086 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p29(hatfit_yaw00_lev2_p29); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p29_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p30.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p30.mh new file mode 100755 index 0000000..6244251 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p30.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p30.mh: + +#ifndef stasm_hat_yaw00_lev2_p30_mh +#define stasm_hat_yaw00_lev2_p30_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p30(const double* const d) // d has 160 elements +{ + const double intercept = -0.158421; + const double coef[160] = + { + -0.00843022, 0.013809, -0.00794464, -0.0280121, -0.0255196, -0.0195118, 0.075042, 0.0257987, + 0.02871, 0.014171, -0.0372592, -0.0380695, -0.0431202, 0.0171225, 0.022328, 0.055504, + 0.0265488, -0.0289131, -0.0281819, -0.0412153, -0.0759227, -0.0295684, 0.0107261, 0.0315409, + 0.0272802, -0.0116362, 0.0206321, 0.0109335, -0.0183937, -0.0122625, -0.0481045, 0.0309332, + 0.0608065, 0.024013, 0.0347018, -0.00428828, -0.0368289, -0.0443961, -0.136547, 0.0201979, + 0.0855011, 0.0571143, -0.0375799, 0.016459, 0.047898, 0.0619319, -0.00773834, 0.0441075, + 0.0146869, 0.0451598, 0.0725738, 0.132561, 0.101115, 0.0209962, 0.0323263, -0.0114213, + 0.0252005, 0.0741543, -0.0264473, 0.0168047, 0.00380724, 0.025259, 0.0513686, 0.0286347, + -0.0300812, 0.0154615, 0.0249453, 0.0434057, 0.0262186, 0.00797694, 0.0215338, -0.0195746, + 0.0452787, -0.00701455, -0.0229841, 0.0159123, -0.00454588, -0.0185701, -0.0208287, -0.097003, + -0.031168, 0.0169527, -0.0343204, -0.0604752, -0.0506117, -0.00868898, 0.0581987, 0.0346967, + -0.0299566, -0.0487133, 0.0231685, -0.0172943, -0.0444626, -0.0258802, -0.0260437, 0.00632427, + -0.0239597, -0.00391656, 0.0107738, -0.00493213, -0.000692711, 0.0458643, -0.0185572, 0.00836634, + -0.0305402, 0.0256927, 0.00675199, 0.0139364, 0.0439735, 0.0283794, -0.0130652, 0.00275794, + 0.0312156, 0.0296386, -0.0355726, -0.0134245, -0.020942, 0.00984381, -0.00773278, -0.023931, + -0.0300758, -0.0669045, -0.0276446, -0.00646776, -0.00236777, 0.0540602, -0.016052, -0.0336337, + -0.0154917, 0.00563903, 0.0243744, -0.00992392, 0.0268612, 0.00221559, -0.0196216, -0.0194976, + -0.0281026, 0.0153356, 0.0276602, 0.00143168, 0.0411615, -0.0150804, -0.00796113, -0.00828842, + -0.0284587, 0.0130893, 0.0282914, 0.0170294, -0.0129933, -0.0233002, 0.00116514, -0.0143735, + -0.025027, 0.0174324, -0.0541421, -0.0264543, -0.0165433, 0.00211273, 0.0148214, -0.0422046 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p30(hatfit_yaw00_lev2_p30); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p30_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p31.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p31.mh new file mode 100755 index 0000000..23c14ba --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p31.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p31.mh: + +#ifndef stasm_hat_yaw00_lev2_p31_mh +#define stasm_hat_yaw00_lev2_p31_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p31(const double* const d) // d has 160 elements +{ + const double intercept = -0.528655; + const double coef[160] = + { + -0.066406, -0.0431597, 0.0637768, 0.0370243, -0.00068307, -0.0259349, 0.0159448, -0.136056, + -0.0293552, -0.0403311, 0.0230454, 0.0283, 0.0388175, 0.046244, 0.04128, -0.00817411, + -0.0405367, -0.0406695, 0.0112241, 0.0182357, 0.0367736, 0.0285879, -0.00759859, -0.00266288, + -0.00139768, -0.0344043, 0.00392997, 0.0241541, 0.0412715, 0.0280483, 0.0292519, 0.0165686, + -0.00435702, -0.0265016, -0.0453606, -0.00250928, 0.0196911, 0.00655709, -0.0367992, 0.0509089, + 0.031559, 0.00575523, -0.0247191, -0.0486219, -0.0750928, -0.00041327, 0.0747566, 0.0146888, + 0.0646145, 0.054396, -0.0192251, -0.0412112, -0.0324459, -0.0705477, 0.0119363, 0.0347726, + 0.106872, 0.102241, 0.0271929, 0.00171756, -0.0470992, 0.00978825, 0.0508835, 0.0792254, + 0.0360194, 0.0367165, -0.0314265, -0.044109, -0.0814634, -0.0126653, 0.0191743, 0.0371767, + -0.0164398, 0.0210203, 0.0384518, 0.0141576, -0.0197071, -0.0172753, -0.101494, -0.0619908, + 0.0851666, -0.0212017, 0.0488603, 0.0448861, 0.118305, 0.0508748, -0.0450723, 0.0224068, + 0.0187996, 0.0203916, -0.0541929, -0.055438, -0.0193445, 0.0425345, -0.00569827, -0.0287024, + -0.0268724, 0.0050541, 0.0470904, 0.103708, 0.10632, 0.0373919, -0.00797826, -0.0303334, + 0.0272002, 0.0300674, 0.0210971, 0.0667653, 0.0624621, 0.0579313, 0.0607208, 0.0280428, + 0.00218957, 0.0585137, -0.00491464, 0.0042163, -0.00801497, 0.00611642, 0.00430601, -0.000424544, + -0.0332441, 0.000448628, 0.107588, -0.0215919, -0.0459838, -0.0180594, -0.00837773, 0.0129875, + -0.0322999, 0.0200498, -0.0108524, -0.0415339, 0.00357464, 0.0119421, 0.00847187, 0.0184128, + -0.0147528, -0.0172094, 0.00718621, -0.0272791, -0.0360428, 0.000881667, 0.018738, 0.0129722, + -0.033975, -0.0226858, 0.0149901, -0.00787227, 0.0079924, -0.0160559, -0.0223671, 0.0172656, + -0.0396059, 0.0749142, -0.00781715, -0.0241655, 0.0206719, 0.0288847, 0.00349044, 0.000974065 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p31(hatfit_yaw00_lev2_p31); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p31_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p32.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p32.mh new file mode 100755 index 0000000..b26c2d0 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p32.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p32.mh: + +#ifndef stasm_hat_yaw00_lev2_p32_mh +#define stasm_hat_yaw00_lev2_p32_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p32(const double* const d) // d has 160 elements +{ + const double intercept = -0.609531; + const double coef[160] = + { + 0.0172974, -0.0195856, 0.0167722, 0.00276741, -0.00863195, -0.00587176, -0.00695058, 0.00103168, + 0.0252518, -0.00719318, 0.0691906, 0.0363376, 0.0383578, 0.00307675, -0.000676522, -0.024943, + -0.0442041, -0.0318909, 0.034783, 0.0447597, 0.0655272, 0.0380396, -0.00974726, -0.0836417, + -0.0233229, -0.039634, 0.0247777, 0.0296812, 0.0518156, 0.0525699, 0.0183891, -0.0139419, + -0.020914, -0.0524356, -0.0490225, 0.00449505, 0.0358374, 0.0320777, 0.0296459, 0.0310532, + -0.0330381, -0.00897001, -0.00230202, -0.0116356, -0.0561876, 0.0508519, 0.0528285, -0.0220447, + -0.0139597, 0.00648959, -0.0200131, -0.0142853, -0.0548651, -0.0256694, 0.0602749, -0.0456561, + 0.0398712, 0.0362381, 0.0279318, -0.028746, -0.0830828, -0.0523895, 0.0622793, 0.0371123, + 0.0490164, 0.0442704, 0.00661728, -0.00335947, -0.0317967, -0.0174821, 0.0718556, 0.0818157, + 0.0211283, 0.02002, -0.0133365, -0.026983, -0.0673874, 0.0154517, -0.063193, -0.00218304, + 0.0374297, 0.0487677, 0.0544543, 0.0878194, 0.0336702, 0.0359337, 0.0358279, -0.0204046, + 0.0455341, -0.0529557, 0.00531201, 0.0209168, 0.0554839, 0.00579068, -0.0201319, -0.0282061, + 0.0528097, 0.00506556, -0.057539, -0.0366376, 0.0122283, 0.040994, -0.021031, 0.0168281, + 0.00323699, 0.0498915, -0.00517948, 0.0202621, 0.0198603, -0.00465672, -0.0212471, -0.0241135, + 0.0386897, 0.0834197, 0.0564583, 0.0766421, 0.0567623, 0.0541306, 0.038094, 0.006473, + 0.00720124, 0.00299913, 0.00695718, 0.0279686, 0.00285145, -0.0329046, -0.0212397, 0.0685372, + 0.0195813, -0.0237838, 0.0724148, 0.00519205, 0.0182673, 0.00552493, 0.00626116, 0.0171959, + -0.00884863, 0.0247297, 0.0399036, -0.0589063, 0.00735654, 0.014987, 0.00327186, -0.0123504, + -0.0107126, -0.00717319, -0.0262902, -0.0281028, 0.00582021, 0.0159987, 0.0436614, 0.0026328, + -0.0659616, 0.0210302, 0.0281372, 0.0251827, 0.0175415, -0.00426784, -0.0135234, 0.0161755 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p32(hatfit_yaw00_lev2_p32); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p32_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p33.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p33.mh new file mode 100755 index 0000000..545ff33 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p33.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p33.mh: + +#ifndef stasm_hat_yaw00_lev2_p33_mh +#define stasm_hat_yaw00_lev2_p33_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p33(const double* const d) // d has 160 elements +{ + const double intercept = -0.134494; + const double coef[160] = + { + 0.00347821, -0.012647, -0.0365701, -0.0502767, -0.0744315, 0.043386, -0.0109632, 0.0408712, + 0.0179905, 0.012047, 0.00764653, 0.0153773, -0.00873694, -0.0365147, -0.0151809, 0.00267504, + -0.0168584, -0.0186926, 0.0209671, -0.00799703, -0.00927319, -0.0278799, -0.00988936, -0.0523256, + -0.0294883, -0.00538619, 0.068079, 0.0330258, 0.0310367, -0.0115363, 0.0173, -0.0956444, + -0.057032, -0.064803, -0.0476392, -0.00186673, 0.0208305, 0.0656317, 0.076984, -0.00418163, + -0.0342102, -0.0295482, -0.0482665, -0.00800121, 0.00782046, 0.0959585, 0.00216746, -0.032154, + 0.00264983, 0.00756613, 0.0352023, -0.0055577, -0.0268146, 0.0481587, 0.0554458, 0.0308655, + 0.00604261, 0.0099717, 0.0418676, 0.0370696, -0.0259611, 0.00845801, 0.0177592, -0.053832, + 0.0574967, -0.00604871, -0.0470008, -0.03597, -0.0512817, -0.0258823, 0.0508364, 0.0315381, + 0.0494617, 0.0662095, 0.0300199, -0.00536518, -0.0187981, -0.0615925, 0.0101557, 0.0309746, + 0.00546111, 0.0467793, 0.0561231, 0.0115831, 0.044103, 0.0122641, -0.0163395, 0.0139846, + -0.00558476, -0.00304077, -0.0153255, 0.0488837, 0.0226645, 0.00507803, -0.00177007, 2.87077e-05, + 0.0540572, -0.0334947, 0.0243881, 0.0453923, 0.0752189, -0.00790317, -0.0371975, -0.022949, + 0.013664, -0.0464787, -0.0117823, -0.0402601, 0.0423795, 0.0570048, -0.0240886, -0.0248997, + 0.00782879, 0.0796069, -0.0435097, 0.00644649, 0.0344214, 0.050919, 0.00223326, -0.0633793, + -0.0164302, 0.0151376, 0.0285752, 0.0378886, -0.0433041, -0.0629131, -0.0664811, -0.01045, + 0.00204687, 0.00533082, -0.0442703, -0.0276485, -0.0263146, 0.00585577, 0.041874, 0.0404161, + 0.0136317, -0.00439693, 0.0465754, 0.0266685, -0.0134835, -0.0163303, 0.0257163, 0.0497645, + -0.0267151, -0.00359233, 0.0465391, -0.052706, -0.0343048, -0.054638, -0.0428177, -0.0114796, + -0.0324168, 0.0278659, 0.0114471, -0.0448499, -0.00375096, 0.0193088, 0.00295261, 0.0724012 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p33(hatfit_yaw00_lev2_p33); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p33_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p34.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p34.mh new file mode 100755 index 0000000..9f03ee3 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p34.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p34.mh: + +#ifndef stasm_hat_yaw00_lev2_p34_mh +#define stasm_hat_yaw00_lev2_p34_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p34(const double* const d) // d has 160 elements +{ + const double intercept = -0.0298145; + const double coef[160] = + { + -0.00712763, -0.0168461, -0.0649287, -0.0964368, -0.0396287, 0.0355124, -0.0932723, -0.0232354, + 0.0015701, 0.000841849, -0.0528588, -0.0779626, -0.0767684, 0.0536808, 0.021654, 0.0115116, + -0.0244025, 0.0129733, 0.00882587, -0.0296528, -0.0752668, 0.0202583, 0.0284596, 0.0038893, + 0.0131413, 0.0202238, 0.0632173, 0.00876749, -0.00538983, 0.00914925, 0.0317333, -0.0110394, + 0.0197249, -0.0156403, -0.0123602, -0.00436375, -0.0205289, -0.0380516, 0.0528582, -0.0722589, + 0.00167284, -0.0296978, -0.0278581, 0.0860811, 0.109771, -0.0337156, -0.0290938, -0.000718443, + -0.0306613, 0.0175718, 0.0508415, 0.0882596, 0.0906046, 0.0451894, 0.0249118, 0.0101467, + 0.0197867, 0.0163201, 0.0461364, 0.0497436, 0.0735869, 0.0261005, 0.0272832, 0.00319717, + 0.0133939, -0.033167, 0.0138665, 0.076355, 0.0436984, -0.0193582, 0.00494415, 0.00794336, + 0.0402147, -0.0356436, -0.0325444, -0.0406939, 0.0445568, 0.0529566, -0.0480436, -0.0361198, + 0.0239785, -0.022601, 0.004583, 0.0357781, -0.024916, -0.0673301, 0.0300021, 0.0233541, + 0.00131507, 0.020674, -0.0172261, -0.0378908, -0.0281607, -0.0362968, -0.0120887, 0.00251283, + -0.0151418, 0.0139788, 0.00226799, -0.0405325, -0.0372183, -0.0239591, 0.000689374, 0.00728419, + 0.0109032, 0.00117639, 0.0110613, 0.0284659, -0.00405134, 0.0224151, 0.0497437, 0.024467, + -0.0197926, 0.0191099, 0.0560234, -0.015999, 0.00349098, -0.0136769, -0.00855267, 0.0378745, + -0.0402489, 0.0187419, 0.00346364, 0.00200766, -0.051981, 0.0314351, -0.0370516, -0.031647, + 0.00269862, -0.0117079, -0.0113778, 0.0323024, 0.000887866, 0.0206333, 0.00573009, 0.0182514, + 0.0140522, -0.00215495, 0.00969224, 0.0445658, -0.0164545, 0.00403198, -0.0327273, 0.00355842, + 0.00186056, -0.0365137, 0.001591, -0.0147659, -0.0152249, -0.028393, -0.0295118, 0.00309647, + 0.0177405, -0.022215, 0.0110218, -0.0373177, -0.0264965, 0.0153762, -0.0577899, -0.0217735 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p34(hatfit_yaw00_lev2_p34); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p34_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p35.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p35.mh new file mode 100755 index 0000000..d1cc4ef --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p35.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p35.mh: + +#ifndef stasm_hat_yaw00_lev2_p35_mh +#define stasm_hat_yaw00_lev2_p35_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p35(const double* const d) // d has 160 elements +{ + const double intercept = -0.0569861; + const double coef[160] = + { + -0.0452166, -0.00120985, -0.0642733, -0.0433011, -0.0143067, 0.187839, -0.00428658, -0.00650242, + 0.0394361, 0.0211488, 0.0687109, 0.000483339, -0.0199071, 0.0220808, 0.0780823, 0.0556368, + 0.0586077, -0.0237231, 0.030264, 0.0372592, 0.0211708, -0.00451533, -0.0238338, -0.0808726, + 0.0375287, -0.0425377, -0.0537355, -0.0160995, 0.0191792, 0.0143375, 0.0323217, -0.0160405, + 0.0641634, 0.041519, -0.0194647, 0.00845982, -0.00460267, -0.00117591, 0.00773437, 0.00707627, + 0.0137806, 0.0537537, 0.116498, 0.0836869, 0.042555, -0.128439, -0.0448244, -0.0201245, + -0.0354514, -0.0320875, -0.0596862, 0.0322179, 0.0248905, 0.00867726, 0.0026904, 0.00215038, + 0.0176725, -0.0278685, 0.0647107, 0.0700868, 0.0723984, 0.013583, 0.0189065, 0.0296625, + -0.0125392, -0.0363014, 0.0524765, -0.0592515, -0.00260219, -0.00356819, -0.0465201, 0.00398317, + -0.0148738, 0.0892113, -0.00931875, -0.0290633, 0.0459755, 0.0466378, 0.0537626, 0.0155148, + 0.00157531, -0.0144777, -0.0566745, -0.0333648, -0.0635901, -0.00229455, -0.0108516, 0.0337369, + 0.0213568, 0.0212246, 0.0134308, -0.0349036, -0.0518544, 0.00736802, 0.00410732, -0.00219179, + 0.00875987, -0.00275223, 0.00445113, -0.0208322, -0.0406893, -0.0105535, 0.0171398, 0.0333355, + 0.0272341, 0.016625, -0.0150876, -0.0448088, -0.0305251, -0.00475766, 0.0282755, 0.0229124, + -0.0562676, -0.00235707, 0.00318367, -0.0375074, -0.036737, -0.0121753, -0.0456456, 0.0088149, + -0.0129207, -0.00481494, 0.0121743, 0.0636755, -0.00218512, -0.0264368, -0.0426944, -0.0331295, + -0.000268162, -0.0303325, -0.0100597, 0.0201173, -0.0187584, -0.0106597, -0.0162527, 0.00213507, + 0.000782108, -0.0446817, 0.0291512, -0.00622929, -0.032462, -0.00722358, -0.015956, -0.017508, + -0.00442869, -0.0616177, 0.00842057, -0.0221374, 0.00273545, 0.0370507, -0.0110599, -0.00349913, + -0.0150104, -0.00249232, 0.0607886, 0.00642015, 0.0137252, -0.00537359, -0.0407976, -0.0264226 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p35(hatfit_yaw00_lev2_p35); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p35_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p36.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p36.mh new file mode 100755 index 0000000..cfe7474 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p36.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p36.mh: + +#ifndef stasm_hat_yaw00_lev2_p36_mh +#define stasm_hat_yaw00_lev2_p36_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p36(const double* const d) // d has 160 elements +{ + const double intercept = -0.15802; + const double coef[160] = + { + 0.0486285, 0.0186809, 0.0610722, 0.0591576, 0.0388397, 0.0574882, 0.0641434, 0.0121667, + 0.0637028, -0.0778575, 0.0320216, 0.00871883, 0.0568133, -0.0225462, -0.015418, -0.0783217, + 0.0842919, -0.0221539, -0.0830029, -0.0634517, -0.0171046, 0.0330657, -0.00201285, 0.0145844, + 0.0509864, 0.0483077, -0.019694, -0.00253477, 0.00980955, -0.0071178, -0.00909895, 0.0133682, + 0.0367686, 0.0816382, 0.0405787, 0.0708277, 0.0300118, 0.0263414, 0.0264027, 0.0197782, + 0.0128342, 0.013998, 0.0557143, 0.0705258, 0.0274475, -0.0401644, -0.0111443, 0.0419802, + -0.0182621, -0.0129423, 0.0528886, 0.0155429, 0.0246531, -0.000775137, 0.00772486, 0.0353004, + -0.0283473, 0.0586058, 0.0423699, -0.0620206, 0.0120028, 0.0105429, 0.0076168, 0.00933035, + -0.0370865, 0.0248185, -0.0452911, -0.0178737, -0.00556646, 0.0268091, 0.0552079, 0.0282525, + -0.0621828, 0.0145903, 0.0643291, 0.0572874, 0.0105461, -0.0216231, -0.0403918, -0.0157246, + 0.0215985, -0.0416195, -0.0175289, -0.0418673, -0.0733202, 0.019949, -0.00658043, 0.0100759, + 0.0164112, -0.00890375, 0.00470579, -0.0475732, -0.0369, 0.00252177, 0.0184815, -0.00362862, + 0.0292086, -0.0130186, -0.0116424, -0.0283327, -0.0278432, 0.0182052, 0.0289034, 0.0470675, + -0.00995198, -0.0356322, -0.000162729, -0.0194088, -0.00831224, -0.00612526, -0.0350988, -0.0230069, + -0.0117491, -0.000818398, 0.015496, -0.0512162, -0.0297679, -0.00224479, -0.0714257, -0.0113509, + -0.043043, -0.0334773, 0.0407909, 0.0321586, -0.00719895, -0.0271855, -0.0296371, -0.0375253, + -0.000821446, -0.0586061, 0.0237793, -0.0243459, -0.00034366, 0.00762769, -0.00338772, 0.0103057, + -0.0559739, -0.0361567, 0.0295625, -0.0245679, 0.0341336, 0.0163618, -0.0120698, -0.034086, + -0.00365451, 0.00950689, 0.021756, -0.000354534, 0.0156633, 0.0315098, -0.00492233, 0.0151073, + -0.0510463, 0.0232019, 0.0325111, 0.0112793, 0.0388108, -0.0584284, -0.00696607, 0.000317936 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p36(hatfit_yaw00_lev2_p36); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p36_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p37.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p37.mh new file mode 100755 index 0000000..0998e72 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p37.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p37.mh: + +#ifndef stasm_hat_yaw00_lev2_p37_mh +#define stasm_hat_yaw00_lev2_p37_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p37(const double* const d) // d has 160 elements +{ + const double intercept = -0.357641; + const double coef[160] = + { + 0.090426, -0.0479457, -0.0400332, -0.0212107, 0.0130497, 0.0347203, 0.0603362, -0.00201685, + 0.0617162, 0.0154297, -0.0587526, -0.0498464, -0.0406109, -0.0444513, -0.0101726, 0.00113316, + 0.0643447, 0.0712631, 0.0518715, 0.0514074, 0.0424869, 0.0176295, -0.000344309, 0.0428262, + 0.0942759, 0.0405735, -0.0464468, -0.0186385, -0.0142453, -0.00193271, 0.0862762, 0.081217, + -0.016825, 0.0197965, 0.0147129, 0.0161728, -0.0757111, -0.0559225, -0.115652, -0.0622848, + -0.00501507, 0.0123832, 0.15875, 0.0352441, 0.0686156, -0.00259391, -0.00970851, 0.0319497, + 0.0172795, 0.0454753, -0.0590746, -0.0806317, 0.00137259, 0.049291, 0.0217576, 0.0280549, + -0.0351055, 0.0234457, 0.0331394, 0.0432127, 0.0247829, 0.0144538, 0.0285027, 0.00046848, + -0.0448116, 0.0182161, 0.0592176, 0.0918027, 0.0649448, 0.0105857, -0.0196588, 0.00406895, + 0.0034925, 0.0990291, -0.0319524, -0.00638724, 0.00562423, 0.0447108, 0.0227806, 0.014012, + -0.0143819, -0.0158124, -0.0378926, -0.0673686, -0.0649373, 0.00224931, 0.0333127, 0.0316347, + -0.0234361, 0.00150827, -0.0153644, -0.0250532, -0.00597671, -0.0067867, 0.018995, 0.0223197, + -0.0146966, -0.0435748, -0.00637642, -0.0419609, -0.0532878, -0.0176804, -0.0263347, -0.0276614, + 0.0162287, -0.00532958, -0.015642, -0.0538278, -0.025124, -0.0130719, -0.0193754, 0.0287796, + -0.0413712, 0.0480701, 0.0441385, 0.00548393, 0.00292707, 0.0269691, -0.0504128, -0.00968982, + -0.0149377, -0.0761418, 0.0646164, -0.013872, 0.0254016, 0.0211067, -0.0213354, -0.0101183, + -0.00769239, -0.018979, 0.0195936, 0.00275689, 0.0226773, 0.0528095, 0.00701476, -0.000215039, + -0.0385599, 0.0166449, 0.0279211, 0.0131107, 0.0463374, 0.0352633, -0.0267223, -0.00659304, + -0.0239268, 0.00596462, 0.064236, 0.0534211, 0.0618139, -0.00417547, 0.0169228, 0.00955138, + -0.0356719, -0.0140551, -0.0375888, -0.00973585, -0.00167822, -0.0297079, -0.0161585, -0.0314359 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p37(hatfit_yaw00_lev2_p37); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p37_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p38.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p38.mh new file mode 100755 index 0000000..d13a2f3 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p38.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p38.mh: + +#ifndef stasm_hat_yaw00_lev2_p38_mh +#define stasm_hat_yaw00_lev2_p38_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p38(const double* const d) // d has 160 elements +{ + const double intercept = -0.376783; + const double coef[160] = + { + -0.0381625, -0.0216802, -0.0155914, -0.0404376, -0.0631582, 0.0381639, 0.0377976, -0.0516102, + -0.028152, -0.0202302, 0.0302485, 0.00262319, -0.0207045, -0.0417396, 0.0787168, -0.0787154, + -0.0329266, -0.0189142, 0.000370531, -0.00575274, -0.0277813, -0.0345295, 0.0621677, -0.0119504, + 0.0166243, 0.0148557, 0.0187655, 0.0119691, 0.0209956, 0.000136722, 0.0679876, 0.0596953, + -0.0173308, -0.0304385, -0.0195675, -0.00678459, -0.058364, 0.00845924, -0.0914828, -0.0269946, + 0.0442164, 0.0218957, 0.0834356, 0.0923645, 0.0542928, 0.0437193, 0.00909546, 0.00658516, + 0.0595327, -0.0285361, -0.0120236, 0.0127215, 0.0471597, 0.00693775, -0.0502759, -0.00219912, + 0.0692, 0.0115397, -0.0597431, -0.0345065, 0.00897436, 0.0644876, -0.00529858, 0.0172422, + 0.0592641, 0.0368146, -0.0170227, 0.000427752, -0.0220798, -0.002191, -0.0154746, -0.0168699, + 0.0352867, 0.111853, 0.0565004, 0.0728899, 0.0717551, 0.033416, 0.048564, 0.00220777, + 0.031206, 0.0294133, -0.00374811, 0.0601965, 0.0488322, -0.0252048, 0.0418437, 0.0539204, + -0.00425075, -0.0373638, 0.0889858, -0.00515388, -0.00512685, -0.0250974, -0.00357214, 0.00699725, + -0.038465, 0.0384146, 0.0125729, -0.0497535, 0.0188856, 0.00873619, 0.0314734, 0.0134863, + -0.0273422, 0.032113, -0.0321483, 0.0119197, 0.0338809, 0.0323335, 0.0534044, 0.0411907, + -0.0332367, 0.0126317, 0.0531453, 0.0720893, 0.00242768, 0.00830297, -0.00492567, 0.0257998, + 0.0186504, -0.0333308, 0.0421134, 0.00815198, -0.0375097, 0.0125134, -0.0599385, 0.000119946, + 0.00751917, -0.019638, 0.00632028, -0.0359062, -0.0111683, 0.00175841, -0.00667292, 0.00282321, + -0.0037453, -0.0103999, 0.00707973, -0.0368289, -0.00472334, 0.00666663, -0.017547, 0.000420025, + -0.0198019, -0.038683, 0.00103139, -0.0286226, -0.00983428, 0.00971842, -0.0108167, -0.0309264, + -0.019254, 0.00464451, 0.0170737, -0.0466007, -0.0101921, -0.019542, -0.0446412, -0.0198669 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p38(hatfit_yaw00_lev2_p38); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p38_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p39.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p39.mh new file mode 100755 index 0000000..87acb56 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p39.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p39.mh: + +#ifndef stasm_hat_yaw00_lev2_p39_mh +#define stasm_hat_yaw00_lev2_p39_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p39(const double* const d) // d has 160 elements +{ + const double intercept = -0.175478; + const double coef[160] = + { + -0.0340044, 0.0102974, -0.0326885, -0.027898, -0.0574698, 0.0218861, -0.0295587, -0.0136835, + -0.0670967, -0.00859483, 0.01472, -0.0127685, -0.00715043, -0.0560974, 0.095579, -0.0138027, + -0.0477498, -0.0188489, 0.0206146, -0.0341245, -0.0114705, -0.0814169, 0.067814, 0.0128964, + -0.0372988, -0.00688147, 0.0535055, 0.0309127, 0.0136957, -0.00924958, -0.0222743, 0.000739304, + 0.00947217, -0.0633822, -0.0394817, -0.0256672, -0.0301259, 0.0126494, 0.033581, 0.0792859, + 0.0625707, 0.0213443, 0.0645021, 0.132729, 0.103496, 0.0360967, 0.0149085, 0.0283455, + 0.0447562, -0.0191749, -0.0247524, 0.0118958, 0.0418581, 0.0228802, -0.0348868, -0.00160803, + 0.0499076, 0.000436949, -0.0455082, -0.0523261, 0.0281439, 0.0563502, -0.0373772, 0.01161, + 0.0649382, 0.0375478, -0.000152216, -0.0242474, -0.0302719, -0.024227, -0.0163539, -0.0237781, + 0.0413481, 0.0639565, 0.0449211, 0.0730719, 0.0627154, 0.0195653, 0.0534155, 0.0242415, + -0.000842906, 0.0446278, 0.00706155, 0.107019, 0.0513803, 0.0188349, 0.0145981, 0.0541501, + 0.0323207, -0.0788871, 0.0691921, 0.0198263, 0.00516369, -0.00499741, 0.0431621, 0.0124451, + -0.0272489, 0.0178388, 0.0144972, -0.0310218, -0.0193413, -0.0027794, 0.0101328, -0.0183224, + -0.0375776, 0.0308271, -0.000599625, 0.00775446, 0.0111844, 0.00535355, 0.0351003, -0.00201906, + -0.0403671, -0.0297313, 0.000650426, 0.0552283, 0.00158567, 0.0127998, 0.0129658, -0.0540405, + 0.0126699, -0.0194195, -0.00137171, -0.0249486, -0.0977167, -0.0190306, -0.0617337, -0.0140263, + -0.0100231, -0.0157547, 0.014888, -0.0241838, -0.0298007, -0.00558167, -0.0200118, -0.00189711, + -0.00822873, -0.0244598, 0.0163851, -0.0267565, -0.00843671, 0.0101747, -0.0156994, 0.0148806, + 0.00397398, -0.0200779, -0.00718148, -0.0189266, 0.0237742, 0.0249438, -0.0174873, 0.00724446, + -0.0138303, 0.0292336, 0.0226407, -0.0766599, -0.0446403, -0.0119488, -0.0658979, 0.00344958 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p39(hatfit_yaw00_lev2_p39); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p39_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p40.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p40.mh new file mode 100755 index 0000000..51341b2 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p40.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p40.mh: + +#ifndef stasm_hat_yaw00_lev2_p40_mh +#define stasm_hat_yaw00_lev2_p40_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p40(const double* const d) // d has 160 elements +{ + const double intercept = -0.578154; + const double coef[160] = + { + -0.0230053, -0.0210838, 0.00833996, -0.00132794, -0.0195168, -0.0318791, -0.127763, -0.0155701, + -0.034902, -0.0315064, -0.0238103, -0.0304517, -0.0559896, 0.0267209, -0.0384578, -0.0265872, + -0.0585699, -0.0104624, -0.0336322, -0.0122956, 0.0132704, 0.0493953, -0.0308533, -0.00357042, + -0.0150394, 0.0170744, 0.0514288, 0.0387841, 0.0129995, 0.0622468, 0.0250487, -0.0148398, + -0.0116489, -0.0478068, -0.0371379, -0.0249553, -0.0180283, -0.0432322, 0.132777, 0.0320973, + 0.0230915, 0.016988, 0.00972359, 0.010769, 0.0282244, -0.0455557, -0.0193062, -0.0163898, + -0.0221048, 0.0368945, 0.0199199, 0.0685538, 0.117503, 0.0400076, 0.0400602, 0.0219632, + 0.0804955, 0.113797, 0.0771816, 0.0595862, 0.0464587, 0.044355, 0.033685, 0.04135, + 0.0573583, 0.000241402, 0.00757319, 0.061972, 0.0494706, -0.00927967, 0.0377478, 0.0453895, + 0.0660352, -0.00707717, -0.00409466, -0.00659626, 0.0710256, 0.0611401, -0.0468957, -0.0240416, + 0.0347565, 0.0332099, 0.0189545, 0.0699647, 0.0311581, 0.00807129, -0.00869748, 0.0150902, + -0.00120095, 0.00668937, 0.0326635, -0.0161191, -0.0129208, 0.0251813, 0.0124696, 0.0217988, + -0.0263708, -0.010514, -0.00390802, -0.0325808, -0.0571086, -0.0154732, 0.0102109, 0.0214122, + -0.0357933, -0.0272357, -0.00538061, 0.0474521, 0.0227356, 0.0232602, 0.0168437, 0.00073643, + 0.0113116, -0.0475376, 0.0560595, 0.031259, 0.0121835, 0.0106892, 0.0648001, 0.0432554, + -0.024124, -0.000816847, -0.0314966, 0.0103787, -0.0787828, -0.0520581, -0.00567509, -0.0185509, + 0.0535842, 0.0555946, 0.0181, 0.0220096, -0.0165579, 0.00212479, 0.0108745, 0.0136421, + 0.00809864, 0.0153479, 0.0293642, 0.0041109, -0.00828299, -0.0165547, -0.00871561, 0.00771352, + 0.0348994, 0.00533858, 0.0126395, -0.00496751, -0.0284364, -0.00480445, -0.0365954, 0.0008347, + -0.0041323, -0.0130019, 0.00889659, -0.0643651, -0.0419563, -0.002939, -0.0148031, 0.000960831 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p40(hatfit_yaw00_lev2_p40); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p40_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p41.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p41.mh new file mode 100755 index 0000000..9156cea --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p41.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p41.mh: + +#ifndef stasm_hat_yaw00_lev2_p41_mh +#define stasm_hat_yaw00_lev2_p41_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p41(const double* const d) // d has 160 elements +{ + const double intercept = -0.504123; + const double coef[160] = + { + 0.0296403, 0.0184192, -0.0822754, -0.0845612, -0.108267, 0.0246414, -0.0393737, 0.000256301, + 0.0228941, 0.041033, 0.0219511, -0.0137096, -0.0388542, -0.0138863, -0.00818661, 0.0105972, + 0.0145915, 0.0357209, -0.00152212, -0.0583622, -0.0404801, -0.0635977, 0.029528, 0.0399791, + -0.0220115, 0.0247502, 0.0609008, -0.00388183, -0.00349649, -0.0646161, 0.00873463, -0.03864, + -0.0574588, 0.0144267, 0.0276363, -0.00116585, -0.00827149, -0.0148357, 0.0379215, 0.0178955, + -0.0908591, -0.0282526, -0.0384145, 0.0148034, 0.0555861, 0.0348459, -0.0682362, -0.0137359, + -0.0161934, -0.000992711, 0.0417267, 0.0533682, 0.0606705, 0.0785771, 0.0177393, 0.0258979, + -0.0378051, -0.0430567, 0.0340479, 0.0873226, 0.0767643, 0.0501276, 0.0462917, -0.0225498, + -0.0253765, -0.0254106, -0.0434375, -0.0268121, 0.00946014, -0.0095343, 0.0410103, 0.0386735, + 0.0417865, -0.0111444, 0.038282, 0.0109508, 0.0165757, -0.0350916, 0.0181481, 0.0559019, + 0.0110023, 0.0756945, 0.0451606, 0.0317503, 0.0342808, 0.0563747, 0.00184054, 0.010916, + 0.0490982, 0.0742725, 0.0272439, 0.0667738, 0.0190779, -0.00363077, 0.0399377, 0.0587057, + 0.08214, -0.00631514, 0.015092, 0.0469049, 0.0700421, -0.000771437, -0.0188088, 0.00943442, + 0.0630941, -0.0083379, 0.000113802, -0.042742, 0.011614, 0.060704, -0.0111803, -0.0069888, + -0.0106874, 0.0722705, -0.0291486, 0.00721724, 0.00275513, 0.0355739, -0.0104596, -0.122197, + 0.0204395, 0.0355279, 0.0431984, 0.00359042, -0.0360651, -0.0240803, 0.00372068, 0.00855862, + -0.0373134, -0.035564, -0.0466182, -0.034249, -0.0504504, -0.0126724, -0.0210202, -0.0237463, + 0.0132138, -0.0377139, 0.0280111, 0.0393601, -0.0212865, 0.0149723, 0.0411332, 0.028714, + -0.0196819, -0.0324787, 0.0620909, -0.0094347, -0.0184877, -0.0330845, -0.013543, 0.00747859, + 0.0163584, 0.0246972, 0.0322218, -0.0315325, -0.00362678, 0.0186201, -0.00667478, 0.0466913 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p41(hatfit_yaw00_lev2_p41); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p41_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p42.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p42.mh new file mode 100755 index 0000000..35e06c0 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p42.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p42.mh: + +#ifndef stasm_hat_yaw00_lev2_p42_mh +#define stasm_hat_yaw00_lev2_p42_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p42(const double* const d) // d has 160 elements +{ + const double intercept = -0.487045; + const double coef[160] = + { + 0.0625564, 0.0377063, -0.0936294, -0.112431, -0.11527, -0.0167091, 0.0406052, 0.0738598, + 0.031717, 0.0592982, 0.0601575, -0.0166848, -0.00291908, -0.0829607, -0.00857274, 0.0205755, + 0.00948705, 0.0357341, 0.0519815, -0.0105257, -0.0086745, -0.0348401, -0.0191874, -0.00563161, + -0.00584097, 0.00939445, 0.0496421, 0.00617174, 0.0109272, -0.00699703, -0.019802, -0.036845, + 0.00622295, -0.0363641, -0.00320816, -0.00398417, -0.00117188, 0.0340202, 0.0232643, 0.0210433, + -0.076952, -0.0577683, 0.00690922, 0.0417571, 0.050944, 0.0913182, 0.0142636, -0.0422739, + -0.0723603, -0.0353338, 0.0062463, 0.027837, 0.0227093, -0.0154173, 0.0851114, 0.00579794, + -0.0556967, -0.016606, 0.00632741, -0.00221272, 0.0259411, -0.0336812, 0.0517649, 0.0257381, + -0.0381896, -0.000830177, 0.0243649, 0.0013848, 0.0115003, -0.0168612, 0.00369493, 0.0256691, + 0.0106233, -0.00775145, -0.00300705, -0.0247126, -0.0192061, 0.0160463, 0.0219635, 0.0912614, + 0.054399, 0.0505047, 0.0788935, 0.124535, 0.0689719, 0.0184976, 0.00473304, 0.0295179, + 0.05098, -0.0160143, -0.0138044, -0.00226117, 0.0481735, 0.0127097, -0.0128908, -0.000225028, + 0.0365491, 0.00311747, -0.0318899, -0.0402103, 0.00986184, 0.0267959, -0.0597112, 0.00930144, + 0.0337973, 0.0299957, 0.0120455, -0.00462641, -0.0216377, -0.0225958, 0.00223717, -0.0270024, + 0.0628005, 0.0489483, 0.0415761, 0.0761125, 0.0714916, 0.0226824, 0.0721983, 0.0584937, + 0.0218871, -0.00527917, -0.021159, 0.0474577, -0.0094378, 0.0238818, 0.00390066, 0.0178393, + 0.0356874, -0.0529759, 0.0605261, 0.0161625, 0.00235941, 0.00300719, 0.0191452, 0.0183478, + 0.00476389, 0.0355849, 0.0325118, -0.0273234, -0.0178925, 0.00676039, 0.00677796, -0.0404392, + -0.0159076, 0.00463432, -0.0117526, -0.00362902, 0.00451682, 0.0295932, 0.0400523, -0.00565271, + -0.0698196, 0.00656611, -0.00782271, 0.000942894, -0.0420094, -0.00445787, -0.0551658, -0.0701101 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p42(hatfit_yaw00_lev2_p42); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p42_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p43.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p43.mh new file mode 100755 index 0000000..3867d83 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p43.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p43.mh: + +#ifndef stasm_hat_yaw00_lev2_p43_mh +#define stasm_hat_yaw00_lev2_p43_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p43(const double* const d) // d has 160 elements +{ + const double intercept = 0.00648366; + const double coef[160] = + { + -0.0152163, -0.00938193, -0.0190419, -0.0687831, -0.0468449, -0.0880119, 0.0812563, -0.00542163, + -0.0303208, 0.00806224, 0.0623734, 0.0413201, -0.00380485, -0.0133008, -0.00241608, -0.0323745, + -0.0738325, -0.0242139, 0.0190181, 0.0157716, 0.0080979, 0.00166531, -0.0480585, -0.0434921, + -0.0302065, -0.0234743, -0.0184186, 0.0244355, 0.0155824, 0.0468844, 0.0080336, 0.00117218, + -0.0331888, -0.0584217, -0.0338365, -0.026523, -0.0119799, 0.0596711, 0.0115523, -0.0122433, + -0.0458657, -0.0397486, 0.00973897, 0.0146185, 0.069101, -0.0167322, 0.0669437, 0.0339211, + 0.00604615, 0.00201924, -0.0142197, -0.0430294, -0.00720905, -0.0326489, -0.0359383, 0.0285836, + 0.0545388, 0.0379828, 0.0598856, 0.0112929, -0.0060677, -0.00368719, 0.0259153, 0.0502069, + 0.0226217, 0.0012846, 0.0148117, -0.0016945, -0.000385082, 0.00444569, 0.0713966, 0.090965, + 0.0507963, -0.00174389, -0.0463333, 0.00418675, 0.0053341, -0.0537939, -0.0550999, 0.0945129, + 0.113893, -0.0139617, 0.0316123, 0.0529792, 0.0495666, 0.0340494, -0.039953, 0.0260375, + 0.00641793, 0.0377733, -0.0625308, -0.0868844, -0.048856, 0.0186374, -0.0411507, -0.0667005, + 0.0029778, 0.0232979, 0.0265188, 0.0512988, 0.0191031, 0.00196293, -0.0345508, -0.0318195, + 0.00777352, 0.0336489, 0.0340635, 0.0523148, 0.03348, 0.0224716, 0.0471509, -0.0111932, + 0.0163388, 0.0360007, -0.0550825, -0.0319889, 0.00674877, 0.0246315, 0.0166669, -0.00832142, + -0.0104868, -0.0427722, 0.0921329, 0.0220887, -0.0355666, -0.0185576, -0.00916089, -0.0092353, + -0.0317364, 0.0305874, 0.00675156, -0.0249873, 0.01326, 0.0109879, -0.016378, 0.00128751, + -0.0210845, -0.0114771, -0.00718837, -0.00888316, -0.0110957, 0.0127997, 0.0179059, 0.0174434, + -0.0127198, -0.0120589, -0.0196548, -0.0179925, -0.071387, 0.00189062, -0.0285034, 0.0140863, + -0.0971454, 0.0467506, -0.00717021, -0.0347361, -0.0281356, -0.0441394, -0.0500878, -0.0092695 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p43(hatfit_yaw00_lev2_p43); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p43_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p44.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p44.mh new file mode 100755 index 0000000..0c890e2 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p44.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p44.mh: + +#ifndef stasm_hat_yaw00_lev2_p44_mh +#define stasm_hat_yaw00_lev2_p44_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p44(const double* const d) // d has 160 elements +{ + const double intercept = 0.133498; + const double coef[160] = + { + -0.0434608, -0.0375412, 0.0454066, -0.00232263, 0.00944101, -0.0499478, 0.0126621, -0.0423901, + -0.00525387, -0.0133133, 0.0215207, 0.0288921, 0.0142323, 0.049969, 0.0481931, 0.0500351, + -0.00359542, -0.0930273, 0.00287021, 0.00598216, 0.0164819, 0.0124433, 0.00604495, 0.0709833, + 0.0020777, -0.0585229, -0.0286585, 0.0102381, 0.0246242, -0.00483163, 0.0220621, 0.0599245, + -0.0185056, -0.0421779, -0.0461277, -0.0347843, -0.0399771, 0.0179453, -0.0988327, -0.0343631, + 0.062811, 0.0709959, -0.0625171, -0.0890556, -0.038321, 0.00148258, -0.0706364, 0.0280211, + 0.013062, 0.0328506, 0.0540438, 0.0737895, 0.0182533, 0.00714815, 0.00747047, -0.0631775, + 0.0937722, 0.11209, 0.00853257, -0.0115347, -0.0403247, 0.0116919, 0.0922686, 0.100438, + 0.0496898, 0.0776282, -0.00799543, 0.0177156, -0.0209815, -0.0426646, 0.012797, 0.00244885, + 0.00795191, 0.0361026, -0.00259492, -0.0143084, -0.0014389, -0.0315686, -0.0858858, -0.0289207, + -0.0384161, 0.0405562, 0.0318509, -0.00677956, 0.0019075, 0.0227394, 0.0385147, 0.0332749, + -0.0443305, -0.0409049, 0.0268993, 0.0395555, -0.00697073, -0.0169692, -0.0110896, 0.0226296, + -0.099113, -0.0380493, -0.0555956, -0.0272147, 0.00162701, 0.0157433, -0.00016503, -0.0427643, + -0.0706651, -0.0126277, -0.00925659, -0.0135335, 0.00727166, -0.00311888, -0.0019915, -0.0481127, + -0.0174759, 0.00736274, 0.0108935, -0.0304465, -0.00479456, 0.0137333, -0.0236878, -0.026351, + -0.0180594, -0.0492838, 0.00470431, -0.0337215, 0.0155772, 0.00649963, -0.0740774, -0.0380523, + 0.0186271, 0.0388299, -0.00633185, -0.0332862, -0.0272252, 0.00657739, -0.0168025, -0.024778, + -0.0133223, -0.000528839, 0.00341718, -0.00758616, -0.0135721, 0.0138585, -0.0262324, 0.0120914, + 0.00661195, -0.00240091, 0.0207088, 0.0293574, -0.0124487, 0.00932525, -0.0122027, 0.0285461, + 0.0236277, 0.000629146, 0.00127135, 0.0423906, -0.00154121, -0.014517, -0.00175293, 0.0134204 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p44(hatfit_yaw00_lev2_p44); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p44_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p45.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p45.mh new file mode 100755 index 0000000..d7d8b17 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p45.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p45.mh: + +#ifndef stasm_hat_yaw00_lev2_p45_mh +#define stasm_hat_yaw00_lev2_p45_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p45(const double* const d) // d has 160 elements +{ + const double intercept = 0.167203; + const double coef[160] = + { + 0.0727442, -0.0166493, -0.0626483, -0.00407148, 0.0385231, 0.0138944, 0.0220685, 0.0317868, + 0.0202424, -0.00508257, -0.02991, -0.0642126, -0.0457136, -0.0205781, -0.0460721, -0.0144347, + 0.0185551, 0.021069, 0.0572957, 0.0567964, 0.0393136, 0.00655403, 0.00297779, -0.0212999, + 0.0588155, -0.0125789, 0.0302992, 0.0420561, 0.0321475, 0.0444928, 0.113518, 0.115613, + 0.0840319, 9.00529e-05, -0.0672098, -0.0382904, 0.00831286, -0.0415421, -0.0300061, 0.112934, + 0.0500438, -0.0398309, 0.121826, 0.0632192, 0.0417922, 0.0189858, 0.00649431, 0.00459315, + -0.0273207, 0.0733033, -0.023846, -0.0719232, -0.0331931, 0.00526774, -0.0276115, -0.0230609, + -0.0322007, 0.0294648, 0.024586, 0.0277014, -0.0083174, 0.00650928, 0.000355891, -0.0111656, + -0.0321933, 0.0129832, -0.00113023, 0.0126422, -0.028525, -0.0111074, 0.00155808, -0.0336636, + -0.0639764, 0.0777543, -0.0134676, -0.0233251, -0.0131801, -0.0252243, 0.00837433, -0.0979294, + -0.0316445, -0.0533707, 0.0260078, 0.0344793, -0.0253976, -0.0140301, 0.00174039, 0.00276017, + 0.00545666, -0.0200741, -0.0239352, -0.0327871, 0.0297689, 0.00861198, 0.040564, 0.052606, + 0.0074788, -0.0479343, 0.0154175, -0.0141605, -0.00841478, -0.00624186, -0.0179837, 0.00613419, + -0.0151695, -0.00554206, -0.0266159, -0.00971198, -0.0140612, 0.00957265, -0.00149456, 0.0407301, + -0.0514291, -0.00426822, -0.0378928, -0.025287, -0.000235668, -0.00516234, -0.043896, 0.0421735, + -0.0130924, -0.0251465, 0.0425118, -0.0765011, -0.041684, -0.0207319, -0.06635, -0.0265088, + -0.033695, -0.0298012, 0.00865036, -0.0296191, 0.00521558, 0.0239798, 0.00332807, -0.0132821, + -0.0237629, 0.0281534, -0.00584087, -0.0281866, -0.00921105, 0.00566867, -0.0154368, -0.0327216, + -0.0208287, 0.00086343, 0.0179541, -0.0235674, -0.0233201, -0.00703314, -0.022644, -0.0103356, + -0.0110677, -0.0168262, 0.00978007, 0.0523263, -0.0194004, -0.00861894, -0.0303185, -0.0325916 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p45(hatfit_yaw00_lev2_p45); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p45_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p46.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p46.mh new file mode 100755 index 0000000..4ba2f6c --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p46.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p46.mh: + +#ifndef stasm_hat_yaw00_lev2_p46_mh +#define stasm_hat_yaw00_lev2_p46_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p46(const double* const d) // d has 160 elements +{ + const double intercept = 0.134623; + const double coef[160] = + { + 0.0531168, 0.0334694, 0.043996, 0.12206, 0.0730851, 0.0708911, -0.00521965, 0.0159515, + 0.0281719, -0.0421384, -0.0138892, -0.0198386, 0.0505329, -0.0104663, 0.00154503, -0.0128061, + 0.058639, -0.00837575, -0.0821761, -0.0997137, -0.0181503, 0.0377087, -0.0401936, 0.00375633, + 0.00143321, 0.0237199, 0.00718317, -0.00464007, -0.0229915, -0.0257773, -0.0106924, -0.0683993, + 0.0987416, 0.0460078, 0.0523512, 0.0644147, 0.0502609, 0.0165771, 0.0867663, 0.123899, + 0.00447481, 0.0121519, 0.00354363, 0.0803775, 0.00817232, -0.0145719, 0.00701082, 0.0432215, + 0.0279507, -0.0634129, 0.0607196, 0.0344952, 0.0197178, 0.00448424, 0.00693527, 0.00980093, + -0.0263267, 0.0359766, 0.0495958, 0.00492949, -0.00529447, 0.00687388, 0.0106333, -0.00370484, + -0.0402679, 0.0157835, -0.00736962, -0.00841176, 0.00542731, 0.0202024, 0.010359, 0.0114009, + -0.114368, -0.00373064, 0.0193916, 0.0368617, -0.0185698, -0.00661785, -0.0196855, -0.0660228, + -0.0155701, -0.0423849, 0.0227829, -0.00564839, -0.0628149, -0.0119208, -0.0545034, -0.0238897, + -0.0304989, -0.0239419, 0.018287, 0.0139659, 0.0074725, 0.00120524, -0.0106813, -0.0109142, + -0.0190309, -0.0788974, -0.0350183, -0.040745, -0.00553431, 0.0194616, 0.0108564, 0.0408648, + 0.0127743, -0.0466269, -0.0114537, -0.0223878, 0.0214901, 0.0118409, 0.0131341, 0.0240932, + 0.0149353, 0.00707499, -0.0278634, -0.0513, -0.0344982, 0.00220224, -0.0332546, 0.008111, + -0.00234963, 0.0362378, 0.0399499, 0.0076758, -0.0431636, -0.0341594, -0.0400981, -0.0105245, + 0.0153956, -0.000767963, 0.0185314, -0.0453842, -0.0557711, -0.00781512, 0.00407695, 0.00583734, + -0.0275517, -0.0113003, 0.0115792, -0.0641317, -0.0148315, -0.0078452, -0.0106168, -0.0332407, + -0.0315385, -0.00204452, -0.00591023, -0.0533512, -0.00380281, 0.00919725, 0.0024589, -0.00864855, + -0.0314061, 0.0254036, 0.0529685, 0.00313081, -0.0361513, -0.0241116, -0.0383206, -0.0235494 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p46(hatfit_yaw00_lev2_p46); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p46_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p47.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p47.mh new file mode 100755 index 0000000..33b09c3 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p47.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p47.mh: + +#ifndef stasm_hat_yaw00_lev2_p47_mh +#define stasm_hat_yaw00_lev2_p47_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p47(const double* const d) // d has 160 elements +{ + const double intercept = -0.349958; + const double coef[160] = + { + -0.0938759, 0.00296821, -0.0729677, -0.0316095, -0.00706991, 0.0713807, -0.125104, -0.0615868, + 0.0707216, 0.055996, 0.066673, 0.063191, 0.0360445, 0.0752131, 0.0635663, 0.0533688, + 0.0104127, -0.0312641, 0.00659127, 0.0569067, 0.0593655, 0.0106091, 0.00629004, -0.0474023, + 0.0337274, -0.0232891, -0.0632985, -0.060388, 0.0187142, 0.0192868, 0.00269171, 0.0232338, + 0.0544664, -0.00795061, 0.00310823, -0.0143325, -0.0106303, -0.010281, 0.0267312, 0.00531744, + 0.0397312, 0.0957103, 0.117226, 0.0655497, 0.0423688, -0.0166754, 0.0271625, 0.0107862, + -0.0253908, 0.0119722, -0.031478, 0.0428568, 0.00490836, -0.0267872, 0.00626841, 0.0239749, + 0.0451296, -0.0252722, 0.0191709, 0.0668581, 0.0521968, 0.042853, 0.0250142, 0.0680039, + 0.0265303, -0.0209002, 0.0792489, -0.0097866, -0.00997529, 0.00598961, -0.0162379, -0.000541026, + -0.0667264, 0.0992408, 0.0101751, -0.0104197, 0.0343122, 0.0579504, 0.00881062, -0.0444161, + -0.0118875, -0.0064939, 0.0189168, 0.000886423, -0.0630399, -0.00776045, -0.0401691, 0.0212956, + -0.0124791, -0.0363352, -0.0313423, -0.0383338, -0.0471207, -0.00316822, -0.0288681, -0.00340652, + -0.0159142, -0.0354307, 0.0194541, 0.0374145, -0.00104714, 0.00322418, -0.00696972, -0.014788, + -0.0295837, -0.0265521, -0.0117168, 0.0133084, -0.0186389, -0.00254122, 0.00481712, 0.0100409, + 0.0211604, -0.0462735, -0.00647958, -0.0555301, -0.00469603, 0.0267769, 0.0434688, 0.0614441, + 0.0477303, 0.0342047, -0.0337731, -0.00408043, -0.0142271, -0.0233577, 0.00147113, -0.0202956, + 0.00291611, 0.0343229, 0.0658706, 0.042245, 0.00563476, -0.011158, -0.00236379, -0.00430019, + 0.024499, 0.0109992, 0.0275971, -0.0199714, -0.0525608, -0.0207767, -0.00988041, 0.0184047, + 0.0161338, -0.0137057, 0.0222027, -0.0660978, -0.0223864, 0.0155657, 0.00532412, 0.00796028, + -0.0192531, -0.00810867, 0.0503201, -0.0601432, -0.00343015, -0.000829491, -0.0402855, -0.0187734 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p47(hatfit_yaw00_lev2_p47); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p47_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p48.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p48.mh new file mode 100755 index 0000000..04d1e37 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p48.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p48.mh: + +#ifndef stasm_hat_yaw00_lev2_p48_mh +#define stasm_hat_yaw00_lev2_p48_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p48(const double* const d) // d has 160 elements +{ + const double intercept = -0.266244; + const double coef[160] = + { + -0.00244126, -0.00695775, -0.00750911, 0.0373564, 0.0912859, -0.0323123, 0.0135883, -0.0108903, + -0.0138802, -0.0188198, -0.0310479, -0.00867961, 0.0052937, 0.02034, -0.00643894, -0.0194933, + 0.00309242, -0.0162415, 0.0107541, 0.0155267, -0.0138722, -0.0117513, 0.0212924, -0.00367859, + 0.0165307, 0.00492787, -0.00487953, 0.00917269, -0.00646058, -0.00447639, -0.0268833, -0.0118095, + -0.000936887, 0.0130276, 0.0132283, 0.0163816, -0.00492111, -0.0137712, -0.00156212, -0.0168748, + -0.00170122, 0.01619, -0.00337298, 0.0267796, 0.0277441, -0.01436, -0.021252, -0.00902059, + 0.000179468, -0.00228062, -0.00427859, 0.032054, -0.00956211, -0.00282608, 0.00909247, -0.0129984, + -0.00618627, -0.0247032, -0.000789677, -0.0353493, -0.0504948, 0.0341041, 0.00664619, 0.00987884, + 0.0321276, -0.0307376, -0.0337874, -0.0369077, -0.0136238, -0.0040396, 0.0365185, 0.0295871, + 0.0337312, 0.0194397, 0.0405361, 0.00148259, 0.000971457, -0.0311783, -0.0283214, -0.0576002, + 0.0379415, 0.0162879, 0.0238018, 0.0896146, 0.0338163, -0.0440928, -0.0198169, 0.0139492, + 0.0135434, -0.0196034, -0.0666693, -0.0221157, 0.0240976, -0.00951311, 0.00591992, 0.00916109, + 0.0469733, 0.0313011, 0.0146373, 0.030906, 0.000892364, -0.0286324, -0.00992309, 0.0304088, + -0.0208145, -0.0248092, -0.0366884, -0.0395867, -0.0286382, 0.0170484, -0.00629805, 0.0301099, + 0.0390146, 0.0614085, 0.0576423, 0.0200063, -0.0242775, -0.05258, -0.0131601, 0.0207403, + -0.00163866, -0.0121648, 0.0215263, 0.0394177, -0.0529247, 0.0340943, -0.00183509, 0.00380548, + 0.00476614, -0.0106921, -0.0110888, 0.0573969, 0.0170387, 0.0482549, 0.0231282, -0.0111661, + -0.0603029, -0.0115112, -0.0168214, -0.00270062, 0.00541293, 0.012113, 0.0468421, -0.0042761, + -0.00759411, 0.0354396, 0.0728358, 0.0893882, 0.0657231, 0.0364996, 0.0136322, -0.0390175, + 0.0584287, -0.0251267, -0.0315721, 0.0521113, 0.116648, 0.060466, 0.0375091, 0.0571198 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p48(hatfit_yaw00_lev2_p48); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p48_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p49.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p49.mh new file mode 100755 index 0000000..edf24ac --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p49.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p49.mh: + +#ifndef stasm_hat_yaw00_lev2_p49_mh +#define stasm_hat_yaw00_lev2_p49_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p49(const double* const d) // d has 160 elements +{ + const double intercept = 0.192501; + const double coef[160] = + { + 0.0835498, -0.0204216, -0.0675207, -0.0489665, -0.033897, -0.021236, -0.00268309, -0.0164719, + -0.0187461, 0.0227914, 0.0300364, 0.015184, -0.0202062, -0.0158775, -0.0168518, -0.0179463, + -0.038041, -0.0119964, 0.00579416, 0.0356555, 0.0566812, -0.0199519, -0.0280012, -0.0420213, + -0.0132371, -0.0144199, -0.0541125, -0.0105326, 0.0603322, 0.022851, 0.00906489, 0.00544175, + -0.0290449, -0.0236012, -0.00222911, 0.00202367, -0.0600652, -0.00660235, 0.00674581, -0.0434849, + -0.0202302, -0.0287063, -0.0283714, -0.0407221, -0.0072558, 0.00972238, 0.00968606, 0.0152914, + -0.0149908, 0.0289505, 0.0488872, 0.0189728, -0.00561173, -0.0135145, -0.0488983, -0.0182296, + 0.00738071, -0.00137348, 0.0304801, 0.00910722, -0.00820217, -0.00508927, -0.0146195, -0.00154415, + -0.00504071, -0.0246486, -0.0311558, 0.0192517, 0.0282089, -0.00265505, 0.0248406, -0.0107161, + 0.0285478, -0.0112178, -0.0346098, -0.0519415, -0.0952246, 0.00133508, 0.00722505, 0.0403746, + 0.0649075, 0.0123525, -0.0457291, -0.0256825, 0.0120643, -0.00891199, -0.0416236, -0.0463997, + -0.0164144, 0.0205189, 0.0227254, -0.0232941, -0.0217079, -0.0199973, -0.0149456, -0.0384636, + -0.00166413, 0.0212203, 0.00416943, 0.0416679, -0.00479935, -0.0405398, -0.0239473, 0.00734616, + 0.0178309, -0.00162916, -0.0119294, 0.0305882, 0.0530868, -0.0145587, 0.00292821, -0.00612065, + -0.0178099, -0.0325072, -0.0661953, 0.00742307, 0.0488632, 0.0027951, -0.0201514, -0.0186999, + 0.0404047, 0.00993155, 0.0343232, 0.0122804, 0.0379228, 0.0375848, 0.0775912, 0.0897432, + -0.0461039, 0.00967581, 0.0305412, 0.0137018, -0.0143922, -0.00987391, -0.0348911, -0.018628, + 0.0197026, -0.00799958, 0.00957767, 0.00337207, -0.0613752, 0.0195736, -0.0140907, 0.0353882, + 0.034985, 0.0218205, 0.0298671, 0.0567854, -0.00573089, 0.018223, 8.00595e-05, 0.00255585, + -0.0136921, -0.0121694, -0.0137683, 0.0372801, -0.0100846, 0.0482397, 0.057524, 0.0142762 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p49(hatfit_yaw00_lev2_p49); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p49_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p50.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p50.mh new file mode 100755 index 0000000..97538f0 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p50.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p50.mh: + +#ifndef stasm_hat_yaw00_lev2_p50_mh +#define stasm_hat_yaw00_lev2_p50_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p50(const double* const d) // d has 160 elements +{ + const double intercept = -0.0477386; + const double coef[160] = + { + -0.0495539, 0.0211041, -0.0123644, -0.00237358, 0.0108027, -0.0275818, -0.0549775, -0.0233839, + -0.0836514, 0.0310929, -0.010384, -0.0336357, -0.0451937, -0.0144377, -0.0114682, -0.0333021, + 0.0882937, -0.00533626, -0.0302569, -0.0444939, -0.0423566, 0.0042213, 0.0342134, 0.0200237, + 0.0692929, 0.0399971, 0.0131628, -0.00253586, -0.0242977, -0.0384338, -0.0239605, -0.00330828, + -0.0419197, 0.00794452, -0.02165, 0.0106045, 0.0321402, -0.0296086, -0.0243697, -0.039781, + -0.042991, -0.0300578, 0.0575712, 0.0340556, 0.0579353, -0.0319422, -0.00851638, -0.0470556, + -0.00101905, -0.0480291, -0.0347489, -0.0109098, 0.00852354, 0.0360537, 0.0439627, 0.042935, + -0.0107764, -0.0386511, -0.0721515, -0.0327677, 0.00865226, 0.0152686, 0.0465945, 0.0362127, + 4.46165e-05, 0.0391035, 0.0494602, 0.0191409, 0.00970513, -0.0327974, -0.0348296, -0.0350654, + -0.0118673, -0.00809259, 0.0306083, 0.0223223, 0.0113989, 0.0111524, -0.0393564, -0.00130007, + -0.00938587, 0.0532157, 0.00277165, 0.0182028, -0.0584938, 0.0277438, 0.00704494, -0.00816859, + 0.0295228, 0.00526707, -0.0163852, -0.0128342, -0.0167003, -0.0067569, 0.0236241, -0.00624285, + 0.0457654, 0.0173623, -0.0646333, -0.00727445, 0.00955263, 0.0091617, -0.0389154, -0.0404082, + 0.036049, 0.0225123, 0.0275935, -0.0153545, -0.00186503, -0.0072327, -0.0506511, -0.0285569, + -0.00781563, 0.0385601, 0.00797834, 0.0318072, -0.00728755, -0.0361007, -0.0141264, -0.0288934, + 0.104485, 0.0503813, 0.0321288, -0.0221143, -0.0110662, 0.0157634, 0.0254731, 0.0313357, + -0.0274174, 0.0228067, 0.0466918, 0.0514846, 0.0267139, 0.0101061, -0.00114006, 0.0169987, + 0.0127578, -0.0134715, -0.013775, -0.0045049, 0.0264766, 0.0464675, 0.0606609, 0.0584783, + -0.0149799, 0.0290195, 0.0436679, 0.0239956, 0.0250228, -0.00806094, 0.0177236, 0.00230823, + -0.012279, -0.014165, 0.0218013, 0.00711751, -0.04036, 0.0250468, -0.0194546, 0.0282929 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p50(hatfit_yaw00_lev2_p50); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p50_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p51.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p51.mh new file mode 100755 index 0000000..4e0e380 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p51.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p51.mh: + +#ifndef stasm_hat_yaw00_lev2_p51_mh +#define stasm_hat_yaw00_lev2_p51_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p51(const double* const d) // d has 160 elements +{ + const double intercept = 0.0764357; + const double coef[160] = + { + 0.0650944, 0.0193851, -0.0594972, -0.100121, -0.104022, -0.0135567, -0.0376246, 0.0163301, + -0.0129405, 0.0103163, 0.0383381, 0.0231603, -0.0437137, -0.0245345, 0.0999677, -0.0503141, + 0.0283688, 3.67082e-05, 0.0251029, 0.0506682, 0.0184266, -0.0705395, 0.0184774, 0.0297773, + -0.00595488, -0.0341949, -0.00113204, 0.00722669, 0.0464591, -0.0242277, -0.0192974, 0.00749769, + -0.0107425, -0.0521185, -0.04147, -0.0343186, -0.0526623, 0.0383393, 0.0396407, 0.0098424, + -0.00613143, -0.0146145, -0.037507, 0.052777, 0.108913, 0.0489861, 0.0294413, 0.00825218, + 0.00635863, 0.017598, 0.00982251, 0.00746601, 0.0341631, 0.0363752, 0.0151007, 0.00218081, + 0.0294743, 0.0752663, 0.0559439, 0.000286545, 0.0110606, 0.012381, 0.0289762, 0.0671849, + 0.0313379, 0.0311749, 0.0262417, 0.0283269, 0.0130074, -0.0453311, -0.0087264, 0.0826683, + -0.0305231, -0.0395294, -0.0730491, -0.0439395, -0.00667226, 0.0224563, 0.00542897, -0.00669543, + -0.00254243, -0.0285783, -0.0136673, 0.0294769, 0.0177926, -0.0204505, 0.00655116, -0.0212695, + -0.0351333, -0.026744, 0.0102726, 0.00539215, -0.0062701, -0.0134256, -0.0305623, -0.0311588, + -0.0275912, 0.00367917, -0.0134105, 0.00069081, 0.003861, 0.0132189, -0.0253056, -0.0409523, + 0.00296127, 0.00236138, -0.00174571, 0.00992103, -0.00668856, 0.00554392, -0.0147451, 0.00857709, + -0.0172276, -0.0069705, 0.00110024, 0.0114147, 0.00020103, 0.0260044, 0.0350674, -0.015979, + -0.0468747, -0.0412072, -0.020738, -0.0234711, -0.0415735, 0.0120218, -0.0126633, -0.02575, + -0.000798617, 0.0116575, -0.00498169, -0.0220634, -0.0188038, 0.00136545, 0.00679813, 0.0155936, + 0.0294948, -0.00340731, -0.00214841, -0.0186313, -0.019873, -0.0132203, -0.00228597, 0.0017341, + 0.0248672, 0.00242723, 0.00372801, 0.0125139, -0.00768655, -0.0294099, -0.00568277, -0.00574113, + -0.00529745, -0.010464, -0.00262238, -0.0218967, -0.00582704, 0.00480886, 0.00623102, 0.00438627 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p51(hatfit_yaw00_lev2_p51); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p51_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p52.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p52.mh new file mode 100755 index 0000000..07371ef --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p52.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p52.mh: + +#ifndef stasm_hat_yaw00_lev2_p52_mh +#define stasm_hat_yaw00_lev2_p52_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p52(const double* const d) // d has 160 elements +{ + const double intercept = 0.0675872; + const double coef[160] = + { + 0.0422232, 0.00605944, -0.0402839, -0.0373185, -0.0290048, -0.0300657, -0.0521738, -0.0466676, + -0.010222, 0.0108525, 0.010731, 0.00984706, 0.0071276, -0.0020334, 0.00506905, -0.0378795, + 0.0256222, -0.00261496, -0.00874904, 0.0389066, 0.00516485, -0.0127199, 0.0187019, -0.000190753, + -0.00267674, -0.0253644, -0.00748812, 0.0673018, 0.0356246, -0.0255024, -0.00546691, -0.0188718, + -0.0131194, -0.0303938, -0.0786897, -0.0136168, -0.00421177, -0.0507213, -0.0482906, -0.0439651, + 0.0165339, -0.00723551, 0.0494401, 0.0500584, 0.0445881, 0.0448531, 0.00679038, 0.127445, + 0.00635129, -0.00477785, -0.0144259, 0.00167362, -0.00852137, 0.0127319, 0.0194569, 0.0380326, + -0.00862816, 0.00856149, 0.0171049, 0.0156228, -0.021514, 0.0473204, -0.00787639, 0.02784, + 0.00322575, 0.0140646, 0.00674093, -0.00690135, -0.0250757, 0.0660233, -0.0360162, -0.00921877, + 0.00959317, 0.0110007, 0.0146054, 0.018331, -0.0163642, 0.049363, 0.0730171, 0.0120552, + -0.0164216, 0.023567, 0.0119819, 0.0361643, 0.0255793, -0.0372276, 0.00954623, 0.0744301, + -0.0511832, -0.0570134, -0.0396644, -0.0404291, -0.0241616, -0.0218683, 0.0113479, 0.00422602, + -0.0198206, -0.0071985, -0.0374479, -0.0315704, -0.0633209, 0.0221232, -0.015953, -0.00428115, + 0.0153375, 0.0136208, -0.023364, -0.0307367, -0.0540647, 0.0534357, -0.0172693, -0.0192023, + -0.0168497, 0.04081, 0.0412586, 0.0312318, -0.00389699, -0.0169878, 0.044265, 0.00451415, + 0.0174412, 0.046257, 0.000171126, 0.00684629, 0.00116319, -0.0263814, 0.0101471, 0.0133016, + -0.0112506, -0.0140623, -0.0175112, -7.98279e-05, -0.00964185, -0.00319915, 0.00209215, -0.0136634, + -0.014852, -0.00364934, 0.00261632, -0.00717517, 0.0168242, -0.00207797, -0.014872, -0.0169025, + -0.00321814, -0.00673075, -0.00480385, 0.0226337, 0.0466613, 0.0354814, 0.0169009, -0.00421824, + -0.000706595, 0.0251857, 0.00525701, -0.0187527, 0.00833638, -0.0156336, -0.0185438, -0.00773955 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p52(hatfit_yaw00_lev2_p52); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p52_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p53.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p53.mh new file mode 100755 index 0000000..13639b7 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p53.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p53.mh: + +#ifndef stasm_hat_yaw00_lev2_p53_mh +#define stasm_hat_yaw00_lev2_p53_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p53(const double* const d) // d has 160 elements +{ + const double intercept = 0.0626878; + const double coef[160] = + { + -0.018691, -0.0296059, -0.0703994, 0.00120945, -0.0494968, 0.0795052, -0.00971431, -0.0329191, + -0.0362483, -0.0085063, -0.0191623, -0.024323, -0.0312561, -0.0143246, -0.00839651, -0.0488237, + -0.0588511, -0.00926484, 0.0441297, 0.0445941, 0.017878, -0.046711, 0.0849654, -0.0249244, + -0.0423636, -0.0462836, 0.0275196, 0.0497014, 0.063428, 0.0314373, -0.00740839, -0.0418502, + 0.0557852, -0.0506972, -0.0623033, -0.0245665, 0.0507803, 0.0253386, -0.0329503, 0.0540937, + 0.0081901, -0.0173538, -0.0468151, -0.0113454, 0.0219419, 0.094097, -0.0336471, -0.0388668, + -0.00046048, 0.00541129, 0.0423549, 0.0338251, 0.0152872, 0.0485634, 0.0308025, 0.0141435, + 0.0688133, 0.0714458, 0.0222149, 0.00240129, -0.003577, 0.0127541, 0.0484851, 0.0474281, + 0.0625819, 0.0711041, -0.0137645, -0.00438153, -0.0217192, -0.0282293, 0.0145261, 0.0291524, + 0.000221867, 0.0219362, -0.00657695, -0.00351057, -0.019949, 0.0184259, -0.0142055, 0.00232768, + 0.0323774, 0.0241413, 0.0107102, 0.0214944, 0.000167494, 0.00677882, 0.0125334, 0.0430097, + 0.00430616, -0.0118973, 0.0184187, 0.0247654, 0.0199142, -0.0243278, -0.0211138, -0.00152234, + -0.0335908, -0.0136346, -0.00509563, -0.0118379, 0.00521896, -0.0137947, -0.029525, -0.033767, + -0.0409034, -0.0136538, -0.00955293, -0.0135913, 0.0034148, -0.00914535, -0.0143001, -0.0305599, + 0.00261832, 0.0124695, -0.0291263, -0.00591625, 0.00662083, 0.00995792, 0.0301587, -0.00637953, + -0.00596176, -0.023765, 0.00159443, -0.017357, 0.0219382, -0.00169842, 0.00159802, -0.0072873, + -0.00549211, -0.0196789, 0.00654718, -0.00794658, -0.0214648, -0.0236879, -0.0144501, -0.0129102, + 0.00940209, -0.013199, 0.00696873, -0.0156188, -0.0263607, -0.0121995, -0.0039541, 0.0131912, + 0.0121015, -0.00687284, -0.00235904, -0.0296469, -0.0215484, -0.0173748, -0.0020463, 0.0232373, + -0.0247, -0.00367961, -0.00750513, -0.0123954, -0.0110696, -0.0125895, 0.0128087, 0.0139221 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p53(hatfit_yaw00_lev2_p53); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p53_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p54.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p54.mh new file mode 100755 index 0000000..b5d8222 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p54.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p54.mh: + +#ifndef stasm_hat_yaw00_lev2_p54_mh +#define stasm_hat_yaw00_lev2_p54_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p54(const double* const d) // d has 160 elements +{ + const double intercept = -0.277291; + const double coef[160] = + { + -0.0446887, -0.00374708, 0.00385274, 0.0503045, 0.0217272, -0.0400245, 0.0183714, -0.0416097, + 0.0361514, 0.0264205, -0.0355195, -0.0535544, -0.0176517, 0.0109518, 0.0471306, 0.0530063, + 0.0408165, -0.00365712, 0.0186745, -0.0167308, -0.0192916, -0.0318051, 0.0164768, 0.0619793, + -0.000283606, 0.0150233, 0.0253617, 0.0234364, -0.00652511, -0.0238146, -0.0132057, -0.00482485, + -0.0557863, -0.0139786, 0.0177731, -0.0304113, -0.0156029, -0.0503534, -0.00948837, -0.00765604, + 0.00322491, 0.0139671, 0.0437126, 0.051357, -0.0120266, -0.0424331, 0.0545242, 0.0207623, + 0.0389337, -0.0450301, -0.0408157, -0.00188467, 0.0802237, 0.10159, 0.00144506, 0.00801055, + 0.0471722, 0.00134928, 0.0049963, 0.00331887, -0.023034, -0.0105944, 0.000381919, 0.0476973, + -0.01709, -0.00342293, 0.0247222, 0.0385434, 0.031444, -0.00491429, -0.0478791, -0.00725465, + -0.00313559, -0.026061, -0.00803455, -0.00766215, -0.00734289, -0.00485036, -0.0128516, 0.0467148, + 0.0217181, 0.0961528, 0.0442988, 0.0244961, -0.00209479, 0.070689, 0.0440197, -0.0210048, + -0.0333998, 0.00952642, -0.0375876, 0.00130615, 0.033453, 0.0267356, 0.0286615, -0.0131523, + 0.0185672, 0.00152239, -0.0076401, 0.0130947, 0.0407226, 0.0263838, -0.0137793, -0.0336713, + 0.0205575, 0.0190752, 0.00701367, 0.0192376, 0.000230231, 0.00256423, -0.00603685, 0.00141138, + -0.000274883, -0.0127365, -0.0275762, -0.00276515, -0.0121963, -0.00158619, -0.00822213, 0.021954, + 0.00219908, 0.0747051, -0.00507968, -0.0224858, -0.0288911, -0.009155, -0.0148191, 0.0314522, + -0.00385337, 0.0544586, -0.0213008, -0.0350865, -0.0216466, 0.0122098, 0.00669712, 0.00928643, + -0.0222463, -0.00865128, -0.0119568, -0.0130535, -0.028518, -0.0214098, -0.0315799, -0.0243013, + 0.0445565, 0.0313687, 0.0127979, 0.0226593, 0.002793, -0.00884828, 0.0147583, 0.0132262, + 0.0187937, -0.00249565, -0.00482565, -0.00873885, -0.00158184, 0.018112, 0.00190477, 0.0203196 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p54(hatfit_yaw00_lev2_p54); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p54_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p55.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p55.mh new file mode 100755 index 0000000..a3ca6d7 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p55.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p55.mh: + +#ifndef stasm_hat_yaw00_lev2_p55_mh +#define stasm_hat_yaw00_lev2_p55_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p55(const double* const d) // d has 160 elements +{ + const double intercept = -0.250169; + const double coef[160] = + { + 0.00770038, -0.0117506, 0.062048, 0.0180783, 0.0240321, 0.0333108, 0.0369724, -0.0106229, + 0.0118312, 0.0499778, 0.061373, 0.0373043, 0.0472146, -0.00673929, 0.0755102, 0.0273608, + 0.0547031, -0.015602, -0.0683437, -0.0307405, 0.0675858, 0.0804987, 0.0421439, 0.0451601, + 0.0381199, -0.00587557, -0.017652, 0.00875733, -0.00608711, 0.0247261, -0.0605143, 0.0144518, + 0.107937, 0.00733392, -0.0109964, 0.0212265, -0.0131021, -0.055415, -0.0756234, 0.06983, + -0.0126466, 0.00585092, 0.020196, 0.030979, 0.00395235, 0.0345755, -0.0128192, -0.0237322, + 0.00551386, 0.05754, -0.0355483, -0.0133549, -0.034749, 0.024405, 0.0142873, -0.00536911, + -0.0123543, 0.0699165, -0.00607456, 0.0269026, -0.0222243, 0.0179932, -0.0170113, -0.0444965, + -0.043051, 0.0686616, 0.0156304, 0.0271785, -0.00155287, -0.0190537, 0.00520236, -0.0426718, + -0.0380035, 0.0159989, -0.0108328, 0.00100199, 0.0144364, 0.0342008, 0.0593881, -0.0223646, + 0.0102675, -0.0133535, -0.00346879, 0.01142, 0.001026, -0.00617268, -0.0179935, 0.0294985, + 0.00672279, 0.0123285, 0.0107054, -0.00973206, -0.00529085, -0.0241834, -0.01892, 0.0318575, + -0.0107454, -0.0399393, -0.00696133, -0.0353624, -0.000994443, -0.0316886, 0.0117592, 0.0338041, + 0.0196972, -0.0370209, -0.0057983, -0.0262384, -0.0001756, -0.0105558, 0.0138915, 0.0301981, + 0.046032, 0.0066506, 0.0175139, 0.0332507, 0.00442133, -0.0277928, 0.0017533, 0.0299767, + -0.00254022, -0.00614713, 0.0406137, 0.0403652, 0.0213262, -0.00909879, -0.0216363, -0.0136817, + -0.00606465, -0.0205355, -0.0101716, -0.020908, -0.020426, 0.00635634, -0.00863355, -0.0117216, + -0.0107347, 0.00235228, 0.00293927, 0.00761096, -0.00581517, 0.0156982, -0.00447562, -0.00811945, + -0.0236372, 0.0142137, -0.0213592, 0.0131076, -0.00325128, 0.00408089, -0.0124824, -0.0344511, + -0.0238587, -0.019063, -0.00917022, -0.0286919, 0.023084, 0.0092957, 0.0240128, 0.036306 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p55(hatfit_yaw00_lev2_p55); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p55_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p56.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p56.mh new file mode 100755 index 0000000..2d234c4 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p56.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p56.mh: + +#ifndef stasm_hat_yaw00_lev2_p56_mh +#define stasm_hat_yaw00_lev2_p56_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p56(const double* const d) // d has 160 elements +{ + const double intercept = -0.328306; + const double coef[160] = + { + 0.0422546, 0.184962, 0.111152, 0.115769, 0.101409, -0.0368084, -0.0156815, 0.139848, + -0.052356, -0.108451, -0.0700122, -0.0229977, -0.0024418, 0.0153147, 0.0345232, 0.0241745, + 0.0212702, 0.000153695, -0.0788591, -0.0915139, -0.0247898, 0.0565069, 0.00748018, 0.0422068, + 0.0181788, 0.0418746, -0.0156512, 0.0312404, -0.00018109, 0.114732, -0.0092167, -0.0121939, + 0.0231432, 0.0906016, 0.160848, 0.0908163, 0.0713517, 0.0394256, 0.00905898, 0.0264914, + 0.0148162, -0.0424319, -0.0394716, -0.0317375, -0.0753654, -0.0172819, -0.0305321, -0.0236258, + 0.022185, 0.012337, 0.0471083, 0.0319807, -0.0116053, -0.0167637, 0.0203835, 0.00503093, + -0.0140213, 0.0198297, 0.0664976, 0.0462881, 0.0105653, -0.000511109, -0.00413334, -0.0450897, + -0.00640742, -0.0325777, 0.0146104, 0.0213001, 0.0387468, -0.00322437, 0.0274184, 0.00179133, + -0.0146529, -0.0246124, -0.0441073, -0.042919, -0.0813967, -0.0495854, -0.0512577, -0.0147774, + 0.0484091, -0.00169258, 0.00229933, 0.0214474, 0.0207526, -0.0267993, -0.042788, -0.0367772, + -0.0232888, -0.0114198, -0.00746757, -0.0123173, 0.000351264, 0.00888676, 0.0162699, 0.0085016, + 0.0219701, 0.00384312, -0.0292739, -0.0425834, 0.0015455, 0.00867374, -0.00863364, 0.0193312, + 0.023051, 0.00926908, 0.00392346, 0.0118959, 0.0199253, 0.00515107, 0.0196919, 0.0199765, + -0.0084015, -0.00823807, 0.0127497, -0.0211327, -0.0121992, -0.0401961, -0.0610518, -0.0164254, + -0.000862504, 0.0221161, 0.0126576, 0.00322465, -0.0033571, 0.00501517, 0.0331727, 0.048669, + -0.0105479, -0.0102952, 0.0363188, 0.0324739, 0.0273342, -0.0126718, 0.00903472, -0.00375157, + 0.00556322, 0.0250934, 0.0164272, 0.0050311, -0.000954502, 0.00514953, -0.00287182, -0.0133536, + -0.0146159, 0.0136428, 0.00980887, 0.0328536, 0.0203876, 0.0245116, 0.00937394, -0.0276986, + -0.00316586, -0.0252487, 0.0171106, 0.0432378, 0.00206141, 0.011208, 0.0426284, -0.0135959 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p56(hatfit_yaw00_lev2_p56); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p56_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p57.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p57.mh new file mode 100755 index 0000000..19cafd6 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p57.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p57.mh: + +#ifndef stasm_hat_yaw00_lev2_p57_mh +#define stasm_hat_yaw00_lev2_p57_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p57(const double* const d) // d has 160 elements +{ + const double intercept = -0.203007; + const double coef[160] = + { + 0.0865128, 0.0248213, 0.0086474, 0.0259264, 0.0268835, 0.0689304, -0.102411, 0.0205806, + 0.117378, -0.00638402, -0.0704098, -0.0455065, 0.0117648, 0.0137531, 0.0162044, 0.0398035, + 0.0274852, -0.00498262, 0.0209268, 0.0316234, 0.0288375, 0.0340683, 0.0668118, 0.0260287, + 0.0215089, 0.0406523, 0.0853733, 0.0623678, 0.0242103, -0.012731, 0.0075814, 0.0342916, + 0.0283612, -0.00154386, -0.0240037, -0.0495551, 0.00866836, -0.0187868, 0.0618618, 0.0776875, + -0.0219694, 0.0250212, -0.0495675, 0.0345358, -0.00554467, -0.0609616, 0.0596593, -0.0024294, + -0.00819783, 0.0356277, 0.0464799, 0.0898769, 0.0426898, -0.0331242, 0.000643486, -0.00481121, + 0.000895754, 0.0312877, -0.00516461, 0.0300407, 0.00527737, -0.00775853, 0.00704294, 0.0223022, + -0.00470824, 0.0474949, 0.0244843, -0.0149368, -0.0229115, -0.0154321, -0.0265509, 0.0119826, + -0.016407, -0.0128797, 0.00940966, 0.0142355, 0.0178779, 0.02561, -0.0083376, 0.0394511, + -0.052462, -0.0293036, 0.00800413, -0.0132136, -0.0146051, 0.0310741, -0.00819054, -0.0509036, + -0.024018, -0.0654997, -0.0291971, -0.0366762, -0.0289362, 0.0235513, 0.00167891, -0.00503019, + -0.0119401, -0.0284647, 0.00416893, 0.00107612, 0.012074, 0.0370183, -2.30073e-05, -0.0357759, + 0.00721041, 0.00510823, 0.0151765, -0.0191009, -0.0173274, -0.00825617, -0.0405202, -0.0194431, + 0.0323954, -0.0224443, -0.020123, 0.0101763, -0.0117992, -0.000572933, 0.0238616, 0.00865666, + 0.0040677, 0.011807, -0.0538971, -0.00438757, -0.0352308, -0.000402236, -0.00168159, -0.00856236, + -0.00958126, 0.0209521, 0.0110831, 0.0138053, -0.0217701, -0.0060596, -0.0140786, -0.0134007, + -0.0150505, 0.00959312, -0.00261968, -0.0179398, -0.0201037, -0.00983304, -0.000632587, 0.00957735, + 0.0348604, 0.0354315, -0.00866957, -0.0197128, -0.00944631, -8.65125e-05, 0.00391458, 0.0133003, + -0.00452637, 0.010231, 0.0347043, 0.0398113, 0.00425353, -0.00193257, -0.0202522, -0.0150822 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p57(hatfit_yaw00_lev2_p57); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p57_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p58.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p58.mh new file mode 100755 index 0000000..108e28c --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p58.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p58.mh: + +#ifndef stasm_hat_yaw00_lev2_p58_mh +#define stasm_hat_yaw00_lev2_p58_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p58(const double* const d) // d has 160 elements +{ + const double intercept = -0.384347; + const double coef[160] = + { + -0.0590473, -0.0107227, 0.0440664, 0.00644412, -0.0110966, 0.00148019, -0.0853849, -0.0932483, + -0.0392207, -0.0348981, -0.00926003, 0.0317718, 0.0280975, 0.0566762, 0.00941703, -0.0125592, + -0.000283368, -0.00502152, -0.0161522, -0.000118852, 0.00761111, 0.0468401, 0.0465597, 0.00643877, + -0.00673491, 0.00193026, -0.0347163, -0.0226197, -0.0508994, 0.00725766, 0.0415696, -0.0173771, + 0.0682239, 0.0358892, 0.0108749, -0.00233464, -0.0229325, -0.064544, 0.000298107, -0.0620169, + -0.0186442, 0.0436344, -0.0143493, -0.050769, -0.0402411, 0.0134804, -0.0727617, 0.0189837, + 0.0197985, 0.0115539, 0.00412827, 0.0101014, 0.0171984, 0.0365728, 0.00240549, 0.0200738, + 0.102691, 0.0325696, 0.00238379, -0.0144204, -0.0414022, 0.0173708, 0.00370051, 0.0572132, + -0.0500593, -0.0452855, -0.0308472, -0.0417367, 0.0276262, 0.0335967, 0.000101994, -0.0125322, + 0.0184756, 0.0674955, 0.0767639, 0.0524944, 0.0106225, -0.00806347, 0.0145697, 0.0241127, + 0.0271895, 0.0055225, -0.0450105, -0.0188389, 0.0217115, 0.0201329, -0.0117536, 0.0364266, + 0.0621516, 0.0058109, 0.0328488, 0.0289039, 0.0422151, -0.0215054, 0.0247541, 0.010941, + 0.0546283, 0.0028825, -0.00979371, 0.02213, 0.0302506, -0.0296153, 0.0105182, 0.03328, + 0.0185126, -0.0128748, 0.00842694, 0.0417042, 0.0210447, 0.0329542, 0.0635035, 0.0543379, + 0.0372297, 0.0482659, 0.0787115, 0.0584661, 0.0446115, -0.0131087, -0.00200247, 0.043677, + -0.0560349, 0.0193011, -0.0152084, -0.0208463, 0.0323249, 0.0279498, -0.000862152, 0.00584713, + -0.0218628, -0.0139652, -0.0164495, 0.00507096, -0.0313434, -0.0317992, -0.0274037, -0.0352698, + -0.0352773, -0.0269394, -0.0122851, 0.0570417, 0.0430161, 0.017478, 0.0152139, 0.00152666, + -0.0431643, -0.0129325, 0.0101743, 0.024005, 0.030459, 0.026044, -0.00930558, -0.0343825, + -0.00255551, 0.02388, -0.00157908, -0.0270078, -0.0219657, 0.0105858, -0.0106584, 0.0122666 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p58(hatfit_yaw00_lev2_p58); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p58_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p59.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p59.mh new file mode 100755 index 0000000..47320f3 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p59.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p59.mh: + +#ifndef stasm_hat_yaw00_lev2_p59_mh +#define stasm_hat_yaw00_lev2_p59_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p59(const double* const d) // d has 160 elements +{ + const double intercept = -0.225675; + const double coef[160] = + { + -0.040477, -0.00609423, -0.00821916, -0.0548738, -0.0169424, 0.0560629, -0.0976803, -0.0536427, + -0.00845835, -0.00693062, -0.0641817, -0.0622238, -0.0746946, -0.00356808, -0.0219615, -0.0562677, + -0.0112212, -0.00771601, -0.0362499, -0.0567906, -0.0768136, 0.00568094, 0.0410822, 0.00568983, + -0.00380847, 0.0141137, 0.0186174, 0.00927793, -0.0298109, -0.00952264, 0.0131703, -0.0200301, + -0.0191894, 0.0028206, 0.00948692, 0.0159359, 0.00167328, -0.0168206, 0.0138921, -0.0010733, + 0.0206606, 0.011975, -0.0235473, 0.0564816, 0.0761392, -0.0740906, -0.0572061, -0.0199989, + 0.00309155, -0.0190737, 0.000729695, 0.0495573, 0.117437, 0.0523793, 0.0212986, 0.0454454, + 0.0286832, 0.0402036, 0.0860817, 0.0986324, 0.080419, 0.0786126, 0.0961135, 0.0916864, + 0.000713514, 0.0161459, 0.0238884, 0.0219361, -0.00209585, 0.0039416, 0.0269808, -0.000680694, + 0.00881705, 0.0295667, 0.0165846, 0.00277793, 0.0118923, -0.0177124, -0.0122367, 0.000993965, + 0.0169292, 0.0339602, -0.019476, 0.0122096, 0.0174662, -0.00977033, 0.0269987, 0.0407677, + 0.0307038, 0.0399019, -0.0295386, -0.030221, -0.061692, -0.0551209, 0.03251, 0.0324767, + -0.00701717, 0.0126396, 0.00466349, 0.0169105, -0.0294034, -0.0441127, -0.00279974, -0.0113114, + 0.0191582, 0.0291767, 0.0220347, 0.0167793, 0.00828308, -0.0079766, -0.0115879, 0.00390746, + 0.00364135, 0.0333894, 0.0046142, -0.00540084, 0.0075717, -0.00470646, -0.0191649, -0.00688477, + 0.0113193, -0.00401891, 0.00742461, -0.00336853, 0.0177918, 0.0482465, 0.0163182, -0.0144115, + -0.0189215, -0.0170834, 0.000100562, -0.00627354, 0.0241668, 0.0217989, -0.0120274, -0.0186345, + -0.0243717, -0.0432802, -0.0227666, 0.0136494, 0.0290572, 0.0133098, -0.0198099, -0.0344272, + -0.0299281, -0.0202596, -0.0112792, -0.00627686, 0.0113015, 0.00128058, -0.0142346, -0.0147663, + 0.0242026, 0.00906782, -0.00932914, 0.016803, -0.00062888, -0.000295773, 0.0133787, 0.064017 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p59(hatfit_yaw00_lev2_p59); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p59_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p60.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p60.mh new file mode 100755 index 0000000..d939901 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p60.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p60.mh: + +#ifndef stasm_hat_yaw00_lev2_p60_mh +#define stasm_hat_yaw00_lev2_p60_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p60(const double* const d) // d has 160 elements +{ + const double intercept = -0.0574429; + const double coef[160] = + { + -0.0481914, -0.0802053, -0.0574908, -0.0144008, -0.0340921, 0.0176143, -0.0273937, -0.065969, + -0.0645076, -0.0216497, -0.0319475, -0.0358559, -0.0307303, -0.000141573, -0.0476916, -0.019718, + -0.011527, 0.00677815, -0.0317135, -0.0533613, -0.0469683, 0.00057032, -0.0231745, 0.00652888, + 0.0652671, 0.0573901, -0.00943745, -0.0753712, -0.0411104, -0.0184814, 0.000290673, 0.0272182, + 0.0513562, 0.0555283, 0.0992615, 0.0705934, 0.024459, 0.00052681, 0.0214185, -0.0196554, + -0.00446396, 0.0397874, -0.0230297, -0.0356375, -0.0500258, -0.0872619, 0.0171653, -0.00482889, + 0.0163187, 0.0409706, 0.0199018, 0.0214592, 0.00166659, -0.00809229, 0.0346777, 0.0031199, + -0.0113046, 0.0163862, -0.00277179, 0.018063, 0.022806, -0.00388124, 0.105189, 0.00141979, + -0.0687237, -0.0122344, -0.00200493, 0.0379497, 0.0276317, -0.0045303, 0.00388892, -0.0202021, + -0.0677418, -0.0309028, -0.016149, -0.00385407, -0.0104694, -0.0736018, 0.0296348, 0.0565345, + 0.0757052, 0.0444074, 0.00251371, 0.0318623, -0.0424912, 0.122445, 0.118608, 0.0299465, + 0.0324904, 0.00866944, -0.0105795, 0.00675961, -0.0485598, 0.0270956, 0.00775366, 0.00346522, + -0.0240875, -0.0145366, 0.00787615, -0.013137, -0.0283774, -0.0251651, -0.036254, -0.0162058, + -0.00468493, -0.0105304, 0.011014, -0.0353427, 0.0080706, -0.03488, 0.00061812, -0.00251708, + -0.00221024, -0.0177607, 0.0496022, -0.0320555, 0.0287524, -0.0167142, -0.0221543, -0.00306374, + -0.0473918, -0.00819185, 0.0295476, 0.0660758, 0.0524945, -0.00485913, -0.0213759, -0.0239857, + -0.0371676, -0.00204892, -0.057195, -0.0158003, 0.0125775, -0.0164363, 0.00846072, -0.0232319, + 0.0346082, 0.034776, 0.00184092, 0.0412026, 0.00858117, 0.042719, -0.0115131, 0.000989414, + 0.0302057, 0.0501328, 0.0110354, 0.0176725, 0.00231205, 0.0281351, -0.00680329, 0.028958, + 0.0595568, 0.00981931, 0.0759773, 0.0700752, -0.0174127, 0.0333898, 0.0162407, 0.0248003 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p60(hatfit_yaw00_lev2_p60); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p60_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p61.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p61.mh new file mode 100755 index 0000000..ca250df --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p61.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p61.mh: + +#ifndef stasm_hat_yaw00_lev2_p61_mh +#define stasm_hat_yaw00_lev2_p61_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p61(const double* const d) // d has 160 elements +{ + const double intercept = -0.522524; + const double coef[160] = + { + -0.025582, -0.051103, -0.0682627, -0.0420982, -0.0651034, -0.00234092, -0.0747404, -0.0480761, + 0.107729, 0.00864232, -0.00692037, -0.0102879, -0.0240543, -0.0372096, -0.00379856, 0.00575709, + 0.0676828, 0.00608742, 0.0175875, 0.0310507, 0.0308839, -0.000315561, -0.021326, -0.00721177, + 0.00359587, -0.00721105, 0.00543791, -0.0175253, -0.00954474, -0.0153807, -0.0221238, 0.000263776, + -0.00772571, 0.0223946, -0.0182963, -0.0436557, 0.0567689, 0.00871555, -0.0673544, -0.0361942, + -0.0467252, 0.0726687, -0.00774027, -0.0425389, 0.0317325, -0.0200056, 0.0628934, 0.0106654, + -0.0175337, 0.0410224, 0.0554879, 0.0386439, 0.0295719, 0.0146787, 0.0482875, 0.058383, + -0.024714, 0.0232768, 0.0340872, 0.055188, 0.0395916, 0.0177769, 0.0895858, 0.0178616, + -0.0133556, 0.0151659, -0.00673149, -0.0250919, -0.0304849, -0.0186642, 0.000626389, -0.0335218, + 0.0608877, 0.0685431, 0.0731696, 0.0613766, -0.0132325, 0.0413995, 0.131949, 0.0114613, + -0.0118039, 0.0113914, 0.0373391, -0.0196422, 0.0161307, 0.0250844, 0.0644002, -0.0362912, + -0.0408222, -0.0456617, -0.0231356, -0.0395514, -0.00521852, -0.0370925, -0.00181958, -0.0144886, + -0.0149205, -0.0229657, 0.0109783, -0.017396, 0.0178595, -0.0404573, -0.0112393, 0.0812739, + 0.0020366, -0.0124532, 0.00444585, -0.0111524, -0.00913733, 0.0125664, 0.00483298, 0.00217064, + -0.0144132, -0.0490858, -0.0180631, -0.0293735, -0.0397752, 0.0204384, 0.0192876, -0.114034, + 0.0300214, 0.0347912, -0.0458519, 0.0255813, -0.0321425, 0.038942, 0.0340921, 0.0874599, + 0.0527331, 0.051523, 0.0481371, -0.0111974, 0.0113982, -0.0118794, 0.0174943, 0.00461061, + 0.0252508, -0.0129713, 0.0672082, 0.045425, 0.00719687, 0.0363388, 0.0130413, -0.0106249, + 0.0131324, -0.025057, 0.0374134, -0.0126326, -0.00183529, -0.00414838, -0.014713, -0.0068541, + 0.0114563, 0.00325675, 0.0470546, 0.0109092, 0.055069, 0.0410553, 0.0344168, 0.061962 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p61(hatfit_yaw00_lev2_p61); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p61_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p62.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p62.mh new file mode 100755 index 0000000..5b19024 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p62.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p62.mh: + +#ifndef stasm_hat_yaw00_lev2_p62_mh +#define stasm_hat_yaw00_lev2_p62_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p62(const double* const d) // d has 160 elements +{ + const double intercept = -0.546964; + const double coef[160] = + { + 0.138885, -0.00653416, 0.00853471, 0.0371284, 0.0234242, -0.0284408, -0.0315538, -0.0084206, + -0.0215589, -0.0296899, -0.0172399, 0.0141021, -0.00141327, 0.0023797, 0.0203704, -0.0246041, + 0.0218481, 0.0149802, -0.00505354, -0.0424898, 0.0127839, -0.014713, -0.0497268, 0.0124626, + 0.0272064, 0.0198233, 0.0172056, 0.037164, 0.0912689, 0.0180614, 0.040656, 0.0120559, + -0.00933765, -0.0506735, -0.0260352, -0.0163973, -0.0156429, -0.0580504, -0.0765838, -0.0387924, + -0.0905708, 0.0280471, 0.0110524, 0.0151604, 0.0410297, 0.00172472, 0.0868415, 0.125911, + -0.0135293, 0.00280759, 0.0468298, 0.0177423, 0.0340985, -0.0281303, 0.0436825, 0.00510234, + -0.000461449, 0.0356534, 0.00241731, 0.0121216, -0.0304363, 0.0429733, 0.043888, -0.0563081, + 0.00259206, 0.0322458, 0.0219172, 0.0211178, -0.032417, 0.0411085, 0.0655549, -0.0576921, + 0.0124454, 0.000714222, 0.0186819, 0.0605241, -0.00227574, 0.0301202, 0.114545, 0.00673266, + -0.0480568, -0.0312519, 0.0222479, -0.0534711, -0.00581887, -0.0658351, 0.00621864, -0.0312635, + 0.0388063, -0.0279277, 0.00658296, -0.0142938, 0.00486383, -0.0184964, -0.0183719, 0.0867722, + -0.0211815, -0.0206133, 0.0011078, -0.0233788, -0.00747, 0.0274744, -0.0195416, -0.0643339, + -0.0140197, -0.0308474, -0.0133872, -0.0273788, -0.0271311, -0.0214956, 0.00498129, -0.0151128, + 0.0111828, -0.0314769, 0.00919131, -0.0110078, 0.0173443, -0.00997421, 0.0334072, 0.0217874, + 0.106887, 0.0221746, 0.0352712, 0.00712471, -0.0108071, 0.04537, 0.059324, 0.0630501, + -0.0271398, -0.021732, 0.056126, 0.0255872, 0.0172018, -0.0036939, -0.00765012, -0.0380807, + 0.028154, 0.0365638, 0.0154153, -0.0389189, -0.00990173, 0.012854, 0.0239918, 0.0617999, + 0.00838691, 0.0237335, 0.0890365, 0.043905, 0.0672928, 0.0101857, -0.022384, -0.00226531, + 0.00802148, -0.0030324, -0.0216086, 0.0359947, 0.0382351, 0.0844859, 0.0510145, 0.0127371 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p62(hatfit_yaw00_lev2_p62); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p62_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p63.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p63.mh new file mode 100755 index 0000000..5244e9c --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p63.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p63.mh: + +#ifndef stasm_hat_yaw00_lev2_p63_mh +#define stasm_hat_yaw00_lev2_p63_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p63(const double* const d) // d has 160 elements +{ + const double intercept = -0.423857; + const double coef[160] = + { + 0.0265549, -0.0276044, -0.00370968, -0.0118707, -0.00882112, -0.0246113, -0.0467704, 0.0199824, + -0.00186678, 0.0315145, -0.000559825, 0.00730218, 0.0767914, 0.00480617, -0.0305773, -0.00495591, + -0.00544638, -0.0269742, -0.00591436, -0.000756903, 0.0649644, -0.0157527, 0.00517219, 0.0190719, + -0.00839473, -0.0469533, -0.0418069, -0.0369397, -0.0190076, -0.0324, -0.0165552, 0.0149198, + -0.00471751, 0.0171046, 0.000668457, -0.0698986, -0.0619992, -0.0615341, -0.12642, 0.0252094, + -0.0435028, 0.043545, 0.0441414, 0.0306194, 0.00830911, -0.00160527, 0.0788639, -0.022395, + 0.0282649, 0.0525967, 0.0219707, 0.0154664, -0.0297831, 0.0328373, 0.0345584, -0.0153494, + 0.00618624, 0.0107224, 0.0286507, 0.0758012, 0.00679737, 0.0580987, 0.0755779, -0.0314715, + 0.0216487, 0.00472771, 0.0206649, 0.0615916, -0.00126626, 0.0549339, 0.0545175, -0.0178235, + 0.00250801, -0.0135117, 0.0126693, 0.0254024, -0.0119378, -0.0245614, 0.0872058, -0.061571, + -0.0144706, -0.0139933, 0.0138068, -0.00669542, -0.000147116, 0.0109306, 0.0232728, 0.0236077, + -0.00255406, -0.0218093, -0.0178081, -0.0399348, -0.0541426, 0.0179802, 0.000382026, -0.080307, + -0.0241902, -0.0399402, -0.00650599, -0.0171668, -0.0288674, -0.0543343, 0.00140922, -0.0267591, + -0.0219663, -0.0134303, -0.0101318, -0.0399241, 0.00262961, -0.000841279, 0.000310534, 0.0195679, + 0.00601974, 0.00463629, 0.0528312, 0.0334954, 0.0483439, 0.0173347, 0.0736588, 0.0803597, + 0.0245546, 0.00187879, 0.0513636, -0.0410876, -0.0243436, 0.00211205, 0.0302069, 0.0518358, + 0.000846981, 0.0155087, 0.0579027, -0.000698564, 0.0446464, 0.00159007, -0.00940185, 0.0313693, + 0.0356152, 0.00868856, 0.0632068, 0.0260316, 0.0439695, 0.0391611, -0.00809624, 0.0123908, + 0.0122246, 0.0118871, -0.000141026, 0.0285526, 0.013631, 0.0368892, 0.0312239, -0.0214874, + -0.0506746, -0.00442504, -0.0284878, -0.000463468, 0.0254501, 0.0404056, 0.000673732, 0.0570073 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p63(hatfit_yaw00_lev2_p63); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p63_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p64.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p64.mh new file mode 100755 index 0000000..c42863d --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p64.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p64.mh: + +#ifndef stasm_hat_yaw00_lev2_p64_mh +#define stasm_hat_yaw00_lev2_p64_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p64(const double* const d) // d has 160 elements +{ + const double intercept = -0.318611; + const double coef[160] = + { + 0.0303392, -0.0338756, 0.0834237, 0.120868, 0.0812831, 0.0402208, 0.0340414, 0.00752149, + 0.0202789, -0.0293674, -0.0115149, -0.0100918, -0.0275825, -0.00502325, -0.0134966, 0.0249952, + -0.00173327, -0.0202851, -0.0188452, -0.00362694, -0.0342703, -0.0545043, -0.0315145, 0.0116079, + -0.0292766, -0.0238764, -0.043136, -0.0673906, -0.024928, -0.0381466, -0.0403704, -0.0131486, + -0.00476721, 0.0190162, -0.0253495, -0.035439, 0.0183347, -0.0346492, 0.0120401, 0.0775275, + -0.0580545, 0.0137694, -0.0451933, -0.0478655, -0.0560371, -0.0302546, 0.0278067, -0.0906249, + -0.00611261, 0.0136716, 0.0284031, 0.0141213, 0.0380981, 0.0211424, 0.061006, 0.0220357, + -0.0239319, 0.004601, 0.0116586, 0.00780832, 0.0126529, 0.0389716, 0.0619632, -0.0620037, + -1.6622e-05, 0.00529334, 0.0163925, 0.0575629, -0.0126739, 0.0293707, 0.0555329, -0.0340061, + -0.0492854, -0.0263342, -0.0230841, -0.00664351, -0.00307715, -0.0315079, -0.00801194, -0.0224053, + 0.0216491, -0.0340911, 0.0330381, -0.0138968, -0.0369097, -0.0292224, 0.00749071, -0.0717104, + 0.00193177, -0.0161945, -0.0172798, -0.0321503, -0.0400085, -0.0127888, -0.010172, 0.0146021, + 0.0102315, 0.0240944, 0.0175333, 0.0151656, 0.0321006, -0.00574093, -0.0279765, 0.0826356, + -0.0166594, 0.032607, 0.00456517, 0.0192567, 0.0363608, 0.0470817, 0.0494096, 0.0576953, + 0.0478303, 0.0388651, 0.0304998, 0.0556383, 0.06976, 0.0325026, 0.0548839, 0.0677554, + 0.0387995, 0.058294, 0.0845377, 0.0621987, 0.0602871, 0.100239, -0.032246, 0.0648524, + -0.00656602, 0.0129769, 0.0062775, 0.025612, 0.0493872, 0.0198563, 0.0228554, 0.0235844, + -0.0314601, 0.0076225, -0.013869, 0.00267554, -0.00261668, -0.026843, -7.51825e-05, -0.0290167, + -0.0213466, 0.0254961, -0.0551618, 0.000592905, -0.0348985, -0.00987818, -0.00998483, -0.000237291, + -0.0332162, 0.114249, 0.00864831, 0.00608068, 0.00960567, -0.00525184, -0.00263628, 0.0300145 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p64(hatfit_yaw00_lev2_p64); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p64_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p65.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p65.mh new file mode 100755 index 0000000..d220dc0 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p65.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p65.mh: + +#ifndef stasm_hat_yaw00_lev2_p65_mh +#define stasm_hat_yaw00_lev2_p65_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p65(const double* const d) // d has 160 elements +{ + const double intercept = -0.243987; + const double coef[160] = + { + -0.0349282, -0.0157765, -0.0086924, -0.00282699, -0.0149473, -0.0225539, 0.00811034, -0.0277787, + -0.0445545, -0.0268885, 0.00123814, 0.018723, 0.0215577, 0.00348647, 0.0432877, 0.015393, + -0.0146094, -0.0727512, -0.0167339, -0.00526844, 0.0124206, -0.0192743, -0.00112128, 0.0524325, + 0.0318377, -0.0210181, 0.0185195, 0.0107726, 0.00235686, -0.0229252, -0.0378398, 0.0122169, + 0.0648801, -0.0481284, -0.0225702, -0.016585, -0.0145166, 0.00342191, -0.0343923, 0.0447919, + 0.00730072, 0.00968041, 0.0132859, 0.025228, -0.0165621, 0.00393144, 0.0214046, 0.00439897, + 0.0515766, 0.105316, 0.0531057, 0.0329829, 0.00820431, 0.0454908, 0.0646219, 0.0528244, + 0.0913025, 0.116096, 0.00542359, 0.00230105, -0.00361529, 0.0339653, 0.0867848, 0.0887866, + 0.0249319, 0.0225997, -0.0341391, -0.0283439, -0.032192, -0.0270769, -0.0276354, -0.0278922, + -0.00167969, 0.031839, 0.0130776, 0.0513927, 0.0148874, -0.0333221, -0.0565927, -0.0919326, + -0.0481775, 0.00961148, 0.0369173, 0.0339856, 0.0305644, -0.0105843, -0.0406127, -0.0459686, + -0.0572706, -0.0102658, 0.006908, 0.024483, 0.0237157, 0.0174332, 0.00794934, -0.0169364, + -0.0855346, -0.0607299, -0.0165062, 0.0368585, 0.0678364, 0.0470307, 0.0111429, -0.0778053, + -0.0145917, -0.00644063, -8.66602e-05, 0.0483476, 0.0388019, 0.0390603, 0.0208508, -0.0057846, + 0.02632, 0.0177281, -0.0409234, -0.0488005, -0.00595819, 0.0191264, 0.0198247, 0.0079343, + 0.00294371, 0.0450466, -0.049365, -0.0611519, -0.0673944, 0.00661048, -0.0227719, -0.0129555, + 0.0390499, 0.0313589, -0.0183179, -0.027491, -0.0362773, -0.0336254, -0.0183198, 0.0135441, + 0.0478529, 0.0184543, 0.00221541, -0.0113542, -0.0103142, -0.0332987, -0.00890361, 0.00957642, + 0.035809, 0.00510408, 0.0259121, 0.00585391, 0.00227161, -0.00880785, 0.00959148, 0.0217641, + -0.00181733, -0.0159237, -0.00991204, -0.0155567, -0.00237713, 0.0162149, 0.0108071, 0.0235907 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p65(hatfit_yaw00_lev2_p65); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p65_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p66.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p66.mh new file mode 100755 index 0000000..d97f04b --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p66.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p66.mh: + +#ifndef stasm_hat_yaw00_lev2_p66_mh +#define stasm_hat_yaw00_lev2_p66_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p66(const double* const d) // d has 160 elements +{ + const double intercept = -0.0701518; + const double coef[160] = + { + -0.0708654, 0.00765122, -0.0479664, -0.0151742, -0.0449968, 0.0104616, 0.0187811, -0.111585, + -0.0537272, -0.0074824, 0.00745304, 0.0122481, 0.00990062, -0.0218072, 0.00427396, -0.0480915, + -0.0640504, -0.0264089, -0.0418814, 0.0102942, 0.00557185, 0.022444, 0.0205122, -0.0415472, + -0.000980233, 0.0081122, 0.0142478, 0.0312302, 0.0283258, 0.0249698, 0.0275674, -0.0121698, + 0.00328101, -0.0607017, -0.0547278, -0.00533866, -0.0167359, -0.0187817, 0.0308578, -0.0826227, + 0.0210649, -0.0401433, 0.0858922, -0.0162593, -0.0293997, -0.00709196, -0.0103385, -0.0348045, + 0.046604, 0.0130812, 0.0206067, 0.00890424, -0.0267464, -0.00939369, 0.0128553, -0.0132674, + 0.0038518, -0.00440902, 0.0568641, 0.0129008, -0.0236924, -0.0437552, 0.0106715, -0.00669881, + -0.0294986, -0.0368686, -0.0473002, -0.0190321, -0.0199637, -0.0099342, 0.00954593, 0.0244957, + -0.011637, 0.0395508, 0.0042163, 0.0441084, 0.0638421, 0.0394723, 0.103015, 0.156714, + 0.052255, 0.0621412, 0.0272445, 0.00398312, 0.0339932, 0.0758456, 0.0253288, 0.0927471, + 0.0252759, 0.00858632, -0.00436336, -0.000708602, 0.0080489, 0.0244064, -0.0327362, 0.0375689, + 0.0432853, 0.0704611, 0.0170734, 0.00734155, 0.00790755, 0.0196225, -0.0162497, 0.0689148, + -0.0052587, 0.0383359, 0.0450021, 0.0342107, 0.0244859, -0.0326178, -0.0691935, -0.0223194, + -0.0558986, 0.031864, -0.0243773, 0.0420224, 0.022056, 0.0248185, 0.0355769, 0.00639857, + -0.0372143, -0.0413475, 0.0206646, -0.0256079, 0.013142, 0.000549, 0.0656237, -0.0167369, + -0.00157571, -0.0133437, 0.0393268, 0.0442889, 0.023384, 0.0158681, -0.0211338, -0.0113463, + -0.0411466, -0.0306031, -0.0099946, -0.00577642, 0.0167192, 0.015533, -0.0201584, -0.0222372, + -0.0119031, -0.0196272, -0.0679993, -0.0403379, -0.0448462, -0.00325033, 0.0126336, 0.0200267, + -0.00218492, 0.0761284, 0.00536654, -0.045271, -0.0379694, -0.068879, -0.048176, -0.0235171 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p66(hatfit_yaw00_lev2_p66); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p66_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p67.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p67.mh new file mode 100755 index 0000000..f6cd06c --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p67.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p67.mh: + +#ifndef stasm_hat_yaw00_lev2_p67_mh +#define stasm_hat_yaw00_lev2_p67_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p67(const double* const d) // d has 160 elements +{ + const double intercept = -0.247596; + const double coef[160] = + { + -0.0736169, -0.0276127, -0.0110018, 0.0327689, 0.0417696, -0.0508686, 0.0518187, 0.0840511, + -0.0303886, -0.00991154, -0.0190655, 0.0268638, 0.0390148, -0.0306362, 0.00124625, 0.0292091, + -0.028384, 0.0154506, -0.0489238, -0.0292177, -0.0432419, 0.0237735, -0.00645516, -0.075781, + -0.0344447, 0.00795708, -0.0113362, 0.00375715, -0.0307709, 0.019674, 0.0208082, -0.0810644, + -0.0320321, -0.00306997, -0.0356069, -0.0101321, -0.0319446, -0.00480176, 0.0949859, -0.0169822, + -0.00113823, 0.00555259, 0.071154, -0.062097, -0.0217091, -0.0145069, 0.00738431, -0.0397669, + 0.01241, -0.0189924, 0.0300015, -0.0195862, -0.00475629, -0.0265258, 0.0166531, 0.0318153, + -0.00367116, -0.02759, 0.0188702, -0.0188599, -0.00399811, 0.0167034, -0.0182665, -0.0490339, + 0.0140556, -0.0226848, 0.0621946, 0.00136623, 0.0219617, -0.00417779, 0.00867766, 0.0167383, + 0.0303028, -0.0610571, -0.00157912, 0.00590548, -0.000679747, -0.0181829, 0.0759585, -0.0109324, + 0.103172, 0.0419958, 0.0377971, 0.0550718, 0.0372263, 0.0418955, 0.0177629, 0.105186, + 0.0102773, -0.0236646, 0.0132591, 0.0170306, 0.0274957, 0.0243854, -0.0133287, 0.00106572, + 0.0625944, 0.0669875, 0.0409219, -0.0185662, 0.0264258, -0.00204492, 0.0117916, 0.0869794, + 0.0293629, 0.0145125, -0.0270072, -0.029051, 0.00351191, 0.0514497, -0.0230748, -0.00405066, + 0.0308248, 0.0564195, 0.0713889, 0.0670879, 0.0589003, 0.0795609, -0.0235842, 0.0512964, + 0.0126223, -0.0347411, 0.0108369, -0.00844631, -0.0383972, -0.00864758, -0.0113566, -0.0264627, + -0.0568571, -0.026271, 0.0151984, -0.00574079, -0.0192334, -0.02782, 0.044097, -0.0414028, + -0.0366356, -0.0275175, -0.0127972, -0.0357274, -0.0439535, -0.0347405, 0.0295106, -0.0334166, + -0.0115584, -0.00484589, 0.0494478, 0.0215708, 0.0369365, 0.00632509, 0.029246, 0.0119853, + -0.0246275, -0.010441, -0.01384, -0.00788622, 0.00133374, 0.0109552, -0.0532666, 0.0105872 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p67(hatfit_yaw00_lev2_p67); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p67_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p68.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p68.mh new file mode 100755 index 0000000..4fbe40c --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p68.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p68.mh: + +#ifndef stasm_hat_yaw00_lev2_p68_mh +#define stasm_hat_yaw00_lev2_p68_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p68(const double* const d) // d has 160 elements +{ + const double intercept = -0.0757646; + const double coef[160] = + { + -0.00765739, 0.00768329, -0.0575099, -0.0516348, -0.0266656, -0.0500927, 0.0358745, -0.0175411, + 0.0177345, 0.0236582, -0.0120278, 0.00559529, -0.0201657, -0.030502, 0.054121, 0.0297531, + -0.0419598, -0.00731448, -0.0151526, -0.00912542, -0.0240267, -0.0837478, -0.0202523, -0.0256003, + -0.022269, 0.00466779, -0.00589252, 0.0435573, 0.0254818, -0.0237978, 0.0257976, 0.0146779, + -0.043373, -0.00708679, -0.0357599, -0.0156336, -0.0216445, -0.0389312, 0.0389291, 0.0233499, + -0.00632229, 0.000509776, -0.0435948, -0.0470262, -0.0667185, 0.0747328, 0.126893, -0.00129318, + -0.0321395, -0.00897225, -3.68053e-05, -0.0283675, -0.0115208, -0.0179474, 0.00675529, -0.00883719, + -0.00705335, 0.0316865, 0.0578501, -0.00771022, 0.0100425, -0.0355437, 0.00655766, -0.0165289, + -0.00349749, 0.0104534, 0.0685608, -0.0369772, 0.00639225, -0.0285923, -0.0259713, -0.00514401, + 0.00499322, -0.0696404, 0.0409068, -0.0124631, 0.00566939, 0.00741387, 0.0199054, 0.0279777, + 0.0304533, 0.0406592, -0.00748054, 0.0523836, 0.0196262, 0.0455741, -0.0128034, 0.0109261, + -0.00248401, 0.0177039, 0.0520706, 0.0980207, 0.0581796, 0.0613779, -0.0584795, -0.0338671, + 0.0320062, 0.000106168, 0.000814598, 0.0446986, 0.0337714, 0.0634353, -0.0129168, 0.04023, + 0.0377319, -0.00135489, -0.00272649, 0.019746, 0.00571683, 0.02824, 0.0143515, 0.0464345, + 0.0379201, -0.0171932, 0.0394895, 0.0366438, 0.0357272, 0.0660102, 0.00613955, 0.000755978, + -0.0498287, -0.00827933, -0.00564258, 0.0293193, -0.0132385, -0.0318905, -0.0579884, -0.0629771, + 0.0413162, 0.0205211, -0.0287987, -0.0527852, -0.0204785, -0.00947517, 0.0112812, 0.0552937, + 0.0302039, 0.0256271, 0.0032538, -0.0196052, -0.0411717, -0.023336, -0.00622439, 0.0119921, + -0.0111091, 0.0054059, 0.00325768, 0.0155701, -0.0202819, -0.0142514, -0.00104689, -0.0309015, + -0.0329345, -0.0311195, 0.00280669, -0.0246231, -0.0683577, -0.0298862, 0.0717735, -0.0271166 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p68(hatfit_yaw00_lev2_p68); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p68_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p69.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p69.mh new file mode 100755 index 0000000..43fede1 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p69.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p69.mh: + +#ifndef stasm_hat_yaw00_lev2_p69_mh +#define stasm_hat_yaw00_lev2_p69_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p69(const double* const d) // d has 160 elements +{ + const double intercept = -0.501654; + const double coef[160] = + { + 0.0230762, 0.013781, -0.00657445, 0.0471398, -0.0427199, 0.0616323, 0.0787647, -0.0205178, + 0.0283805, 0.00417323, -0.0299789, -0.00113931, 0.00442089, 0.0032871, 0.0688228, 0.0346765, + 0.0165321, -0.00414199, 0.0122695, -0.00732337, 0.0150011, -0.0245671, 0.0132475, 0.032327, + 0.000797509, -0.00988351, 0.051295, 0.0229001, 0.0359781, -0.0336637, -0.0108366, 0.0252209, + 0.020593, -0.052713, -0.00831198, -0.023326, 0.0160632, -0.00662693, 0.0392824, 0.0359511, + 0.0132203, 0.0843051, 0.0489842, 0.0283437, 0.0252406, -0.0132659, -0.00237541, 0.0296945, + -0.0310582, 0.0390671, 0.0513185, 0.063233, 0.0463622, 0.0295249, -0.046507, -0.0503186, + 0.00465255, 0.042021, 0.0377644, 0.0377952, 0.0454656, 0.0607733, 0.011305, 0.00291495, + 0.0162281, 0.0229597, 0.000801866, -0.0258597, -0.006601, 0.0314184, 0.0300617, 0.0221378, + 0.0353532, -0.0223414, 0.0576977, 0.0532616, 0.0339265, 0.0812579, 0.0746731, 0.0397337, + -0.0452784, -0.0296776, -0.00618464, -0.0518293, -0.0230095, -0.0246242, -0.0108614, -0.032008, + 0.0463778, -0.00181644, -0.011047, -0.0398095, -0.032624, -0.0271314, -0.0057484, 0.0243942, + 0.0450044, 0.00126629, -0.0208306, -0.000854032, -0.0459446, -0.0179491, 0.0195236, 0.023157, + 0.0121265, -0.00441669, -0.00206993, 0.0209117, -0.0164818, -0.0292706, 0.0150287, -0.0104449, + 8.88458e-05, -0.00480531, 0.0246249, 0.00735242, -0.0548231, -0.0298589, 0.00930757, -0.0227601, + -0.0147846, -0.00834553, 0.0140991, 0.0687771, 0.0127808, -0.0391709, -0.100938, -0.0643944, + 0.00304581, 0.0149064, -0.00979668, -0.00442815, 0.00117602, 0.0288025, 0.0130279, 0.0453444, + 0.00588069, 0.0113229, 0.0145629, -0.010143, 0.0273337, 0.00405032, -0.026315, 0.0255917, + -0.0205528, -0.0099725, -0.00149903, -0.00361405, 0.0109862, 0.0220806, 0.00492744, -0.0209835, + -0.0241067, -0.0574909, -0.0389412, -0.0288473, -0.0352359, -0.0309879, 0.133181, -0.0314818 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p69(hatfit_yaw00_lev2_p69); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p69_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p70.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p70.mh new file mode 100755 index 0000000..5e758c7 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p70.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p70.mh: + +#ifndef stasm_hat_yaw00_lev2_p70_mh +#define stasm_hat_yaw00_lev2_p70_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p70(const double* const d) // d has 160 elements +{ + const double intercept = -0.796744; + const double coef[160] = + { + 0.0341126, 0.030913, 0.0565538, -0.0217916, 0.0594326, -0.00177041, 0.0670565, 0.110014, + 0.0136715, -0.0211248, 0.0298438, -0.00643463, 0.0507008, 0.0165849, 0.00193834, 0.0198088, + 0.040878, -0.00468351, 0.0100448, -0.00929118, -0.00366385, 0.0370591, 0.0151456, -0.00610841, + -0.013336, -0.0204119, 0.0169284, 0.0136462, 0.0235074, 0.0580339, -0.0254044, -0.0406963, + 0.0457589, 0.000602063, 0.0289157, 0.0500932, 0.0437863, 0.0717904, 0.115542, 0.0436263, + 0.0597082, 0.04082, 0.0822951, 0.0789102, -0.0223879, 0.0168742, 0.00346895, -0.00116304, + 0.00827851, -0.0188379, 0.00784034, 0.0193207, 0.00303974, 0.0132664, 0.0323815, 0.0108335, + -0.000397366, 0.0480992, 0.0571615, -0.0306483, 0.0298595, -0.0114398, 0.00719362, 0.0230871, + 0.0337041, 0.0186319, 0.016356, -0.0379243, -0.0010245, 0.0157864, 0.039134, 0.0443413, + -0.00662945, 0.0302044, 0.100822, 0.0421849, 0.021755, 0.00721991, -0.0526274, -0.00401875, + 0.00745431, -0.0546156, -0.0483602, -0.0723921, -0.0346058, 0.00494108, 0.0417335, 0.038248, + -0.0521416, -0.0183956, 0.0329272, 0.00122424, -0.0210599, -0.0336885, -0.000733202, -0.0429939, + -0.0131328, -0.00134099, 0.00244619, -0.00476187, -0.0511824, 6.90332e-05, 0.0192196, 0.035143, + -0.0167092, -0.0203088, 0.0356238, 0.0305921, 0.0310917, -0.0159399, -0.00998229, -0.0332763, + -0.00396009, -0.0509041, -0.0438387, -0.0139841, 0.0156792, 0.0802788, -0.00387387, 0.0396491, + -0.0138537, 0.00411943, 0.0459761, 0.0705967, 0.0388752, -0.00499727, -0.0434178, -0.0411767, + 0.00068529, -0.0315149, -0.0276846, -0.0166414, 0.0211953, -0.0120308, 0.101158, -0.0236568, + 0.00511414, -0.00715396, 0.00110345, -0.0277911, 0.01183, -0.0440184, 0.065236, -0.0390393, + 0.0345616, 0.0270472, -0.0106751, -0.0168165, 0.00699347, 0.0236292, 0.0722466, 0.0388224, + 0.0165932, 0.0619228, 0.0400074, 0.00844104, -0.0458653, -0.0401251, -0.0834489, -0.053744 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p70(hatfit_yaw00_lev2_p70); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p70_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p71.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p71.mh new file mode 100755 index 0000000..aa708b4 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p71.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p71.mh: + +#ifndef stasm_hat_yaw00_lev2_p71_mh +#define stasm_hat_yaw00_lev2_p71_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p71(const double* const d) // d has 160 elements +{ + const double intercept = -0.228303; + const double coef[160] = + { + -0.017111, -0.022052, -0.00614923, -0.0357715, -0.0435176, 0.0448165, 0.0220894, -0.0516583, + 0.0108187, 0.00215221, 0.0254229, 0.0407787, -0.00456935, 0.00405667, -0.00742958, -0.0386631, + -0.015499, -0.00547458, -0.0352142, -0.0268172, 0.0305546, 0.0189814, 0.0391679, 0.0137124, + -0.0184416, 0.0157674, -0.0167993, -0.00814776, 0.0233144, 0.00835204, 0.0267862, 0.0261481, + -0.031253, 0.053105, 0.00506253, 0.0295576, 0.0810968, 0.000240087, 0.0685961, 0.0736698, + 0.0396325, -0.00192333, 0.0398411, -0.0224833, 0.0568153, 0.0653045, 0.0746592, 0.0545985, + 0.0476846, 0.0445793, 0.0128924, 0.0168234, 0.0199235, 0.00612228, 0.00681783, 0.0652892, + 0.0271855, 0.0683756, 0.0482958, 0.0264938, 0.0049733, -0.00396101, -0.0108081, 0.0179262, + -0.0120251, 0.0171102, 0.0621464, 0.0619762, 0.00706686, -0.0169642, -0.056881, -0.0319456, + 0.0173384, 0.0326166, 0.0196537, 0.024805, 0.0106165, 0.0307442, 0.0466129, 0.0408582, + -0.0466218, -0.00108609, 0.0448339, -0.0176936, -0.00619008, -0.00752668, -0.00836617, -0.0182072, + -0.0185282, -0.0351142, 0.0156919, 0.0410905, 0.028794, 0.0296952, -0.0019478, -0.00737658, + -0.0497287, -0.0804701, -0.028536, 0.00617823, 0.0208016, 0.0122223, -0.0116624, -0.0289944, + -0.0185809, -0.00769248, -0.049657, -0.0105338, -0.0136338, -0.0318718, -0.00579806, -0.0141414, + -0.0423346, 0.00531431, -0.029213, -0.00106899, -0.0104407, -0.0311609, 0.0452972, -0.0288284, + -0.000861945, -0.0264658, -0.060526, -0.0221315, -0.0058577, -0.00805579, 0.126322, 0.0137975, + 0.0286371, 0.0189514, 0.0126194, 0.0137927, -3.51434e-05, 0.0184098, -0.0200559, -0.00883375, + 0.0122228, 0.0290598, 0.0135307, -0.0147906, -0.0471683, -0.000711908, -0.0279763, -0.00207475, + -0.0208812, 0.00633825, -0.0057985, -0.0346104, -0.0503356, -0.00016977, -0.00822498, -0.00219097, + 0.00821315, 0.0429233, -0.0253353, -0.049237, -0.037318, -0.0431846, -0.104914, -0.0377205 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p71(hatfit_yaw00_lev2_p71); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p71_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p72.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p72.mh new file mode 100755 index 0000000..b9d96a4 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p72.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p72.mh: + +#ifndef stasm_hat_yaw00_lev2_p72_mh +#define stasm_hat_yaw00_lev2_p72_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p72(const double* const d) // d has 160 elements +{ + const double intercept = 0.0989027; + const double coef[160] = + { + 0.0353764, 0.0277736, 0.04861, 0.04112, 0.0318701, 0.0638361, 0.0247897, 0.0240266, + -0.029073, 0.0102228, 0.0311509, 0.0575003, 0.0473831, -0.0324984, -0.0463012, -0.0206577, + -0.037861, 0.0584556, 0.000544823, 0.0446031, 0.0441769, 0.0171549, 0.0071004, -0.00858692, + -0.0259733, 0.0649289, 0.0597177, 0.0379904, 0.060508, 0.0483501, 0.0606923, 0.0483977, + 0.0661255, 0.0586531, -0.0390427, -0.0124601, 0.00511991, 0.00752953, 0.0470815, 0.0899895, + -0.0509386, -0.0158875, 0.0177365, 0.0503958, 0.0272851, 0.00163617, -0.0573846, -0.032114, + -0.0140886, -0.0360239, -0.0132793, -0.0438912, -0.0533735, -0.0178983, 0.00808064, -0.0037729, + 0.00674255, 0.00883555, -0.0407354, -0.0373997, -0.0647183, -0.048717, -0.0122859, -0.0419641, + -0.0126266, -0.0328703, -0.012028, -0.0100037, -0.0112557, -0.0387492, 0.0066805, -0.0281232, + -0.0138208, -0.0198197, 0.00231299, 0.0379716, 0.0331442, 0.00275953, 0.0226216, 0.0050906, + 0.0396779, 0.00572949, 0.0354563, 0.0213916, -0.0189767, 0.0629411, 0.0430068, -0.001415, + 0.00446211, 0.0394156, -0.02176, -0.0226459, -0.016732, 0.0233161, 0.000864116, 0.00640479, + 0.00623369, 0.0189184, -0.0344753, -0.042294, -0.0352279, -0.00984565, -0.0545616, -0.00547315, + 0.00238742, 0.00755953, -0.00149086, 0.00472792, -0.0127927, 0.0140774, -0.0201612, -0.00222445, + 0.00755303, -0.0167544, -0.0126289, 0.010009, -0.0270465, 0.0279078, 0.0155872, 0.0209598, + -0.0326684, 0.061328, 0.0523704, -0.00903776, -0.0186215, -0.0228648, -0.000452808, 0.0277466, + -0.0358783, -0.0374315, -0.0188875, -0.0180433, -0.0288677, -0.0363021, -0.0697074, -0.0256992, + -0.0105341, -0.000758809, -0.019205, 0.00468453, 0.0167659, -0.0189989, -0.00735232, -0.0126924, + -0.0193627, 0.00313296, -0.0349624, -0.00599344, -0.0143699, -0.0147435, -0.00646707, -0.0132372, + 0.00929204, -0.0217543, -0.00755049, -0.0319638, 0.0274715, -0.0140345, -0.0298341, 0.000378985 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p72(hatfit_yaw00_lev2_p72); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p72_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p73.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p73.mh new file mode 100755 index 0000000..8d96d83 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p73.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p73.mh: + +#ifndef stasm_hat_yaw00_lev2_p73_mh +#define stasm_hat_yaw00_lev2_p73_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p73(const double* const d) // d has 160 elements +{ + const double intercept = 0.2272; + const double coef[160] = + { + 0.0255893, 0.0398401, 0.0722409, -0.0445891, -0.00470297, 0.0199131, 0.0165382, 0.0502811, + -0.00357428, 0.0267947, 0.0298553, 0.0338194, 0.0115309, 0.0525491, -0.0585943, 0.0168286, + -0.0344251, -0.0135233, 0.00966544, -0.00890617, 0.0219983, 0.0400588, -0.0679062, -0.0236777, + -0.0311951, -0.00646702, -0.00432313, 0.0206786, 0.000559952, 0.0152661, -0.0226117, -0.013479, + -0.0105264, 0.068243, 0.0255499, 0.0686949, 0.0348068, 0.00315771, 0.022277, -0.0270726, + -0.0638634, -0.0465897, 0.000870173, -0.00499389, 0.0135916, -0.0406264, 0.134036, -0.0508613, + 0.0164918, -0.0227687, 0.0123077, 0.0246532, 0.0388393, 0.0162069, 0.0206663, -0.0122329, + 0.0299857, -0.00969451, 0.012411, 0.029231, 2.48269e-05, 0.0192934, 0.0275271, 0.0159747, + 0.00547446, -0.00790329, -0.0158997, -0.0171256, -0.0474391, -0.0183324, 0.00562775, -0.014244, + 0.00208121, 0.014199, -0.0392767, -0.0390247, -0.0773608, -0.0353364, -0.059764, -0.00843707, + 0.0343853, 0.0210175, 0.0667703, -0.0188759, 0.00741526, -0.0248253, 0.0236731, 0.0150207, + 0.02456, 0.011471, -0.00712584, -0.00760106, 0.00412152, -0.00145081, -0.00908071, 0.0340654, + -0.0160172, 0.0134107, -0.033796, -0.0640794, -0.0423164, -0.0309958, -0.0195926, 0.0046965, + -0.0302013, 0.00814257, 0.0109026, -0.00412582, -0.0214709, -0.00833786, -0.0445951, 0.00290581, + -0.0485127, 0.0372803, -0.0382319, -0.037839, -0.0146938, -0.0105336, -0.0543978, -0.0349175, + -0.0338447, -0.0119121, 0.0375504, -0.070027, -0.031661, -0.0501551, -0.0756655, -0.0274004, + 0.0166032, -0.00992744, 0.00897534, 0.0151133, 0.0147912, 0.0192464, 0.0249975, 0.000497542, + -0.0298722, -0.0303016, -0.0064489, 0.0242609, 0.00872472, 0.0181461, -0.00119551, 0.00268649, + -0.022466, -0.00770383, 0.00493488, 0.0351058, 0.0112933, -0.0113295, -0.0163328, -0.00654885, + -0.00769511, -0.00613724, -0.0214477, 0.0156502, 0.00151531, -0.0105068, -0.0139874, -0.00132222 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p73(hatfit_yaw00_lev2_p73); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p73_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p74.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p74.mh new file mode 100755 index 0000000..84e0683 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p74.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p74.mh: + +#ifndef stasm_hat_yaw00_lev2_p74_mh +#define stasm_hat_yaw00_lev2_p74_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p74(const double* const d) // d has 160 elements +{ + const double intercept = 0.220837; + const double coef[160] = + { + 0.0997616, 0.0125493, 0.0805498, 0.0505776, 0.0241363, -0.0158419, -0.00138413, 0.122373, + -0.0548679, -0.0388266, -0.0205136, 0.00769371, -0.0244587, -0.00259736, -0.0334081, -0.0375006, + -0.000879399, 0.0375804, 0.022773, -0.0364326, -0.0197282, -0.0116901, -0.0067975, 0.0542848, + -0.00496367, 0.00205504, 0.00612758, -0.0245926, -0.00805552, 0.0306298, -0.0388553, -0.00607397, + -0.0344556, 0.00688398, 0.0726518, 0.0611777, 0.0524567, 0.133079, -0.0805806, -0.0304452, + 0.0178677, 0.0146661, -0.0404539, -0.0564941, -0.0251524, -0.00790241, 0.0491951, 0.0209929, + -0.0179925, -0.0133809, 0.0486278, -0.00252625, 0.00212989, -0.0610684, 0.061689, -0.0801673, + -0.0163816, -0.0372453, 0.00362735, -0.0162172, 0.00727025, -0.0274276, 0.0750418, -0.045223, + -0.000489668, -0.00779798, 0.0240939, 0.0361449, 0.0502159, 0.00077348, 0.0667484, -0.0117676, + 0.0332801, 0.00466945, -0.0202147, 0.00608668, -0.000506863, -0.00459854, -0.00812146, 0.0152727, + -0.0425586, -0.0802285, 0.00159375, 0.0558017, -0.00765114, 0.00755221, -0.0865962, -0.0550125, + -0.00236795, -0.020008, 0.0172968, -0.0217609, -0.00662207, -0.00394266, 0.0197515, 0.00845607, + 0.00294191, -0.015641, 0.0306525, -0.0346056, 0.00200094, -0.0243319, -0.0388526, -0.0104735, + 0.0332378, 0.00964622, 0.015311, -0.031667, -0.0026931, -0.0167854, 0.0413121, 0.0305034, + -0.0497629, 0.0223061, -0.0173011, -0.0670779, -0.0373291, -0.0491551, -0.0999961, -0.0247411, + -0.00199409, 0.00331581, -0.00190104, 0.0357631, -0.0189724, -0.0121322, -0.0489254, -0.00806714, + -0.00593859, -0.0420058, -0.00393673, -0.0122627, -0.02622, -0.00047707, 0.00341348, -0.0080613, + -0.0147898, 0.00988879, 0.0294775, -0.025466, -0.0314937, -0.0253052, -0.00229925, -0.0165381, + 0.0120794, -0.000878892, -0.0134628, -0.0299334, -0.000286509, 0.0341773, 0.00942387, 0.01636, + 0.00437037, 0.0138162, -0.00189742, 0.0512054, 0.0145081, -0.0253149, -0.0284283, -0.000407491 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p74(hatfit_yaw00_lev2_p74); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p74_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p75.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p75.mh new file mode 100755 index 0000000..1ff5063 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p75.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p75.mh: + +#ifndef stasm_hat_yaw00_lev2_p75_mh +#define stasm_hat_yaw00_lev2_p75_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p75(const double* const d) // d has 160 elements +{ + const double intercept = 0.143169; + const double coef[160] = + { + 0.00500872, 0.0788672, 0.0830198, 0.0347642, -0.0187663, -0.0351558, -0.0415346, 0.0104833, + 0.0498593, -0.0189021, -0.00322631, 0.0243254, 0.0296824, 0.0101936, -0.0423976, 0.0253372, + 0.0264438, 0.0109294, 0.00481503, 0.0401891, 0.00785275, 0.0183256, -0.0359458, 0.0222586, + 0.0156764, -0.0259935, 0.0140222, 0.032216, 0.0129041, 0.0165035, 0.0218827, 0.0255931, + -0.000384394, 0.00497098, 0.0593127, 0.0308721, 0.00392444, 0.044366, -0.00035291, -0.00172973, + -0.030345, -0.0104249, -0.0251774, -0.0307689, -0.0132279, 0.0105106, -0.0441885, -0.00590676, + 0.0163224, 0.0580328, 0.0210897, -0.0185961, -0.0262614, 0.0140714, 0.00418796, 0.0559395, + 0.0287848, 0.0198064, 0.0171609, -0.0322414, -0.0331728, -0.0154635, 0.0338829, 0.00292881, + -0.0252734, -0.00853298, -0.011739, -0.00645236, -0.021923, -0.0136072, 0.0177093, -0.0464155, + 0.00499591, -0.0300743, 0.000695989, -0.0423862, -0.0442462, -0.0612181, 0.137093, -0.0412476, + -0.0647362, -0.0389046, 0.00246774, 0.10443, 0.00126402, -0.0269946, -0.0753447, -0.0576863, + -0.0234948, -0.05018, -0.0350569, 0.045086, -0.00129855, 0.0252666, -0.0227364, 0.00152243, + -0.0214684, -0.0347765, -0.0292191, 0.0101462, 0.00576992, 0.034891, -0.0286404, 0.0115731, + 0.0166064, -0.00540362, 0.0170785, -0.000730702, 0.0076479, -0.00579039, 0.000993971, -0.00161051, + -0.0243942, -0.0351045, 0.0418538, -0.0097826, 0.0250171, 0.000271145, 0.0154932, -0.0324622, + 0.0201201, 0.0511685, -0.0276986, -0.0137756, -0.0753459, -0.0498984, -0.0279214, -0.0080389, + 0.0279161, 0.0353108, -0.0087214, -0.00518912, -0.019555, -0.0113267, 0.00225945, 0.00182463, + -0.00303256, -0.009005, -0.0044915, 0.00135642, -0.0402617, -0.000805723, 0.00377508, -0.00364319, + -0.017734, -0.0284965, 0.0101866, 0.0294709, -0.00494104, 0.00568477, 0.0026554, 0.0024603, + 0.0331129, -0.000183846, 0.0391978, -0.0503583, -0.0647342, -0.0203285, -0.071913, -0.00292174 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p75(hatfit_yaw00_lev2_p75); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p75_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p76.mh b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p76.mh new file mode 100755 index 0000000..e63b8ca --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/hat/hat_yaw00_lev2_p76.mh @@ -0,0 +1,54 @@ +// hat_yaw00_lev2_p76.mh: + +#ifndef stasm_hat_yaw00_lev2_p76_mh +#define stasm_hat_yaw00_lev2_p76_mh + +namespace stasm { + +// tasm -V1 /b/stasm/train/conf/tasm_muct77.conf +// static const int EYEMOUTH_DIST = 100; +// static const int FACESCALE = 1 +// static const int PYRSCALE = 1 +// static const double SIGMOIDSCALE = 0 +// static const double PYR_RATIO = 2; +// static const int NEGTRAIN_SEED = 2013; +// static const int HAT_PATCH_WIDTH = 19; +// static const int HAT_PATCH_WIDTH_ADJ = -6; +// static const int GRIDHEIGHT = 4; +// static const int GRIDWIDTH = 5; +// static const int BINS_PER_HIST = 8; +// static const double WINDOW_SCALE = 0.5; + +static double hatfit_yaw00_lev2_p76(const double* const d) // d has 160 elements +{ + const double intercept = -0.201853; + const double coef[160] = + { + 0.0611373, 0.0315796, 0.0567915, 0.106684, 0.0484192, 0.0674777, 0.0757485, 0.0605822, + 0.0186337, 0.0519524, 0.0346602, 0.0198745, -0.00704912, -0.00303739, 0.0450818, 0.0361972, + 0.0369279, 0.091747, 0.0269727, 0.0391098, -0.00623467, -0.00886847, -0.0219807, 0.00198184, + -0.00639586, 0.0351891, 0.0215669, 0.0166585, 0.0285714, -0.00488696, -0.0227643, -0.0313198, + 0.0481887, 0.021827, 0.0344451, 0.0295356, 0.0218445, 0.0148926, 0.0491293, 0.0874688, + -0.0506854, 0.00908012, -0.0301636, -0.020028, -0.0276748, -0.0438808, -0.0051665, -0.0169528, + -0.04442, -0.0557306, -0.0222959, -0.0149306, 0.0132545, -0.0284669, -0.0162358, -0.0420221, + -0.0273391, -0.0344512, 0.00447293, -0.0428183, -0.0259566, -0.027002, -0.00397243, 0.00140603, + 0.0180769, 0.0192412, -0.00879481, -0.0152303, -0.0131571, -0.0139515, -0.0280759, 0.0147447, + 0.0135716, 0.0181163, 0.0118787, 0.0380173, -0.0208318, -0.00114229, 0.00245865, -0.00468111, + 0.00239062, -0.0172136, 0.0122535, -0.0113478, 0.0467641, 0.0450793, 0.025304, 0.0200704, + -0.00336887, -0.0417958, -0.0106864, 0.0015939, 0.0052554, 4.45126e-05, -0.043915, -0.0132575, + 0.00779591, 0.0124207, -0.00729038, 0.0235562, 0.0188436, 0.0162366, -0.0049948, 0.0219917, + 0.00685187, 0.00962004, 0.0242144, -0.0208656, -0.00332951, 0.0194852, -0.00885252, 0.0384181, + 0.0336081, 0.0232335, 0.0185163, -0.00383684, 0.0050504, 0.000545654, 0.0614317, 0.0711241, + 0.00410444, -0.00721999, -0.0234826, -0.00556213, -0.00222316, -0.0218519, -0.0229695, -0.0315578, + 0.00101129, 0.00344464, -0.0110083, -0.00632637, -0.0111474, -0.00212928, 0.0064592, -0.00594809, + -0.0431056, -0.0271004, -0.0278623, 0.0168796, -0.0128066, -0.0357533, -0.0304638, -0.0240973, + -0.0122436, 0.0135754, -0.0410427, 0.0175618, -0.036486, -0.00465138, -0.0283021, -0.0328289, + -0.019626, -0.0317221, 0.0607035, 0.0916186, -0.0109209, 0.0271553, -0.00350397, -0.0121741 + }; + return linmod(d, intercept, coef, 160); +} + +static const HatDescMod hat_yaw00_lev2_p76(hatfit_yaw00_lev2_p76); + +} // namespace stasm +#endif // stasm_hat_yaw00_lev2_p76_mh diff --git a/3rdparty/stasm4.0.0/stasm/MOD_1/initasm.cpp b/3rdparty/stasm4.0.0/stasm/MOD_1/initasm.cpp new file mode 100755 index 0000000..a5971c3 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/initasm.cpp @@ -0,0 +1,35 @@ +// initasm.cpp: initialize the ASM model +// +// Copyright (C) 2005-2013, Stephen Milborrow + +#include "../stasm.h" +#include "yaw00.h" + +namespace stasm +{ +void InitMods( // initialize ASM model + vec_Mod& mods, // out: ASM model (only one model in this version of Stasm) + const char* datadir) // in: directory of face detector files +{ + if (mods.empty()) // models not yet initialized? + { + mods.resize(1); // 1 model + + static const Mod mod_yaw00( + EYAW00, + ESTART_EYES, // ignore detected mouth for best startshape on frontal faces + datadir, + yaw00_meanshape, + yaw00_eigvals, + yaw00_eigvecs, + 20, // neigs (value from empirical testing) + 1.5, // bmax (value from empirical testing) + SHAPEHACKS_DEFAULT | SHAPEHACKS_SHIFT_TEMPLE_OUT, + YAW00_DESCMODS, // defined in yaw00.h + NELEMS(YAW00_DESCMODS)); + + mods[0] = &mod_yaw00; + } +} + +} // namespace stasm diff --git a/3rdparty/stasm/stasm/stasm/include/initasm.h b/3rdparty/stasm4.0.0/stasm/MOD_1/initasm.h index 9485c67..b6458b5 100755 --- a/3rdparty/stasm/stasm/stasm/include/initasm.h +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/initasm.h @@ -5,8 +5,6 @@ #ifndef STASM_INITASM_H #define STASM_INITASM_H -#include "asm.h" - namespace stasm { void InitMods( diff --git a/3rdparty/stasm/stasm/stasm/include/yaw00.h b/3rdparty/stasm4.0.0/stasm/MOD_1/yaw00.h index 267c0df..267c0df 100755 --- a/3rdparty/stasm/stasm/stasm/include/yaw00.h +++ b/3rdparty/stasm4.0.0/stasm/MOD_1/yaw00.h diff --git a/3rdparty/stasm4.0.0/stasm/asm.cpp b/3rdparty/stasm4.0.0/stasm/asm.cpp new file mode 100755 index 0000000..e7a36cb --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/asm.cpp @@ -0,0 +1,250 @@ +// asm.cpp: Active Shape Model class +// +// Copyright (C) 2005-2013, Stephen Milborrow + +#include "stasm.h" +#include "stasmhash.h" + +namespace stasm +{ +static void TraceShape( // write an image file showing current shape on the image + const Shape& shape, // in: current search shape + const Image& pyrimg, // in: image scaled to this pyramid level + int ilev, // in: pyramid level (0 is full size) + int iter, // in: model iteration (-1 if start shape) + const char* name) // in +{ + (void) shape; + (void) pyrimg; + (void) ilev; + (void) iter; + (void) name; +#if TRACE_IMAGES // will be 0 unless debugging (defined in stasm.h) + + static int index = 0; // number images so they appear in order in the directory + + if (index == 0) + lprintf("TRACE_IMAGES "); + + Image img; // pyrimg rescaled back to full size image (after rescaling by eyemouth) + const double RESOLUTION = 2; // 1 for no extra resolution, 2 for double resolution + const double rescale = RESOLUTION / GetPyrScale(ilev); + cv::resize(pyrimg, img, cv::Size(), rescale, rescale, cv::INTER_NEAREST); + CImage cimg; cvtColor(img, cimg, CV_GRAY2BGR); // color image + DesaturateImg(cimg); + Shape shape1(shape.clone()); RoundMat(shape1); + shape1 += .4; // put shape points in center of rescaled pixels + shape1 *= rescale; + DrawShape(cimg, shape1, 0xffff00, false, 1); + char path[SLEN]; + if (iter < 0) // start shape? + sprintf(path, "_%2.2d_%s.bmp", index, name); + else + sprintf(path, "_%2.2d_lev%d_iter%d_%s.bmp", index, ilev, iter, name); + ImgPrintf(cimg, 10 * RESOLUTION, 20 * RESOLUTION, 0xffff00, 2, path); + if (iter >= 0) + { + // draw 1D patch boundary at one point (patch is drawn + // horizontal, not rotated to shape boundary as it should be) + + Shape shape2(shape); RoundMat(shape2); + int ipoint = shape2.rows >= L_RJaw11? L_RJaw11: 0; + int proflen = 9; + int x1 = cvRound(shape2(ipoint, IX)) - proflen / 2; + int x2 = x1 + proflen; + int y1 = cvRound(shape2(ipoint, IY)); + int y2 = y1 + 1; + rectangle(cimg, + cv::Point(cvRound(rescale * x1), cvRound(rescale * y1)), + cv::Point(cvRound(rescale * x2), cvRound(rescale * y2)), + CV_RGB(255,0,0), 1); + + // draw 2D patch boundary at one point + + if (ilev <= HAT_START_LEV) // we use HATs only at upper pyr levs + { + ipoint = shape2.rows >= L_LPupil? L_LPupil: 0; + #define round2(x) 2 * cvRound((x) / 2) + int patchwidth = HAT_PATCH_WIDTH + round2(ilev * HAT_PATCH_WIDTH_ADJ); + x1 = cvRound(shape2(ipoint, IX)) - patchwidth / 2; + x2 = x1 + patchwidth; + y1 = cvRound(shape2(ipoint, IY)) - patchwidth / 2; + y2 = y1 + patchwidth; + rectangle(cimg, + cv::Point(cvRound(rescale * x1), cvRound(rescale * y1)), + cv::Point(cvRound(rescale * x2), cvRound(rescale * y2)), + CV_RGB(255,0,0), 1); + + } + } + + cv::imwrite(path, cimg); + index++; + +#endif // TRACE_IMAGES +} + +#if _OPENMP + +void Mod::SuggestShape_( // args same as non OpenMP version, see below + Shape& shape, // io + int ilev, // in + const Image& img, // in + const Shape& pinned) // in +const +{ + static bool firsttime = true; + int ncatch = 0; + const Shape inshape(shape.clone()); + + // Call the search function DescSearch_ concurrently for multiple points. + // Note that dynamic OpenMP scheduling is faster here than static, + // because the time through the loop varies widely (mainly because + // classic descriptors are faster than HATs). + + #pragma omp parallel for schedule(dynamic) + + for (int ipoint = 0; ipoint < shape.rows; ipoint++) + if (pinned.rows == 0 || !PointUsed(pinned, ipoint)) // skip point if pinned + { + // You are not allowed to jump out of an OpenMP for loop. Thus + // we need this try block, to subsume the global try blocks in + // stasm_lib.cpp. Without this try, a call to Err would cause + // a jump to the global catch. + + try + { + if (firsttime && omp_get_thread_num() == 0) + { + firsttime = false; + logprintf("[nthreads %d]", omp_get_num_threads()); + } + descmods_[ilev][ipoint]->DescSearch_(shape(ipoint, IX), shape(ipoint, IY),img, inshape, ilev, ipoint); + } + catch(...) + { + ncatch++; // a call was made to Err or a CV_Assert failed + } + } + + if (ncatch) + { + if (ncatch > 1) + lprintf("\nMultiple errors, only the first will be printed\n"); + // does not matter what we throw, will be caught by global catch + throw "SuggestShape_"; + } +} + +#else // not _OPENMP + +void Mod::SuggestShape_( // estimate shape by matching descr at each point + Shape& shape, // io: points will be moved for best descriptor matches + int ilev, // in: pyramid level (0 is full size) + const Image& img, // in: image scaled to this pyramid level + const Shape& pinned, // in: if no rows then no pinned landmarks, else + // points except those equal to 0,0 are pinned + const Hat &hat, + StasmHash &hash) +const +{ + const Shape inshape(shape.clone()); + + for (int ipoint = 0; ipoint < shape.rows; ipoint++) + if (pinned.rows == 0 || !PointUsed(pinned, ipoint)) // skip point if pinned + { + // Call the ClassicDescMod or HatDescMod search function + // to update the current point in shape (the point at ipoint) + // yaw00.h:YAW00_DESCMODS defines which descriptor model is used + // for each point (assuming we are using the yaw00 model). + + descmods_[ilev][ipoint]->DescSearch_(shape(ipoint, IX), shape(ipoint, IY),img, inshape, ilev, ipoint, hat, hash); + } +} +#endif // not _OPENMP + +void Mod::LevSearch_( // do an ASM search at one level in the image pyr + Shape& shape, // io: the face shape for this pyramid level + int ilev, // in: pyramid level (0 is full size) + const Image& img, // in: image scaled to this pyramid level + const Shape& pinnedshape) // in: if no rows then no pinned landmarks, else + // points except those equal to 0,0 are pinned +const +{ + StasmHash hash; + + TraceShape(shape, img, ilev, 0, "enterlevsearch"); + + const Hat &hat = InitHatLevData(img, ilev); // init internal HAT mats for this lev + + VEC b(NSIZE(shapemod_.eigvals_), 1, 0.); // eigvec weights, init to 0 + + for (int iter = 0; iter < SHAPEMODEL_ITERS; iter++) + { + // suggest shape by descriptor matching at each landmark + + SuggestShape_(shape, ilev, img, pinnedshape, hat, hash); + + TraceShape(shape, img, ilev, iter, "suggested"); + + // adjust suggested shape to conform to the shape model + + if (pinnedshape.rows) + shape = shapemod_.ConformShapeToMod_Pinned_(b, shape, ilev, pinnedshape); + else + shape = shapemod_.ConformShapeToMod_(b, shape, ilev); + + TraceShape(shape, img, ilev, iter, "conformed"); + } +} + +static void CreatePyr( // create image pyramid + vector& pyr, // out: the pyramid, pyr[0] is full size image + const Image& img, // in: full size image + int nlevs) // in +{ + CV_Assert(nlevs >= 1 && nlevs < 10); // 10 is arb + pyr.resize(nlevs); + pyr[0] = img; // pyramid level 0 is full size image + for (int ilev = 1; ilev < nlevs; ilev++) + { + const double scale = GetPyrScale(ilev); + cv::resize(img, pyr[ilev], cv::Size(), scale, scale, cv::INTER_LINEAR); + } +} + +Shape Mod::ModSearch_( // returns coords of the facial landmarks + const Shape& startshape, // in: startshape roughly positioned on face + const Image& img, // in: grayscale image (typically just ROI) + const Shape* pinnedshape) // in: pinned landmarks, NULL if nothing pinned +const +{ + Image scaledimg; // image scaled to fixed eye-mouth distance + const double imgscale = EYEMOUTH_DIST / EyeMouthDist(startshape); + + // TODO This resize is quite slow (cv::INTER_NEAREST is even slower, why?). + cv::resize(img, scaledimg, + cv::Size(), imgscale, imgscale, cv::INTER_LINEAR); + + TraceShape(startshape * imgscale, scaledimg, 0, -1, "start"); + + vector pyr; // image pyramid (a vec of images, one for each pyr lev) + CreatePyr(pyr, scaledimg, N_PYR_LEVS); + + Shape shape(startshape * imgscale * GetPyrScale(N_PYR_LEVS)); + + Shape pinned; // pinnedshape scaled to current pyr lev + if (pinnedshape) + pinned = *pinnedshape * imgscale * GetPyrScale(N_PYR_LEVS); + + for (int ilev = N_PYR_LEVS-1; ilev >= 0; ilev--) + { + shape *= PYR_RATIO; // scale shape to this pyr lev + pinned *= PYR_RATIO; + + LevSearch_(shape, ilev, pyr[ilev], pinned); + } + return shape / imgscale; +} + +} // namespace stasm diff --git a/3rdparty/stasm/stasm/stasm/include/asm.h b/3rdparty/stasm4.0.0/stasm/asm.h index 48145ae..2ec220b 100755 --- a/3rdparty/stasm/stasm/stasm/include/asm.h +++ b/3rdparty/stasm4.0.0/stasm/asm.h @@ -12,10 +12,6 @@ #ifndef STASM_ASM_H #define STASM_ASM_H -#include "misc.h" -#include "basedesc.h" -#include "shapemod.h" -#include "hat.h" #include "stasmhash.h" namespace stasm @@ -58,7 +54,7 @@ private: const BaseDescMod** const descmods_arg, // in: descriptor models int ndescmods) // in: sanity check { - (void) ndescmods; + CV_Assert(ndescmods == stasm_NLANDMARKS * N_PYR_LEVS); vec_vec_BaseDescMod descmods(N_PYR_LEVS); @@ -93,7 +89,6 @@ public: { CV_Assert(eyaw == EYAW_45 || eyaw == EYAW_22 || eyaw == EYAW00 || eyaw == EYAW22 || eyaw == EYAW45); - CV_Assert(estart == ESTART_RECT_ONLY || estart == ESTART_EYES || estart == ESTART_EYE_AND_MOUTH); } diff --git a/3rdparty/stasm/stasm/stasm/include/basedesc.h b/3rdparty/stasm4.0.0/stasm/basedesc.h index 9dfb545..8c1b218 100755 --- a/3rdparty/stasm/stasm/stasm/include/basedesc.h +++ b/3rdparty/stasm4.0.0/stasm/basedesc.h @@ -38,15 +38,15 @@ class BaseDescMod // abstract base class for all descriptor models { public: virtual void DescSearch_( // search in area around the current point - double& x, // io: (in: old posn of landmark, out: new posn) - double& y, // io - const Image& img, // in: image scaled to this pyramid level - const Shape& shape, // in: current position of the landmarks - int ilev, // in: pyramid level (0 is full size) - int ipoint, // in: index of the current landmark - const Hat &hat, - StasmHash &hash) - const = 0; + double& x, // io: (in: old posn of landmark, out: new posn) + double& y, // io + const Image& img, // in: image scaled to this pyramid level + const Shape& shape, // in: current position of the landmarks + int ilev, // in: pyramid level (0 is full size) + int ipoint, // in: index of the current landmark + const Hat &hat, + StasmHash &hash) + const = 0; virtual ~BaseDescMod() {} // destructor }; diff --git a/3rdparty/stasm4.0.0/stasm/classicdesc.cpp b/3rdparty/stasm4.0.0/stasm/classicdesc.cpp new file mode 100755 index 0000000..ec5745b --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/classicdesc.cpp @@ -0,0 +1,274 @@ +// classicdesc.cpp: model for classic ASM descriptors +// +// By "classic descriptor" we mean the Cootes' style one dimensional +// profile along the whisker orthogonal to the shape boundary. +// +// Copyright (C) 2005-2013, Stephen Milborrow + +#include "stasm.h" + +namespace stasm +{ +static void NormalizeMat( + MAT& mat) // io: normalized so L2 length is 1 +{ + double norm = cv::norm(mat); // L2 norm + if (!IsZero(norm)) + mat /= norm; +} + +static const VEC Bisector( // return normalized bisector of three ordered points + const VEC& prev, // in: x,y coords of previous point (1x2 matrix) + const VEC& point, // in + const VEC& next) // in +{ + VEC u(1, 2); // u is point - prev, rotated by 90 degrees + u(IX) = point(IY) - prev(IY); + u(IY) = prev(IX) - point(IX); + NormalizeMat(u); + + VEC v(1, 2); // v is next - point, rotated by 90 degrees + v(IX) = next(IY) - point(IY); + v(IY) = point(IX) - next(IX); + NormalizeMat(v); + + VEC w(u + v); NormalizeMat(w); + + // are prev and next in the same line? if so, avoid numerical issues + if (IsZero(w(IX)) && IsZero(w(IY))) + { + w = point - prev; + NormalizeMat(w); + } + return w; // w is the direction of the bisector +} + +// get x and y distances to take a single pixel step along the whisker + +static void WhiskerStep( + double& xstep, // out: x dist to move one pix along whisker + double& ystep, // out: y dist to move one pix along whisker + const Shape& shape, // in + int ipoint) // in: index of the current point +{ + int prev, next; PrevAndNextLandmarks(prev, next, ipoint, shape); + + if ((Equal(shape(prev, IX), shape(ipoint, IX)) && + Equal(shape(prev, IY), shape(ipoint, IY))) || + + (Equal(shape(next, IX), shape(ipoint, IX)) && + Equal(shape(next, IY), shape(ipoint, IY)))) + { + // The prev or next point is on top of the current point. + // Arbitrarily point the whisker in a horizontal direction. + // TODO Revisit, this is common at low resolution pyramid levels. + + xstep = 1; + ystep = 0; + } + else + { + const VEC whisker_direction(Bisector(shape.row(prev), + shape.row(ipoint), + shape.row(next))); + xstep = -whisker_direction(IX); + ystep = -whisker_direction(IY); + + // normalize so either xstep or ystep will be +-1, + // and the other will be smaller than +-1 + + const double abs_xstep = ABS(xstep); + const double abs_ystep = ABS(ystep); + if (abs_xstep >= abs_ystep) + { + xstep /= abs_xstep; + ystep /= abs_xstep; + } + else + { + xstep /= abs_ystep; + ystep /= abs_ystep; + } + } +} + +static inline int Step( // return x coord at the given offset along whisker + double x, // in: x coord of center of whisker + double xstep, // in: x dist to move one pixel along whisker + int offset) // in: offset along whisker in pixels +{ + return cvRound(x + (offset * xstep)); +} + +static inline int Pix( // get pixel at ix and iy, forcing ix and iy in range + const Image& img, // in + int ix, // in + int iy) // in +{ + return img(Clamp(iy, 0, img.rows-1), Clamp(ix, 0, img.cols-1)); +} + +// fullprof is the 1D profile along the whisker, including extra elements +// to allow searching away from the current position of the landmark. +// +// shape[ipoint] is the current position of the landmark, +// and the center point of the whisker. +// We also use shape for figuring out the direction of the whisker. + +static void FullProf( + VEC& fullprof, // out + const Image& img, // in + const MAT& shape, // in + int ipoint) // in: index of the current point +{ + double xstep; // x axis dist corresponding to one pixel along whisker + double ystep; + WhiskerStep(xstep, ystep, shape, ipoint); + + const double x = shape(ipoint, IX); // center point of the whisker + const double y = shape(ipoint, IY); + + // number of pixs to sample in each direction along the whisker + const int n = (NSIZE(fullprof) - 1) / 2; + + int prevpix = Pix(img, + Step(x, xstep, -n-1), Step(y, ystep, -n-1)); + + for (int i = -n; i <= n; i++) + { + const int pix = Pix(img, + Step(x, xstep, i), Step(y, ystep, i)); + + fullprof(i + n) = double(pix - prevpix); // signed gradient + prevpix = pix; + } +} + +double SumAbsElems( // return the sum of the abs values of the elems of mat + const MAT& mat) // in +{ + CV_Assert(mat.isContinuous()); + const double* const data = Buf(mat); + double sum = 0; + int i = NSIZE(mat); // number of elements + while (i--) + sum += ABS(data[i]); + return sum; +} + +// This returns a double equal to x.t() * mat * x. +// +// x is a vector (row or column, it doesn't matter). +// +// mat is assumed to be a symmetric matrix +// (but only the upper right triangle of mat is actually used). +// +// mat and x are not modified. +// +// This function is equivalent to x.t() * mat * x(), but is optimized +// for speed and is faster. It's faster because we use the fact that +// mat is symmetric to roughly halve the number of operations. + +static double xAx( + const VEC& x, // in + const MAT& mat) //in: must be symmetric +{ + const int n = NSIZE(x); + CV_Assert(mat.rows == n && mat.cols == n && x.isContinuous()); + const double* px = Buf(x); + double diagsum = 0, sum = 0; + int i = n; + while (i--) + { + const double xi = px[i]; + const double* const rowbuf = mat.ptr(i); + diagsum += rowbuf[i] * SQ(xi); // sum diag elements + for (int j = i+1; j < n; j++) // sum upper right triangle elements + sum += rowbuf[j] * xi * px[j]; + } + return diagsum + 2 * sum; // "2 *" to include lower left triangle elements +} + +// Get the profile distance. That is, get the image profile at the given +// offset along the whisker, and return the Mahalanobis distance between +// it and the model mean profile. Low distance means good fit. + +static double ProfDist( + int offset, // in: offset along whisker in pixels + int proflen, // in + const VEC& fullprof, // in + const VEC& meanprof, // in: mean of the training profiles for this point + const MAT& covi) // in: inverse of the covar of the training profiles +{ + VEC prof(1, proflen); // the profile at the given offset along whisker + + // copy the relevant part of fullprof into prof + + memcpy(Buf(prof), + Buf(fullprof) + offset + NSIZE(fullprof)/2 - NSIZE(prof)/2, + NSIZE(prof) * sizeof(prof(0))); + + // normalize prof + + double sum = SumAbsElems(prof); + if (!IsZero(sum)) + prof *= NSIZE(prof) / sum; + + // The following code is equivalent to + // return (prof - meanprof).t() * covi * (prof - meanprof) + // but is optimized for speed. + + prof -= meanprof; // for efficiency, use "-=" not "=" with "-" + return xAx(prof, covi); +} + +// If OpenMP is enabled, multiple instances of this function will be called +// concurrently (each call will have a different value of x and y). Thus this +// function and its callees do not modify any data that is not on the stack. + +void ClassicDescSearch( // search along whisker for best profile match + double& x, // io: (in: old posn of landmark, out: new posn) + double& y, // io: + const Image& img, // in: the image scaled to this pyramid level + const Shape& inshape, // in: current posn of landmarks (for whisker directions) + int ipoint, // in: index of the current landmark + const MAT& meanprof, // in: mean of the training profiles for this point + const MAT& covi) // in: inverse of the covar of the training profiles +{ + const int proflen = NSIZE(meanprof); + CV_Assert(proflen % 2 == 1); // proflen must be odd in this implementation + + // fullprof is the 1D profile along the whisker including the extra + // elements to allow search +-CLASSIC_MAX_OFFSET pixels away from + // the current position of the landmark. + // We precalculate the fullprof for efficiency in the for loop below. + + VEC fullprof(1, proflen + 2 * CLASSIC_MAX_OFFSET); + CV_Assert(NSIZE(fullprof) % 2 == 1); // fullprof length must be odd + FullProf(fullprof, img, inshape, ipoint); + + // move along the whisker looking for the best match + + int bestoffset = 0; + double mindist = FLT_MAX; + for (int offset = -CLASSIC_MAX_OFFSET; + offset <= CLASSIC_MAX_OFFSET; + offset += CLASSIC_SEARCH_RESOL) + { + const double dist = ProfDist(offset, proflen, fullprof, meanprof, covi); + + if (dist < mindist) + { + mindist = dist; + bestoffset = offset; + } + } + // change x,y to the best position along the whisker + + double xstep, ystep; + WhiskerStep(xstep, ystep, inshape, ipoint); + x = inshape(ipoint, IX) + (bestoffset * xstep); + y = inshape(ipoint, IY) + (bestoffset * ystep); +} + +} // namespace stasm diff --git a/3rdparty/stasm/stasm/stasm/include/classicdesc.h b/3rdparty/stasm4.0.0/stasm/classicdesc.h index d0335b7..32709f7 100755 --- a/3rdparty/stasm/stasm/stasm/include/classicdesc.h +++ b/3rdparty/stasm4.0.0/stasm/classicdesc.h @@ -5,8 +5,6 @@ #ifndef STASM_CLASSICDESC_H #define STASM_CLASSICDESC_H -#include "misc.h" -#include "basedesc.h" #include "stasmhash.h" namespace stasm @@ -14,7 +12,7 @@ namespace stasm static const int CLASSIC_MAX_OFFSET = 2; // search +-2 pixels along the whisker static const int CLASSIC_SEARCH_RESOL = 2; // search resolution, every 2nd pix -void ClassicDescSearch( // search along whisker for best profile match +extern void ClassicDescSearch( // search along whisker for best profile match double& x, // io: (in: current posn of the point, out: new posn) double& y, // io: const Image& img, // in: the image scaled to this pyramid level @@ -23,12 +21,6 @@ void ClassicDescSearch( // search along whisker for best profile match const MAT& meanprof, // in: mean of the training profiles for this point const MAT& covi); // in: inverse of the covar of the training profiles -VEC ClassicProf( // used only during training a new model - const Image& img, // in: the image scaled to this pyramid level - const Shape& inshape, // in: current posn of landmarks (for whisker directions) - int ipoint, // in: index of the current landmark - int proflen); // in - class ClassicDescMod: public BaseDescMod { public: @@ -39,8 +31,7 @@ public: (void) hat; (void) hash; - ClassicDescSearch(x, y, - img, shape, ipoint, meanprof_, covi_); + ClassicDescSearch(x, y, img, shape, ipoint, meanprof_, covi_); } ClassicDescMod( // constructor diff --git a/3rdparty/stasm4.0.0/stasm/convshape.cpp b/3rdparty/stasm4.0.0/stasm/convshape.cpp new file mode 100755 index 0000000..443df22 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/convshape.cpp @@ -0,0 +1,230 @@ +// convshape.cpp: convert a stasm 77 point shape to other formats +// +// Copyright (C) 2005-2013, Stephen Milborrow + +#include "stasm.h" + +namespace stasm +{ +static void Copy( // copy a point from oldshape to shape + Shape& shape, // io + const Shape& oldshape, // in + int i, // in + int iold) // in +{ + shape(i, IX) = oldshape(iold, IX); + shape(i, IY) = oldshape(iold, IY); +} + +static void Inter( // interpolate a point from two nearby oldshape points + Shape& shape, // io + const Shape& oldshape, // in + int i, // in: shape point + double ratio, // in: interpolation ratio, 0 to 1 + int i1, // in: oldshape point 1 + int i2) // in: oldshape point 2 +{ + if (!PointUsed(oldshape, i1) && !PointUsed(oldshape, i2)) + { + shape(i, IX) = 0; + shape(i, IY) = 0; + } + else if (!PointUsed(oldshape, i1)) + { + shape(i, IX) = oldshape(i2, IX) + 1; // +1 is arb, to disambiguate point + shape(i, IY) = oldshape(i2, IY) + 1; + } + else if (!PointUsed(oldshape, i2)) + { + shape(i, IX) = oldshape(i1, IX) + 1; + shape(i, IY) = oldshape(i1, IY) + 1; + } + else + { + CV_Assert(ratio >= 0 && ratio <= 1); + shape(i, IX) = ratio * oldshape(i1, IX) + (1-ratio) * oldshape(i2, IX); + shape(i, IY) = ratio * oldshape(i1, IY) + (1-ratio) * oldshape(i2, IY); + } +} + +static Shape Shape77As20( // return an approximated BioID 20 point shape + const Shape& shape) // in: Stasm 77 point shape +{ + CV_Assert(shape.rows == 77); + + Shape newshape(20, 2); + + Copy(newshape, shape, 0, 38); + Copy(newshape, shape, 1, 39); + Copy(newshape, shape, 2, 59); + Copy(newshape, shape, 3, 65); + Copy(newshape, shape, 4, 18); + Copy(newshape, shape, 5, 21); + Copy(newshape, shape, 6, 22); + Copy(newshape, shape, 7, 25); + Copy(newshape, shape, 8, 0); + Copy(newshape, shape, 9, 34); + Copy(newshape, shape, 10, 30); + Copy(newshape, shape, 11, 40); + Copy(newshape, shape, 12, 44); + Copy(newshape, shape, 13, 12); + Copy(newshape, shape, 14, 52); + Copy(newshape, shape, 15, 51); + Copy(newshape, shape, 16, 53); + Copy(newshape, shape, 17, 62); + Copy(newshape, shape, 18, 74); + Copy(newshape, shape, 19, 6); + +#if MOD_A1 || MOD_A || MOD_A_EMU + const double eyemouth = EyeMouthDist(shape); + newshape(15, IY) += MAX(1, .02 * eyemouth); // move down, into nostril + newshape(16, IY) += MAX(1, .02 * eyemouth); // move down, into nostril +#endif + + return newshape; +} + +static Shape Shape77As22( // return an approximated AR 22 point shape + const Shape& shape) // in: Stasm 77 point shape +{ + CV_Assert(shape.rows == 77); + + // first 20 points same as BioId + Shape newshape = DimKeep(Shape77As20(shape), 77, 2); + + Copy(newshape, shape, 20, 3); + Copy(newshape, shape, 21, 9); + + return newshape; +} + +static Shape Shape77As68( // return an approximated XM2VTS 68 point shape + const Shape& shape) // in: Stasm 77 point shape +{ + CV_Assert(shape.rows == 77); + + Shape newshape(68, 2); + + Copy(newshape, shape, 0, 0); + Inter(newshape, shape, 1, .6667, 1, 2); + Inter(newshape, shape, 2, .5, 2, 3); + Copy(newshape, shape, 3, 3); + Inter(newshape, shape, 4, .3333, 3, 4); + Inter(newshape, shape, 5, .6667, 4, 5); + Copy(newshape, shape, 6, 5); + Copy(newshape, shape, 7, 6); + Copy(newshape, shape, 8, 7); + Inter(newshape, shape, 9, .3333, 7, 8); + Inter(newshape, shape, 10, .6667, 8, 9); + Copy(newshape, shape, 11, 9); + Inter(newshape, shape, 12, .5, 9, 10); + Inter(newshape, shape, 13, .3333, 10, 11); + Copy(newshape, shape, 14, 12); + Copy(newshape, shape, 15, 25); + Copy(newshape, shape, 16, 24); + Copy(newshape, shape, 17, 23); + Copy(newshape, shape, 18, 22); + Copy(newshape, shape, 19, 27); + Copy(newshape, shape, 20, 26); + Copy(newshape, shape, 21, 18); + Copy(newshape, shape, 22, 17); + Copy(newshape, shape, 23, 16); + Copy(newshape, shape, 24, 21); + Copy(newshape, shape, 25, 20); + Copy(newshape, shape, 26, 19); + Copy(newshape, shape, 27, 34); + Copy(newshape, shape, 28, 32); + Copy(newshape, shape, 29, 30); + Copy(newshape, shape, 30, 36); + Copy(newshape, shape, 31, 38); + Copy(newshape, shape, 32, 44); + Copy(newshape, shape, 33, 42); + Copy(newshape, shape, 34, 40); + Copy(newshape, shape, 35, 46); + Copy(newshape, shape, 36, 39); + Inter(newshape, shape, 37, .6667, 30, 40); + newshape(37, IX) = shape(50, IX); + Copy(newshape, shape, 38, 50); + Copy(newshape, shape, 39, 58); + Copy(newshape, shape, 40, 57); + Copy(newshape, shape, 41, 56); + Copy(newshape, shape, 42, 55); + Copy(newshape, shape, 43, 54); + Copy(newshape, shape, 44, 48); + Inter(newshape, shape, 45, .3333, 30, 40); + newshape(45, IX) = shape(48, IX); + Copy(newshape, shape, 46, 51); + Copy(newshape, shape, 47, 53); + Copy(newshape, shape, 48, 59); + Copy(newshape, shape, 49, 60); + Copy(newshape, shape, 50, 61); + Copy(newshape, shape, 51, 62); + Copy(newshape, shape, 52, 63); + Copy(newshape, shape, 53, 64); + Copy(newshape, shape, 54, 65); + Copy(newshape, shape, 55, 72); + Copy(newshape, shape, 56, 73); + Copy(newshape, shape, 57, 74); + Copy(newshape, shape, 58, 75); + Copy(newshape, shape, 59, 76); + Copy(newshape, shape, 60, 69); + Copy(newshape, shape, 61, 70); + Copy(newshape, shape, 62, 71); + Copy(newshape, shape, 63, 66); + Copy(newshape, shape, 64, 67); + Copy(newshape, shape, 65, 68); + Inter(newshape, shape, 66, .5, 67, 70); + Copy(newshape, shape, 67, 52); + +#if MOD_A1 || MOD_A || MOD_A_EMU + const double eyemouth = EyeMouthDist(shape); + newshape(38, IY) += MAX(1, .05 * eyemouth); // move side of nose down + newshape(44, IY) += MAX(1, .05 * eyemouth); // move side of nose down + newshape(46, IY) += MAX(1, .02 * eyemouth); // move down, into nostril + newshape(47, IY) += MAX(1, .02 * eyemouth); // move down, into nostril +#endif + + return newshape; +} + +static Shape Shape77As76( // return an approximated MUCT 76 point shape + const Shape& shape) // in: Stasm 77 point shape +{ + // first 68 points same as XM2VTS + Shape newshape = DimKeep(Shape77As68(shape), 77, 2); + + Copy(newshape, shape, 68, 33); // extra eyelid points + Copy(newshape, shape, 69, 31); + Copy(newshape, shape, 70, 37); + Copy(newshape, shape, 71, 35); + Copy(newshape, shape, 72, 43); + Copy(newshape, shape, 73, 41); + Copy(newshape, shape, 74, 47); + Copy(newshape, shape, 75, 45); + + return newshape; +} + +Shape ConvertShape( // return shape with nlandmarks, return no rows if can't + const Shape& shape, // in + int nlandmarks) // in: 77=nochange, 76=stasm3, 68=xm2vts, 22=ar, 20=bioid, 17=me17 +{ + Shape newshape; + if (nlandmarks == shape.rows) + newshape = shape.clone(); + else if (nlandmarks == 17) // me17 + newshape = Shape17(shape); + else if (shape.rows == stasm_NLANDMARKS) + { + switch(nlandmarks) + { + case 20: newshape = Shape77As20(shape); break; // BioID + case 22: newshape = Shape77As22(shape); break; // AR + case 68: newshape = Shape77As68(shape); break; // XM2VTS + case 76: newshape = Shape77As76(shape); break; // Stasm 3 + } + } + return newshape; +} + +} // namespace stasm diff --git a/3rdparty/stasm/stasm/stasm/include/convshape.h b/3rdparty/stasm4.0.0/stasm/convshape.h index 411a377..6487a5f 100755 --- a/3rdparty/stasm/stasm/stasm/include/convshape.h +++ b/3rdparty/stasm4.0.0/stasm/convshape.h @@ -5,14 +5,11 @@ #ifndef STASM_CONVSHAPE_H #define STASM_CONVSHAPE_H -#include "misc.h" - namespace stasm { Shape ConvertShape( // return shape with nlandmarks, return no rows if can't const Shape& shape, // in - int nlandmarks); // in: shape.rows=no change, 17=shape17, anything else return no rows - // if shape.rows=77, treat specially: - // 77=nochange, 76=muct76, 68=xm2vts, 22=ar, 20=bioid, 17=shape17 + int nlandmarks); // in: 77=nochange, 76=stasm3, 68=xm2vts, 22=ar, 20=bioid, 17=me17 + } // namespace stasm #endif // STASM_CONVSHAPE_H diff --git a/3rdparty/stasm4.0.0/stasm/err.cpp b/3rdparty/stasm4.0.0/stasm/err.cpp new file mode 100755 index 0000000..c9fc363 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/err.cpp @@ -0,0 +1,145 @@ +// err.cpp: error handling for Stasm +// +// Don't call internal Stasm functions (i.e. functions in the Stasm namespace +// when not in a try block, because Stasm's error handler (Err) raises an +// exception. You need to catch that exception to avoid a messageless crash. +// +// Your code should look like this (see e.g. stasm_lib.cpp and stasm_main.cpp): +// +// CatchOpenCvErrs(); // tell Stasm to handle CV_Assert as Stasm errors +// try +// { +// ... your code which calls Stasm's internal functions ... +// } +// catch(...) +// { +// // a call was made to Err or a CV_Assert failed +// printf("\n%s\n", stasm_lasterr()); +// exit(1); +// } +// UncatchOpenCvErrs(); // restore OpenCV handler to its previous state +// +// Note that the stasm library function (i.e. the functions prefixed +// by "stasm_") use try blocks internally, and code that calls +// them doesn't have to worry about the above exception. +// +// Copyright (C) 2005-2013, Stephen Milborrow + +#include "stasm.h" + +namespace stasm +{ +static char err_g[SBIG]; // err msg saved for retrieval by LastErr and stasm_lasterr + +static vector stack_g(10); // stack of err handlers, 10 is generous + +static int istack_g; // index into stack_g + +//----------------------------------------------------------------------------- + +static void PossiblyEnterDebugger(void) +{ +#if _DEBUG + // requires you to be in a debugger or have set up a just-in-time debugger + printf("\n%s\nDEBUG is true so forcing entry to the debugger\n", err_g); + fflush(stdout); + static volatile int* p = 0; + *p = 99; +#endif // _DEBUG +} + +// This gets called during OpenCV error handling e.g. if a CV_Assert fails. +// Save the error info in our global string err_g. + +static int CV_CDECL CvErrorCallbackForStasm( + int code, // translated to a string e.g. "Assertion failed" + const char* , // unused here + const char* err_msg, // e.g. the contents of the line where assert failed + const char* file_name, // filename where error occurred (if available) + int line, // line number where error occurred + void* ) // unused here +{ + if (err_g[0]) + { + // Recursive, we are already processing an error. + // Not really an issue, only first error will be reported via LastErr. + printf("\nNested error in CvErrorCallbackForStasm\n" + " Current error: %.80s\n New error: %.80s\n", + err_g, err_msg); + } + else + { + char temp[SBIG]; // temporary string needed because err_msg may be err_g + const char* errmsg = cvErrorStr(code); + if (file_name && file_name[0]) + sprintf(temp, "%s(%d) : %s : %s", + BaseExt(file_name), line, errmsg, err_msg); + else + sprintf(temp, "OpenCV %s : %s", errmsg, err_msg); + + STRCPY(err_g, temp); + } + PossiblyEnterDebugger(); + return 0; +} + +void CatchOpenCvErrs(void) // makes CV_Assert work with LastErr and stasm_lasterr +{ + err_g[0] = 0; + cv::ErrorCallback prev = cv::redirectError(CvErrorCallbackForStasm); + if (istack_g < NSIZE(stack_g)) + stack_g[istack_g++] = prev; + else // should never get here (CatchErr regions nested too deeply) + printf("\nCallback stack overpush\n"); +} + +void UncatchOpenCvErrs(void) // restore handler that was active before CatchOpenCvErrs +{ + if (istack_g > 0) + cv::redirectError(stack_g[--istack_g]); + else // should never get here (call to UncatchErr without matching CatchErr) + printf("\nCallback stack overpop\n"); +} + +void Err(const char* format, ...) // args like printf, throws an exception +{ + if (err_g[0]) + { + // Recursive, we are already processing an error. + // Ok, only first error will be reported via LastErr. + // This happens if Err is called to report a stasm_search_auto fail. + } + else + { + char s[SBIG]; // temporary needed because format or ... may be err_g + va_list args; + va_start(args, format); + VSPRINTF(s, format, args); + va_end(args); + STRCPY(err_g, s); + } + PossiblyEnterDebugger(); + throw "Err"; // does not matter what we throw, will be caught by global catch +} + +const char* LastErr(void) // return the last error message, called by stasm_lasterr +{ + if (!err_g[0]) // no error message? + { + // Should never get here unless someone calls LastErr or + // stasm_lasterr incorrectly (i.e. when there has been no error). + // + // TODO But in fact we do actually get here if cv::fastMalloc fails + // (within OpenCV) when allocating a small amount of memory (say 10 bytes + // large amounts are ok). It seems that when there is very little memory + // remaining, OpenCV does not handle exceptions properly (an exception + // is raised but the OpenCV error callback function is not called). + // To reproduce, put the following in your code: + // volatile void *p; while (1) p = cv::fastMalloc(10); + + STRCPY(err_g, "Illegal call to LastErr"); + } + return err_g; +} + +} // namespace stasm diff --git a/3rdparty/stasm/stasm/stasm/include/err.h b/3rdparty/stasm4.0.0/stasm/err.h index 13fc703..89b38f7 100755 --- a/3rdparty/stasm/stasm/stasm/include/err.h +++ b/3rdparty/stasm4.0.0/stasm/err.h @@ -10,7 +10,6 @@ namespace stasm void CatchOpenCvErrs(void); void UncatchOpenCvErrs(void); void Err(const char* format, ...); -void ClearLastErr(void); const char* LastErr(void); // return the last error message } // namespace stasm diff --git a/3rdparty/stasm/stasm/stasm/src/eyedet.cpp b/3rdparty/stasm4.0.0/stasm/eyedet.cpp index 6e3f6b5..9daf810 100755 --- a/3rdparty/stasm/stasm/stasm/src/eyedet.cpp +++ b/3rdparty/stasm4.0.0/stasm/eyedet.cpp @@ -2,8 +2,7 @@ // // Copyright (C) 2005-2013, Stephen Milborrow -#include "eyedet.h" -#include "err.h" +#include "stasm.h" namespace stasm { @@ -23,68 +22,68 @@ namespace stasm static Rect EyeSearchRect( EYAW eyaw, // in - const Rect& facerect, // in: the detected face rectangle + const Rect& facerect, // in const bool is_right_eye) // in: true for right eye, false for left eye { Rect rect = facerect; int width = facerect.width; switch (eyaw) { - case EYAW00: // frontal model - if (is_right_eye) - rect.x += width / 3; // don't search left third of face - rect.width -= width / 3; // or right third - rect.height = cvRound(.6 * facerect.height); // don't search lower face - break; - case EYAW_22: // left facing three-quarter model - if (is_right_eye) // inner eye - { - rect.x += cvRound(.4 * width); - rect.width = cvRound(.5 * width); - } - else // outer eye - { - rect.x += cvRound(.1 * width); - rect.width = cvRound(.5 * width); - } - rect.height = cvRound(.5 * facerect.height); - break; - case EYAW22: // right facing three-quarter model - if (is_right_eye) // outer eye - { - rect.x += cvRound(.4 * width); - rect.width = cvRound(.5 * width); - } - else // inner eye - { - rect.x += cvRound(.1 * width); - rect.width = cvRound(.5 * width); - } - rect.height = cvRound(.5 * facerect.height); - break; - case EYAW_45: // left facing three-quarter model - if (is_right_eye) // inner eye - { - rect.x += cvRound(.4 * width); - rect.width = cvRound(.5 * width); + case EYAW00: // frontal model + if (is_right_eye) + rect.x += width / 3; // don't search left third of face + rect.width -= width / 3; // or right third + rect.height = cvRound(.6 * facerect.height); // don't search lower part of face + break; + case EYAW_22: // left facing three-quarter model + if (is_right_eye) // inner eye + { + rect.x += cvRound(.4 * width); + rect.width = cvRound(.5 * width); + } + else // outer eye + { + rect.x += cvRound(.1 * width); + rect.width = cvRound(.5 * width); + } rect.height = cvRound(.5 * facerect.height); - } - else // outer eye - rect.width = rect.height = 0; - break; - case EYAW45: // right facing three-quarter model - if (is_right_eye) // outer eye - rect.width = rect.height = 0; - else // inner eye - { - rect.x += cvRound(.1 * width); - rect.width = cvRound(.5 * width); + break; + case EYAW22: // right facing three-quarter model + if (is_right_eye) // outer eye + { + rect.x += cvRound(.4 * width); + rect.width = cvRound(.5 * width); + } + else // inner eye + { + rect.x += cvRound(.1 * width); + rect.width = cvRound(.5 * width); + } rect.height = cvRound(.5 * facerect.height); - } - break; - default: - Err("EyeSearchRect: Invalid eyaw %d", eyaw); - break; + break; + case EYAW_45: // left facing three-quarter model + if (is_right_eye) // inner eye + { + rect.x += cvRound(.4 * width); + rect.width = cvRound(.5 * width); + rect.height = cvRound(.5 * facerect.height); + } + else // outer eye + rect.width = rect.height = 0; + break; + case EYAW45: // right facing three-quarter model + if (is_right_eye) // outer eye + rect.width = rect.height = 0; + else // inner eye + { + rect.x += cvRound(.1 * width); + rect.width = cvRound(.5 * width); + rect.height = cvRound(.5 * facerect.height); + } + break; + default: + Err("EyeSearchRect: Invalid eyaw %d", eyaw); + break; } rect.width = MAX(0, rect.width); rect.height = MAX(0, rect.height); @@ -107,24 +106,25 @@ static void MouthRectShift( double xshift = 0, yshift = 0; switch (eyaw) { - case EYAW00: // frontal model - break; - case EYAW_45: // left facing three-quarter model - xshift -= .04 * facerect_width; - break; - case EYAW_22: // left facing three-quarter model - xshift -= .03 * facerect_width; - break; - case EYAW22: // right facing three-quarter model - xshift += .03 * facerect_width; - break; - case EYAW45: // right facing three-quarter model - xshift += .04 * facerect_width; - break; - default: - Err("MouthRectShift: Invalid eyaw %d", eyaw); - break; + case EYAW00: // frontal model + break; + case EYAW_45: // left facing three-quarter model + xshift -= .04 * facerect_width; + break; + case EYAW_22: // left facing three-quarter model + xshift -= .03 * facerect_width; + break; + case EYAW22: // right facing three-quarter model + xshift += .03 * facerect_width; + break; + case EYAW45: // right facing three-quarter model + xshift += .04 * facerect_width; + break; + default: + Err("GeMouthRect: Invalid eyaw %d", eyaw); + break; } + if (ileft_best != -1 && iright_best != -1) // got both eyes? { // get center of eye boxes to get eye angle @@ -142,8 +142,8 @@ static void MouthRectShift( iyshift = cvRound(yshift); } -static Rect MouthSearchRect( // will search for mouth in this rectangle - const Rect& facerect, // in: the detected face rectangle +static Rect MouthRect( // will search for mouth in this rectangle + const Rect& facerect, // in EYAW eyaw, // in int ileft_best, // in: index of best left eye, -1 if none int iright_best, // in: index of best right eye, -1 if none @@ -154,94 +154,70 @@ static Rect MouthSearchRect( // will search for mouth in this rectangle int ixshift, iyshift; MouthRectShift(ixshift, iyshift, - eyaw, facerect.width, facerect.height, - ileft_best, iright_best, leyes, reyes); + eyaw, facerect.width, facerect.height, + ileft_best, iright_best, leyes, reyes); rect.x += cvRound(.2 * facerect.width) + ixshift; rect.width = MAX(1, cvRound(.6 * facerect.width)); - rect.height = cvRound(.42 * facerect.height); switch (eyaw) { - case EYAW00: // frontal model - rect.y += cvRound(.64 * facerect.height); - break; - case EYAW_45: // left facing three-quarter model - rect.y += cvRound(.55 * facerect.height); - break; - case EYAW_22: // left facing three-quarter model - rect.y += cvRound(.55 * facerect.height); - break; - case EYAW22: // right facing three-quarter model - rect.y += cvRound(.55 * facerect.height); - break; - case EYAW45: // right facing three-quarter model - rect.y += cvRound(.55 * facerect.height); - break; - default: - Err("MouthSearchRect: Invalid eyaw %d", eyaw); - break; + case EYAW00: // frontal model + rect.y += cvRound(.64 * facerect.height); + break; + case EYAW_45: // left facing three-quarter model + rect.y += cvRound(.55 * facerect.height); + break; + case EYAW_22: // left facing three-quarter model + rect.y += cvRound(.55 * facerect.height); + break; + case EYAW22: // right facing three-quarter model + rect.y += cvRound(.55 * facerect.height); + break; + case EYAW45: // right facing three-quarter model + rect.y += cvRound(.55 * facerect.height); + break; + default: + Err("MouthRect: Invalid eyaw %d", eyaw); + break; } rect.y += iyshift; + rect.height = cvRound(.42 * facerect.height); rect.width = MAX(0, rect.width); rect.height = MAX(0, rect.height); return rect; } -bool NeedEyes( // true if we need the eye detectors for the given mods +bool NeedMouth( const vec_Mod& mods) // in: the ASM model(s) { - static bool need_eyes = true; // static for efficiency - if (need_eyes) // not yet opened? - { - // use the estart field to determine if we need the eyes for any model - need_eyes = false; - for (int imod = 0; imod < NSIZE(mods); imod++) - { - ESTART estart = mods[imod]->Estart_(); - if (estart == ESTART_EYES || - estart == ESTART_EYE_AND_MOUTH) - { - need_eyes = true; - } - } - } - return need_eyes; -} - -bool NeedMouth( // true if we need the mouth detector for the given mods - const vec_Mod& mods) // in: the ASM model(s) -{ - static bool need_mouth = true; // static for efficiency - if (need_mouth) // not yet opened? - { - // we need the eyes if the estart field of any model is ESTART_EYE_AND_MOUTH - need_mouth = false; - for (int imod = 0; imod < NSIZE(mods); imod++) - if (mods[imod]->Estart_() == ESTART_EYE_AND_MOUTH) - { - need_mouth = true; - } - } - return need_mouth; + for (int imod = 0; imod < NSIZE(mods); imod++) + if (mods[imod]->Estart_() == ESTART_EYE_AND_MOUTH) + return true; + return false; } // Possibly open OpenCV eye detectors and mouth detector. We say "possibly" because // the eye and mouth detectors will actually only be opened if any model in mods // actually needs them. That is determined by the model's estart field. -void OpenEyeMouthDetectors( // open eye and mouth detectors, if necessary - bool need_eyes, // in: true if we need the eye detectors - bool need_mouth, // in: true if we need the mouth detector - const char* datadir) // in +void OpenEyeMouthDetectors( + const vec_Mod& mods, // in: the ASM models (used to see if we need eyes or mouth) + const char* datadir) // in { - (void) need_eyes; - (void) need_mouth; + (void) mods; (void) datadir; - /* - if (need_eyes) + static bool needeyes = true; // static for efficiency + // we need the eyes if the estart field of any model + // is ESTART_EYES or ESTART_EYE_AND_MOUTH + needeyes = false; + for (int imod = 0; imod < NSIZE(mods); imod++) + if (mods[imod]->Estart_() == ESTART_EYES || + mods[imod]->Estart_() == ESTART_EYE_AND_MOUTH) + needeyes = true; + if (needeyes) { // I tried all the eye XML files that come with OpenCV 2.1 and found that // the files used below give the best results. The other eye XML files @@ -252,27 +228,25 @@ void OpenEyeMouthDetectors( // open eye and mouth detectors, if necessary // the MUCT and BioID sets: haarcascade_mcs_lefteye.xml finds more eyes // on the viewer's left than it finds on the right (milbo Lusaka Dec 2011). - OpenDetector(leye_det_g, "haarcascade_mcs_lefteye.xml", datadir); - OpenDetector(reye_det_g, "haarcascade_mcs_righteye.xml", datadir); + //OpenDetector(leye_det_g, "haarcascade_mcs_lefteye.xml", datadir); + //OpenDetector(reye_det_g, "haarcascade_mcs_righteye.xml", datadir); } - if (need_mouth) - OpenDetector(mouth_det_g, "haarcascade_mcs_mouth.xml", datadir); - */ -} - -void OpenEyeMouthDetectors( // open eye and mouth detectors, if necessary for given mods - const vec_Mod& mods, // in: the ASM models (to see if we need eyes or mouth) - const char* datadir) // in -{ - OpenEyeMouthDetectors(NeedEyes(mods), NeedMouth(mods), datadir); + static bool needmouth = true; // static for efficiency + // we need the eyes if the estart field of any model is ESTART_EYE_AND_MOUTH + needmouth = false; + for (int imod = 0; imod < NSIZE(mods); imod++) + if (mods[imod]->Estart_() == ESTART_EYE_AND_MOUTH) + needmouth = true; + if (needmouth) + //OpenDetector(mouth_det_g, "haarcascade_mcs_mouth.xml", datadir);*/ } static void DetectAllEyes( - vec_Rect& leyes, // out: a vector of detected left eyes - vec_Rect& reyes, // out: a vector of detected right eyes + vec_Rect& leyes, // out + vec_Rect& reyes, // out const Image& img, // in EYAW eyaw, // in - const Rect& facerect, // in: the detected face rectangle + const Rect& facerect, // in StasmCascadeClassifier cascade) { // 1.2 is 40ms faster than 1.1 but finds slightly fewer eyes @@ -280,34 +254,41 @@ static void DetectAllEyes( static const int EYE_MIN_NEIGHBORS = 3; static const int EYE_DETECTOR_FLAGS = 0; - const Rect left_searchrect(EyeSearchRect(eyaw, facerect, false)); + Rect leftrect(EyeSearchRect(eyaw, facerect, false)); - if (left_searchrect.width) - leyes = Detect(img, cascade.leftEyeCascade, &left_searchrect, + if (leftrect.width) + leyes = Detect(img, &cascade.leftEyeCascade, &leftrect, EYE_SCALE_FACTOR, EYE_MIN_NEIGHBORS, EYE_DETECTOR_FLAGS, facerect.width / 10); - const Rect right_searchrect(EyeSearchRect(eyaw, facerect, true)); + Rect rightrect(EyeSearchRect(eyaw, facerect, true)); - if (right_searchrect.width) - reyes = Detect(img, cascade.rightEyeCascade, &right_searchrect, + if (rightrect.width) + reyes = Detect(img, &cascade.rightEyeCascade, &rightrect, EYE_SCALE_FACTOR, EYE_MIN_NEIGHBORS, EYE_DETECTOR_FLAGS, facerect.width / 10); } static void DetectAllMouths( - vec_Rect& mouths, // out: a vector of detected mouths - const Image& img, // in - const Rect& facerect, // in: the detected face rectangle - const Rect& mouth_searchrect, // in + vec_Rect& mouths, // out + const Image& img, // in + EYAW eyaw, // in + const Rect& facerect, // in + int ileft_best, // in + int iright_best, // in + const vec_Rect& leyes, // in + const vec_Rect& reyes, // in cv::CascadeClassifier cascade) { static const double MOUTH_SCALE_FACTOR = 1.2; // less false pos with 1.2 than 1.1 static const int MOUTH_MIN_NEIGHBORS = 5; // less false pos with 5 than 3 static const int MOUTH_DETECTOR_FLAGS = 0; + Rect mouth_rect(MouthRect(facerect, + eyaw, ileft_best, iright_best, leyes, reyes)); + mouths = - Detect(img, cascade, &mouth_searchrect, + Detect(img, &cascade, &mouth_rect, MOUTH_SCALE_FACTOR, MOUTH_MIN_NEIGHBORS, MOUTH_DETECTOR_FLAGS, facerect.width / 10); } @@ -318,45 +299,45 @@ static void DetectAllMouths( // enough to enclose the _entire_ eye box). static Rect EyeInnerRect( - EYAW eyaw, // in - const Rect& facerect) // in + EYAW eyaw, // in + const Rect& facerect) // in { Rect rect = facerect; switch (eyaw) { - case EYAW00: // frontal model - rect.x += cvRound(.1 * facerect.width); - rect.width = cvRound(.8 * facerect.width); - rect.y += cvRound(.2 * facerect.height); - rect.height = cvRound(.28 * facerect.height); - break; - case EYAW_45: // left facing three-quarter model - rect.x += cvRound(.4 * facerect.width); - rect.width = cvRound(.5 * facerect.width); - rect.y += cvRound(.20 * facerect.height); - rect.height = cvRound(.25 * facerect.height); - break; - case EYAW_22: // left facing three-quarter model - rect.x += cvRound(.1 * facerect.width); - rect.width = cvRound(.8 * facerect.width); - rect.y += cvRound(.20 * facerect.height); - rect.height = cvRound(.25 * facerect.height); - break; - case EYAW22: // right facing three-quarter model - rect.x += cvRound(.1 * facerect.width); - rect.width = cvRound(.8 * facerect.width); - rect.y += cvRound(.20 * facerect.height); - rect.height = cvRound(.25 * facerect.height); - break; - case EYAW45: // right facing three-quarter model - rect.x += cvRound(.1 * facerect.width); - rect.width = cvRound(.5 * facerect.width); - rect.y += cvRound(.20 * facerect.height); - rect.height = cvRound(.25 * facerect.height); - break; - default: - Err("EyeInnerRect: Invalid eyaw %d", eyaw); - break; + case EYAW00: // frontal model + rect.x += cvRound(.1 * facerect.width); + rect.width = cvRound(.8 * facerect.width); + rect.y += cvRound(.2 * facerect.height); + rect.height = cvRound(.28 * facerect.height); + break; + case EYAW_45: // left facing three-quarter model + rect.x += cvRound(.4 * facerect.width); + rect.width = cvRound(.5 * facerect.width); + rect.y += cvRound(.20 * facerect.height); + rect.height = cvRound(.25 * facerect.height); + break; + case EYAW_22: // left facing three-quarter model + rect.x += cvRound(.1 * facerect.width); + rect.width = cvRound(.8 * facerect.width); + rect.y += cvRound(.20 * facerect.height); + rect.height = cvRound(.25 * facerect.height); + break; + case EYAW22: // right facing three-quarter model + rect.x += cvRound(.1 * facerect.width); + rect.width = cvRound(.8 * facerect.width); + rect.y += cvRound(.20 * facerect.height); + rect.height = cvRound(.25 * facerect.height); + break; + case EYAW45: // right facing three-quarter model + rect.x += cvRound(.1 * facerect.width); + rect.width = cvRound(.5 * facerect.width); + rect.y += cvRound(.20 * facerect.height); + rect.height = cvRound(.25 * facerect.height); + break; + default: + Err("EyeInnerRect: Invalid eyaw %d", eyaw); + break; } rect.width = MAX(0, rect.width); rect.height = MAX(0, rect.height); @@ -375,7 +356,7 @@ static bool IsEyeHorizOk( right.x - (left.x + left.width) <= left.width; } -static bool VerticalOverlap( // do the two eye rectangles overlap vertically? +static bool VerticalOverlap( // do the two eyes overlap vertically? const Rect& left, // in const Rect& right) // in { @@ -388,6 +369,22 @@ static bool VerticalOverlap( // do the two eye rectangles overlap vertically? (topright >= left.y && topright <= left.y + left.height); } + +// Is the center of rect within the enclosing rect? + +static bool InRect( + const Rect& rect, // in + const Rect& enclosing) // in +{ + int x = rect.x + rect.width / 2; // center of rectangle + int y = rect.y + rect.height / 2; + + return x >= enclosing.x && + x <= enclosing.x + enclosing.width && + y >= enclosing.y && + y <= enclosing.y + enclosing.height; +} + // Return the indices of the best left and right eye in the list of eyes. // returned by the feature detectors. // The heuristic in in detail (based on looking at images produced): @@ -422,11 +419,10 @@ static void SelectEyes( for (iright = 0; iright < NSIZE(reyes); iright++) { right = reyes[iright]; - const bool c0 = InRect(right, eye_inner_rect); - const bool c1 = IsEyeHorizOk(left, right); - const bool c2 = right.x - left.x >= min_intereye; - const bool c3 = VerticalOverlap(left, right); - if (c0 && c1 && c2 && c3) + if (InRect(right, eye_inner_rect) && + IsEyeHorizOk(left, right) && + right.x - left.x >= min_intereye && + VerticalOverlap(left, right)) { int total_width = left.width + right.width; if (total_width > maxwidth) @@ -515,24 +511,24 @@ static Rect MouthInnerRect( switch (eyaw) { - case EYAW00: // frontal model - rect.y += cvRound(.7 * facerect.height); - break; - case EYAW_45: // left facing three-quarter model - rect.y += cvRound(.65 * facerect.height); - break; - case EYAW_22: // left facing three-quarter model - rect.y += cvRound(.65 * facerect.height); - break; - case EYAW22: // right facing three-quarter model - rect.y += cvRound(.65 * facerect.height); - break; - case EYAW45: // right facing three-quarter model - rect.y += cvRound(.65 * facerect.height); - break; - default: - Err("MouthInnerRect: Invalid eyaw %d", eyaw); - break; + case EYAW00: // frontal model + rect.y += cvRound(.7 * facerect.height); + break; + case EYAW_45: // left facing three-quarter model + rect.y += cvRound(.65 * facerect.height); + break; + case EYAW_22: // left facing three-quarter model + rect.y += cvRound(.65 * facerect.height); + break; + case EYAW22: // right facing three-quarter model + rect.y += cvRound(.65 * facerect.height); + break; + case EYAW45: // right facing three-quarter model + rect.y += cvRound(.65 * facerect.height); + break; + default: + Err("MouthInnerRect: Invalid eyaw %d", eyaw); + break; } rect.y += iyshift; rect.height = cvRound(height); @@ -552,7 +548,7 @@ static int MouthVerticalShift( const vec_Rect& reyes, // in const vec_Rect& mouths) // in { - double shift = 0; // assume no shift + double shift = 0; if (ileft_best != -1 && iright_best != -1) // got both eyes? { CV_Assert(imouth_best != -1); @@ -570,37 +566,23 @@ static int MouthVerticalShift( return cvRound(shift); } -static bool MouthOnNose( // true if mouth is probably a mouth false detect on the nostrils - const Rect& mouth, // in: left eyes found by eye detector - const Rect& facerect, // in: - const Rect& mouth_searchrect) // in: -{ - return mouth.x < // near top of search rect? - mouth_searchrect.x + .20 * mouth_searchrect.height && - double(mouth.width) / facerect.width < .28; -} +// Return the indices of the best mouth in the list of mouths -static void SelectMouth( // return index of the best mouth in the list of mouths +static void SelectMouth( int& imouth_best, // out: index into mouths, -1 if none int ileft_best, // in: index of best left eye, -1 if none int iright_best, // in: index of best right eye, -1 if none const vec_Rect& leyes, // in: left eyes found by eye detector const vec_Rect& reyes, // in: right eyes found by eye detector const vec_Rect& mouths, // in: left eyes found by eye detector - const Rect& facerect, // in: - const Rect& mouth_searchrect, // in: const Rect& mouth_inner_rect) // in: center of mouth must be in this region { CV_Assert(!mouths.empty()); imouth_best = -1; - if (NSIZE(mouths) == 1) // only one mouth? - { - if (InRect(mouths[0], mouth_inner_rect) && - !MouthOnNose(mouths[0], facerect, mouth_searchrect)) - { - imouth_best = 0; - } - } + + // if only one mouth, use it + if (NSIZE(mouths) == 1 && InRect(mouths[0], mouth_inner_rect)) + imouth_best = 0; else { // More than one mouth: selected the lowest mouth to avoid @@ -635,8 +617,7 @@ static void SelectMouth( // return index of the best mouth in the list of mouths const Rect mouth = mouths[imouth]; if (InRect(mouth, mouth_inner_rect) && mouth.y + mouth.height / 2 > ymin && - mouth.width > minwidth && - !MouthOnNose(mouths[0], facerect, mouth_searchrect)) + mouth.width > minwidth) { ymin = mouth.y + mouth.height / 2; imouth_best = imouth; @@ -677,197 +658,53 @@ static void RectToImgFrame( y = featrect.y + featrect.height / 2; } -#if TRACE_IMAGES - -static unsigned Dark1(unsigned color, double scale) -{ - const unsigned Red = unsigned(scale * ((color & 0xff0000) >> 16)); - const unsigned Green = unsigned(scale * ((color & 0x00ff00) >> 8)); - const unsigned Blue = unsigned(scale * ((color & 0x0000ff) >> 0)); - return - ((Red << 16) & 0xff0000) | - ((Green << 8) & 0x00ff00) | - ((Blue << 0) & 0x0000ff); -} - -static unsigned Dark(unsigned color) // return a dark version of color -{ - return Dark1(color, .667); -} - -static unsigned VeryDark(unsigned color) // return a very dark version of color -{ - return Dark1(color, .333); -} - -static void DrawRect( // draw a rectangle on an image - CImage& img, // io - const Rect& rect, // in - unsigned color=0xff0000, // in: rrggbb, default is 0xff0000 (red) - int linewidth=2) // in -{ - rectangle(img, - cv::Point(rect.x, rect.y), - cv::Point(rect.x + rect.width, rect.y + rect.height), - ToCvColor(color), linewidth); -} - -static void DrawFeat( // draw eye (or mouth) at index i in the eyes vec - CImage& img, // io - int i, // in - const vec_Rect& eyes, // in - unsigned col, // in - int linewidth, // in - bool best) // in: true if this is the best eye -{ - double x, y; RectToImgFrame(x, y, eyes[i]); - Rect rect; - rect.x = cvRound(x - eyes[i].width / 2); - rect.y = cvRound(y - eyes[i].height / 2); - rect.width = eyes[i].width; - rect.height = eyes[i].height; - if (!best) - col = Dark(col); - DrawRect(img, rect, col, linewidth); - cv::circle(img, cv::Point(cvRound(x), cvRound(y)), - (best? 2: 1) * linewidth, ToCvColor(col), linewidth); -} - -static void DrawEyes( - CImage& img, // io - const vec_Rect& leyes, // in - const vec_Rect& reyes, // in - int ileft_best, // in - int iright_best, // in - const Rect& facerect, // in - EYAW eyaw) // in -{ - // rectangles showing search regions - const int linewidth = facerect.width > 700? 3: facerect.width > 300? 2: 1; - const Rect left_rect(EyeSearchRect(eyaw, facerect, false)); - const Rect right_rect(EyeSearchRect(eyaw, facerect, true)); - const Rect eye_inner_rect(EyeInnerRect(eyaw, facerect)); - DrawRect(img, facerect, Dark(C_YELLOW), linewidth); - DrawRect(img, left_rect, VeryDark(C_RED), linewidth); - DrawRect(img, right_rect, VeryDark(C_GREEN), linewidth); - DrawRect(img, eye_inner_rect, Dark(C_YELLOW), linewidth); - int i; - for (i = 0; i < NSIZE(leyes); i++) - DrawFeat(img, - i, leyes, C_RED, linewidth, i==ileft_best); - for (i = 0; i < NSIZE(reyes); i++) - DrawFeat(img, - i, reyes, C_RED /*C_GREEN*/, linewidth, i==iright_best); -} - -static void DrawMouths( - CImage& img, // io - const vec_Rect& mouths, // in - int ibest, // in - const Rect& facerect, // in - EYAW eyaw, // in - int ileft_best, // in: index of best left eye, -1 if none - int iright_best, // in: index of best right eye, -1 if none - const vec_Rect& leyes, // in: left eyes found by eye detector - const vec_Rect& reyes) // in: right eyes found by eye detector -{ - const int linewidth = facerect.width > 700? 3: facerect.width > 300? 2: 1; - const Rect mouth_searchrect( - MouthSearchRect(facerect, eyaw, ileft_best, iright_best, leyes, reyes)); - const Rect inner_rect( - MouthInnerRect(facerect, eyaw, ileft_best, iright_best, leyes, reyes)); - DrawRect(img, facerect, Dark(C_YELLOW), 3 * linewidth); - DrawRect(img, mouth_searchrect, VeryDark(C_YELLOW), linewidth); - DrawRect(img, inner_rect, Dark(C_YELLOW), linewidth); - int i; - for (i = 0; i < NSIZE(mouths); i++) - DrawFeat(img, - i, mouths, C_RED, linewidth, i==ibest); -} - -static void TraceEyeMouthImg( - CImage& cimg, // in - DetPar& detpar, // in - int ileft_best, // in - int iright_best, // in - int imouth_best) // in -{ - rectangle(cimg, // border color shows eyaw - cv::Point(0, 0), cv::Point(cimg.cols-1, cimg.rows-1), - EyawAsColor(detpar.eyaw), 4); - - ImgPrintf(cimg, .8 * cimg.cols, .05 * cimg.rows, C_YELLOW, 1, - "%s", EyawAsString(detpar.eyaw)); - - char sl[SLEN]; sl[0] = 0; if (ileft_best < 0) strcat(sl, "_noleye"); - char sr[SLEN]; sr[0] = 0; if (iright_best < 0) strcat(sl, "_noreye"); - char sm[SLEN]; sm[0] = 0; if (imouth_best < 0) strcat(sl, "_nomouth"); - - double rot = detpar.rot; // INVALID rots will appear as 99999 in filename - PossiblySetRotToZero(rot); - char path[SLEN]; - sprintf(path, "%s_20_rot%d_eyemouth%s%s%s.bmp", - Base(imgpath_g), int(ABS(rot)), sl, sr, sm); - - lprintf("%s\n", path); - if (!cv::imwrite(path, cimg)) - Err("Cannot write %s", path); -} -#endif // TRACE_IMAGES - void DetectEyesAndMouth( // use OpenCV detectors to find the eyes and mouth DetPar& detpar, // io: eye and mouth fields updated, other fields untouched const Image& img, // in: ROI around face (already rotated if necessary) StasmCascadeClassifier cascade) { - const Rect facerect(cvRound(detpar.x - detpar.width/2), - cvRound(detpar.y - detpar.height/2), - cvRound(detpar.width), - cvRound(detpar.height)); + Rect facerect(cvRound(detpar.x - detpar.width/2), + cvRound(detpar.y - detpar.height/2), + cvRound(detpar.width), + cvRound(detpar.height)); // possibly get the eyes detpar.lex = detpar.ley = INVALID; // mark eyes as unavailable detpar.rex = detpar.rey = INVALID; vec_Rect leyes, reyes; - int ileft_best = -1, iright_best = -1; // index into leyes and reyes vecs + int ileft_best = -1, iright_best = -1; // indices into leyes and reyes - DetectAllEyes(leyes, reyes, - img, detpar.eyaw, facerect, cascade); + DetectAllEyes(leyes, reyes, img, detpar.eyaw, facerect, cascade); - SelectEyes(ileft_best, iright_best, // indices of best left and right eye - detpar.eyaw, leyes, reyes, EyeInnerRect(detpar.eyaw, facerect)); + SelectEyes(ileft_best, iright_best, detpar.eyaw, leyes, reyes, EyeInnerRect(detpar.eyaw, facerect)); - if (ileft_best >= 0) // left eye valid? + if (ileft_best >= 0) RectToImgFrame(detpar.lex, detpar.ley, leyes[ileft_best]); - if (iright_best >= 0) // right eye valid? + if (iright_best >= 0) RectToImgFrame(detpar.rex, detpar.rey, reyes[iright_best]); // possibly get the mouth detpar.mouthx = detpar.mouthy = INVALID; // mark mouth as unavailable - int imouth_best = -1; // index into mouths vector - - const Rect mouth_searchrect( - MouthSearchRect(facerect, detpar.eyaw, - ileft_best, iright_best, leyes, reyes)); vec_Rect mouths; DetectAllMouths(mouths, - img, facerect, mouth_searchrect, cascade.mouthCascade); + img, detpar.eyaw, facerect, + ileft_best, iright_best, leyes, reyes, cascade.mouthCascade); if (!mouths.empty()) { - SelectMouth(imouth_best, // get index of best mouth + int imouth_best = -1; + + SelectMouth(imouth_best, ileft_best, iright_best, leyes, reyes, mouths, - facerect, - mouth_searchrect, MouthInnerRect(facerect, detpar.eyaw, ileft_best, iright_best, leyes, reyes)); - if (imouth_best >= 0) // mouth valid? + if (imouth_best >= 0) { TweakMouthPosition(mouths, leyes, reyes, ileft_best, iright_best, diff --git a/3rdparty/stasm/stasm/stasm/include/eyedet.h b/3rdparty/stasm4.0.0/stasm/eyedet.h index 11c4c1a..4e49774 100755 --- a/3rdparty/stasm/stasm/stasm/include/eyedet.h +++ b/3rdparty/stasm4.0.0/stasm/eyedet.h @@ -5,23 +5,10 @@ #ifndef STASM_EYEDET_H #define STASM_EYEDET_H -#include "misc.h" -#include "asm.h" #include "stasmcascadeclassifier.h" namespace stasm { -bool NeedEyes( // true if we need the eye detectors for the given mods - const vec_Mod& mods); // in: the ASM model(s) - -bool NeedMouth( // true if we need the mouth detector for the given mods - const vec_Mod& mods); // in: the ASM model(s) - -void OpenEyeMouthDetectors( // open eye and mouth detectors, if necessary - bool need_eyes, // in: true if we need the eye detectors - bool need_mouth, // in: true if we need the mouth detector - const char* datadir); // in - void OpenEyeMouthDetectors( // possibly open OpenCV eye detectors and mouth detector const vec_Mod& mods, // in: the ASM models (used to see if we need eyes or mouth) const char* datadir); // in diff --git a/3rdparty/stasm4.0.0/stasm/eyedist.cpp b/3rdparty/stasm4.0.0/stasm/eyedist.cpp new file mode 100755 index 0000000..b962654 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/eyedist.cpp @@ -0,0 +1,136 @@ +// eyedist.cpp: calculate eye-mouth and inter-eye dist +// +// The functions in this file know how to deal with missing points. This +// matters during testing when we are comparing results to manually +// landmarked reference shapes. For example, a reference eye pupil may be +// concealed by the side of the nose. When calculating the inter-eye +// distance, if the pupil is missing we can instead use a point near the +// pupil. We must then adjust the point-to-point distance calculated using +// this surrogate point. We use the mean face shape to figure out the +// adjustment. The accuracy of the resulting estimated inter-eye distance will +// depend upon how similar the proportions of the face are to the mean face. +// +// Copyright (C) 2005-2013, Stephen Milborrow + +#include "stasm.h" + +namespace stasm +{ +static int TabPoint( // return first used point in tab, -1 if none + const int* tab, // in + int ntab, // in + const Shape& shape) // in +{ + for (int i = 0; i < ntab; i++) + if (PointUsed(shape, tab[i])) + return tab[i]; // note return + + return -1; +} + +// TODO Use center of mouth rather than bottom of bottom lip +// --- but then would have to to retrain the ASM models. + +static double CanonicalEyeMouthDist( // return 0 if pupils and mouth not avail + const Shape& shape17) // in +{ + if (!PointUsed(shape17, L17_LPupil) || + !PointUsed(shape17, L17_RPupil) || + !PointUsed(shape17, L17_CBotOfBotLip)) + { + return 0; // note return + } + return PointDist( + MeanPoint(shape17, L17_LPupil, L17_RPupil, IX), // eye mid point + MeanPoint(shape17, L17_LPupil, L17_RPupil, IY), + shape17(L17_CBotOfBotLip, IX), // bot of bot lip + shape17(L17_CBotOfBotLip, IY)); +} + +double EyeMouthDist( // eye-mouth distance of a face shape + const Shape& shape) // in +{ + static const int eyes[] = // surrogates for pupil midpoint + { + L17_LPupil, + L17_RPupil, + L17_LEyeOuter, + L17_REyeOuter, + L17_LEyeInner, + L17_REyeInner, + L17_LEyebrowInner, + L17_REyebrowInner, + L17_LEyebrowOuter, + L17_REyebrowOuter + }; + static const int mouths[] = // surrogates for bot of bot lip + { + L17_CBotOfBotLip, + L17_CTopOfTopLip, + L17_LMouthCorner, + L17_RMouthCorner + }; + const Shape shape17(shape.rows == 17? shape: Shape17(shape)); + double eyemouth = CanonicalEyeMouthDist(shape17); + if (eyemouth == 0) // pupils and mouth not available? + { + const int eye = TabPoint(eyes, NELEMS(eyes), shape17); + const int mouth = TabPoint(mouths, NELEMS(mouths), shape17); + if (eye >= 0 && mouth >= 0) // actual or surrogate points available? + { + eyemouth = PointDist(shape17, eye, mouth) * + CanonicalEyeMouthDist(MEANSHAPE17) / + PointDist(MEANSHAPE17, eye, mouth); + } + } + if (eyemouth == 0) + { + // last resort, estimate eyemouth dist from shape extent + eyemouth = MAX(ShapeWidth(shape17), ShapeHeight(shape17)) * + PointDist(MEANSHAPE17, L17_LPupil, L17_CBotOfBotLip) / + MAX(ShapeWidth(MEANSHAPE17), ShapeHeight(MEANSHAPE17)); + } + CV_Assert(eyemouth > 1 && eyemouth < 1e5); // sanity check + return eyemouth; +} + +double InterEyeDist( // inter-pupil distance of a face shape + const Shape& shape) // in +{ + static const int leyes[] = // surrogates for left pupil + { + L17_LPupil, + L17_LEyeOuter, + L17_LEyeInner, + L17_LEyebrowInner, + L17_LEyebrowOuter + }; + static const int reyes[] = // surrogates for right pupil + { + L17_RPupil, + L17_REyeOuter, + L17_REyeInner, + L17_REyebrowInner, + L17_REyebrowOuter + }; + double eyedist = 0; + const Shape shape17(Shape17(shape)); + const int leye = TabPoint(leyes, NELEMS(leyes), shape17); + const int reye = TabPoint(reyes, NELEMS(reyes), shape17); + if (leye >= 0 && reye >= 0) // actual or surrogate points available? + { + eyedist = PointDist(shape17, leye, reye) * + PointDist(MEANSHAPE17, L17_LPupil, L17_RPupil) / + PointDist(MEANSHAPE17, leye, reye); + } + else // last resort, estimate inter-pupil distance from shape extent + { + eyedist = MAX(ShapeWidth(shape17), ShapeHeight(shape17)) * + PointDist(MEANSHAPE17, L17_LPupil, L17_RPupil) / + MAX(ShapeWidth(MEANSHAPE17), ShapeHeight(MEANSHAPE17)); + } + CV_Assert(eyedist > 1 && eyedist < 1e5); // sanity check + return eyedist; +} + +} // namespace stasm diff --git a/3rdparty/stasm/stasm/stasm/include/eyedist.h b/3rdparty/stasm4.0.0/stasm/eyedist.h index 0546563..1b90ff8 100755 --- a/3rdparty/stasm/stasm/stasm/include/eyedist.h +++ b/3rdparty/stasm4.0.0/stasm/eyedist.h @@ -5,8 +5,6 @@ #ifndef STASM_EYEDIST_H #define STASM_EYEDIST_H -#include "misc.h" - namespace stasm { double EyeMouthDist( // eye-mouth distance of a face shape diff --git a/3rdparty/stasm4.0.0/stasm/faceroi.cpp b/3rdparty/stasm4.0.0/stasm/faceroi.cpp new file mode 100755 index 0000000..b7f9120 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/faceroi.cpp @@ -0,0 +1,212 @@ +// faceroi.cpp: face ROI, and translation from image frame to the ROI +// +// Copyright (C) 2005-2013, Stephen Milborrow + +#include "stasm.h" + +namespace stasm +{ +// Rotations less than 5 are treated as zero to minimize image preprocessing. + +static const double ROT_TREAT_AS_ZERO = 5; + +//----------------------------------------------------------------------------- + +// Return a rect which covers the face with enough space around it for an +// ASM search, but also ensuring that the rect is in the image boundaries. + +static Rect RoiRect( + const DetPar& detpar, // in + int nimgcols, // in + int nimgrows, // in + bool flip, // in: mirror the ROI + double botfrac, // in: distance from center to bottom marg + double leftfrac, // in: dist from center to left marg + double topfrac, // in + double rightfrac) // in +{ + int ixmin, ixmax; + if (flip) + { + ixmin = MAX(0, cvRound(detpar.x - rightfrac * detpar.width)); + ixmax = MIN(nimgcols, cvRound(detpar.x + leftfrac * detpar.width)); + } + else + { + ixmin = MAX(0, cvRound(detpar.x - leftfrac * detpar.width)); + ixmax = MIN(nimgcols, cvRound(detpar.x + rightfrac * detpar.width)); + } + const int iymin = MAX(0, cvRound(detpar.y - botfrac * detpar.height)); + const int iymax = MIN(nimgrows, cvRound(detpar.y + topfrac * detpar.height)); + + Rect roi; + + roi.x = ixmin; + roi.y = iymin; + roi.width = ixmax - ixmin; + roi.height = iymax - iymin; + + CV_Assert(roi.width > 0); + CV_Assert(roi.height > 0); + + return roi; +} + +static bool IsRoiEntireImg( + const Rect& roi, // in + int imgcols, // in + int imgrows) // in +{ + return roi.x == 0 && + roi.y == 0 && + roi.width == imgcols && + roi.height == imgrows; +} + +static DetPar ImgDetParToRoiFrame( + const DetPar& detpar, // in + const Rect& rect_roi) // in +{ + DetPar detpar_roi(detpar); + detpar_roi.x -= rect_roi.x; + detpar_roi.y -= rect_roi.y; + Shape eyemouth_shape(5, 2, 0.); + if (Valid(detpar_roi.lex)) + { + eyemouth_shape(0, IX) -= rect_roi.x; + eyemouth_shape(0, IY) -= rect_roi.y; + } + if (Valid(detpar_roi.rex)) + { + eyemouth_shape(1, IX) -= rect_roi.x; + eyemouth_shape(1, IY) -= rect_roi.y; + } + if (Valid(detpar_roi.mouthx)) + { + eyemouth_shape(2, IX) -= rect_roi.x; + eyemouth_shape(2, IY) -= rect_roi.y; + } + if (Valid(detpar.rot) && detpar.rot) + { + // rotate eyes and mouth + const MAT rotmat = getRotationMatrix2D(cv::Point2f(float(detpar_roi.x), + float(detpar_roi.y)), + -detpar.rot, 1.); + AlignShapeInPlace(eyemouth_shape, rotmat); + } + if (Valid(detpar.lex)) + { + detpar_roi.lex = eyemouth_shape(0, IX); + detpar_roi.ley = eyemouth_shape(0, IY); + } + if (Valid(detpar.rex)) + { + detpar_roi.rex = eyemouth_shape(1, IX); + detpar_roi.rey = eyemouth_shape(1, IY); + } + if (Valid(detpar.mouthx)) + { + detpar_roi.mouthx = eyemouth_shape(2, IX); + detpar_roi.mouthy = eyemouth_shape(2, IY); + } + return detpar_roi; +} + +Shape ImgShapeToRoiFrame( // return shape in ROI frame + const Shape& shape, // in: shape in image frame + const DetPar& detpar_roi, // in: detpar wrt the ROI + const DetPar& detpar) // in +{ + Shape outshape(shape.clone()); + for (int i = 0; i < outshape.rows; i++) + if (PointUsed(outshape, i)) + { + outshape(i, IX) -= detpar.x - detpar_roi.x; + outshape(i, IY) -= detpar.y - detpar_roi.y; + } + + if (Valid(detpar.rot) && detpar.rot) + { + const MAT rotmat = getRotationMatrix2D(cv::Point2f(float(detpar_roi.x), + float(detpar_roi.y)), + -detpar.rot, + 1.); + outshape = AlignShape(outshape, rotmat); + } + return outshape; +} + +// In StartShapeAndRoi we selected a ROI and possibly rotated that ROI. +// The search was done on that ROI. Now de-adjust the search results +// to undo the effects of searching on the ROI, not on the actual image. + +Shape RoiShapeToImgFrame( // return shape in image frame + const Shape& shape, // in: shape in roi frame + const Image& face_roi, // in + const DetPar& detpar_roi, // in: detpar wrt the ROI + const DetPar& detpar) // in: detpar wrt the image +{ + Shape outshape(shape.clone()); + if (IsLeftFacing(detpar.eyaw)) + outshape = FlipShape(outshape, face_roi.cols); + if (Valid(detpar.rot) && detpar.rot) + { + const MAT rotmat = getRotationMatrix2D(cv::Point2f(float(detpar_roi.x), + float(detpar_roi.y)), + detpar.rot, 1.); + outshape = AlignShape(outshape, rotmat); + } + for (int i = 0; i < outshape.rows; i++) + if (PointUsed(outshape, i)) + { + outshape(i, IX) += detpar.x - detpar_roi.x; + outshape(i, IY) += detpar.y - detpar_roi.y; + } + return outshape; +} + +void PossiblySetRotToZero( // this is to avoid rotating the image unnecessarily + double& rot) // io +{ + if (rot >= -ROT_TREAT_AS_ZERO && rot <= ROT_TREAT_AS_ZERO) + rot = 0; +} + +void FaceRoiAndDetPar( // get ROI around the face, rotate if necessary + Image& face_roi, // out + DetPar& detpar_roi, // out: detpar wrt the ROI + const Image& img, // in: original image + const DetPar& detpar, // in: wrt img frame, only x,y,w,h,rot used + bool flip, // in: mirror the ROI? + double botfrac, // in: default ROI_FRAC + double leftfrac, // in: dist from center to left margin + double topfrac, // in + double rightfrac) // in +{ + Rect rect_roi = RoiRect(detpar, img.cols, img.rows, flip, + botfrac, leftfrac, topfrac, rightfrac); + + detpar_roi = ImgDetParToRoiFrame(detpar, rect_roi); + + // following "if"s are for efficiency (avoid rotation etc. when possible). + + if (detpar.rot == 0 && IsRoiEntireImg(rect_roi, img.cols, img.rows)) + face_roi = img; + + else if (!Valid(detpar.rot) || detpar.rot == 0) + face_roi = Image(img, rect_roi); + + else // rotate image so face is upright, results go into face_roi + warpAffine(Image(img, rect_roi), face_roi, + getRotationMatrix2D(cv::Point2f(float(detpar_roi.x), + float(detpar_roi.y)), + -detpar.rot, 1.), + cv::Size(face_roi.cols, face_roi.rows), + cv::INTER_AREA, cv::BORDER_REPLICATE); + + // TODO For efficiency could combine this flip with above rot img when possible? + if (flip) + FlipImgInPlace(face_roi); +} + +} // namespace stasm diff --git a/3rdparty/stasm/stasm/stasm/include/faceroi.h b/3rdparty/stasm4.0.0/stasm/faceroi.h index 3b4fb42..d0a3b16 100755 --- a/3rdparty/stasm/stasm/stasm/include/faceroi.h +++ b/3rdparty/stasm4.0.0/stasm/faceroi.h @@ -5,8 +5,6 @@ #ifndef STASM_FACEROI_H #define STASM_FACEROI_H -#include "misc.h" - namespace stasm { // RoiFrac controls the size of the ROI area around the face. So for diff --git a/3rdparty/stasm4.0.0/stasm/hat.cpp b/3rdparty/stasm4.0.0/stasm/hat.cpp new file mode 100755 index 0000000..5cfb3c6 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/hat.cpp @@ -0,0 +1,434 @@ +// hat.cpp: Histogram Array Transform descriptors +// +// Rob Hess' opensift implementation was used a reference: +// http://blogs.oregonstate.edu/hess/code/sift +// +// Copyright (C) 2005-2013, Stephen Milborrow + +#include "stasm.h" + +namespace stasm +{ +static const int GRIDHEIGHT = 4; // 4 x 5 grid of histograms in descriptor +static const int GRIDWIDTH = 5; + +static const int BINS_PER_HIST = 8; // 8 gives a 45 degree range per bin + +static const double WINDOW_SIGMA = .5; // gaussian window as frac of patch width + // .5 implies patch border downweight is .368 + +static const double FINAL_SCALE = 10; // arb but 10 is good for %g printing of descriptors + +// Get gradient magnitude and orientation of pixels in given img. +// We use a [1,-1] convolution mask rather than [1,0,-1] because it gives as good +// Stasm results and doesn't "waste" pixels on the left and top image boundary. +// Before scaling by bins_per_degree, orientations are from 0 to 359.99... +// degrees, with 0 being due east, and anticlockwise increasing. + +static void InitGradMagAndOrientMats( + MAT& magmat, // out: grad mag mat + MAT& orientmat, // out: grad ori mat + const Image& img) // in: ROI scaled to current pyramid level +{ + const int nrows = img.rows, nrows1 = img.rows-1; + const int ncols = img.cols, ncols1 = img.cols-1; + const double bins_per_degree = BINS_PER_HIST / 360.; + + magmat.create(nrows, ncols); + orientmat.create(nrows, ncols); + + for (int y = 0; y < nrows1; y++) + { + const byte* const buf = (byte*)(img.data) + y * ncols; + const byte* const buf_x1 = (byte*)(img.data) + y * ncols + 1; + const byte* const buf_y1 = (byte*)(img.data) + (y+1) * ncols; + + double* const magbuf = Buf(magmat) + y * ncols; + double* const orientbuf = Buf(orientmat) + y * ncols; + + for (int x = 0; x < ncols1; x++) + { + const byte pixel = buf[x]; + const double xdelta = buf_x1[x] - pixel; + const double ydelta = buf_y1[x] - pixel; + + magbuf[x] = sqrt(SQ(xdelta) + SQ(ydelta)); + + double orient = + RadsToDegrees(atan2(ydelta, xdelta)); // -180 <= orient < 180 + if (orient < 0) + orient += 360; // 0 <= orient < 360 + orientbuf[x] = orient * bins_per_degree; // 0 <= orient < BINS_PER_HIST + } + } + // fill bottom and right edges + magmat.row(nrows1) = 0; + magmat.col(ncols1) = 0; + orientmat.row(nrows1) = 0; + orientmat.col(ncols1) = 0; +} + +// Init the indices which map a patch row,col to the corresponding +// histogram grid row,col. The mapping depends only on the image +// patchwidth and the histogram GRIDHEIGHT and WIDTH. +// +// The first pixel in the image patch maps to histogram grid x coord -0.5. +// Therefore after TrilinearAccumulate, the pixel will be equally smeared +// across histogram bin -1 and histogram bin 0. The histogram row indices +// for this pixel are irow=-1 row_frac=0.5. + +static inline void InitIndices( + vec_int& row_indices, // out + vec_double& row_fracs, // out + vec_int& col_indices, // out + vec_double& col_fracs, // out + vec_double& pixelweights, // out + const int patchwidth) // in: in pixels +{ + CV_Assert(patchwidth % 2 == 1); // patchwidth must be odd in this implementation + + const int npix = SQ(patchwidth); // number of pixels in image patch + + row_indices.resize(npix); + row_fracs.resize(npix); + col_indices.resize(npix); + col_fracs.resize(npix); + pixelweights.resize(npix); + + const int halfpatchwidth = (patchwidth-1) / 2; + + const double grid_rows_per_img_row = GRIDHEIGHT / (patchwidth-1.); + const double row_offset = GRIDHEIGHT / 2. - .5; // see header comment + + const double grid_cols_per_img_col = GRIDWIDTH / (patchwidth-1.); + const double col_offset = GRIDWIDTH / 2. - .5; + + // downweight at border of patch is exp(-1 / (2 * WINDOW_SIGMA)) + const double weight = -1 / (WINDOW_SIGMA * GRIDHEIGHT * GRIDWIDTH ); + + int ipix = 0; + + for (double patchrow = -halfpatchwidth; patchrow <= halfpatchwidth; patchrow++) + { + const double signed_row = patchrow * grid_rows_per_img_row; + const double row = signed_row + row_offset; + const int irow = int(floor(row)); + const double row_frac = row - irow; + + CV_DbgAssert(row >= -.5 && row <= GRIDHEIGHT - .5); // same applies to col below + + for (double patchcol = -halfpatchwidth; patchcol <= halfpatchwidth; patchcol++) + { + row_indices[ipix] = irow; + row_fracs[ipix] = row_frac; + + const double signed_col = patchcol * grid_cols_per_img_col; + const double col = signed_col + col_offset; + const int icol = int(floor(col)); + + col_indices[ipix] = icol; + col_fracs[ipix] = col - icol; + + pixelweights[ipix] = // TODO this weights col and row offsets equally + exp(weight * (SQ(signed_row) + SQ(signed_col))); + + ipix++; + } + } +} + +// Init the data that doesn't change unless the image, patch width, or +// GRIDHEIGHT or WIDTH changes (i.e. for Stasm this must be called +// once per pyramid lev). + +void Hat::Init_( + const Image& img, // in: image scaled to current pyramid level + const int patchwidth) // in: patch will be patchwidth x patchwidth pixels +{ + patchwidth_ = patchwidth; + + InitGradMagAndOrientMats(magmat_, orientmat_, img); + + InitIndices(row_indices_, row_fracs_, col_indices_, col_fracs_, pixelweights_, + patchwidth_); +} + +// Calculate the image patch gradient mags and orients. +// Note that the mag for a pixel out of the image boundaries is set +// to 0 and thus contributes nothing later in TrilinearAccumulate. + +static void GetMagsAndOrients_GeneralCase( + vec_double& mags, // out + vec_double& orients, // out + const int ix, // in: x coord of center of patch + const int iy, // in: y coord of center of patch + const int patchwidth, // in + const MAT& magmat, // in + const MAT& orientmat, // in + const vec_double& pixelweights) // in +{ + const int halfpatchwidth = (patchwidth-1) / 2; + int ipix = 0; + for (int x = iy - halfpatchwidth; x <= iy + halfpatchwidth; x++) + { + const double* const magbuf = Buf(magmat) + x * magmat.cols; + const double* const orientbuf = Buf(orientmat) + x * orientmat.cols; + + for (int y = ix - halfpatchwidth; y <= ix + halfpatchwidth; y++) + { + if (x < 0 || x >= magmat.rows || y < 0 || y >= magmat.cols) + { + mags[ipix] = 0; // off image + orients[ipix] = 0; + } + else // in image + { + mags[ipix] = pixelweights[ipix] * magbuf[y]; + orients[ipix] = orientbuf[y]; + } + ipix++; + } + } + CV_DbgAssert(ipix == NSIZE(mags)); +} + +// Calculate the image patch gradient mags and orients for +// an image patch that is entirely in the image boundaries. + +static inline void GetMagsAndOrients_AllInImg( + vec_double& mags, // out + vec_double& orients, // out + const int ix, // in: x coord of center of patch + const int iy, // in: y coord of center of patch + const int patchwidth, // in + const MAT& magmat, // in + const MAT& orientmat, // in + const vec_double& pixelweights) // in +{ + const int halfpatchwidth = (patchwidth-1) / 2; + int ipix = 0; + for (int x = iy - halfpatchwidth; x <= iy + halfpatchwidth; x++) + { + const double* const magbuf = Buf(magmat) + x * magmat.cols; + const double* const orientbuf = Buf(orientmat) + x * orientmat.cols; + + for (int y = ix - halfpatchwidth; y <= ix + halfpatchwidth; y++) + { + mags[ipix] = pixelweights[ipix] * magbuf[y]; + orients[ipix] = orientbuf[y]; + ipix++; + } + } + CV_DbgAssert(ipix == NSIZE(mags)); +} + +void GetMagsAndOrients( // get mags and orients for patch at ix,iy + vec_double& mags, // out + vec_double& orients, // out + const int ix, // in: x coord of center of patch (may be off image) + const int iy, // in: y coord of center of patch (may be off image) + const int patchwidth, // in: in pixels + const MAT& magmat, // in + const MAT& orientmat, // in + const vec_double& pixelweights) // in +{ + CV_Assert(patchwidth % 2 == 1); // patchwidth must be odd in this implementation + const int npix = SQ(patchwidth); // number of pixels in image patch + const int halfpatchwidth = (patchwidth-1) / 2; + + mags.resize(npix); + orients.resize(npix); + + if (ix - halfpatchwidth < 0 || ix + halfpatchwidth >= magmat.cols || + iy - halfpatchwidth < 0 || iy + halfpatchwidth >= magmat.rows) + { + // Part or all of the patch is out the image area. + + GetMagsAndOrients_GeneralCase(mags, orients, + ix, iy, patchwidth, magmat, orientmat, pixelweights); + } + else + { + // Patch is entirely in the image area. The following function returns + // results identical to GetMagsAndOrients_GeneralCase, but is faster + // because it doesn't have to worry about the edges of the image. + + GetMagsAndOrients_AllInImg(mags, orients, + ix, iy, patchwidth, magmat, orientmat, pixelweights); + } +} + +// Apportion the gradient magnitude of a pixel across 8 orientation bins. +// "Accumulate" is in the func name because we "+=" the interpolated values. +// This routine needs to be fast. + +static inline void TrilinearAccumulate( + double& b000, double& b001, // io: histogram bins + double& b010, double& b011, // io + double& b100, double& b101, // io + double& b110, double& b111, // io + const double mag, // in: the mag that gets apportioned + const double rowfrac, // in + const double colfrac, // in + const double orientfrac) // in +{ + const double + a1 = mag * rowfrac, a0 = mag - a1, + + a11 = a1 * colfrac, a10 = a1 - a11, + a01 = a0 * colfrac, a00 = a0 - a01, + + a111 = a11 * orientfrac, + a101 = a10 * orientfrac, + a011 = a01 * orientfrac, + a001 = a00 * orientfrac; + + b000 += a00 - a001; b001 += a001; + b010 += a01 - a011; b011 += a011; + b100 += a10 - a101; b101 += a101; + b110 += a11 - a111; b111 += a111; +} + +// The dimension of histbins is 1+GRIDHEIGHT+1 by 1+GRIDWIDTH+1 by BINS_PER_HIST+1. +// The extra bins are for fast trilinear accumulation (boundary checks unneeded). +// The final bin in each histogram is for degrees greater than 360, needed as +// degrees less than but near 360 get smeared out by trilinear interpolation. + +static inline int HistIndex(int row, int col, int iorient) // index into histbins +{ + return ((row+1) * (1+GRIDWIDTH+1) + (col+1)) * (BINS_PER_HIST+1) + iorient; +} + +void GetHistograms( // get all histogram bins + vec_double& histbins, // out + const int patchwidth, // in: in pixels + const vec_double& mags, // in + const vec_double& orients, // in + const vec_int& row_indices, // in + const vec_double& row_fracs, // in + const vec_int& col_indices, // in + const vec_double& col_fracs) // in +{ + const int npix = SQ(patchwidth); // number of pixels in image patch + + const int nhistbins = + (1 + GRIDHEIGHT + 1) * (1 + GRIDWIDTH + 1) * (BINS_PER_HIST + 1); + + // resize and clear (the fill is needed if the size of histbins + // doesn't change, because in that case resize does nothing) + histbins.resize(nhistbins); + fill(histbins.begin(), histbins.end(), 0.); + + for (int ipix = 0; ipix < npix; ipix++) + { + const double orient = orients[ipix]; + const int iorient = int(floor(orient)); + CV_DbgAssert(iorient >= 0 && iorient < BINS_PER_HIST); + + const int ibin = + HistIndex(row_indices[ipix], col_indices[ipix], iorient); + + double* const p = &histbins[ibin]; + + TrilinearAccumulate( // apportion grad mag across eight orientation bins + p[0], // ThisOrient + p[1], // NextOrient + p[BINS_PER_HIST + 1], // NextCol ThisOrient + p[BINS_PER_HIST + 2], // NextCol NextOrient + p[(GRIDWIDTH+2) * (BINS_PER_HIST+1)], // NextRow ThisOrient + p[(GRIDWIDTH+2) * (BINS_PER_HIST+1) + 1], // NextRow NextOrient + p[(GRIDWIDTH+3) * (BINS_PER_HIST+1)], // NextRow NextCol ThisOrient + p[(GRIDWIDTH+3) * (BINS_PER_HIST+1) + 1], // NextRow NextCol NextOrient + mags[ipix], // the mag that gets apportioned + row_fracs[ipix], // rowfrac + col_fracs[ipix], // colfrac + orient - iorient); // orientfrac + } +} + +static void WrapHistograms( + vec_double& histbins) +{ + for (int row = 0; row < GRIDHEIGHT; row++) + for (int col = 0; col < GRIDWIDTH; col++) + { + const int ibin = HistIndex(row, col, 0); + histbins[ibin] += histbins[ibin + BINS_PER_HIST]; // 360 wraps to 0 + } +} + +static void CopyHistsToDesc( // copy histograms to descriptor, skipping pad bins + VEC& desc, // out + const vec_double& histbins) // in +{ + for (int row = 0; row < GRIDHEIGHT; row++) + for (int col = 0; col < GRIDWIDTH; col++) + memcpy(Buf(desc) + + (row * GRIDWIDTH + col) * BINS_PER_HIST, + &histbins[HistIndex(row, col, 0)], + BINS_PER_HIST * sizeof(histbins[0])); +} + +static void NormalizeDesc( // take sqrt of elems and divide by L2 norm + VEC& desc) // io +{ + double* const data = Buf(desc); + for (int i = 0; i < NSIZE(desc); i++) + data[i] = sqrt(data[i]); // sqrt reduces effect of outliers + const double norm = cv::norm(desc); // L2 norm + if (!IsZero(norm)) + { + const double scale = FINAL_SCALE / norm; + for (int i = 0; i < NSIZE(desc); i++) + data[i] *= scale; + } +} + +// Hat::Init_ must be called before calling this function. +// +// A HAT descriptor is a vector of doubles of length +// GRIDHEIGHT * GRIDWIDTH * BINS_PER_HIST (currently 4 * 5 * 8 = 160). +// +// The descriptor is a vector of doubles (instead of say bytes) primarily +// so the HatFit function we apply later is fast (because byte-to-double +// type conversions are unneeded when applying the formula). +// +// Note also that a trial implementation that used floats instead of +// doubles (and with a float form of HatFit) was slower. + +VEC Hat::Desc_( // return HAT descriptor, Init_ must be called first + const double x, // in: x coord of center of patch (may be off image) + const double y) // in: y coord of center of patch (may be off image) + const +{ + CV_Assert(magmat_.rows); // verify that Hat::Init_ was called + +#if _OPENMP // can't be static because multiple instances + vec_double mags, orients; + vec_double histbins; +#else // static faster since size rarely changes + vec_double mags, orients; // the image patch grad mags and orientations + vec_double histbins; // the histograms +#endif + + GetMagsAndOrients(mags, orients, + cvRound(x), cvRound(y), patchwidth_, + magmat_, orientmat_, pixelweights_); + + GetHistograms(histbins, + patchwidth_, mags, orients, + row_indices_, row_fracs_, col_indices_, col_fracs_); + + WrapHistograms(histbins); // wrap 360 degrees back to 0 + + VEC desc(GRIDHEIGHT * GRIDWIDTH * BINS_PER_HIST, 1); // the HAT descriptor + + CopyHistsToDesc(desc, + histbins); + + NormalizeDesc(desc); + + return desc; +} + +} // namespace stasm diff --git a/3rdparty/stasm/stasm/stasm/include/hat.h b/3rdparty/stasm4.0.0/stasm/hat.h index 0cabb0e..934ea78 100755 --- a/3rdparty/stasm/stasm/stasm/include/hat.h +++ b/3rdparty/stasm4.0.0/stasm/hat.h @@ -5,8 +5,6 @@ #ifndef STASM_HAT_H #define STASM_HAT_H -#include "misc.h" - namespace stasm { class Hat diff --git a/3rdparty/stasm4.0.0/stasm/hatdesc.cpp b/3rdparty/stasm4.0.0/stasm/hatdesc.cpp new file mode 100755 index 0000000..1f8e020 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/hatdesc.cpp @@ -0,0 +1,147 @@ +// hatdesc.cpp: Model for HAT descriptors. +// This does a grid search using the descriptors defined hat.cpp. +// It also caches the descriptors for fast reuse. +// +// Copyright (C) 2005-2013, Stephen Milborrow + +#include "stasm.h" +#include "stasmhash.h" + +#define CACHE 1 // define to 0 if your compiler doesn't support hash_map + // Stasm runs faster if 1 + +namespace stasm +{ +// hat_g is global because we initialize the HAT internal data +// (grads and orients etc.) once for the entire pyramid level. +// Initialized in InitHatLevData. + +//static const Hat &hat_g; + +//----------------------------------------------------------------------------- + +#if CACHE + +// For speed, we cache the HAT descriptors, so we have the descriptor at +// hand if we revisit an xy position in the image which is very common in ASMs. +// (Note: an implementation with cache_g as a vector> was slower.) + +//static hash_map cache_g; // cached descriptors +//static const bool TRACE_CACHE = 0; // for checking cache hit rate +//static int ncalls_g, nhits_g; // only used if TRACE_CACHE + +static unsigned Key(int x, int y) // pack x,y into 32 bits for cache key +{ + return ((y & 0xffff) << 16) | (x & 0xffff); +} + +static double GetHatFit( // args same as non CACHE version, see below + int x, // in + int y, // in + const HatFit hatfit, // in + const Hat &hat, + StasmHash &hash) +{ + const double* descbuf = NULL; // the HAT descriptor + + const unsigned key(Key(x, y)); + + QHash::const_iterator it = hash.find(key); + if (it != hash.end()) { + descbuf = Buf(it.value()); + } else { + const VEC desc(hat.Desc_(x, y)); + hash[key] = desc; // remember descriptor for possible re-use + descbuf = Buf(desc); + } + return hatfit(descbuf); +} + +#else // not CACHE + +// Get the HAT descriptor at the given ipoint and x,y coords, and return +// how well the descriptor matches the model. High fit means good match. + +static double GetHatFit( + int x, // in: image x coord (may be off image) + int y, // in: image y coord (may be off image) + const HatFit hatfit) // in: func to estimate descriptor match +{ + return hatfit(Buf(hat_g.Desc_(x, y))); +} + +#endif // not CACHE + +static int round2(double x) // return closest int to x that is divisible by 2 +{ + return 2 * cvRound(x / 2); +} + +static int PatchWidth( // patchwidth at the given pyramid level + int ilev) // in: pyramid level (0 is full size) +{ + return HAT_PATCH_WIDTH + round2(ilev * HAT_PATCH_WIDTH_ADJ); +} + +Hat InitHatLevData( // init the global HAT data needed for this pyr level + const Image& img, // in + int ilev) // in +{ + Hat hat; + + if (ilev <= HAT_START_LEV) // we use HATs only at upper pyr levs + { + hat.Init_(img, PatchWidth(ilev)); + } + + return hat; +} + +// Note 1: The image is not passed directly to this function. Instead this +// function accesses the image gradient magnitude and orientation stored in +// fields of the global variable hat_g and previously initialized by the +// call to InitHatLevData. +// +// Note 2: If OpenMP is enabled, multiple instances of this function will be +// called concurrently (each call will have a different value of x and y). Thus +// this function and its callees do not modify any data that is not on the stack. + +void HatDescSearch( // search in a grid around the current landmark + double& x, // io: (in: old position of landmark, out: new position) + double& y, // io: + const HatFit hatfit, // in: func to estimate descriptor match + const Hat &hat, + StasmHash &hash) +{ + // If HAT_SEARCH_RESOL is 2, force x,y positions to be divisible + // by 2 to increase cache hit rate. This increases the mean hit rate + // from about 67% to 88% and barely affects landmark accuracy. + int ix = HAT_SEARCH_RESOL == 2? round2(x): cvRound(x); + int iy = HAT_SEARCH_RESOL == 2? round2(y): cvRound(y); + + double fit_best = -FLT_MAX; + + int xoffset_best = 0, yoffset_best = 0; // in pixels + + for (int yoffset = -HAT_MAX_OFFSET; + yoffset <= HAT_MAX_OFFSET; + yoffset += HAT_SEARCH_RESOL) + { + for (int xoffset = -HAT_MAX_OFFSET; + xoffset <= HAT_MAX_OFFSET; + xoffset += HAT_SEARCH_RESOL) + { + const double fit = GetHatFit(ix + xoffset, iy + yoffset, hatfit, hat, hash); + if (fit > fit_best) + { + fit_best = fit; + xoffset_best = xoffset; + yoffset_best = yoffset; + } + } + } + x += xoffset_best; + y += yoffset_best; +} + +} // namespace stasm diff --git a/3rdparty/stasm4.0.0/stasm/hatdesc.h b/3rdparty/stasm4.0.0/stasm/hatdesc.h new file mode 100755 index 0000000..6192f43 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/hatdesc.h @@ -0,0 +1,66 @@ +// hatdesc.h: Model for HAT descriptors +// This does a search using the descriptors from hat.cpp. +// +// Copyright (C) 2005-2013, Stephen Milborrow + +#ifndef STASM_HATPATCH_H +#define STASM_HATPATCH_H + +#include "stasmhash.h" + +namespace stasm +{ +static const int HAT_MAX_OFFSET = 4; // search grid +-4 pixs from current posn + +static const int HAT_SEARCH_RESOL = 2; // search resolution, search every 2nd pixel + +// Following params must match those used for generating the HAT +// descriptors used to generate the HAT models during training. + +static const int HAT_PATCH_WIDTH = 9*2+1; + // HAT patch is 19 x 19 at pyr lev 0 + +static const int HAT_PATCH_WIDTH_ADJ = -6; + // grid gets smaller for smaller pyr levs + +static const int HAT_START_LEV = 2; // HAT descriptors are for pyr levs 0...2 + // so no need for Hat::Init_ at pyr lev 3 + +// define HatFit: a pointer to a func for measuring fit of HAT descriptor +typedef double(*HatFit)(const double* const); + +extern Hat InitHatLevData( // init the global HAT data needed for this pyr level + const Image& img, // in + int ilev); // in: pyramid level, 0 is full size + +extern void HatDescSearch( // search in a grid around the current landmark + double& x, // io: (in: old posn of landmark, out: new posn) + double& y, // io + const HatFit hatfit, // in: func to estimate descriptor match + const Hat &hat, + StasmHash &hash); + +class HatDescMod: public BaseDescMod +{ +public: + virtual void DescSearch_(double& x, double& y, // io + const Image&, const Shape&, // in + int, int, const Hat &hat, StasmHash &hash) const // in + { + HatDescSearch(x, y, hatfit_, hat, hash); + } + + HatDescMod(const HatFit hatfit) // constructor + : hatfit_(hatfit) + { + } + +private: + HatFit const hatfit_; // func to estimate HAT descriptor match + + DISALLOW_COPY_AND_ASSIGN(HatDescMod); + +}; // end class HatDescMod + +} // namespace stasm +#endif // STASM_HATPATCH_H diff --git a/3rdparty/stasm4.0.0/stasm/landmarks.cpp b/3rdparty/stasm4.0.0/stasm/landmarks.cpp new file mode 100755 index 0000000..304aeac --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/landmarks.cpp @@ -0,0 +1,82 @@ +// landmarks.cpp: code for manipulating landmarks +// +// Copyright (C) 2005-2013, Stephen Milborrow + +#include "stasm.h" + +namespace stasm +{ +double MeanPoint( + const Shape& shape, // in + int ipoint1, // in + int ipoint2, // in + int ix) // in: IX or IY +{ + return (shape(ipoint1, ix) + shape(ipoint2, ix)) / 2; +} + +void PrevAndNextLandmarks( + int& prev, // out + int& next, // out + int ipoint, // in + const Shape& shape) // in +{ + const int npoints = shape.rows; + + const LANDMARK_INFO* const info = LANDMARK_INFO_TAB; + + prev = info[ipoint].prev; + if (prev < 0) // not specified in table? + prev = (ipoint + npoints - 1) % npoints; + + next = info[ipoint].next; + if (next < 0) + next = (ipoint + 1) % npoints; + + CV_Assert(prev >= 0); + CV_Assert(next >= 0); + CV_Assert(prev != next); + CV_Assert(PointUsed(shape, prev)); + CV_Assert(PointUsed(shape, next)); +} + +static void FlipPoint( + Shape& shape, // io + const Shape& oldshape, // in + int inew, // in + int iold, // in + int imgwidth) // in +{ + if (!PointUsed(oldshape, iold)) + shape(inew, IX) = shape(inew, IY) = 0; + else + { + shape(inew, IX) = imgwidth - oldshape(iold, IX) - 1; + shape(inew, IY) = oldshape(iold, IY); + if (!PointUsed(shape, inew)) // falsely marked unused after conversion? + shape(inew, IX) = XJITTER; // adjust so not marked as unused + } +} + +// Flip shape horizontally. +// Needed so we can use right facing models for left facing faces. + +Shape FlipShape( + const Shape& shape, // in + int imgwidth) // in +{ + const LANDMARK_INFO* info = LANDMARK_INFO_TAB; + Shape outshape(shape.rows, 2); + for (int i = 0; i < shape.rows; i++) + { + int partner = info[i].partner; + + if (partner == -1) // e.g. tip of nose + partner = i; + + FlipPoint(outshape, shape, partner, i, imgwidth); + } + return outshape; +} + +} // namespace stasm diff --git a/3rdparty/stasm4.0.0/stasm/landmarks.h b/3rdparty/stasm4.0.0/stasm/landmarks.h new file mode 100755 index 0000000..6fb43f2 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/landmarks.h @@ -0,0 +1,119 @@ +// landmarks.h: code for manipulating landmarks +// +// Copyright (C) 2005-2013, Stephen Milborrow + +#ifndef STASM_LANDMARKS_H +#define STASM_LANDMARKS_H + +namespace stasm +{ +struct LANDMARK_INFO // landmark information +{ + int partner; // symmetrical partner point, -1 means no partner + + int prev, next; // previous and next point + // special val -1 means prev=current-1 and next=current+1 + + double weight; // weight of landmark relative to others (for shape mod) +}; + +static const LANDMARK_INFO LANDMARK_INFO_TAB[stasm_NLANDMARKS] = // stasm77 points +{ + // par pre next weight + { 12, 1, 15, 1. }, // 00 L_LTemple + { 11, -1, -1, 1. }, // 01 L_LJaw01 + { 10, -1, -1, 1. }, // 02 L_LJawNoseline + { 9, -1, -1, 1. }, // 03 L_LJawMouthline + { 8, -1, -1, 1. }, // 04 L_LJaw04 + { 7, -1, -1, 1. }, // 05 L_LJaw05 + { -1, -1, -1, 1. }, // 06 L_CTipOfChin + { 5, -1, -1, 1. }, // 07 L_RJaw07 + { 4, -1, -1, 1. }, // 08 L_RJaw08 + { 3, -1, -1, 1. }, // 09 L_RJawMouthline + { 2, -1, -1, 1. }, // 10 L_RJawNoseline + { 1, -1, -1, 1. }, // 11 L_RJaw11 + { 0, 11, 13, 1. }, // 12 L_RTemple + { 15, -1, -1, 0. }, // 13 L_RForehead point is virtually useless + { -1, -1, -1, 0. }, // 14 L_CForehead point is virtually useless + { 13, -1, -1, 0. }, // 15 L_LForehead point is virtually useless + { 23, -1, -1, 0. }, // 16 L_LEyebrowTopInner + { 24, -1, -1, 0. }, // 17 L_LEyebrowTopOuter + { 25, 0, 17, 0. }, // 18 L_LEyebrowOuter + { 26, -1, -1, 0. }, // 19 L_LEyebrowBotOuter + { 27, -1, -1, 0. }, // 20 L_LEyebrowBotInner + { 22, 0, 12, 0. }, // 21 L_LEyebrowInner + { 21, 0, 12, 0. }, // 22 L_REyebrowInner + { 16, -1, -1, 0. }, // 23 L_REyebrowTopInner + { 17, -1, -1, 0. }, // 24 L_REyebrowTopOuter + { 18, 12, 24, 0. }, // 25 L_REyebrowOuter + { 19, -1, -1, 0. }, // 26 L_REyebrowBotOuter + { 20, -1, -1, 0. }, // 27 L_REyebrowBotInner + { 29, 26, 39, 1. }, // 28 L_REyelid + { 28, 20, 38, 1. }, // 29 L_LEyelid + { 40, 32, 36, 1. }, // 30 L_LEyeInner + { 41, -1, -1, 1. }, // 31 L_LEye31 + { 42, -1, -1, 1. }, // 32 L_LEyeTop + { 43, -1, -1, 1. }, // 33 L_LEye33 + { 44, 32, 36, 1. }, // 34 L_LEyeOuter + { 45, -1, -1, 1. }, // 35 L_LEye35 + { 46, -1, -1, 1. }, // 36 L_LEyeBot + { 47, 30, 36, 1. }, // 37 L_LEye37 + { 39, -1, -1, 1. }, // 38 L_LPupil + { 38, -1, -1, 1. }, // 39 L_RPupil + { 30, 42, 46, 1. }, // 40 L_REyeInner + { 31, -1, -1, 1. }, // 41 L_REye41 + { 32, -1, -1, 1. }, // 42 L_REyeTop + { 33, -1, -1, 1. }, // 43 L_REye43 + { 34, 42, 46, 1. }, // 44 L_REyeOuter + { 35, -1, -1, 1. }, // 45 L_REye45 + { 36, -1, -1, 1. }, // 46 L_REyeBot + { 37, 40, 46, 1. }, // 47 L_REye47 + { 50, 0, 12, 1. }, // 48 L_RNoseMid + { -1, -1, -1, 1. }, // 49 L_CNoseMid + { 48, 0, 12, 1. }, // 50 L_LNoseMid + { 53, 0, 12, 1. }, // 51 L_LNostrilTop + { -1, 0, 12, 1. }, // 52 L_CNoseTip + { 51, 0, 12, 1. }, // 53 L_RNostrilTop + { 58, 0, 12, 1. }, // 54 L_RNoseSide + { 57, 60, 62, 1. }, // 55 L_RNostrilBot + { -1, -1, -1, 1. }, // 56 L_CNoseBase + { 55, 30, 62, 1. }, // 57 L_LNostrilBot + { 54, 0, 12, 1. }, // 58 L_LNoseSide + { 65, 61, 74, 1. }, // 59 L_LMouthCorner + { 64, 59, 61, 1. }, // 60 L_LMouth60 + { 63, -1, -1, 1. }, // 61 L_LMouthCupid + { -1, -1, -1, 1. }, // 62 L_CTopOfTopLip + { 61, -1, -1, 1. }, // 63 L_RMouthCupid + { 60, 63, 65, 1. }, // 64 L_RMouth64 + { 59, 61, 74, 1. }, // 65 L_RMouthCorner + { 68, 65, 67, 1. }, // 66 L_RMouth66 + { -1, -1, -1, 1. }, // 67 L_CBotOfTopLip + { 66, 59, 67, 1. }, // 68 L_LMouth68 + { 71, 59, 70, 1. }, // 69 L_LMouth69 + { -1, -1, -1, 1. }, // 70 L_CTopOfBotLip + { 69, 65, 70, 1. }, // 71 L_RMouth71 + { 76, 65, 73, 1. }, // 72 L_RMouth72 + { 75, 72, 74, 1. }, // 73 L_RMouth73 + { -1, -1, -1, 1. }, // 74 L_CBotOfBotLip + { 73, 74, 76, 1. }, // 75 L_LMouth75 + { 72, 59, 75, 1. }, // 76 L_LMouth76 +}; + +double MeanPoint( + const Shape& shape, // in + int ipoint1, // in + int ipoint2, // in + int ix); // in: IX or IY + +void PrevAndNextLandmarks( + int& prev, // out + int& next, // out + int ipoint, // in + const Shape& shape); // in + +Shape FlipShape( // flip shape horizontally + const Shape& shape, // in + int imgwidth); // in + +} // namespace stasm +#endif // STASM_LANDMARKS_H diff --git a/3rdparty/stasm/stasm/stasm/src/misc.cpp b/3rdparty/stasm4.0.0/stasm/misc.cpp index 308700c..dcf30de 100755 --- a/3rdparty/stasm/stasm/stasm/src/misc.cpp +++ b/3rdparty/stasm4.0.0/stasm/misc.cpp @@ -1,15 +1,9 @@ -// misc.cpp: miscellaneous definitions for Stasm +// misc.h: miscellaneous definitions for Stasm // // Copyright (C) 2005-2013, Stephen Milborrow -#include "misc.h" -#include "err.h" -#include "print.h" -#include "asm.h" - -#include - -#include +#include "stasm.h" +#include namespace stasm { @@ -89,7 +83,7 @@ void splitpath( char* base, // out: can be NULL char* ext) // out: can be NULL, includes dot { - //CV_Assert(path && STRNLEN(path, _MAX_PATH) < _MAX_PATH); + CV_Assert(path && STRNLEN(path, _MAX_PATH) < _MAX_PATH); if (drive) { @@ -199,7 +193,7 @@ void makepath( } void LogShape( // print mat to log file, this is mostly for debugging and testing - const MAT& mat, // in + const MAT& mat, // in const char* matname) // in { // print in shapefile format @@ -220,53 +214,6 @@ void LogShape( // print mat to log file, this is mostly for debugging and testin logprintf("}\n"); } -static void GetPrintMatFormat( - char* format, // out: will be something like %3.2f - const MAT& mat) // in -{ - // get max elem and if any elems are negative so we can format nicely - double max = -1; - bool neg = false; - bool frac = false; - for (int row = 0; row < mat.rows; row++) - for (int col = 0; col < mat.cols; col++) - { - const double elem = mat(row, col); - if (ABS(elem) > max) - max = ABS(elem); - if (elem < 0) - neg = true; - if (elem != floor(elem)) - frac = true; - } - - if (max >= 1e5) - frac = false; // no decimal digit if enough sig digits to left of decimal - const int ndigits = NumDigits(max); - sprintf(format, "%%%s%d.%s", - neg? " ": "", ndigits+neg+(frac? 2: 0)+1, frac? "2f": "0f"); -} - -void PrintMat( // utility to print a matrix - const MAT& mat, // in - const char* msg) // in: message -{ - char format[SLEN]; // will be something like %3.2f - GetPrintMatFormat(format, mat); - lprintf("%s %dx%d:\n", msg, mat.rows, mat.cols); - for (int row = 0; row < mat.rows; row++) - { - lprintf("%*d: ", NumDigits(mat.rows), row); - for (int col = 0; col < mat.cols; col++) - { - lprintf(format, mat(row, col)); - if (col < mat.cols-1) - lprintf(" "); - } - lprintf("\n"); - } -} - // This redimensions a matrix and preserves as much of the old data as possible. // If new matrix is bigger than or same size as the old matrix then all the data // will be preserved. Unused entries in the new matrix are cleared i.e. set to 0. @@ -309,18 +256,15 @@ const MAT ArrayAsMat( // create a MAT from a C array of doubles return cv::Mat(nrows, ncols, CV_64FC1, const_cast(data)); } -MAT RoundMat( // return mat with entries rounded to integers - const MAT& mat) // in +void RoundMat( // round mat entries to integers + MAT& mat) // io { - MAT newmat(mat.rows, mat.cols); for (int i = 0; i < mat.rows; i++) + { + double* const rowbuf = mat.ptr(i); for (int j = 0; j < mat.cols; j++) - { - newmat(i, IX) = cvRound(mat(i, IX)); - newmat(i, IY) = cvRound(mat(i, IY)); - } - - return newmat; + rowbuf[j] = cvRound(rowbuf[j]); + } } // Force pinned landmarks in shape to their pinned position. @@ -347,7 +291,7 @@ double ForcePinnedPoints( return dist / npinned; } -void ShapeMinMax( // get min and max ccords in the given shape +void ShapeMinMax( double& xmin, // out double& xmax, // out double& ymin, // out @@ -380,7 +324,6 @@ double ShapeWidth(const Shape& shape) // width of shape in pixels double ShapeHeight(const Shape& shape) // height of shape in pixels { - CV_Assert(shape.rows > 1); double xmin, xmax, ymin, ymax; ShapeMinMax(xmin, xmax, ymin, ymax, shape); return ABS(ymax - ymin); @@ -390,19 +333,15 @@ double ShapeHeight(const Shape& shape) // height of shape in pixels // of a point are zero, Stasm takes that to mean that the point is unused. // So prevent that when we know all points in the shape are actually used. -void JitterPointsAt00InPlace( - Shape& shape) // io -{ - for (int i = 0; i < shape.rows; i++) - if (!PointUsed(shape, i)) - shape(i, IX) = XJITTER; -} - Shape JitterPointsAt00( const Shape& shape) // in { Shape outshape(shape.clone()); - JitterPointsAt00InPlace(outshape); + + for (int i = 0; i < outshape.rows; i++) + if (!PointUsed(outshape, i)) + outshape(i, IX) = XJITTER; + return outshape; } @@ -430,9 +369,8 @@ static void Mat33TimesVec( // Transform shape by multiplying it by a homogeneous alignment_mat. // alignment_mat can be 3x2 or 2x2 (since the bottom row of a homogeneous mat // is constant and is ignored here). -// The term "in place" means that we modify the shape passed to this func. -void TransformShapeInPlace( +void AlignShapeInPlace( Shape& shape, // io const MAT& alignment_mat) // in { @@ -450,7 +388,7 @@ void TransformShapeInPlace( } } -void TransformShapeInPlace( +void AlignShapeInPlace( Shape& shape, // io double x0, double y0, double z0, // in double x1, double y1, double z1) // in @@ -460,41 +398,40 @@ void TransformShapeInPlace( x0, y0, z0, x1, y1, z1 }; - TransformShapeInPlace(shape, MAT(2, 3, transform_data)); + AlignShapeInPlace(shape, MAT(2, 3, transform_data)); } -Shape TransformShape( // return transformed shape +Shape AlignShape( // return transformed shape const Shape& shape, // in - double x0, double y0, double z0, // in - double x1, double y1, double z1) // in + const MAT& alignment_mat) // in { Shape outshape(shape.clone()); - TransformShapeInPlace(outshape, x0, y0, z0, x1, y1, z1); + AlignShapeInPlace(outshape, alignment_mat); return outshape; } -Shape TransformShape( // return transformed shape, affine transform - const Shape& shape, // in - const MAT& alignment_mat) // in +Shape AlignShape( // return transformed shape + const Shape& shape, // in + double x0, double y0, double z0, // in + double x1, double y1, double z1) // in { Shape outshape(shape.clone()); - TransformShapeInPlace(outshape, alignment_mat); + AlignShapeInPlace(outshape, x0, y0, z0, x1, y1, z1); return outshape; } // Solves Ax=b by LU decomposition. Returns col vec x. // The b argument must be a vector (row or column, it doesn't matter). -// If mat is singular this will fail with an error message. -// See also LinSolve() which will solve any linear system. +// If mat is singular this will fail. -static const VEC LinSolveLu( - MAT& mat, // in, but gets destroyed - VEC& b) // in, but gets destroyed +static const VEC Solve(MAT& mat, VEC& b) // note that mat and b get destroyed { CV_Assert(mat.isContinuous() && b.isContinuous()); + if (!cv::LU(Buf(mat), mat.cols * sizeof(mat(0)), mat.rows, Buf(b), sizeof(mat(0)), 1)) - Err("LinSolveLu failed"); + Err("Solve: LU failed"); + return b; } @@ -549,44 +486,14 @@ const MAT AlignmentMat( sx1, sy1 ); - const VEC soln(LinSolveLu(soln_data, vec_data)); + const VEC soln(Solve(soln_data, vec_data)); return (MAT(3, 3) << soln(0), -soln(1), soln(2), // a -b tx soln(1), soln(0), soln(3), // b a ty 0, 0, 1 ); // 0 0 1 } -Shape ShiftShape( // add xshift and yshift to shape coords, skipping unused points - const Shape& shape, // in - int xshift, // in - int yshift) // in -{ - Shape shiftedshape(shape.clone()); - for (int i = 0; i < shape.rows; i++) - if (PointUsed(shape, i)) - { - shiftedshape(i, IX) += xshift; - shiftedshape(i, IY) += yshift; - } - return shiftedshape; -} - -Shape ShiftShape( // like above but shifts are doubles not ints - const Shape& shape, // in - double xshift, // in - double yshift) // in -{ - Shape shiftedshape(shape.clone()); - for (int i = 0; i < shape.rows; i++) - if (PointUsed(shape, i)) - { - shiftedshape(i, IX) += xshift; - shiftedshape(i, IY) += yshift; - } - return shiftedshape; -} - -CvScalar ToCvColor(unsigned color) +static CvScalar ToCvColor(unsigned color) { CvScalar cvcolor; cvcolor.val[0] = (color & 0xff); @@ -638,7 +545,7 @@ void DrawShape( // draw a shape on an image } i++; } - while (i < shape.rows && j < shape.rows); + while (i != shape.rows && j != shape.rows); } void ImgPrintf( // printf on image @@ -690,12 +597,6 @@ void DesaturateImg( // for apps and debugging, unneeded for ASM } } -void DarkenImg( // for apps and debugging, unneeded for ASM - CImage& img) // io: darken this image -{ - img /= 2; -} - void ForceRectIntoImg( // force rectangle into image int& ix, // io int& iy, // io @@ -763,8 +664,11 @@ void OpenDetector( // open face or feature detector from its XML file { char dir[SLEN]; STRCPY(dir, datadir); ConvertBackslashesToForwardAndStripFinalSlash(dir); + char path[SLEN]; sprintf(path, "%s/%s", dir, filename); + logprintf("Open %s\n", path); + if (!cascade.load(path)) Err("Cannot load %s", path); } @@ -785,14 +689,14 @@ static void DiscountSearchRegion( vec_Rect Detect( // detect faces or facial features const Image& img, // in - cv::CascadeClassifier& cascade, // in + cv::CascadeClassifier* cascade, // in const Rect* searchrect, // in: search in this region, can be NULL double scale_factor, // in int min_neighbors, // in int flags, // in int minwidth_pixels) // in: reduces false positives { - CV_Assert(!cascade.empty()); + CV_Assert(!cascade->empty()); Rect searchrect1; searchrect1.width = 0; if (searchrect) @@ -807,15 +711,15 @@ vec_Rect Detect( // detect faces or facial features // TODO If we don't allocate feats now we get a crash on mem release later. - static const int MAX_NFACES_IN_IMG = int(1e4); // arb, but big + const int MAX_NFACES_IN_IMG = int(1e4); // arb, but big vec_Rect feats(MAX_NFACES_IN_IMG); // Note: This call to detectMultiScale causes the Peak Working Set // to jump to 160 MBytes (multiface2.jpg) versus less than 50 MBytes // for the rest of Stasm (Feb 2013). - cascade.detectMultiScale(roi, feats, scale_factor, min_neighbors, flags, - cvSize(minwidth_pixels, minwidth_pixels)); + cascade->detectMultiScale(roi, feats, scale_factor, min_neighbors, flags, + cvSize(minwidth_pixels, minwidth_pixels)); if (!feats.empty() && searchrect1.width) DiscountSearchRegion(feats, searchrect1); @@ -825,7 +729,7 @@ vec_Rect Detect( // detect faces or facial features bool IsLeftFacing(EYAW eyaw) // true if eyaw is for a left facing face { - return int(eyaw) < int(EYAW00); + return int(eyaw) <= int(EYAW_22); } int EyawAsModIndex( // note: returns a negative index for left facing yaws @@ -837,12 +741,12 @@ int EyawAsModIndex( // note: returns a negative index for left facing yaws { switch (eyaw) { - case EYAW00: imod = 0; break; - case EYAW_45: imod = -2; break; - case EYAW_22: imod = -1; break; - case EYAW22: imod = 1; break; - case EYAW45: imod = 2; break; - default: Err("EyawAsModIndex: bad eyaw %d", eyaw); break; + case EYAW00: imod = 0; break; + case EYAW_45: imod = -2; break; + case EYAW_22: imod = -1; break; + case EYAW22: imod = 1; break; + case EYAW45: imod = 2; break; + default: Err("EyawAsModIndex: bad eyaw %d", eyaw); break; } } CV_Assert(ABS(imod) < NSIZE(mods)); @@ -855,8 +759,11 @@ EYAW DegreesAsEyaw( // this determines what model is best for a given yaw { (void) yaw; (void) nmods; + + if (nmods == 1) + return EYAW00; + #if MOD_3 || MOD_A || MOD_A_EMU // experimental versions - CV_Assert(nmods == 3); if (yaw < -EYAW_TO_USE_DET45) return EYAW_45; @@ -870,40 +777,27 @@ EYAW DegreesAsEyaw( // this determines what model is best for a given yaw return EYAW22; return EYAW45; +#else + CV_Assert(0); + return EYAW00; // keep compiler quiet #endif - return EYAW00; } const char* EyawAsString(EYAW eyaw) // utility for debugging/tracing { switch (int(eyaw)) { - case EYAW00: return "YAW00"; - case EYAW_45: return "YAW_45"; - case EYAW_22: return "YAW_22"; - case EYAW22: return "YAW22"; - case EYAW45: return "YAW45"; - case INVALID: return "YAW_Inv"; - default: Err("YawAsString: Invalid eyaw %d", eyaw); break; + case EYAW00: return "YAW00"; + case EYAW_45: return "YAW_45"; + case EYAW_22: return "YAW_22"; + case EYAW22: return "YAW22"; + case EYAW45: return "YAW45"; + case INVALID: return "YAW_Inv"; + default: Err("YawAsString: Invalid eyaw %d", eyaw); break; } return NULL; // prevent compiler warning } -#if TRACE_IMAGES -unsigned EyawAsColor(EYAW eyaw) -{ - unsigned color = C_YELLOW; - switch (eyaw) - { - case EYAW00: color = C_YELLOW; break; - case EYAW_22: color = C_RED; break; // red is left facing - case EYAW22: color = C_GREEN; break; // green is right facing - default: Err("EyawAsColor: Invalid eyaw %d", eyaw); - } - return color; -} -#endif - DetPar FlipDetPar( // mirror image of detpar const DetPar& detpar, // in int imgwidth) // in @@ -939,32 +833,4 @@ DetPar FlipDetPar( // mirror image of detpar return detpar_new; } - -bool InRect( // is the center of rect within the enclosing rect? - const Rect& rect, // in - const Rect& enclosing) // in -{ - int x = rect.x + rect.width / 2; // center of rectangle - int y = rect.y + rect.height / 2; - - return x >= enclosing.x && - x <= enclosing.x + enclosing.width && - y >= enclosing.y && - y <= enclosing.y + enclosing.height; -} - -bool InRect( // is x,y within the enclosing rect? - double x, // in - double y, // in - double left, // in - double top, // in - double right, // in - double bot) // in -{ - return x >= left && - x <= right && - y >= top && - y <= bot; -} - } // namespace stasm diff --git a/3rdparty/stasm/stasm/stasm/include/misc.h b/3rdparty/stasm4.0.0/stasm/misc.h index 9b7fddc..f150683 100755 --- a/3rdparty/stasm/stasm/stasm/include/misc.h +++ b/3rdparty/stasm4.0.0/stasm/misc.h @@ -1,505 +1,441 @@ -// misc.h: miscellaneous definitions for Stasm -// -// Copyright (C) 2005-2013, Stephen Milborrow - -#ifndef STASM_MISC_H -#define STASM_MISC_H - -#include - -namespace stasm -{ -using cv::Rect; -using std::vector; -using std::string; - -typedef vector vec_int; -typedef vector vec_bool; -typedef vector vec_double; -typedef vector vec_Rect; - -typedef unsigned char byte; - -typedef cv::Mat_ MAT; // a matrix with double elements -typedef cv::Mat_ VEC; // by convention indicates one-dim matrix - -typedef cv::Mat_ Shape; // by convention an N x 2 matrix holding a shape - -typedef cv::Mat_ Image; // a gray image (a matrix of bytes) - -typedef cv::Vec3b RGBV; // a vec of three bytes: red(0), green(1), and blue(2) - -typedef cv::Mat_ CImage; // an RGB image (for apps and debugging, unneeded for ASM) - -static const int IX = 0; // X,Y index in shape matrices. For clarity by -static const int IY = 1; // convention we use these rather than 0 and 1. - -static const int SLEN = 260; // generic string length - // big enough for any Windows path (MAX_PATH is 260) - -static const int SBIG = 10000; // long string length, enough for big printfs - -#ifndef _MAX_PATH // definitions copied verbatim from Microsoft stdlib.h -#define _MAX_PATH 260 /* max. length of full pathname */ -#define _MAX_DRIVE 3 /* max. length of drive component */ -#define _MAX_DIR 256 /* max. length of path component */ -#define _MAX_FNAME 256 /* max. length of file name component */ -#define _MAX_EXT 256 /* max. length of extension component */ -#endif - -// colors -static const unsigned C_RED = 0xff0000; -static const unsigned C_GREEN = 0x00ff00; -static const unsigned C_BLUE = 0x0000ff; -static const unsigned C_YELLOW = 0xffff00; - -// Secure form of strcpy and friends (prevent buffer overrun). -// The CV_DbgAssert catches an easy programming error where -// we mistakenly take the size of a pointer. - -#if _MSC_VER // microsoft compiler - #define STRCPY(dest, src) \ - { \ - CV_DbgAssert(sizeof(dest) > 8); \ - strcpy_s(dest, sizeof(dest), src); \ - } - #define STRCAT(dest, src) \ - { \ - CV_DbgAssert(sizeof(dest) > 8); \ - strcat_s(dest, sizeof(dest), src); \ - } - #define VSPRINTF(dest, format, args) \ - { \ - CV_DbgAssert(sizeof(dest) > 8); \ - vsnprintf_s(dest, sizeof(dest), _TRUNCATE, format, args); \ - } -#else - #define STRCPY(dest, src) \ - { \ - CV_DbgAssert(sizeof(dest) > 8); \ - strncpy_(dest, src, sizeof(dest)); \ - } - #define STRCAT(dest, src) \ - { \ - CV_DbgAssert(sizeof(dest) > 8); \ - strncat(dest, sizeof(dest), src); \ - } - #define VSPRINTF(dest, format, args) \ - { \ - CV_DbgAssert(sizeof(dest) > 8); \ - vsnprintf(dest, sizeof(dest), format, args); \ - } -#endif - -// A macro to disallow the copy constructor and operator= functions. -// This is used in the private declarations for a class where those member -// functions have not been explicitly defined. This macro prevents use of -// the implicitly defined functions (the compiler will complain if you try -// to use them). -// This is often just paranoia. The implicit functions may actually be ok -// for the class in question, but shouldn't be used until that is checked. -// For details, See Item 6 Meyers Effective C++ and the Google C++ Style Guide. - -#define DISALLOW_COPY_AND_ASSIGN(ClassName) \ - ClassName(const ClassName&); \ - void operator=(const ClassName&) - -template int NELEMS(const T& x) // number of elems in an array -{ - return int(sizeof(x) / sizeof((x)[0])); -} - -// The NSIZE and STRNLEN utility functions prevent the following -// warnings from certain compilers: -// o signed/unsigned mismatch -// o conversion from 'size_t' to 'int', possible loss of data -// Alternatives would be to use typecasts directly in the code -// or pedantically use size_t instead of int. - -static inline int NSIZE(const MAT& m) // nrows * ncols -{ - return int((m).total()); -} - -template int NSIZE(const T& x) // size of any STL container -{ - return int(x.size()); -} - -static inline int STRNLEN(const char* s, int n) -{ - return int(strnlen(s, n)); -} - -template T SQ(const T x) // define SQ(x) -{ - return x * x; -} - -template T ABS(const T x) // define ABS(x) -{ - // portable across compilers unlike "abs" - return x < 0? -x: x; -} - -template T Clamp(const T x, const T min, const T max) -{ - return MIN(MAX(x, min), max); // force x to a value between min and max -} - -// Equal() returns true if x == y within reasonable tolerance. -// The default tolerance 1e-7 is arbitrary but approximately equals FLT_EPSILON. -// (If one or both of the numbers are NANs then the test fails, even if -// they are equal NANs. Which is not necessarily desireable behaviour.) - -static inline bool Equal(const double x, const double y, const double max = 1e-7) -{ - return ABS(x-y) < max; -} - -static inline bool IsZero(const double x, const double max = 1e-7) -{ - return Equal(x, 0, max); -} - -static inline double RadsToDegrees(const double rads) -{ - return 180 * rads / 3.14159265358979323846264338328; -} - -static const int INVALID = 99999; // used to specify unavail eye locations, etc - -template bool Valid(const T x) -{ - return x != INVALID && x != -INVALID; -} - -// For reference, the fields of an OpenCV Mat are as follows. -// See \OpenCV\build\include\opencv2\core\core.hpp for details. -// -// int flags; // magic signature, continuity flag, depth, number of chans -// int dims; // matrix dimensionality, >= 2 -// int rows, cols; // number of rows and columns or (-1, -1) -// uchar* data; // the data -// int* refcount; // pointer to ref counter, NULL if user-allocated -// uchar* datastart; // fields used in locateROI and adjustROI -// uchar* dataend; -// uchar* datalimit; -// MatAllocator* allocator; // custom allocator -// MSize size; -// MStep step; - -static inline double* Buf(const MAT& mat) // access MAT data buffer -{ - return (double*)(mat.data); -} - -static inline VEC AsColVec(const MAT& mat) // view entire matrix as a col vector -{ - CV_Assert(mat.isContinuous()); - return MAT(mat.rows * mat.cols, 1, Buf(mat)); -} - -static inline VEC AsRowVec(const MAT& mat) // view entire matrix as a row vector -{ - CV_Assert(mat.isContinuous()); - return MAT(1, mat.rows * mat.cols, Buf(mat)); -} - -// Note on unused points: -// -// Unused points (a.k.a. missing points) points are indicated -// by setting both x and y equal to zero. -// Thus if there is a valid point that happens actually to -// be at 0,0 (rare) we must offset x slightly to ensure that the -// point is seen by Stasm as used. Hence XJITTER. -// -// XJITTER is one tenth of a pixel, which is big enough to be -// visible when saved in a shapefile with one decimal digit. -// -// Unused points are mostly useful during training (it is not unusual for a -// landmark to be obscured in a training face). They are also used during -// a search with pinned points (non-pinned points are marked as unused in -// the shape which specifies the pinned points). - -static const double XJITTER = .1; - -static inline bool PointUsed(const double x, const double y) -{ - return !IsZero(x, XJITTER) || !IsZero(y, XJITTER); -} - -static inline bool PointUsed(const Shape& shape, int ipoint) -{ - return PointUsed(shape(ipoint, IX), shape(ipoint, IY)); -} - -static inline double PointDist( - double x1, // in - double y1, // in - double x2, // in - double y2) // in -{ - CV_Assert(PointUsed(x1, y1)); - CV_Assert(PointUsed(x2, y2)); - - return sqrt(SQ(x1 - x2) + SQ(y1 - y2)); -} - -static inline double PointDist( - const Shape& shape1, // in: the first shape - const Shape& shape2, // in: the second shape - int ipoint) // in: the point -{ - return PointDist(shape1(ipoint, IX), shape1(ipoint, IY), - shape2(ipoint, IX), shape2(ipoint, IY)); -} - -static inline double PointDist( - const Shape& shape, // in - int ipoint1, // in: the first point - int ipoint2) // in: the second point -{ - return PointDist(shape(ipoint1, IX), shape(ipoint1, IY), - shape(ipoint2, IX), shape(ipoint2, IY)); -} - -static inline double SumElems( - const MAT &mat) -{ - return double(cv::sum(mat)[0]); -} - -// Generate the width used (in for example %2.2d) for printfs of landmark numbers -// -// For npoints 0..9 return 1 -// npoints 10..99 return 2 -// npoints 100.999 return 3 -// etc. - -static inline int NumDigits( - const double npoints) -{ - return MAX(1, int(floor(log10(npoints))+1)); -} - -// note: in frontal-model-only Stasm, the only valid value for EYAW is EYAW00 - -enum EYAW -{ - EYAW_45 = -3, // yaw -45 degrees (left facing strong three-quarter pose) - EYAW_22 = -2, // yaw -22 degrees (left facing mild three-quarter pose) - EYAW00 = 1, // yaw 0 degrees (frontal pose) - EYAW22 = 2, // yaw 22 degrees (right facing mild three-quarter pose) - EYAW45 = 3 // yaw 45 degrees (right facing strong three-quarter pose) -}; - -enum ESTART // do we use the detected eyes or mouth to help position the startshape? - // note: gaps in enum numbering are for compat with other Stasm versions -{ - ESTART_RECT_ONLY = 1, // use just the face det rect to align the start shape - ESTART_EYES = 2, // use eyes if available (as well as face rect) - ESTART_EYE_AND_MOUTH = 4 // uses eye(s) and mouth if both available -}; - -#if MOD_3 || MOD_A || MOD_A_EMU // experimental versions -static const double EYAW_TO_USE_DET22 = 14; // what estimated yaw requires the yaw22 mod -static const double EYAW_TO_USE_DET45 = 35; // ditto for yaw45 model -#endif - -struct DetPar // face and feature detector parameters -{ - double x, y; // center of detector shape - double width, height; // width and height of detector shape - double lex, ley; // center of left eye (left and right are wrt the viewer) - double rex, rey; // center of right eye - double mouthx, mouthy; // center of mouth - double rot; // in-plane rotation - double yaw; // yaw - EYAW eyaw; // yaw as an enum - - DetPar() // constructor sets all fields to INVALID - : x(INVALID), - y(INVALID), - width(INVALID), - height(INVALID), - lex(INVALID), - ley(INVALID), - rex(INVALID), - rey(INVALID), - mouthx(INVALID), - mouthy(INVALID), - rot(INVALID), - yaw(INVALID), - eyaw(EYAW(INVALID)) - { - }; - -}; - -//----------------------------------------------------------------------------- - -const char* ssprintf(const char* format, ...); -void strncpy_(char* dest, const char* src, int n); -void ToLowerCase(char* s); -void ConvertBackslashesToForwardAndStripFinalSlash(char* s); -const char* Base(const char* path); -const char* BaseExt(const char* path); - -void splitpath( - const char* path, - char* drive, char* dir, char* base, char* ext); - -void makepath( - char* path, - const char* drive, const char* dir, const char* base, const char* ext); - -void LogShape(const MAT& mat, const char* matname); - -void PrintMat(const MAT& mat, const char* msg); // utility to print a matrix - -#define PRINTMAT(mat) PrintMat(mat, #mat) // utility to print an matrix and its name - -MAT DimKeep(const MAT& mat, int nrows, int ncols); - -const MAT ArrayAsMat(int ncols, int nrows, const double* data); - -MAT RoundMat( // return mat with entries rounded to integers - const MAT& mat); // in - -void JitterPointsAt00InPlace(Shape& shape); - -Shape JitterPointsAt00(const Shape& shape); - -double ForcePinnedPoints( // force pinned landmarks in shape to their pinned posn - Shape& shape, // io - const Shape pinnedshape); // in - -void ShapeMinMax( // get min and max ccords in the given shape - double& xmin, // out - double& xmax, // out - double& ymin, // out - double& ymax, // out - const Shape& shape); // in - -double ShapeWidth(const Shape& shape); // width of shape in pixels - -double ShapeHeight(const Shape& shape); // height of shape in pixels - -void TransformShapeInPlace( // affine transform of shape - Shape& shape, // io - const MAT& alignment_mat); // in - -void TransformShapeInPlace( // affine transform of shape - Shape& shape, // io - double x0, double y0, double z0, // in - double x1, double y1, double z1); // in - -Shape TransformShape( // return transformed shape, affine transform - const Shape& shape, // in - const MAT& alignment_mat); // in - -Shape TransformShape( // return transformed shape, affine transform - const Shape& shape, // in - double x0, double y0, double z0, // in - double x1, double y1, double z1); // in - -const MAT AlignmentMat( // return similarity transf to align shape to anchorshape - const Shape& shape, // in - const Shape& anchorshape, // in - const double* weights=NULL); // in: if NULL (default) all points equal weight - -Shape ShiftShape( // add xshift and yshift to shape coords, skipping unused points - const Shape& shape, // in - int xshift, // in - int yshift); // in - -Shape ShiftShape( // like above but shifts are doubles not ints - const Shape& shape, // in - double xshift, // in - double yshift); // in - -CvScalar ToCvColor(unsigned color); - -void DrawShape( // draw a shape on an image - CImage& img, // io - const Shape& shape, // in - unsigned color=0xff0000, // in: rrggbb e.g. 0xff0000 is red - bool dots=false, // in: true for dots only - int linewidth=0); // in: default 0 means automatic - -void ImgPrintf( // printf on image - CImage& img, // io - double ix, // in - double iy, // in - unsigned color, // in: rrggbb e.g. 0xff0000 is red - double size, // in: relative font size, 1 is standard size - const char* format, // in - ...); // in - -void DesaturateImg( - CImage& img); // io: convert to gray (but still an RGB image) - -void DarkenImg( - CImage& img); // io: darken this image - -void ForceRectIntoImg( // force rectangle into image - int& ix, // io - int& iy, // io - int& ncols, // io - int& nrows, // io - const Image& img); // in - -void ForceRectIntoImg( // force rectangle into image - Rect& rect, // io - const Image& img); // in - -Image FlipImg(const Image& img); // in: flip image horizontally (mirror image) - -void FlipImgInPlace(Image& img); // io: flip image horizontally (mirror image) - -void OpenDetector( // open face or feature detector from its XML file - cv::CascadeClassifier& cascade, // out - const char* filename, // in: basename.ext of cascade - const char* datadir); // in - -vec_Rect Detect( // detect faces or facial features - const Image& img, // in - cv::CascadeClassifier& cascade, // in - const Rect* searchrect, // in: search in this region, can be NULL - double scale_factor, // in - int min_neighbors, // in - int flags, // in - int minwidth_pixels); // in: reduces false positives - -bool IsLeftFacing(EYAW eyaw); // true if eyaw is for a left facing face - -// TODO Following commented out to avoid circular dependency. -// int EyawAsModIndex(EYAW eyaw, const vec_Mod& mods); - -EYAW DegreesAsEyaw( // this determines what model is best for a given yaw - double yaw, // in: yaw in degrees, negative if left facing - int nmods); // in - -const char* EyawAsString(EYAW eyaw); - -unsigned EyawAsColor(EYAW eyaw); - -DetPar FlipDetPar( // mirror image of detpar - const DetPar& detpar, // in - int imgwidth); // in - -bool InRect( // is the center of rect within the enclosing rect? - const Rect& rect, // in - const Rect& enclosing); // in - -bool InRect( // is x,y within the enclosing rect? - double x, // in - double y, // in - double left, // in - double top, // in - double right, // in - double bot); // in - -} // namespace stasm -#endif // STASM_MISC_H +// misc.h: miscellaneous definitions for Stasm +// +// Copyright (C) 2005-2013, Stephen Milborrow + +#ifndef STASM_MISC_H +#define STASM_MISC_H + +namespace stasm +{ +using cv::Rect; +using std::vector; +using std::string; + +typedef vector vec_int; +typedef vector vec_double; +typedef vector vec_Rect; + +typedef unsigned char byte; + +typedef cv::Mat_ MAT; // a matrix with double elements +typedef cv::Mat_ VEC; // by convention indicates one-dim matrix + +typedef cv::Mat_ Shape; // by convention an N x 2 matrix holding a shape + +typedef cv::Mat_ Image; // a gray image (a matrix of bytes) + +typedef cv::Vec3b RGBV; // a vec of three bytes: red(0), green, and blue(2) + +typedef cv::Mat_ CImage; // an RGB image (for apps and debugging, unneeded for ASM) + +static const int IX = 0; // X,Y index in shape matrices. For clarity by +static const int IY = 1; // convention we use these rather than 0 and 1. + +static const int SLEN = 260; // generic string length + // big enough for any Windows path (MAX_PATH is 260) + +static const int SBIG = 10000; // long string length, enough for big printfs + +#ifndef _MAX_PATH // definitions copied verbatim from Microsoft stdlib.h +#define _MAX_PATH 260 /* max. length of full pathname */ +#define _MAX_DRIVE 3 /* max. length of drive component */ +#define _MAX_DIR 256 /* max. length of path component */ +#define _MAX_FNAME 256 /* max. length of file name component */ +#define _MAX_EXT 256 /* max. length of extension component */ +#endif + +// Secure form of strcpy and friends (prevent buffer overrun). +// The CV_DbgAssert catches an easy programming error where +// we mistakenly take the size of a pointer. + +#if _MSC_VER // microsoft compiler + #define STRCPY(dest, src) \ + { \ + CV_DbgAssert(sizeof(dest) > 8); \ + strcpy_s(dest, sizeof(dest), src); \ + } + #define STRCAT(dest, src) \ + { \ + CV_DbgAssert(sizeof(dest) > 8); \ + strcat_s(dest, sizeof(dest), src); \ + } + #define VSPRINTF(dest, format, args) \ + { \ + CV_DbgAssert(sizeof(dest) > 8); \ + vsnprintf_s(dest, sizeof(dest), _TRUNCATE, format, args); \ + } +#else + #define STRCPY(dest, src) \ + { \ + CV_DbgAssert(sizeof(dest) > 8); \ + strncpy_(dest, src, sizeof(dest)); \ + } + #define STRCAT(dest, src) \ + { \ + CV_DbgAssert(sizeof(dest) > 8); \ + strncat(dest, sizeof(dest), src); \ + } + #define VSPRINTF(dest, format, args) \ + { \ + CV_DbgAssert(sizeof(dest) > 8); \ + vsnprintf(dest, sizeof(dest), format, args); \ + } +#endif + +// A macro to disallow the copy constructor and operator= functions. +// This is used in the private declarations for a class where those member +// functions have not been explicitly defined. This macro prevents use of +// the implicitly defined functions (the compiler will complain if you try +// to use them). +// This is often just paranoia. The implicit functions may actually be ok +// for the class in question, but shouldn't be used until that is checked. +// For details, See Item 6 Meyers Effective C++ and the Google C++ Style Guide. + +#define DISALLOW_COPY_AND_ASSIGN(ClassName) \ + ClassName(const ClassName&); \ + void operator=(const ClassName&) + +template int NELEMS(const T& x) // number of elems in an array +{ + return int(sizeof(x) / sizeof((x)[0])); +} + +// The NSIZE and STRNLEN utility functions prevent the following +// warnings from certain compilers: +// o signed/unsigned mismatch +// o conversion from 'size_t' to 'int', possible loss of data +// Alternatives would be to use typecasts directly in the code +// or pedantically use size_t instead of int. + +static inline int NSIZE(const MAT& m) // nrows * ncols +{ + return int((m).total()); +} + +template int NSIZE(const T& x) // size of any STL container +{ + return int(x.size()); +} + +static inline int STRNLEN(const char* s, int n) +{ + return int(strnlen(s, n)); +} + +template T SQ(const T x) // define SQ(x) +{ + return x * x; +} + +template T ABS(const T x) // define ABS(x) +{ + // portable across compilers unlike "abs" + return x < 0? -x: x; +} + +template T Clamp(const T x, const T min, const T max) +{ + return MIN(MAX(x, min), max); +} + +// Equal() returns true if x == y within reasonable tolerance. +// The 1e-7 is arbitrary but approximately equals FLT_EPSILON. +// (If one or both of the numbers are NANs then the test fails, even if +// they are equal NANs. Which is not necessarily desireable behaviour.) + +static inline bool Equal(const double x, const double y, const double max = 1e-7) +{ + return ABS(x-y) < max; +} + +static inline bool IsZero(const double x, const double max = 1e-7) +{ + return Equal(x, 0, max); +} + +static inline double RadsToDegrees(const double rads) +{ + return 180 * rads / 3.14159265358979323846264338328; +} + +static const int INVALID = 99999; // used to specify unavail eye locations, etc + +template bool Valid(const T x) +{ + return x != INVALID && x != -INVALID; +} + +// For reference, the fields of an OpenCV Mat are as follows. +// See \OpenCV\build\include\opencv2\core\core.hpp for details. +// +// int flags; // magic signature, continuity flag, depth, number of chans +// int dims; // matrix dimensionality, >= 2 +// int rows, cols; // number of rows and columns or (-1, -1) +// uchar* data; // the data +// int* refcount; // pointer to ref counter, NULL if user-allocated +// uchar* datastart; // fields used in locateROI and adjustROI +// uchar* dataend; +// uchar* datalimit; +// MatAllocator* allocator; // custom allocator +// MSize size; +// MStep step; + +static inline double* Buf(const MAT& mat) // access MAT data buffer +{ + return (double*)(mat.data); +} + +static inline VEC AsColVec(const MAT& mat) // view entire matrix as a col vector +{ + CV_Assert(mat.isContinuous()); + return MAT(mat.rows * mat.cols, 1, Buf(mat)); +} + +static inline VEC AsRowVec(const MAT& mat) // view entire matrix as a row vector +{ + CV_Assert(mat.isContinuous()); + return MAT(1, mat.rows * mat.cols, Buf(mat)); +} + +// Note on unused points: +// +// Unused points (a.k.a. missing points) points are indicated +// by setting both x and y equal to zero. +// Thus if there is a valid point that happens actually to +// be at 0,0 (rare) we must offset x slightly to ensure that the +// point is seen by Stasm as used. Hence XJITTER. +// +// XJITTER is one tenth of a pixel, which is big enough to be +// visible when saved in a shapefile with one decimal digit. +// +// Unused points are mostly useful during training (it is not unusual for a +// landmark to be obscured in a training face). They are also used during +// a search with pinned points (non-pinned points are marked as unused in +// the shape which specifies the pinned points). + +static const double XJITTER = .1; + +static inline bool PointUsed(const double x, const double y) +{ + return !IsZero(x, XJITTER) || !IsZero(y, XJITTER); +} + +static inline bool PointUsed(const Shape& shape, int ipoint) +{ + return PointUsed(shape(ipoint, IX), shape(ipoint, IY)); +} + +static inline double PointDist( + double x1, // in + double y1, // in + double x2, // in + double y2) // in +{ + CV_Assert(PointUsed(x1, y1)); + CV_Assert(PointUsed(x2, y2)); + + return sqrt(SQ(x1 - x2) + SQ(y1 - y2)); +} + +static inline double PointDist( + const Shape& shape1, // in: the first shape + const Shape& shape2, // in: the second shape + int ipoint) // in: the point +{ + return PointDist(shape1(ipoint, IX), shape1(ipoint, IY), + shape2(ipoint, IX), shape2(ipoint, IY)); +} + +static inline double PointDist( + const Shape& shape, // in + int ipoint1, // in: the first point + int ipoint2) // in: the second point +{ + return PointDist(shape(ipoint1, IX), shape(ipoint1, IY), + shape(ipoint2, IX), shape(ipoint2, IY)); +} + +// note: in frontal-model-only Stasm, the only valid value for EYAW is EYAW00 + +enum EYAW +{ + EYAW_45 = -3, // yaw -45 degrees (left facing strong three-quarter pose) + EYAW_22 = -2, // yaw -22 degrees (left facing mild three-quarter pose) + EYAW00 = 1, // yaw 0 degrees (frontal pose) + EYAW22 = 2, // yaw 22 degrees (right facing mild three-quarter pose) + EYAW45 = 3 // yaw 45 degrees (right facing strong three-quarter pose) +}; + +enum ESTART // do we use the detected eyes or mouth to help position the startshape? + // note: gaps in enum numbering are for compat with other Stasm versions +{ + ESTART_RECT_ONLY = 1, // use just the face det rect to align the start shape + ESTART_EYES = 2, // use eyes if available (as well as face rect) + ESTART_EYE_AND_MOUTH = 4 // uses eye(s) and mouth if both available +}; + +#if MOD_3 || MOD_A || MOD_A_EMU // experimental versions +static double EYAW_TO_USE_DET22 = 14; // what estimated yaw requires the yaw22 mod +static double EYAW_TO_USE_DET45 = 35; // ditto for yaw45 model +#endif + +struct DetPar // the structure describing a face detection +{ + double x, y; // center of detector shape + double width, height; // width and height of detector shape + double lex, ley; // center of left eye, left and right are wrt the viewer + double rex, rey; // ditto for right eye + double mouthx, mouthy; // center of mouth + double rot; // in-plane rotation + double yaw; // yaw + EYAW eyaw; // yaw as an enum + + DetPar() // constructor sets all fields to INVALID + : x(INVALID), + y(INVALID), + width(INVALID), + height(INVALID), + lex(INVALID), + ley(INVALID), + rex(INVALID), + rey(INVALID), + mouthx(INVALID), + mouthy(INVALID), + rot(INVALID), + yaw(INVALID), + eyaw(EYAW(INVALID)) + { + }; + +}; + +//----------------------------------------------------------------------------- + +const char* ssprintf(const char* format, ...); +void strncpy_(char* dest, const char* src, int n); +void ToLowerCase(char* s); +void ConvertBackslashesToForwardAndStripFinalSlash(char* s); +const char* Base(const char* path); +const char* BaseExt(const char* path); + +void splitpath( + const char* path, + char* drive, char* dir, char* base, char* ext); + +void makepath( + char* path, + const char* drive, const char* dir, const char* base, const char* ext); + +void LogShape(const MAT& mat, const char* matname); + +MAT DimKeep(const MAT& mat, int nrows, int ncols); + +const MAT ArrayAsMat(int ncols, int nrows, const double* data); + +void RoundMat(MAT& mat); // round mat entries to integers + +Shape JitterPointsAt00(const Shape& shape); + +double ForcePinnedPoints( // force pinned landmarks in shape to their pinned posn + Shape& shape, // io + const Shape pinnedshape); // in + +void ShapeMinMax( + double& xmin, // out + double& xmax, // out + double& ymin, // out + double& ymax, // out + const Shape& shape); // in + +double ShapeWidth(const Shape& shape); // width of shape in pixels + +double ShapeHeight(const Shape& shape); // height of shape in pixels + +void AlignShapeInPlace( // affine transform of shape + Shape& shape, // io + const MAT& alignment_mat); // in + +void AlignShapeInPlace( // affine transform of shape + Shape& shape, // io + double x0, double y0, double z0, // in + double x1, double y1, double z1); // in + +Shape AlignShape( // return transformed shape, affine transform + const Shape& shape, // in + const MAT& alignment_mat); // in + +Shape AlignShape( // return transformed shape, affine transform + const Shape& shape, // in + double x0, double y0, double z0, // in + double x1, double y1, double z1); // in + +const MAT AlignmentMat( // return similarity transf to align shape to anchorshape + const Shape& shape, // in + const Shape& anchorshape, // in + const double* weights=NULL); // in: if NULL (default) all points equal weight + +void DrawShape( // draw a shape on an image + CImage& img, // io + const Shape& shape, // in + unsigned color=0xff0000, // in: rrggbb e.g. 0xff0000 is red + bool dots=false, // in: true for dots only + int linewidth=0); // in: default 0 means automatic + +void ImgPrintf( // printf on image + CImage& img, // io + double ix, // in + double iy, // in + unsigned color, // in: rrggbb e.g. 0xff0000 is red + double size, // in: relative font size, 1 is standard size + const char* format, // in + ...); // in + +void DesaturateImg( + CImage& img); // io: convert to gray (but still an RGB image) + +void ForceRectIntoImg( // force rectangle into image + int& ix, // io + int& iy, // io + int& ncols, // io + int& nrows, // io + const Image& img); // in + +void ForceRectIntoImg( // force rectangle into image + Rect& rect, // io + const Image& img); // in + +Image FlipImg(const Image& img); // in: flip image horizontally (mirror image) + +void FlipImgInPlace(Image& img); // io: flip image horizontally (mirror image) + +void OpenDetector( // open face or feature detector from its XML file + cv::CascadeClassifier& cascade, // out + const char* filename, // in: basename.ext of cascade + const char* datadir); // in + +vec_Rect Detect( // detect faces or facial features + const Image& img, // in + cv::CascadeClassifier* cascade, // in + const Rect* searchrect, // in: search in this region, can be NULL + double scale_factor, // in + int min_neighbors, // in + int flags, // in + int minwidth_pixels); // in: reduces false positives + +// TODO Following commented out to avoid circular dependency. +// int EyawAsModIndex(EYAW eyaw, const vec_Mod& mods); + +bool IsLeftFacing(EYAW eyaw); // true if eyaw is for a left facing face + +EYAW DegreesAsEyaw( // this determines what model is best for a given yaw + double yaw, // in: yaw in degrees, negative if left facing + int nmods); // in + +const char* EyawAsString(EYAW eyaw); + +DetPar FlipDetPar( // mirror image of detpar + const DetPar& detpar, // in + int imgwidth); // in + +} // namespace stasm +#endif // STASM_MISC_H diff --git a/3rdparty/stasm4.0.0/stasm/pinstart.cpp b/3rdparty/stasm4.0.0/stasm/pinstart.cpp new file mode 100755 index 0000000..e47be40 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/pinstart.cpp @@ -0,0 +1,302 @@ +// pinstart.cpp: utilities for creating a start shape from manually pinned points +// +// Copyright (C) 2005-2013, Stephen Milborrow + +#include "stasm.h" + +namespace stasm +{ +// The following model was machine generated by running +// 5pointpose.R on the training shapes and their reflections. + +static double EstYawFrom5PointShape(const double* x) // x has 10 elements +{ + return 34.342 + - 7.0267 * MAX(0, x[3] - -0.34708) + + 10.739 * MAX(0, -0.34708 - x[3]) + + 116.29 * MAX(0, x[4] - 0.21454) + - 159.56 * MAX(0, 0.21454 - x[4]) + + 12.513 * MAX(0, x[7] - 0.3384) + + 7.2764 * MAX(0, 0.3384 - x[7]) + + 260.14 * MAX(0, x[3] - -0.34708) * MAX(0, x[5] - -0.010838) + - 160.64 * MAX(0, x[3] - -0.34708) * MAX(0, -0.010838 - x[5]) + - 284.88 * MAX(0, -0.34708 - x[3]) * MAX(0, x[5] - -0.055581) + + 654.54 * MAX(0, -0.34708 - x[3]) * MAX(0, -0.055581 - x[5]) + ; +} + +static void RotShapeInPlace( + Shape& shape, // io + double rot, // in: in-plane rotation angle in degrees, pos is anticlock + double x, // in: rotation origin + double y) // in +{ + CV_Assert(rot >= -360 && rot <= 360); // sanity check, 360 is arb + + const MAT rotmat = + getRotationMatrix2D(cv::Point2f(float(x), float(y)), rot, 1.); + + AlignShapeInPlace(shape, rotmat); +} + +static double SumElems( // return the sum of the elemens in mat + const MAT& mat) // in +{ + return cv::sum(mat)[0]; +} + +// If shape does not have 5 points, return rot and yaw of 0. +// Else assume that the following five points are present, in this order: +// 0 LEyeOuter +// 1 REyeOuter +// 2 CNoseTip +// 3 LMouthCorner +// 4 RMouthCorner + +static void EstRotAndYawFrom5PointShape( + double& rot, // out + double& yaw, // out + const Shape shape) // in +{ + if (shape.rows != 5 || // basic sanity checks + shape(0, IX) > shape(1, IX) || // eye corners + shape(3, IX) > shape(4, IX)) // mouth corners + { + rot = yaw = 0; + return; + } + Shape workshape(shape.clone()); // local copy we can modify + + // Derotate shape using eye angle as estimate of in-plane rotation. + // We rotate about the shape centroid. + // TODO EstYawFrom5PointShape was trained on shapes without this + // derotation, so must retrain the model for best results. + + rot = RadsToDegrees(-atan2(workshape(1, IY) - workshape(0, IY), + workshape(1, IX) - workshape(0, IX))); + + PossiblySetRotToZero(rot); // treat small Rots as zero Rots + + if (rot) + RotShapeInPlace(workshape, + -rot, + SumElems(workshape.col(IX)) / 5, + SumElems(workshape.col(IY)) / 5); + + // mean-center x and y + MAT X(workshape.col(IX)); X -= SumElems(X) / 5; + MAT Y(workshape.col(IY)); Y -= SumElems(Y) / 5; + + // normalize so shape size is 1 + double norm = 0; + for (int i = 0; i < 5; i++) + norm += SQ(X(i)) + SQ(Y(i)); + workshape /= sqrt(norm); + + yaw = EstYawFrom5PointShape(Buf(workshape)); +} + +static Shape PinMeanShape( // align mean shape to the pinned points + const Shape& pinned, // in: at least two of these points must be set + const Shape& meanshape) // in +{ + CV_Assert(pinned.rows == meanshape.rows); + + int ipoint, nused = 0; // number of points used in pinned + for (ipoint = 0; ipoint < meanshape.rows; ipoint++) + if (PointUsed(pinned, ipoint)) + nused++; + + if (nused < 2) + Err("Need at least two pinned landmarks"); + + // Create an anchor shape (the pinned landmarks) and an alignment shape (the + // points in meanshape that correspond to those pinned landmarks). Do that by + // copying the used points in pinned to pinned_used, and the corresponding + // points in meanshape to meanused. + + Shape pinned_used(nused, 2), mean_used(nused, 2); + int i = 0; + for (ipoint = 0; ipoint < meanshape.rows; ipoint++) + if (PointUsed(pinned, ipoint)) + { + pinned_used(i, IX) = pinned(ipoint, IX); + pinned_used(i, IY) = pinned(ipoint, IY); + mean_used(i, IX) = meanshape(ipoint, IX); + mean_used(i, IY) = meanshape(ipoint, IY); + i++; + } + CV_Assert(i == nused); + + // transform meanshape to pose generated by aligning mean_used to pinned_used + Shape TransformedShape( + AlignShape(meanshape, AlignmentMat(mean_used, pinned_used))); + + return JitterPointsAt00(TransformedShape); +} + +static bool HaveCanonical5Points( + const Shape& pinned) // in: pinned landmarks +{ + return PointUsed(pinned, L_LEyeOuter) && + PointUsed(pinned, L_REyeOuter) && + PointUsed(pinned, L_CNoseTip) && + PointUsed(pinned, L_LMouthCorner) && + PointUsed(pinned, L_RMouthCorner); +} + +static Shape As5PointShape( // return a 5 point shape + const Shape& pinned, // in: pinned landmarks, canonical 5 points are best + const Shape& meanshape) // in: used only if pinned landmarks are not canonical +{ + CV_Assert(pinned.rows == stasm_NLANDMARKS); + CV_Assert(meanshape.rows == stasm_NLANDMARKS); + + Shape newpinned(pinned); + + if (!HaveCanonical5Points(pinned)) + { + // Not canonical 5 point pinned landmarks. Impute the missing points. + // This is not an optimal situation but will at least allow estimation + // of pose from an arb set of pinned landmarks. + + newpinned = PinMeanShape(pinned, meanshape); + } + + Shape outshape(5, 2); // 5 point shape + + outshape(0, IX) = newpinned(L_LEyeOuter, IX); + outshape(0, IY) = newpinned(L_LEyeOuter, IY); + + outshape(1, IX) = newpinned(L_REyeOuter, IX); + outshape(1, IY) = newpinned(L_REyeOuter, IY); + + outshape(2, IX) = newpinned(L_CNoseTip, IX); + outshape(2, IY) = newpinned(L_CNoseTip, IY); + + outshape(3, IX) = newpinned(L_LMouthCorner, IX); + outshape(3, IY) = newpinned(L_LMouthCorner, IY); + + outshape(4, IX) = newpinned(L_RMouthCorner, IX); + outshape(4, IY) = newpinned(L_RMouthCorner, IY); + + return outshape; +} + + +static void InitDetParEyeMouthFromShape( // fill in eye and mouth fields of detpar + DetPar& detpar, + Shape& shape) +{ + if (PointUsed(shape, L_LPupil)) + { + detpar.lex = shape(L_LPupil, IX); + detpar.ley = shape(L_LPupil, IY); + } + if (PointUsed(shape, L_RPupil)) + { + detpar.rex = shape(L_RPupil, IX); + detpar.rey = shape(L_RPupil, IY); + } + if (PointUsed(shape, L_CBotOfBotLip)) + { + detpar.mouthx = shape(L_CBotOfBotLip, IX); + detpar.mouthy = shape(L_CBotOfBotLip, IY); + } +} + +// We generated the startshape without using the face detector, now "back +// generate" the detpar (the position of this does not have to exactly +// match the detpar that would generate the startshape). This approach +// allows detpar to be handled uniformly in PinnedStartShapeAndRoi. + +static DetPar PseudoDetParFromStartShape( + const Shape& startshape, + double rot, + double yaw, + int nmods) +{ + const double lex = startshape(L_LPupil, IX); // left eye + const double ley = startshape(L_LPupil, IY); + const double rex = startshape(L_RPupil, IX); // right eye + const double rey = startshape(L_RPupil, IY); + const double mouthx = startshape(L_CBotOfBotLip, IX); // mouth + const double mouthy = startshape(L_CBotOfBotLip, IY); + + CV_Assert(PointUsed(lex, ley)); + CV_Assert(PointUsed(rex, rey)); + CV_Assert(PointUsed(mouthx, mouthy)); + + const double xeye = (lex + rex) / 2; // midpoint of eyes + const double yeye = (ley + rey) / 2; + const double eyemouth = PointDist(xeye, yeye, mouthx, mouthy); + + DetPar detpar; + + detpar.x = .7 * xeye + .3 * mouthx; + detpar.y = .7 * yeye + .3 * mouthy; + detpar.width = 2.0 * eyemouth; + detpar.height = 2.0 * eyemouth; + detpar.lex = lex; + detpar.ley = ley; + detpar.rex = rex; + detpar.rey = rey; + detpar.mouthx = mouthx; + detpar.mouthy = mouthy; + detpar.rot = rot; + detpar.eyaw = DegreesAsEyaw(yaw, nmods); // determines what ASM model to use + detpar.yaw = yaw; + + return detpar; +} + +// Use the given pinned face landmarks to init the start shape. The +// current implementation works best if the pinned landmarks are the five +// canonical pinned landmarks (viz. LEyeOuter, REyeOuter, CNoseTip, +// LMouthCorner, RMouthCorner). This is because it was trained on those +// points. But the routine also works if any two or more points are pinned. + +void PinnedStartShapeAndRoi( // use the pinned landmarks to init the start shape + Shape& startshape, // out: the start shape (in ROI frame) + Image& face_roi, // out: ROI around face, possibly rotated upright + DetPar& detpar_roi, // out: detpar wrt to face_roi + DetPar& detpar, // out: detpar wrt to img + Shape& pinned_roi, // out: pinned arg translated to ROI frame + const Image& img, // in: the image (grayscale) + const vec_Mod& mods, // in: a vector of models, one for each yaw range + const Shape& pinned) // in: manually pinned landmarks +{ + double rot, yaw; + EstRotAndYawFrom5PointShape(rot, yaw, As5PointShape(pinned, mods[0]->MeanShape_())); + + const EYAW eyaw = DegreesAsEyaw(yaw, NSIZE(mods)); + const int imod = EyawAsModIndex(eyaw, mods); // select ASM model based on yaw + if (trace_g) + lprintf("%-6.6s yaw %3.0f rot %3.0f ", EyawAsString(eyaw), yaw, rot); + pinned_roi = pinned; // use pinned_roi as a temp shape we can change + Image workimg(img); // possibly flipped image + if (IsLeftFacing(eyaw)) // left facing? (our models are for right facing faces) + { + pinned_roi = FlipShape(pinned_roi, workimg.cols); + FlipImgInPlace(workimg); + } + const Mod* mod = mods[ABS(imod)]; + startshape = PinMeanShape(pinned_roi, mod->MeanShape_()); + startshape = mod->ConformShapeToMod_Pinned_(startshape, pinned_roi); + detpar = PseudoDetParFromStartShape(startshape, rot, yaw, NSIZE(mods)); + if (IsLeftFacing(eyaw)) + detpar.rot *= -1; + FaceRoiAndDetPar(face_roi, detpar_roi, workimg, detpar, false); + startshape = ImgShapeToRoiFrame(startshape, detpar_roi, detpar); + pinned_roi = ImgShapeToRoiFrame(pinned_roi, detpar_roi, detpar); + // following line not strictly necessary because don't actually need eyes/mouth + InitDetParEyeMouthFromShape(detpar_roi, startshape); + if (IsLeftFacing(eyaw)) + { + detpar = FlipDetPar(detpar, img.cols); + detpar.rot = -detpar.rot; + detpar_roi.x += 2. * (face_roi.cols/2. - detpar_roi.x); + } +} + +} // namespace stasm diff --git a/3rdparty/stasm4.0.0/stasm/pinstart.h b/3rdparty/stasm4.0.0/stasm/pinstart.h new file mode 100755 index 0000000..5fcb304 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/pinstart.h @@ -0,0 +1,22 @@ +// pinstart.h: utilities for creating a start shape from manually pinned points +// +// Copyright (C) 2005-2013, Stephen Milborrow + +#ifndef STASM_PINSTART_H +#define STASM_PINSTART_H + +namespace stasm +{ + +void PinnedStartShapeAndRoi( // use the pinned landmarks to init the start shape + Shape& startshape, // out: the start shape (in ROI frame) + Image& face_roi, // out: ROI around face, possibly rotated upright + DetPar& detpar_roi, // out: detpar wrt to face_roi + DetPar& detpar, // out: detpar wrt to img + Shape& pinned_roi, // out: pinned arg translated to ROI frame + const Image& img, // in: the image (grayscale) + const vec_Mod& mods, // in: a vector of models, one for each yaw range + const Shape& pinned); // in: manually pinned landmarks + +} // namespace stasm +#endif // STASM_PINSTART_H diff --git a/3rdparty/stasm4.0.0/stasm/print.cpp b/3rdparty/stasm4.0.0/stasm/print.cpp new file mode 100755 index 0000000..4c02497 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/print.cpp @@ -0,0 +1,89 @@ +// print.cpp: printing and logging utilities for the Stasm library +// +// Copyright (C) 2005-2013, Stephen Milborrow + +#include "stasm.h" +#include + +namespace stasm +{ +bool print_g; // true to allow output to stdout (but error msgs always printed) + +bool trace_g; // true to trace Stasm internal operation + +static FILE* logfile_g; // lprintfs go to this log file as well as stdout + +//----------------------------------------------------------------------------- + +// Open the log file. After this, when you call lprintf, you print to the log +// file (as well as to stdout). This inits the global variable logfile_g. + +void OpenLogFile(void) // also inits the global variable logfile_g +{ + if (!logfile_g) + { + static const char* const path = "stasm.log"; + if (print_g) + printf("Opening %s\n", path); + logfile_g = fopen(path, "wt"); + if (!logfile_g) + Err("Cannot open \"%s\"", path); + // check that we can write to the log file + if (fputs("log file\n", logfile_g) < 0) + Err("Cannot write to \"%s\"", path); + rewind(logfile_g); // rewind so above test msg is not in the log file + } +} + +// Like printf but only prints if print_g flag is set, +// and also prints to the log file if it is open. + +void lprintf(const char* format, ...) // args like printf +{ + (void) format; + /* + if (print_g) + { + char s[SBIG]; + va_list args; + va_start(args, format); + VSPRINTF(s, format, args); + va_end(args); + lputs(s); + }*/ +} + +// Like printf but prints to the log file only (and not to stdout). +// Used for detailed stuff that we don't usually want to see. + +void logprintf(const char* format, ...) // args like printf +{ + (void) format; + /* + if (logfile_g) + { + char s[SBIG]; + va_list args; + va_start(args, format); + VSPRINTF(s, format, args); + va_end(args); + // we don't check fputs here, to prevent recursive calls and msgs + fputs(s, logfile_g); + fflush(logfile_g); + }*/ +} + +// Like puts but prints to the log file as well if it is open, +// and does not append a newline. + +void lputs(const char* s) +{ + (void) s; + /* + printf("%s", s); + fflush(stdout); // flush so if there is a crash we can see what happened + logprintf("%s", s);*/ +} + + +} // namespace stasm diff --git a/3rdparty/stasm4.0.0/stasm/print.h b/3rdparty/stasm4.0.0/stasm/print.h new file mode 100755 index 0000000..e815db3 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/print.h @@ -0,0 +1,20 @@ +// print.h: printing and logging utilities for the Stasm library +// +// Copyright (C) 2005-2013, Stephen Milborrow + +#ifndef STASM_PRINT_H +#define STASM_PRINT_H + +namespace stasm +{ +extern bool print_g; // true to allow output to stdout + +extern bool trace_g; // true to trace Stasm internal operation + +void OpenLogFile(void); +void lputs(const char* s); +void lprintf(const char* format, ...); // args like printf +void logprintf(const char* format, ...); + +} // namespace stasm +#endif // STASM_PRINT_H diff --git a/3rdparty/stasm4.0.0/stasm/shape17.cpp b/3rdparty/stasm4.0.0/stasm/shape17.cpp new file mode 100755 index 0000000..d1de9a3 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/shape17.cpp @@ -0,0 +1,217 @@ +// shape17.cp: convert a shape to a 17 point shape +// +// We can conveniently work with shapes with differing numbers of points +// (e.g. XM2VTS, BioID) by first converting them to a "Shape17" shape. +// That is, we use Shape17s as a lowest common denominator. A Shape17 +// consists of the 17 points defined by Cristinacce's "me17" measure. + +#include "stasm.h" + +namespace stasm +{ +static const double REF17[] = // mean frontal shape (data from mean MUCT shape) +{ + -44.2, 43.4, // 0 L17_LPupil + 39.0, 48.1, // 1 L17_RPupil + -32.7, -41.6, // 2 L17_LMouthCorner + 37.2, -37.7, // 3 L17_RMouthCorner + -74.6, 57.6, // 4 L17_LEyebrowOuter + -22.0, 63.3, // 5 L17_LEyebrowInner + 14.8, 65.3, // 6 L17_REyebrowInner + 67.6, 65.6, // 7 L17_REyebrowOuter + -59.2, 40.4, // 8 L17_LEyeOuter + -28.4, 42.0, // 9 L17_LEyeInner + 23.6, 44.9, // 10 L17_REyeInner + 54.3, 46.8, // 11 L17_REyeOuter + -0.2, 5.2, // 12 L17_CNoseTip + -13.8, -4.3, // 13 L17_LNostril + 14.4, -2.7, // 14 L17_RNostril + 1.6, -27.7, // 15 L17_CTopOTopLip + 3.3, -56.3 // 16 L17_CBotOfBotLip +}; + +const Shape MEANSHAPE17(17, 2, const_cast(REF17)); + +//----------------------------------------------------------------------------- + +static const int* Shape17Tab( // get appropriate tab to convert to a 17 point shape + const Shape& shape) // in +{ + static const int shape17_tab[17] = // identity transform + { + 0, // 0 L17_LPupil + 1, // 1 L17_RPupil + 2, // 2 L17_LMouthCorner + 3, // 3 L17_RMouthCorner + 4, // 4 L17_LEyebrowOuter + 5, // 5 L17_LEyebrowInner + 6, // 6 L17_REyebrowInner + 7, // 7 L17_REyebrowOuter + 8, // 8 L17_LEyeOuter + 9, // 9 L17_LEyeInner + 10, // 10 L17_REyeInner + 11, // 11 L17_REyeOuter + 12, // 12 L17_CNoseTip + 13, // 13 L17_LNostril + 14, // 14 L17_RNostril + 15, // 15 L17_CTopOfTopLip + 16 // 16 L17_CBotOfBotLip + }; + static const int bioid_tab[17] = // 20 points + { + 0, // 0 L17_LPupil + 1, // 1 L17_RPupil + 2, // 2 L17_LMouthCorner + 3, // 3 L17_RMouthCorner + 4, // 4 L17_LEyebrowOuter + 5, // 5 L17_LEyebrowInner + 6, // 6 L17_REyebrowInner + 7, // 7 L17_REyebrowOuter + 9, // 8 L17_LEyeOuter + 10, // 9 L17_LEyeInner + 11, // 10 L17_REyeInner + 12, // 11 L17_REyeOuter + 14, // 12 L17_CNoseTip + 15, // 13 L17_LNostril + 16, // 14 L17_RNostril + 17, // 15 L17_CTopOfTopLip + 18 // 16 L17_CBotOfBotLip + }; + static const int muct_tab[17] = // 68 (XM2VTS) or 76 (MUCT) points + { + 31, // 0 L17_LPupil + 36, // 1 L17_RPupil + 48, // 2 L17_LMouthCorner + 54, // 3 L17_RMouthCorner + 21, // 4 L17_LEyebrowOuter + 24, // 5 L17_LEyebrowInner + 18, // 6 L17_REyebrowInner + 15, // 7 L17_REyebrowOuter + 27, // 8 L17_LEyeOuter + 29, // 9 L17_LEyeInner + 34, // 10 L17_REyeInner + 32, // 11 L17_REyeOuter + 67, // 12 L17_CNoseTip + 46, // 13 L17_LNostril + 47, // 14 L17_RNostril + 51, // 15 L17_CTopOfTopLip + 57 // 16 L17_CBotOfBotLip + }; + static const int stasm77_tab[17] = // Stasm 77 points + { + 38, // 0 LPupil + 39, // 1 RPupil + 59, // 2 LMouthCorner + 65, // 3 RMouthCorner + 18, // 4 LEyebrowOuter + 21, // 5 LEyebrowInner + 22, // 6 REyebrowInner + 25, // 7 REyebrowOuter + 34, // 8 LEyeOuter + 30, // 9 LEyeInner + 40, // 10 REyeInner + 44, // 11 REyeOuter + 52, // 12 CNoseTip + 51, // 13 LNostril + 53, // 14 RNostril + 62, // 15 CTopOfTopLip + 74 // 16 CBotOfBotLip + }; + static const int helen_tab[17] = // 194 points (Helen) + { + 144, // 0 LPupil actually eye outer corner, will correct in TweakHelen + 124, // 1 RPupil actually eye outer corner, will correct in TweakHelen + 58, // 2 LMouthCorner + 71, // 3 RMouthCorner + 185, // 4 LEyebrowOuter + 174, // 5 LEyebrowInner + 154, // 6 REyebrowInner + 164, // 7 REyebrowOuter + 144, // 8 LEyeOuter + 134, // 9 LEyeInner + 114, // 10 REyeInner + 124, // 11 REyeOuter + 49, // 12 CNoseTip actually base of nose, will correct in TweakHelen + 47, // 13 LNostril actually base of nostril, will correct in TweakHelen + 51, // 14 RNostril actually base of nostril, will correct in TweakHelen + 64, // 15 CTopOfTopLip + 79 // 16 CBotOfBotLip + }; + static const int put199_tab[17] = // 199 points (extended PUT) + { + 195, // 0 LPupil + 194, // 1 RPupil + 58, // 2 LMouthCorner + 72, // 3 RMouthCorner + 184, // 4 LEyebrowOuter + 174, // 5 LEyebrowInner + 154, // 6 REyebrowInner + 164, // 7 REyebrowOuter + 144, // 8 LEyeOuter + 134, // 9 LEyeInner + 114, // 10 REyeInner + 124, // 11 REyeOuter + 196, // 12 CNoseTip + 197, // 13 LNostril + 198, // 14 RNostril + 65, // 15 CTopOfTopLip + 79 // 16 CBotOfBotLip + }; + const int *tab = NULL; + switch(shape.rows) + { + case 17: tab = shape17_tab; break; // identity transform + case 20: tab = bioid_tab; break; // BioID + case 22: tab = bioid_tab; break; // AR + case 68: tab = muct_tab; break; // XM2VTS, 68 point MUCT + case 76: tab = muct_tab; break; // Stasm version 3 (Stasm76 shape) + case 77: tab = stasm77_tab; break; // Stasm version 4 (Stasm77 shape) + case 194: tab = helen_tab; break; // Helen + case 199: tab = put199_tab; break; // PUT with me17 points + default: Err("Cannot convert %d point shape to 17 points", shape.rows); break; + } + return tab; +} + +static void TweakHelen( + Shape& shape17) // io +{ + // pupils not available in the helen set so use mean of eye corners + if (PointUsed(shape17, L17_LEyeOuter) && PointUsed(shape17, L17_LEyeInner)) + { + shape17(L17_LPupil, IX) = (shape17(L17_LEyeOuter, IX) + shape17(L17_LEyeInner, IX)) / 2; + shape17(L17_LPupil, IY) = (shape17(L17_LEyeOuter, IY) + shape17(L17_LEyeInner, IY)) / 2; + } + if (PointUsed(shape17, L17_REyeOuter) && PointUsed(shape17, L17_REyeInner)) + { + shape17(L17_RPupil, IX) = (shape17(L17_REyeOuter, IX) + shape17(L17_REyeInner, IX)) / 2; + shape17(L17_RPupil, IY) = (shape17(L17_REyeOuter, IY) + shape17(L17_REyeInner, IY)) / 2; + } + // nose tip and nostrils not available, fake it by shifting available points up + if (PointUsed(shape17, L17_LPupil) && PointUsed(shape17, L17_RPupil)) + { + const double shift = .08 * PointDist(shape17, L17_LPupil, L17_RPupil); + shape17(L17_CNoseTip, IY) -= 2 * shift; + shape17(L17_LNostril, IY) -= shift; + shape17(L17_RNostril, IY) -= shift; + } +} + +Shape Shape17( // convert an arb face shape to a 17 point shape + const Shape& shape) // in +{ + const int* const tab = Shape17Tab(shape); + Shape shape17(17, 2); + for (int i = 0; i < 17; i++) + { + int iold = tab[i]; + CV_Assert(iold >= 0 && iold < NSIZE(shape)); + shape17(i, IX) = shape(iold, IX); + shape17(i, IY) = shape(iold, IY); + } + if (shape.rows == 194) // helen set? www.ifp.illinois.edu/~vuongle2/helen + TweakHelen(shape17); + return shape17; +} + +} // namespace stasm diff --git a/3rdparty/stasm4.0.0/stasm/shape17.h b/3rdparty/stasm4.0.0/stasm/shape17.h new file mode 100755 index 0000000..92ce6bb --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/shape17.h @@ -0,0 +1,60 @@ +// shape17.h: convert a shape to a 17 point shape +// +// Copyright (C) 2005-2013, Stephen Milborrow + +#ifndef STASM_SHAPE17_H +#define STASM_SHAPE17_H + +namespace stasm +{ +enum LANDMARKS_17 // the 17 points that make up a Shape17 shape +{ + L17_LPupil, // 0 + L17_RPupil, // 1 + L17_LMouthCorner, // 2 + L17_RMouthCorner, // 3 + L17_LEyebrowOuter, // 4 + L17_LEyebrowInner, // 5 + L17_REyebrowInner, // 6 + L17_REyebrowOuter, // 7 + L17_LEyeOuter, // 8 + L17_LEyeInner, // 9 + L17_REyeInner, // 10 + L17_REyeOuter, // 11 + L17_CNoseTip, // 12 + L17_LNostril, // 13 + L17_RNostril, // 14 + L17_CTopOfTopLip, // 15 + L17_CBotOfBotLip // 16 +}; + +#if 0 +static const char *LANDMARKS_17_NAMES[] = +{ + "LPupil", + "RPupil", + "LMouthCorner", + "RMouthCorner", + "LEyebrowOuter", + "LEyebrowInner", + "REyebrowInner", + "REyebrowOuter", + "LEyeOuter", + "LEyeInner", + "REyeInner", + "REyeOuter", + "CNoseTip", + "LNostril", + "RNostril", + "CTopOTopLip", + "CBotOfBotLip" +}; +#endif + +extern const Shape MEANSHAPE17; // mean 17 point shape + +Shape Shape17( // convert an arb face shape to a 17 point shape + const Shape& shape); // in + +} // namespace stasm +#endif // STASM_SHAPE17_H diff --git a/3rdparty/stasm4.0.0/stasm/shapehacks.cpp b/3rdparty/stasm4.0.0/stasm/shapehacks.cpp new file mode 100755 index 0000000..85f3078 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/shapehacks.cpp @@ -0,0 +1,126 @@ +// shapehacks.cpp: +// +// The shape model sometimes allows implausible point layouts. For +// example, the mouth on the nose, or the chin inside the mouth. The +// functions in this module fix the most egregious cases. These hacks +// don't necessarily make the overall fitness measure (FM29) better, +// but minimize the occurrence of ridiculous shapes, although also +// occasionally worsen a good shape. +// +// Copyright (C) 2005-2013, Stephen Milborrow + +#include "stasm.h" + +namespace stasm +{ +static double SHIFT_MOUTH_FROM_NOSE_FRAC = 0.06; // .06 from tuning on D1 set + +static double CHIN_DOWN_RATIO = 0.5; // chin must be this far from mouth +static double CHIN_DOWN_SHIFT = 0.2; + +static double CHIN_UP_RATIO = 2.4; // chin cannot be further than this from mouth +static double CHIN_UP_SHIFT = 0.1; + +static double TEMPLE_RATIO = .1; // temple must be this far from eye, 0 disables +static double TEMPLE_SHIFT = 3; + +//----------------------------------------------------------------------------- + +static void PossiblyPrint(const char* s) // debugging print +{ + if (trace_g) + lprintf("%s ", s); +} + +void ApplyShapeModelHacks( // adjust shape by applying various hacks + Shape& shape, // io: position of features possibly adjusted + unsigned hackbits) // in: which hacks to apply, see SHAPEHACKS defs +{ + CV_Assert(shape.rows == stasm_NLANDMARKS); // the hacks assume stasm77 points + CV_Assert(shape.rows == 77); + + const double eyemouth = EyeMouthDist(shape); + + if (hackbits & SHAPEHACKS_DEFAULT) + { + // Possibly shift the entire mouth down, if it is too close to the nose. + // Useful when the descriptor matchers think the nostrils are the mouth. + + const double nosemouth_gap = + shape(L_CTopOfTopLip, IY) - shape(L_CNoseBase, IY); + if (nosemouth_gap < .1 * eyemouth) + { + PossiblyPrint("ShiftMouthDown"); + for (int i = L_LMouthCorner; i <= L_LMouth76; i++) + shape(i, IY) += SHIFT_MOUTH_FROM_NOSE_FRAC * eyemouth; + } + // Shift the bottom of mouth down if it is above the top of mouth. + + const double gap = shape(L_CTopOfBotLip, IY) - shape(L_CTopOfTopLip, IY); + if (gap < 0) + { + PossiblyPrint("ShiftBottomOfMouthDown"); + for (int i = L_RMouthCorner; i <= L_LMouth76; i++) + shape(i, IY) -= gap; + } + // Possibly shift the chin down or up, if it too close to the mouth. + // Useful when the chin is on the mouth. + + const double y_mouth_center = + (shape(L_CTopOfTopLip, IY) + shape(L_CBotOfBotLip, IY)) / 2; + const double nosemouth_gap1 = + MAX(0, y_mouth_center - shape(L_CNoseBase, IY)); + const double mouthchin_gap = + shape(L_CTipOfChin, IY) - y_mouth_center; + if (mouthchin_gap < CHIN_DOWN_RATIO * nosemouth_gap1) + { + PossiblyPrint("ShiftChinDown"); + double yadjust = CHIN_DOWN_SHIFT * eyemouth; + shape(L_LJaw04, IY) += yadjust; + shape(L_LJaw05, IY) += yadjust; + shape(L_CTipOfChin, IY) += yadjust; + shape(L_RJaw07, IY) += yadjust; + shape(L_RJaw08, IY) += yadjust; + } + if (mouthchin_gap > CHIN_UP_RATIO * nosemouth_gap1) + { + PossiblyPrint("ShiftChinUp"); + double yadjust = CHIN_UP_SHIFT * eyemouth; + shape(L_LJaw04, IY) -= yadjust; + shape(L_LJaw05, IY) -= yadjust; + shape(L_CTipOfChin, IY) -= yadjust; + shape(L_RJaw07, IY) -= yadjust; + shape(L_RJaw08, IY) -= yadjust; + } + } + // Possibly shift the side of face away from eye. + // Useful when the side of face is on the eye. + + if (hackbits & SHAPEHACKS_SHIFT_TEMPLE_OUT) + { + if (shape(L_LTemple, IX) > + shape(L_LEyeOuter, IX) - TEMPLE_RATIO * eyemouth) + { + PossiblyPrint("LTempleOut"); + double xadjust = + TEMPLE_SHIFT * ABS(shape(L_LEyeOuter, IX) - shape(L_LTemple, IX)); + shape(L_LTemple, IX) -= xadjust; + shape(L_LJaw01, IX) -= xadjust; + shape(L_LJawNoseline, IX) -= xadjust; + shape(L_LJawMouthline, IX) -= .5 * xadjust; + } + if (shape(L_RTemple, IX) < + shape(L_REyeOuter, IX) + TEMPLE_RATIO * eyemouth) + { + PossiblyPrint("RTempleOut"); + double xadjust = + TEMPLE_SHIFT * ABS(shape(L_REyeOuter, IX) - shape(L_RTemple, IX)); + shape(L_RTemple, IX) += xadjust; + shape(L_RJaw11, IX) += xadjust; + shape(L_RJawNoseline, IX) += xadjust; + shape(L_RJawMouthline, IX) += .5 * xadjust; + } + } +} + +} // namespace stasm diff --git a/3rdparty/stasm4.0.0/stasm/shapehacks.h b/3rdparty/stasm4.0.0/stasm/shapehacks.h new file mode 100755 index 0000000..3525a18 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/shapehacks.h @@ -0,0 +1,18 @@ +// shapehacks.h: +// +// Copyright (C) 2005-2013, Stephen Milborrow + +#ifndef STASM_SHAPEHACKS_H +#define STASM_SHAPEHACKS_H + +namespace stasm +{ +static const unsigned SHAPEHACKS_DEFAULT = 0x01; +static const unsigned SHAPEHACKS_SHIFT_TEMPLE_OUT = 0x10; // for frontal models + +void ApplyShapeModelHacks( // adjust shape by applying various hacks + Shape& shape, // io: features possibly adjusted + unsigned hackbits); // in: which hacks to apply, see above constants + +} // namespace stasm +#endif // STASM_SHAPEHACKS_H diff --git a/3rdparty/stasm4.0.0/stasm/shapemod.cpp b/3rdparty/stasm4.0.0/stasm/shapemod.cpp new file mode 100755 index 0000000..1b0a8dc --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/shapemod.cpp @@ -0,0 +1,130 @@ +// shapemod.cpp: the ASM shape model +// +// Copyright (C) 2005-2013, Stephen Milborrow + +#include "stasm.h" + +namespace stasm +{ +static const int SHAPEHACK_MINPYRLEV = 2; // allow hacks only at coarse pyr levs + +// Limit the values of b to make sure the generated shape is plausible. +// That is, clip each b[i] to bmax * sqrt(lambda_i). +// "b" is the name used for the eigenvector weights in Cootes' papers. + +static void LimitB( + VEC& b, // io: eigvec weights + const VEC& eigvals, // in + double bmax) // in +{ + for (int i = 0; i < NSIZE(eigvals); i++) + { + const double limit = bmax * sqrt(eigvals(i)); + b(i) = Clamp(b(i), -limit, limit); + } +} + +// This implements Section 4.8 of CootesTaylor 2004 +// www.isbe.man.ac.uk/~bim/Mods/app_models.pdf. +// Except that we don't implement tangent spaces. And we don't iterate the +// shape model until convergence. Instead we use the b from the previous +// iteration of the ASM, which gives as good landmark fit results, empirically. + +static Shape ConformShapeToMod( // Return a copy of inshape conformed to the model + VEC& b, // io: eigvec weights + const Shape& inshape, // in: the current position of the landmarks + const Shape& meanshape, // in: n x 2 + const VEC& eigvals, // in: neigs x 1 + const MAT& eigvecs, // in: 2n x neigs + const MAT& eigvecsi, // in: neigs x 2n, inverse of eigvecs + const double bmax, // in: for LimitB + const VEC& pointweights) // in: contribution of each point to the pose +{ + Shape shape(inshape.clone()); + + // estimate the pose which transforms the shape into the model space + // (use the b from previous iterations of the ASM) + + MAT modelshape(AsColVec(meanshape) + eigvecs * b); + modelshape = DimKeep(modelshape, shape.rows, 2); // redim back to 2 columns + const MAT pose(AlignmentMat(modelshape, shape, Buf(pointweights))); + + // transform the shape into the model space + + modelshape = AlignShape(shape, pose.inv(cv::DECOMP_LU)); + + // update shape model params b to match modelshape, then limit b + + b = eigvecsi * AsColVec(modelshape - meanshape); + LimitB(b, eigvals, bmax); + + // generate conformedshape from the model using the limited b + // (we generate as a column vec, then redim back to 2 columns) + + const Shape conformedshape(DimKeep(eigvecs * b, shape.rows, 2)); + + // back to image space + + return AlignShape(meanshape + conformedshape, pose); +} + +static VEC PointWeights(void) // return point weights from LANDMARK_INFO_TAB +{ + CV_DbgAssert(NELEMS(LANDMARK_INFO_TAB) == stasm_NLANDMARKS); + + VEC pointweights(stasm_NLANDMARKS, 1); + + for (int i = 0; i < stasm_NLANDMARKS; i++) + pointweights(i) = LANDMARK_INFO_TAB[i].weight; + + return pointweights; +} + +// wrapper around ConformShapeToMod above + +const Shape ShapeMod::ConformShapeToMod_( // return shape conformed to shape model + VEC& b, // io: eigvec weights from previous iters of ASM + const Shape& shape, // in: shape suggested by the descriptor models + int ilev) // in: pyramid level (0 is full size) +const +{ + // static for efficiency (init once) + static const VEC pointweights(PointWeights()); + + Shape newshape = ConformShapeToMod(b, + shape, meanshape_ * GetPyrScale(ilev), + eigvals_ / pow(SQ(PYR_RATIO), ilev), eigvecs_, eigvecsi_, + bmax_, pointweights); + + newshape = JitterPointsAt00(newshape); // jitter points at 0,0 if any + + if (ilev >= SHAPEHACK_MINPYRLEV) // allow shape hacks only at coarse pyr levs + ApplyShapeModelHacks(newshape, hackbits_); + + return newshape; +} + +// Like ConformShapeToMod_ but with pinned landmarks. Conform the given shape to +// the ASM model, but keeping points in pinnedshape at their original position. + +const Shape ShapeMod::ConformShapeToMod_Pinned_( + VEC& b, // io: eigvec weights from previous iters of ASM + const Shape& shape, // in: shape suggested by the descriptor models + int ilev, // in: pyramid level (0 is full size) + const Shape& pinnedshape) // in: pinned landmarks +const +{ + static const double MAX_DIST = 0.5; + static const int MAX_ITERS = 50; + + Shape outshape(shape.clone()); + double dist = FLT_MAX; + for (int iter = 0; dist > MAX_DIST && iter < MAX_ITERS; iter++) + { + outshape = ConformShapeToMod_(b, outshape, ilev); + dist = ForcePinnedPoints(outshape, pinnedshape); + } + return outshape; +} + +} // namespace stasm diff --git a/3rdparty/stasm4.0.0/stasm/shapemod.h b/3rdparty/stasm4.0.0/stasm/shapemod.h new file mode 100755 index 0000000..4c1cee1 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/shapemod.h @@ -0,0 +1,67 @@ +// shapemod.h: the ASM shape model +// +// Copyright (C) 2005-2013, Stephen Milborrow + +#ifndef STASM_SHAPEMODEL_H +#define STASM_SHAPEMODEL_H + +namespace stasm +{ +class ShapeMod +{ +public: + const Shape ConformShapeToMod_( // return shape conformed to shape mod + VEC& b, // io: eigvec weights + const Shape& shape, // in: shape suggested by the descriptor mods + int ilev) // in: pyramid level (0 is full size) + const; + + const Shape ConformShapeToMod_Pinned_( // like above but allow pinned points + VEC& b, // io: eigvec weights + const Shape& shape, // in: shape suggested by the descriptor mods + int ilev, // in: pyramid level (0 is full size) + const Shape& pinnedshape) // in: pinned landmarks + const; + + ShapeMod( // constructor + const Shape& meanshape, + const VEC& eigvals, + const MAT& eigvecs, + const int neigs, + const double bmax, + const unsigned hackbits) + + : meanshape_(meanshape), + eigvals_(DimKeep(eigvals, neigs, 1)), + eigvecs_(DimKeep(eigvecs, eigvecs.rows, neigs)), // retain neigs cols + // take inverse of eigvecs (by taking transpose) and retain neigs rows + eigvecsi_(DimKeep(eigvecs.t(), neigs, eigvecs.cols)), + bmax_(bmax), + hackbits_(hackbits) + { + CV_Assert(meanshape.rows == stasm_NLANDMARKS); + CV_Assert(meanshape.cols == 2); + CV_Assert(NSIZE(eigvals) == 2 * stasm_NLANDMARKS); + CV_Assert(eigvecs.rows == 2 * stasm_NLANDMARKS); + CV_Assert(eigvecs.cols == 2 * stasm_NLANDMARKS); + CV_Assert(neigs > 0 && neigs <= 2 * stasm_NLANDMARKS); + CV_Assert(bmax > 0 && bmax < 10); + CV_Assert((hackbits & ~(SHAPEHACKS_DEFAULT|SHAPEHACKS_SHIFT_TEMPLE_OUT)) == 0); + } + + // all data remains constant after ShapeMod construction + + const Shape meanshape_; // mean shape aligned to face det frame + const VEC eigvals_; // neigs x 1 vector + const MAT eigvecs_; // 2n x neigs matrix where n is nbr of landmarks + const MAT eigvecsi_; // neigs x 2n matrix, inverse of eigvecs_ + const double bmax_; // eigvec weight limit, for LimitB() + const unsigned hackbits_; // allowable shape model hacks (e.g. SHAPEHACKS_DEFAULT) + +private: + DISALLOW_COPY_AND_ASSIGN(ShapeMod); + +}; // end class ShapeMod + +} // namespace stasm +#endif // STASM_SHAPEMODEL_H diff --git a/3rdparty/stasm4.0.0/stasm/startshape.cpp b/3rdparty/stasm4.0.0/stasm/startshape.cpp new file mode 100755 index 0000000..5439f53 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/startshape.cpp @@ -0,0 +1,463 @@ +// startshape.cpp: routines for finding the start shape for an ASM search +// +// The model "estart" determines the method we use to create the start shape. +// (The InitMods function initializes estart during Stasm initialization.) +// The current open-source version of Stasm uses estart=ESTART_EYES. +// +// 1. With the model estart=ESTART_RECT_ONLY, the start shape is created by +// aligning the model mean face shape to the face rectangle. (The face +// rectangle is found by the face detector prior to calling routines in +// this file.) +// +// 2. With the model estart=ESTART_EYES (currently used for the frontal +// model), the start shape is created as follows. Using the face rectangle +// found by the face detector, Stasm searches for the eyes in the +// appropriate subregions within the rectangle. If both eyes are found the +// face is rotated so the eyes are horizontal. The start shape is then +// formed by aligning the mean training shape to the eyes. If either eye +// isn't found, the start shape is aligned to the face detector rectangle. +// +// Note however that if the eye angle is less than +-5 degrees, we treat it +// as 0 degrees (and don't rotate the face as described above). This +// minimizes preprocessing. +// +// 3. With the model estart=ESTART_EYE_AND_MOUTH (currently used for the +// three-quarter models), the start shape is generated as above, but we +// search for the mouth too and use it if is detected. +// +// Copyright (C) 2005-2013, Stephen Milborrow + +#include "stasm.h" + +namespace stasm +{ +// The constant 200 is arbitrary, except that the value used by Stasm +// must match that used by Tasm when training the model. Using 200 instead +// of say, 1, means that the detector average face is displayable at a decent +// size which is useful for debugging. + +static const int DET_FACE_WIDTH = 200; + +// Following used if we did not detect eyes. We empirically get slighter better +// Stasm results if we slightly reduce the size of the detected face rectangle. + +static double FACERECT_SCALE_WHEN_NO_EYES = .95; + +//----------------------------------------------------------------------------- + +// Align meanshape to the face detector rectangle and return it as startshape +// This ignores the eye and mouth, if any. + +static Shape AlignMeanShapeToFaceDetRect( + const DetPar& detpar, // in + const Shape& meanshape, // in + double scale, // in: scale the face rectangle + const Image& img) // io: the image (grayscale) +{ + if (trace_g) + lprintf("AlignToFaceDetBox "); + + DetPar detpar1(detpar); + + if (IsLeftFacing(detpar.eyaw)) + detpar1 = FlipDetPar(detpar, img.cols); + + CV_Assert(meanshape.rows > 0 && meanshape.cols == 2); + + const double xscale = detpar1.width * scale / DET_FACE_WIDTH; + const double yscale = detpar1.height * scale / DET_FACE_WIDTH; + + Shape startshape = AlignShape(meanshape, + xscale, 0, detpar1.x, + 0, yscale, detpar1.y); + + return startshape; +} + +// Return the model meanshape aligned to both eyes and the mouth. +// +// The central idea is to form a triangular shape of the eyes and +// bottom-of-mouth from the face detector params, and align the same +// triangle in the meanshape to this triangle. + +static Shape AlignMeanShapeToBothEyesAndMouth( + const DetPar& detpar, // in + const Shape& meanshape) // in +{ + if (trace_g) + lprintf("AlignToBothEyesAndMouth "); + + CV_Assert(NSIZE(meanshape) > 0 && PointUsed(meanshape, 0)); + CV_Assert(Valid(detpar.mouthx)); + CV_Assert(Valid(detpar.lex)); + CV_Assert(Valid(detpar.rex)); + + Shape mean_tri(3, 2), det_tri(3, 2); // triangle of eyes and mouth + + const double x_meanmouth = + (meanshape(L_CTopOfTopLip, IX) + meanshape(L_CBotOfBotLip, IX)) / 2.; + + const double y_meanmouth = + (meanshape(L_CTopOfTopLip, IY) + meanshape(L_CBotOfBotLip, IY)) / 2.; + + mean_tri(0, IX) = meanshape(L_LPupil, IX); // left eye + mean_tri(0, IY) = meanshape(L_LPupil, IY); + mean_tri(1, IX) = meanshape(L_RPupil, IX); // right eye + mean_tri(1, IY) = meanshape(L_RPupil, IY); + mean_tri(2, IX) = x_meanmouth; // mouth + mean_tri(2, IY) = y_meanmouth; + + det_tri(0, IX) = detpar.lex; // left eye + det_tri(0, IY) = detpar.ley; + det_tri(1, IX) = detpar.rex; // right eye + det_tri(1, IY) = detpar.rey; + det_tri(2, IX) = detpar.mouthx; // mouth + det_tri(2, IY) = detpar.mouthy; + + return AlignShape(meanshape, AlignmentMat(mean_tri, det_tri)); +} + +// return the model meanshape aligned to both eyes (mouth is not avail) + +static Shape AlignMeanShapeToBothEyesNoMouth( + const DetPar& detpar, // in + const Shape& meanshape) // in +{ + if (trace_g) + lprintf("AlignToBothEyesNoMouth "); + + CV_Assert(NSIZE(meanshape) > 0 && PointUsed(meanshape, 0)); + CV_Assert(Valid(detpar.lex)); + CV_Assert(Valid(detpar.rex)); + + Shape meanline(2, 2), detline(2, 2); // line from eye to eye + + meanline(0, IX) = meanshape(L_LPupil, IX); // left eye + meanline(0, IY) = meanshape(L_LPupil, IY); + meanline(1, IX) = meanshape(L_RPupil, IX); // right eye + meanline(1, IY) = meanshape(L_RPupil, IY); + + detline(0, IX) = detpar.lex; // left eye + detline(0, IY) = detpar.ley; + detline(1, IX) = detpar.rex; // right eye + detline(1, IY) = detpar.rey; + + return AlignShape(meanshape, AlignmentMat(meanline, detline)); +} + +// return the model meanshape aligned to both eyes (mouth is not avail) + +static Shape AlignMeanShapeToBothEyesEstMouth( + const DetPar& detpar, // in + const Shape& meanshape) // in +{ + // .48 was tested to give slightly better worse case results than .50 + static double EYEMOUTH_TO_FACERECT_RATIO = .48; + + if (trace_g) + lprintf("AlignToBothEyesNoMouth(EstMouth) "); + + CV_Assert(NSIZE(meanshape) > 0 && PointUsed(meanshape, 0)); + CV_Assert(Valid(detpar.lex)); + CV_Assert(Valid(detpar.rex)); + + // estimate the mouth's position + + double x_eyemid = 0; + switch (detpar.eyaw) + { + case EYAW00: // mid point + x_eyemid = .50 * detpar.lex + .50 * detpar.rex; + break; + // TODO The constants below have not been empirically optimized. + case EYAW_45: // closer to left eye + x_eyemid = .30 * detpar.lex + .70 * detpar.rex; + break; + case EYAW_22: // closer to left eye + x_eyemid = .30 * detpar.lex + .70 * detpar.rex; + break; + case EYAW22: // closer to right eye + x_eyemid = .30 * detpar.lex + .70 * detpar.rex; + break; + case EYAW45: // closer to right eye + x_eyemid = .30 * detpar.lex + .70 * detpar.rex; + break; + default: + Err("AlignMeanShapeToBothEyesEstMouth: Invalid eyaw %d", detpar.eyaw); + break; + } + const double y_eyemid = (detpar.ley + detpar.rey) / 2; + + Shape mean_tri(3, 2), det_tri(3, 2); // triangle of eyes and mouth + + mean_tri(0, IX) = meanshape(L_LPupil, IX); // left eye + mean_tri(0, IY) = meanshape(L_LPupil, IY); + mean_tri(1, IX) = meanshape(L_RPupil, IX); // right eye + mean_tri(1, IY) = meanshape(L_RPupil, IY); + mean_tri(2, IX) = meanshape(L_CBotOfBotLip, IX); // mouth + mean_tri(2, IY) = meanshape(L_CBotOfBotLip, IY); + + det_tri(0, IX) = detpar.lex; // left eye + det_tri(0, IY) = detpar.ley; + det_tri(1, IX) = detpar.rex; // right eye + det_tri(1, IY) = detpar.rey; + det_tri(2, IX) = x_eyemid; // mouth + det_tri(2, IY) = y_eyemid + EYEMOUTH_TO_FACERECT_RATIO * detpar.width; + + return AlignShape(meanshape, AlignmentMat(mean_tri, det_tri)); +} + +static Shape AlignMeanShapeToLeftEyeAndMouth( + const DetPar& detpar, // in + const Shape& meanshape) // in +{ + if (trace_g) + lprintf("AlignToLeftEyeAndMouth "); + + CV_Assert(NSIZE(meanshape) > 0 && PointUsed(meanshape, 0)); + CV_Assert(Valid(detpar.lex)); // left eye valid? + CV_Assert(!Valid(detpar.rex)); // right eye invalid? (else why are we here?) + CV_Assert(Valid(detpar.mouthx)); // mouth valid? + + Shape meanline(2, 2), detline(2, 2); // line from eye to mouth + + const double x_meanmouth = + (meanshape(L_CTopOfTopLip, IX) + meanshape(L_CBotOfBotLip, IX)) / 2; + + const double y_meanmouth = + (meanshape(L_CTopOfTopLip, IY) + meanshape(L_CBotOfBotLip, IY)) / 2; + + meanline(0, IX) = meanshape(L_LPupil, IX); // left eye + meanline(0, IY) = meanshape(L_LPupil, IY); + meanline(1, IX) = x_meanmouth; // mouth + meanline(1, IY) = y_meanmouth; + + detline(0, IX) = detpar.lex; // left eye + detline(0, IY) = detpar.ley; + detline(1, IX) = detpar.mouthx; // mouth + detline(1, IY) = detpar.mouthy; + + return AlignShape(meanshape, AlignmentMat(meanline, detline)); +} + +static Shape AlignMeanShapeToRightEyeAndMouth( + const DetPar& detpar, // in + const Shape& meanshape) // in +{ + if (trace_g) + lprintf("AlignToRightEyeAndMouth "); + + CV_Assert(NSIZE(meanshape) > 0 && PointUsed(meanshape, 0)); + CV_Assert(!Valid(detpar.lex)); // left eye invalid? (else why are we here?) + CV_Assert(Valid(detpar.rex)); // right eye valid? + CV_Assert(Valid(detpar.mouthx)); // mouth valid? + + const double x_meanmouth = + (meanshape(L_CTopOfTopLip, IX) + meanshape(L_CBotOfBotLip, IX)) / 2; + + const double y_meanmouth = + (meanshape(L_CTopOfTopLip, IY) + meanshape(L_CBotOfBotLip, IY)) / 2; + + Shape meanline(2, 2), detline(2, 2); // line from eye to mouth + + meanline(0, IX) = meanshape(L_RPupil, IX); // right eye + meanline(0, IY) = meanshape(L_RPupil, IY); + meanline(1, IX) = x_meanmouth; // mouth + meanline(1, IY) = y_meanmouth; + + detline(0, IX) = detpar.rex; // right eye + detline(0, IY) = detpar.rey; + detline(1, IX) = detpar.mouthx; // mouth + detline(1, IY) = detpar.mouthy; + + return AlignShape(meanshape, AlignmentMat(meanline, detline)); +} + +static void FlipIfLeftFacing( + Shape& shape, // io + EYAW eyaw, // in + int ncols) // in +{ + if (IsLeftFacing(eyaw)) + shape = FlipShape(shape, ncols); +} + +// Align the model meanshape to the detpar from the face and feature dets. +// Complexity enters in because the detected eyes and mouth may be useful +// if available. The "left facing" code is needed because our three +// quarter models are for right facing faces (wrt the viewer). + +static Shape StartShapeFromDetPar( + const DetPar& detpar_roi, // in: detpar wrt the ROI + const Image& face_roi, // in + const Shape& meanshape, // in + ESTART estart) // in: use mouth etc. to posn start shape? +{ + CV_Assert(estart == ESTART_RECT_ONLY || + estart == ESTART_EYES || + estart == ESTART_EYE_AND_MOUTH); + + Shape startshape; + Shape meanshape1(meanshape); + + if (estart == ESTART_EYE_AND_MOUTH && // use both eyes and mouth? + Valid(detpar_roi.mouthx) && + Valid(detpar_roi.lex) && + Valid(detpar_roi.rex)) + { + FlipIfLeftFacing(meanshape1, detpar_roi.eyaw, face_roi.cols); + startshape = AlignMeanShapeToBothEyesAndMouth(detpar_roi, meanshape1); + FlipIfLeftFacing(startshape, detpar_roi.eyaw, face_roi.cols); + } + else if (Valid(detpar_roi.lex) && // use both eyes? + Valid(detpar_roi.rex)) + { + FlipIfLeftFacing(meanshape1, detpar_roi.eyaw, face_roi.cols); + // TODO Tune the following code, what approach is best? + if (detpar_roi.eyaw == EYAW00) + startshape = AlignMeanShapeToBothEyesEstMouth(detpar_roi, meanshape1); + else + startshape = AlignMeanShapeToBothEyesNoMouth(detpar_roi, meanshape1); + FlipIfLeftFacing(startshape, detpar_roi.eyaw, face_roi.cols); + } + else if (estart == ESTART_EYE_AND_MOUTH && // use left eye and mouth? + Valid(detpar_roi.mouthx) && + Valid(detpar_roi.lex)) + { + FlipIfLeftFacing(meanshape1, detpar_roi.eyaw, face_roi.cols); + startshape = AlignMeanShapeToLeftEyeAndMouth(detpar_roi, meanshape1); + FlipIfLeftFacing(startshape, detpar_roi.eyaw, face_roi.cols); + } + else if (estart == ESTART_EYE_AND_MOUTH && // use right eye and mouth? + Valid(detpar_roi.mouthx) && + Valid(detpar_roi.rex)) + { + FlipIfLeftFacing(meanshape1, detpar_roi.eyaw, face_roi.cols); + startshape = AlignMeanShapeToRightEyeAndMouth(detpar_roi, meanshape1); + FlipIfLeftFacing(startshape, detpar_roi.eyaw, face_roi.cols); + } + else // last resort: use the face det rectangle (can't use facial features) + { + startshape = + AlignMeanShapeToFaceDetRect(detpar_roi, meanshape1, + FACERECT_SCALE_WHEN_NO_EYES, face_roi); + } + return JitterPointsAt00(startshape); +} + +static double EstRotFromEyeAngle( // estimate face rotation from intereye angle + const DetPar& detpar) // in: detpar wrt the ROI +{ + double rot = 0; + + if (Valid(detpar.lex) && Valid(detpar.rey)) // both eyes detected? + rot = RadsToDegrees(-atan2(detpar.rey - detpar.ley, + detpar.rex - detpar.lex)); + + return rot; +} + +// Get the start shape and the ROI around it, given the face rectangle. +// Depending on the estart field in the model, we detect the eyes +// and mouth and use those to help fit the start shape. +// (Note also that the ROI is flipped if necessary because our three-quarter +// models are right facing and the face may be left facing.) + +static void StartShapeAndRoi( // we have the facerect, now get the rest + Shape& startshape, // out: the start shape we are looking for + Image& face_roi, // out: ROI around face, possibly rotated upright + DetPar& detpar_roi, // out: detpar wrt to face_roi + DetPar& detpar, // io: detpar wrt to img (has face rect on entry) + const Image& img, // in: the image (grayscale) + const vec_Mod& mods, // in: a vector of models, one for each yaw range + // (use only estart, and meanshape) + StasmCascadeClassifier cascade) +{ + PossiblySetRotToZero(detpar.rot); // treat small rots as zero rots + + FaceRoiAndDetPar(face_roi, detpar_roi, // get ROI around face + img, detpar, false); + + DetectEyesAndMouth(detpar_roi, // use OpenCV eye and mouth detectors + face_roi, cascade); + + // Some face detectors return the face rotation, some don't (in + // the call to NextFace_ just made via NextStartShapeAndRoi). + // If we don't have the rotation, then estimate it from the eye + // angle, if the eyes are available. + + if (!Valid(detpar.rot)) // don't have the face rotation? + { + detpar_roi.rot = EstRotFromEyeAngle(detpar_roi); + PossiblySetRotToZero(detpar_roi.rot); + detpar.rot = detpar_roi.rot; + if (detpar.rot != 0) + { + // face is rotated: rotate ROI and re-get the eyes and mouth + + // TODO: Prevent bogus OpenCV assert fail face_roi.data == img.data. + face_roi = Image(0,0); + + FaceRoiAndDetPar(face_roi, detpar_roi, + img, detpar, false); + + DetectEyesAndMouth(detpar_roi, // use OpenCV eye and mouth detectors + face_roi, cascade); + } + } + if (trace_g) + lprintf("%-6.6s yaw %3.0f rot %3.0f ", + EyawAsString(detpar_roi.eyaw), detpar_roi.yaw, detpar_roi.rot); + else + logprintf("%-6.6s yaw %3.0f rot %3.0f ", + EyawAsString(detpar_roi.eyaw), detpar_roi.yaw, detpar_roi.rot); + + // select an ASM model based on the face's yaw + const Mod* mod = mods[ABS(EyawAsModIndex(detpar_roi.eyaw, mods))]; + + const ESTART estart = mod->Estart_(); + CV_Assert(estart == ESTART_EYES || estart == ESTART_EYE_AND_MOUTH); + + startshape = StartShapeFromDetPar(detpar_roi, + face_roi, mod->MeanShape_(), estart); + + if (IsLeftFacing(detpar_roi.eyaw)) + FlipImgInPlace(face_roi); + + JitterPointsAt00(startshape); + +} + +// Get the start shape for the next face in the image, and the ROI around it. +// The returned shape is wrt the ROI frame. +// +// Note that we we previously called the face detector, and the face +// rectangle(s) were saved privately in facedet, and are now ready for +// immediate retrieval by NextFace_. +// +// The following comment applies for three-quarter models (not for frontal +// models): If the three-quarter face is left-facing, we flip the ROI so +// the returned face is right-facing. This is because our three-quarter +// ASM models are for right-facing faces. For frontal faces (the yaw00 +// model), faces are not flipped. + +bool NextStartShapeAndRoi( // use face detector results to estimate start shape + Shape& startshape, // out: the start shape + Image& face_roi, // out: ROI around face, possibly rotated upright + DetPar& detpar_roi, // out: detpar wrt to face_roi + DetPar& detpar, // out: detpar wrt to img + const Image& img, // in: the image (grayscale) + const vec_Mod& mods, // in: a vector of models, one for each yaw range + // (use only estart, and meanshape) + FaceDet& facedet, // io: the face detector (internal face index bumped) + StasmCascadeClassifier cascade) +{ + detpar = facedet.NextFace_(); // get next face's detpar from the face det + + if (Valid(detpar.x)) // NextFace_ returned a face? + StartShapeAndRoi(startshape, face_roi, detpar_roi, detpar, img, mods, cascade); + + return Valid(detpar.x); +} + +} // namespace stasm diff --git a/3rdparty/stasm4.0.0/stasm/startshape.h b/3rdparty/stasm4.0.0/stasm/startshape.h new file mode 100755 index 0000000..dfe9b5d --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/startshape.h @@ -0,0 +1,35 @@ +// startshape.h: routines for finding the start shape for an ASM search +// +// Copyright (C) 2005-2013, Stephen Milborrow + +#ifndef STASM_startshape_H +#define STASM_startshape_H + +#include "stasmcascadeclassifier.h" + +namespace stasm +{ +// get the start shape for the next face in the image, and the ROI around it + +bool NextStartShapeAndRoi( // use face detector results to estimate start shape + Shape& startshape, // out: the start shape we are looking for + Image& face_roi, // out: ROI around face, possibly rotated upright + DetPar& detpar_roi, // out: detpar wrt to face_roi + DetPar& detpar, // out: detpar wrt to img + const Image& img, // in: the image (grayscale) + const vec_Mod& mods, // in: a vector of models, one for each yaw range + FaceDet& facedet, // io: the face detector (internal face index bumped) + StasmCascadeClassifier cascade); + +void PinnedStartShapeAndRoi( // use the pinned landmarks to init the start shape + Shape& startshape, // out: the start shape (in ROI frame) + Image& face_roi, // out: ROI around face, possibly rotated upright + DetPar& detpar_roi, // out: detpar wrt to face_roi + DetPar& detpar, // out: detpar wrt to img + Shape& pinned_roi, // out: pinned arg translated to ROI frame + const Image& img, // in: the image (grayscale) + const vec_Mod& mods, // in: a vector of models, one for each yaw range + const Shape& pinned); // in: pinned landmarks + +} // namespace stasm +#endif // STASM_startshape_H diff --git a/3rdparty/stasm4.0.0/stasm/stasm.h b/3rdparty/stasm4.0.0/stasm/stasm.h new file mode 100755 index 0000000..2161bf8 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/stasm.h @@ -0,0 +1,100 @@ +// stasm.h: (nearly) all include files for the Stasm package +// +// Copyright (C) 2005-2013, Stephen Milborrow + +#ifndef STASM_H +#define STASM_H + +static const char* const STASM_VERSION = "4.0.0" +#if MOD_3 // experimental versions + "_MOD_3"; +#elif MOD_A1 + "_MOD_A1"; +#elif MOD_A + "_MOD_A"; +#elif MOD_A_EMU + "_MOD_A_EMU"; +#else + ""; // released version of Stasm + #define MOD_1 1 +#endif + +#define TRACE_IMAGES 0 // 1 to generate debugging images + +#if _MSC_VER >= 1200 +// disable the following warning: +// opencv2\flann\logger.h(66) : warning C4996: 'fopen': This function may be unsafe +#pragma warning(disable: 4996) +// disable the following warning (x64 builds only) +// opencv2\flann\lsh_table.h(417) : warning C4267: conversion from 'size_t' to ... +#pragma warning(disable:4267) +#endif + +#include "opencv/cv.h" + +#if _MSC_VER >= 1200 +#pragma warning(default:4996) // re-enable the warnings disabled above +#pragma warning(default:4267) +#endif + +#if TRACE_IMAGES // will be 0 unless debugging +#include "opencv/highgui.h" // need imwrite +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#if _OPENMP +#include +#endif + +#include "misc.h" +#include "print.h" +#include "err.h" +#include "stasm_landmarks.h" +#include "stasm_lib.h" +#include "stasm_lib_ext.h" +#include "landmarks.h" +#include "basedesc.h" +#include "classicdesc.h" +#include "hat.h" +#include "hatdesc.h" +#include "shapehacks.h" +#include "shapemod.h" +#include "asm.h" + +#if MOD_1 // released version of Stasm + #include "../stasm/MOD_1/facedet.h" + #include "../stasm/MOD_1/initasm.h" +#elif MOD_3 // experimental versions + #include "../stasm/MOD_3/facedet.h" + #include "../stasm/MOD_3/initasm.h" +#elif MOD_A1 + #include "../stasm/MOD_A1/facedet.h" + #include "../stasm/MOD_A1/initasm.h" +#elif MOD_A + #include "../stasm/MOD_A/facedet.h" + #include "../stasm/MOD_A/initasm.h" +#elif MOD_A_EMU + #include "../stasm/MOD_A/facedet.h" + #include "../stasm/MOD_A/initasm.h" +#else + error illegal MOD +#endif + +#include "eyedet.h" +#include "convshape.h" +#include "eyedist.h" +#include "faceroi.h" +#include "pinstart.h" +#include "shape17.h" +#include "startshape.h" + +#endif // STASM_H diff --git a/3rdparty/stasm4.0.0/stasm/stasm_landmarks.h b/3rdparty/stasm4.0.0/stasm/stasm_landmarks.h new file mode 100755 index 0000000..abbb2b3 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/stasm_landmarks.h @@ -0,0 +1,93 @@ +// stasm_landmarks.h: define the Stasm landmarks +// +// Copyright (C) 2005-2013, Stephen Milborrow + +#ifndef STASM_STASM_LANDMARKS_H +#define STASM_STASM_LANDMARKS_H + +// All landmark names begin with L_ followed by L, C, or R, +// for left, center, or right. +// Note that left and right are with respect to the viewer, not the subject. + +enum stasm_LANDMARKS_77 // stasm77 landmarks +{ + L_LTemple, // 00 + L_LJaw01, // 01 + L_LJawNoseline, // 02 nose line on left jaw + L_LJawMouthline, // 03 mouth line on left jaw + L_LJaw04, // 04 + L_LJaw05, // 05 + L_CTipOfChin, // 06 + L_RJaw07, // 07 + L_RJaw08, // 08 + L_RJawMouthline, // 09 + L_RJawNoseline, // 10 + L_RJaw11, // 11 + L_RTemple, // 12 + L_RForehead, // 13 + L_CForehead, // 14 + L_LForehead, // 15 + L_LEyebrowTopInner, // 16 + L_LEyebrowTopOuter, // 17 + L_LEyebrowOuter, // 18 + L_LEyebrowBotOuter, // 19 + L_LEyebrowBotInner, // 20 + L_LEyebrowInner, // 21 + L_REyebrowInner, // 22 + L_REyebrowTopInner, // 23 + L_REyebrowTopOuter, // 24 + L_REyebrowOuter, // 25 + L_REyebrowBotOuter, // 26 + L_REyebrowBotInner, // 27 + L_REyelid, // 28 + L_LEyelid, // 29 + L_LEyeInner, // 30 + L_LEye31, // 31 + L_LEyeTop, // 32 + L_LEye33, // 33 + L_LEyeOuter, // 34 + L_LEye35, // 35 + L_LEyeBot, // 36 + L_LEye37, // 37 + L_LPupil, // 38 + L_RPupil, // 39 + L_REyeInner, // 40 + L_REye41, // 41 + L_REyeTop, // 42 + L_REye43, // 43 + L_REyeOuter, // 44 + L_REye45, // 45 + L_REyeBot, // 46 + L_REye47, // 47 + L_RNoseMid, // 48 + L_CNoseMid, // 49 + L_LNoseMid, // 50 + L_LNostrilTop, // 51 + L_CNoseTip, // 52 + L_RNostrilTop, // 53 + L_RNoseSide, // 54 + L_RNostrilBot, // 55 + L_CNoseBase, // 56 + L_LNostrilBot, // 57 + L_LNoseSide, // 58 + L_LMouthCorner, // 59 + L_LMouth60, // 60 + L_LMouthCupid, // 61 + L_CTopOfTopLip, // 62 + L_RMouthCupid, // 63 + L_RMouth64, // 64 + L_RMouthCorner, // 65 + L_RMouth66, // 66 + L_CBotOfTopLip, // 67 + L_LMouth68, // 68 + L_LMouth69, // 69 + L_CTopOfBotLip, // 70 + L_RMouth71, // 71 + L_RMouth72, // 72 + L_RMouth73, // 73 + L_CBotOfBotLip, // 74 + L_LMouth75, // 75 + L_LMouth76 // 76 +}; + +#endif // STASM_STASM_LANDMARKS_H diff --git a/3rdparty/stasm4.0.0/stasm/stasm_lib.cpp b/3rdparty/stasm4.0.0/stasm/stasm_lib.cpp new file mode 100755 index 0000000..bfea3f9 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/stasm_lib.cpp @@ -0,0 +1,329 @@ +// stasm_lib.cpp: interface to the Stasm library +// +// Copyright (C) 2005-2013, Stephen Milborrow + +#include "stasm.h" + +using namespace stasm; + +const char* const stasm_VERSION = STASM_VERSION; + +static vec_Mod mods_g; // the ASM model(s) +//static FaceDet facedet_g; // the face detector +//static Image img_g; // the current image + +//----------------------------------------------------------------------------- + +namespace stasm +{ +static void CheckStasmInit(void) +{ + if (mods_g.empty()) + Err("Models not initialized (missing call to stasm_init?)"); +} + +static void ShapeToLandmarks( // convert Shape to landmarks (float *) + float* landmarks, // out + const Shape& shape) // in +{ + CV_Assert(shape.rows <= stasm_NLANDMARKS); + int i; + for (i = 0; i < MIN(shape.rows, stasm_NLANDMARKS); i++) + { + landmarks[i * 2] = float(shape(i, IX)); + landmarks[i * 2 + 1] = float(shape(i, IY)); + } + // set remaining unused landmarks if any to 0,0 + for (; i < stasm_NLANDMARKS; i++) + { + landmarks[i * 2] = 0; + landmarks[i * 2 + 1] = 0; + } +} + +static const Shape LandmarksAsShape( // return a Shape + const float* landmarks) // in +{ + Shape shape(stasm_NLANDMARKS, 2); + for (int i = 0; i < stasm_NLANDMARKS; i++) + { + shape(i, IX) = landmarks[i*2]; + shape(i, IY) = landmarks[i*2+1]; + } + return shape; +} + +} // namespace stasm + +//----------------------------------------------------------------------------- + +int stasm_init_ext( // extended version of stasm_init + const char* datadir, // in: directory of face detector files + int trace, // in: 0 normal use, 1 trace to stdout and stasm.log + void* detparams) // in: NULL or face detector parameters +{ + (void) detparams; + + int returnval = 1; // assume success + CatchOpenCvErrs(); + try + { + print_g = (trace != 0); + trace_g = (trace != 0); + if (mods_g.empty()) // not yet initialized? + { + if (trace) + { + // Open a log file in the current directory (if possible). + // After the log file is opened, lprintf and stasm_printf + // will print to stasm.log (as well as to stdout). + //OpenLogFile(); + } + lprintf("Stasm version %s%s\n", + stasm_VERSION, trace? " Logging to stasm.log": ""); + CV_Assert(datadir && datadir[0] && STRNLEN(datadir, SLEN) < SLEN); + InitMods(mods_g, datadir); // init ASM model(s) + //facedet_g.OpenFaceDetector_(datadir, detparams); + //OpenEyeMouthDetectors(mods_g, datadir); + } + CheckStasmInit(); + } + catch(...) + { + returnval = 0; // a call was made to Err or a CV_Assert failed + } + UncatchOpenCvErrs(); + return returnval; +} + +int stasm_init( // call once, at bootup (to read models from disk) + const char* datadir, // in: directory of face detector files + int trace) // in: 0 normal use, 1 trace to stdout and stasm.log +{ + return stasm_init_ext(datadir, trace, NULL); +} + +int stasm_open_image_ext( // extended version of stasm_open_image + const char* img, // in: gray image data, top left corner at 0,0 + int width, // in: image width + int height, // in: image height + const char* imgpath, // in: image path, used only for err msgs and debug + int multiface, // in: 0=return only one face, 1=allow multiple faces + int minwidth, // in: min face width as percentage of img width + void* user) // in: NULL or pointer to user abort func +{ + (void) img; + (void) width; + (void) height; + (void) imgpath; + (void) user; + + int returnval = 1; // assume success + CatchOpenCvErrs(); + try + { + //CV_Assert(imgpath && STRNLEN(imgpath, SLEN) < SLEN); + CV_Assert(multiface == 0 || multiface == 1); + CV_Assert(minwidth >= 1 && minwidth <= 100); + + CheckStasmInit(); + + //img_g = Image(height, width,(unsigned char*)img); + + // call the face detector to detect the face rectangle(s) + // facedet_g.DetectFaces_(img_g, imgpath, multiface == 1, minwidth, user); + } + catch(...) + { + returnval = 0; // a call was made to Err or a CV_Assert failed + } + UncatchOpenCvErrs(); + return returnval; +} + +int stasm_open_image( // call once per image, detect faces + const char* img, // in: gray image data, top left corner at 0,0 + int width, // in: image width + int height, // in: image height + const char* imgpath, // in: image path, used only for err msgs and debug + int multiface, // in: 0=return only one face, 1=allow multiple faces + int minwidth) // in: min face width as percentage of img width +{ + return stasm_open_image_ext(img, width, height, imgpath, + multiface, minwidth, NULL); +} + +int stasm_search_auto_ext( // extended version of stasm_search_auto + int* foundface, // out: 0=no more faces, 1=found face + float* landmarks, // out: x0, y0, x1, y1, ..., caller must allocate + float* estyaw, // out: NULL or pointer to estimated yaw + const char* data, + const int width, + const int height, + StasmCascadeClassifier cascade) +{ + int returnval = 1; // assume success + *foundface = 0; // but assume no face found + try + { + CheckStasmInit(); + + Shape shape; // the shape with landmarks + Image face_roi; // cropped to area around startshape and possibly rotated + DetPar detpar_roi; // detpar translated to ROI frame + DetPar detpar; // params returned by face det, in img frame + + // Allocate image + Image img = Image(height, width,(unsigned char*)data); + + FaceDet facedet; + + // call the face detector to detect the face rectangle(s) + facedet.DetectFaces_(img, NULL, false, 10, NULL, cascade.faceCascade); + + // Get the start shape for the next face in the image, and the ROI around it. + // The shape will be wrt the ROI frame. + if (NextStartShapeAndRoi(shape, face_roi, detpar_roi, detpar, + img, mods_g, facedet, cascade)) + { + // now working with maybe flipped ROI and start shape in ROI frame + *foundface = 1; + if (trace_g) // show start shape? + LogShape(RoiShapeToImgFrame(shape, face_roi, detpar_roi, detpar), + "auto_start"); + + // select an ASM model based on the face's yaw + const int imod = ABS(EyawAsModIndex(detpar.eyaw, mods_g)); + + // do the actual ASM search + shape = mods_g[imod]->ModSearch_(shape, face_roi); + + shape = RoiShapeToImgFrame(shape, face_roi, detpar_roi, detpar); + // now working with non flipped start shape in image frame + RoundMat(shape); + ShapeToLandmarks(landmarks, shape); + if (estyaw) + *estyaw = float(detpar.yaw); + } + } + catch(...) + { + returnval = 0; // a call was made to Err or a CV_Assert failed + } + return returnval; +} + +int stasm_search_auto(// call repeatedly to find all faces + int* foundface, // out: 0=no more faces, 1=found face + float* landmarks, // out: x0, y0, x1, y1, ..., caller must allocate + const char *data, + const int width, + const int height, + StasmCascadeClassifier cascade) +{ + return stasm_search_auto_ext(foundface, landmarks, NULL, data, width, height, cascade); +} + +int stasm_search_single( // wrapper for stasm_search_auto and friends + int* foundface, // out: 0=no face, 1=found face + float* landmarks, // out: x0, y0, x1, y1, ..., caller must allocate + const char* img, // in: gray image data, top left corner at 0,0 + int width, // in: image width + int height, // in: image height + StasmCascadeClassifier cascade, + const char* imgpath, // in: image path, used only for err msgs and debug + const char* datadir) // in: directory of face detector files +{ + (void) datadir; + (void) imgpath; + + return stasm_search_auto(foundface, landmarks, img, width, height, cascade); +} + +int stasm_search_pinned( // call after the user has pinned some points + float* landmarks, // out: x0, y0, x1, y1, ..., caller must allocate + const float* pinned, // in: pinned landmarks (0,0 points not pinned) + const char* data, // in: gray image data, top left corner at 0,0 + int width, // in: image width + int height, // in: image height + const char* imgpath) // in: image path, used only for err msgs and debug +{ + (void) width; + (void) height; + (void) imgpath; + + int returnval = 1; // assume success + try + { + CheckStasmInit(); + + Image img = Image(height, width,(unsigned char*)data); + + const Shape pinnedshape(LandmarksAsShape(pinned)); + + Shape shape; // the shape with landmarks + Image face_roi; // img cropped to startshape area and maybe rotated + Shape pinned_roi; // pinned translated to ROI frame + DetPar detpar_roi; // detpar translated to ROI frame + DetPar detpar; // params returned by pseudo face det, in img frame + + PinnedStartShapeAndRoi(shape, face_roi, detpar_roi, detpar, pinned_roi, img, mods_g, pinnedshape); + + // now working with maybe flipped ROI and start shape in ROI frame + const int imod = ABS(EyawAsModIndex(detpar.eyaw, mods_g)); + + shape = mods_g[imod]->ModSearch_(shape, face_roi, &pinned_roi); // ASM search + + shape = RoiShapeToImgFrame(shape, face_roi, detpar_roi, detpar); + // now working with non flipped start shape in image frame + RoundMat(shape); + ForcePinnedPoints(shape, pinnedshape); // undo above RoundMat on pinned points + ShapeToLandmarks(landmarks, shape); + } + catch(...) + { + returnval = 0; // a call was made to Err or a CV_Assert failed + } + return returnval; +} + +const char* stasm_lasterr(void) // same as LastErr but not in stasm namespace +{ + return LastErr(); // return the last error message (stashed in sgErr) +} + +void stasm_force_points_into_image( // force landmarks into image boundary + float* landmarks, // io + int ncols, // in + int nrows) // in +{ + for (int i = 0; i < stasm_NLANDMARKS; i++) + { + landmarks[i * 2] = Clamp(landmarks[i * 2], 0.f, float(ncols-1)); + landmarks[i * 2 + 1] = Clamp(landmarks[i * 2 + 1], 0.f, float(nrows-1)); + } +} + +void stasm_convert_shape( // convert stasm 77 points to given number of points + float* landmarks, // io: return all points zero if can't do conversion + int nlandmarks) // in: 77=nochange 76=stasm3 68=xm2vts 22=ar 20=bioid 17=me17 +{ + Shape newshape = ConvertShape(LandmarksAsShape(landmarks), nlandmarks); + if (newshape.rows) + ShapeToLandmarks(landmarks, newshape); + else // cannot convert, set all points to 0,0 + for (int i = 0; i < stasm_NLANDMARKS; i++) + landmarks[i * 2] = landmarks[i * 2 + 1] = 0; +} + +void stasm_printf( // print to stdout and to the stasm.log file if it is open + const char* format, // args like printf + ...) +{ + char s[SBIG]; + va_list args; + va_start(args, format); + VSPRINTF(s, format, args); + va_end(args); + lputs(s); +} diff --git a/3rdparty/stasm4.0.0/stasm/stasm_lib.h b/3rdparty/stasm4.0.0/stasm/stasm_lib.h new file mode 100755 index 0000000..ba56b55 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/stasm_lib.h @@ -0,0 +1,136 @@ +// stasm_lib.h: interface to the Stasm library +// +// The Stasm library interface function and variable names are all prefixed +// by "stasm_". They are not in the stasm namespace. +// +// The library routines return 1 on success, 0 on error (they do not throw +// exceptions). Use stasm_lasterr to get the error string. An example +// error is "Cannot open ../data/haarcascade_frontalface_alt2.xml". +// Errors in OpenCV routines called by Stasm and out-of-memory errors are +// handled in the same way. +// +// Typical usage in multiple face scenario with stasm_search_auto: +// +// stasm_init() +// load image from disk +// optionally present the image to the user +// stasm_open_image() +// while stasm_find_face() finds another face: +// save the face shape (and optionally present the image to the user) +// optionally present the image with all face shapes to the user +// optionally call stasm_search_pinned to correct any bad faces +// +// The interface is defined in vanilla C so can be used by code +// in "any" language. +// +//----------------------------------------------------------------------------- +// +// Stasm License Agreement +// +// Copyright (C) 2005-2013, Stephen Milborrow +// All rights reserved. +// +// Redistribution of Stasm in source and binary forms, with or +// without modification, is permitted provided that the following +// conditions are met: +// * Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimers. +// +// * Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimers in the documentation +// and/or other materials provided with the distribution. +// +// A SIFT patent restriction may be in conflict with the copyright +// freedoms granted by this license. This license does not give you +// permission to infringe patents. +// +// This software is provided by the copyright holders and contributors "as is" and +// any express or implied warranties, including, but not limited to, the implied +// warranties of merchantability and fitness for a particular purpose are disclaimed. +// In no event shall the copyright holder be liable for any direct, +// indirect, incidental, special, exemplary, or consequential damages +// (including, but not limited to, procurement of substitute goods or services; +// loss of use, data, or profits; or business interruption) however caused +// and on any theory of liability, whether in contract, strict liability, +// or tort (including negligence or otherwise) arising in any way out of +// the use of this software, even if advised of the possibility of such damage. +// +// Note that Stasm versions prior to version 4.0.0 had a different license. +// +//----------------------------------------------------------------------------- + +#ifndef STASM_LIB_H +#define STASM_LIB_H + +#include "stasmcascadeclassifier.h" + +static const int stasm_NLANDMARKS = 77; // number of landmarks + +extern const char* const stasm_VERSION; + +extern "C" +int stasm_init( // call once, at bootup + const char* datadir, // in: directory of face detector files + int trace); // in: 0 normal use, 1 trace to stdout and stasm.log + +extern "C" +int stasm_open_image( // call once per image, detect faces + const char* img, // in: gray image data, top left corner at 0,0 + int width, // in: image width + int height, // in: image height + const char* imgpath, // in: image path, used only for err msgs and debug + int multiface, // in: 0=return only one face, 1=allow multiple faces + int minwidth); // in: min face width as percentage of img width + +extern "C" +int stasm_search_auto( // call repeatedly to find all faces + int* foundface, // out: 0=no more faces, 1=found face + float* landmarks, // out: x0, y0, x1, y1, ..., caller must allocate + const char* data, + const int width, + const int height, + StasmCascadeClassifier cascade); + +extern "C" +int stasm_search_single( // wrapper for stasm_search_auto and friends + int* foundface, // out: 0=no face, 1=found face + float* landmarks, // out: x0, y0, x1, y1, ..., caller must allocate + const char* img, // in: gray image data, top left corner at 0,0 + int width, // in: image width + int height, // in: image height + StasmCascadeClassifier cascade, + const char* imgpath, // in: image path, used only for err msgs and debug + const char* datadir); // in: directory of face detector files + +extern "C" // find landmarks, no OpenCV face detect +int stasm_search_pinned( // call after the user has pinned some points + float* landmarks, // out: x0, y0, x1, y1, ..., caller must allocate + const float* pinned, // in: pinned landmarks (0,0 points not pinned) + const char* img, // in: gray image data, top left corner at 0,0 + int width, // in: image width + int height, // in: image height + const char* imgpath); // in: image path, used only for err msgs and debug + +extern "C" +const char* stasm_lasterr(void); // return string describing last error + +extern "C" +void stasm_force_points_into_image( // force landmarks into image boundary + float* landmarks, // io + int ncols, // in + int nrows); // in + +extern "C" +void stasm_convert_shape( // convert stasm 77 points to given number of points + float* landmarks, // io: return all points zero if can't do conversion + int nlandmarks); // in: 77=nochange 76=stasm3 68=xm2vts 22=ar 20=bioid 17=me17 + +// stasm_printf is like printf but also prints to the file stasm.log if it +// is open. The file stasm.log will be open if stasm_init was called with +// trace=1. This function was added primarily for the programs that test +// the stasm library. + +extern "C" +void stasm_printf(const char* format, ...); // print to stdout and stasm.log + +#endif // STASM_LIB_H diff --git a/3rdparty/stasm4.0.0/stasm/stasm_lib_ext.h b/3rdparty/stasm4.0.0/stasm/stasm_lib_ext.h new file mode 100755 index 0000000..174d4a9 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/stasm_lib_ext.h @@ -0,0 +1,29 @@ +// stasm_lib_ext.h: experimental extensions to the Stasm library +// Please don't use these functions, they may change at any time. + +#ifndef STASM_LIB_EXT_H +#define STASM_LIB_EXT_H + +extern "C" // extended version of stasm_init +int stasm_init_ext( // call once, at bootup + const char* datadir, // in: directory of face detector files + int trace, // in: 0 normal use, 1 trace to stdout and stasm.log + void* detparams); // in: NULL or face detector parameters + +extern "C" // extended version of stasm_open_image +int stasm_open_image_ext( // call once per image, detect faces + const char* img, // in: gray image data, top left corner at 0,0 + int width, // in: image width + int height, // in: image height + const char* imgpath, // in: image path, used only for err msgs and debug + int multiface, // in: 0=return only one face, 1=allow multiple faces + int minwidth, // in: min face width as percentage of img width + void* user); // in: NULL or pointer to user abort func + +extern "C" +int stasm_search_auto_ext( // extended version of stasm_search_auto + int* foundface, // out: 0=no more faces, 1=found face + float* landmarks, // out: x0, y0, x1, y1, ..., caller must allocate + float* estyaw); // out: NULL or pointer to estimated yaw + +#endif // STASM_LIB_EXT_H diff --git a/3rdparty/stasm4.0.0/stasm/stasmcascadeclassifier.h b/3rdparty/stasm4.0.0/stasm/stasmcascadeclassifier.h new file mode 100644 index 0000000..e2870a5 --- /dev/null +++ b/3rdparty/stasm4.0.0/stasm/stasmcascadeclassifier.h @@ -0,0 +1,27 @@ +#ifndef STASMCASCADECLASSIFIER_H +#define STASMCASCADECLASSIFIER_H + +#include +#include + +class StasmCascadeClassifier +{ + +public: + cv::CascadeClassifier faceCascade; + cv::CascadeClassifier mouthCascade; + cv::CascadeClassifier leftEyeCascade; + cv::CascadeClassifier rightEyeCascade; + + bool load(const std::string &path) { + if (!faceCascade.load(path + "haarcascades/haarcascade_frontalface_alt2.xml") || + !mouthCascade.load(path + "haarcascades/haarcascade_mcs_mouth.xml") || + !leftEyeCascade.load(path + "haarcascades/haarcascade_mcs_lefteye.xml") || + !rightEyeCascade.load(path + "haarcascades/haarcascade_mcs_righteye.xml")) return false; + + return true; + } + +}; + +#endif // STASMCASCADECLASSIFIER_H diff --git a/3rdparty/stasm/stasm/stasm/include/stasmhash.h b/3rdparty/stasm4.0.0/stasm/stasmhash.h index e104a9f..e104a9f 100644 --- a/3rdparty/stasm/stasm/stasm/include/stasmhash.h +++ b/3rdparty/stasm4.0.0/stasm/stasmhash.h diff --git a/CMakeLists.txt b/CMakeLists.txt index f22d4d1..6dff8ec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,7 @@ if(${CMAKE_VERSION} VERSION_EQUAL 2.8.11) cmake_policy(SET CMP0020 OLD) endif() if(${CMAKE_VERSION} VERSION_GREATER 2.8.11) - cmake_policy(SET CMP0020 NEW) + cmake_policy(SET CMP0020 OLD) endif() if(${CMAKE_VERSION} VERSION_EQUAL 2.8.12) @@ -89,7 +89,7 @@ set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} ${Qt5Core_QTMAIN_LIBRARIES}) # Find OpenCV find_package(OpenCV REQUIRED) -set(OPENCV_DEPENDENCIES opencv_calib3d opencv_core opencv_features2d opencv_flann opencv_gpu opencv_highgui opencv_imgproc opencv_ml opencv_nonfree opencv_objdetect opencv_photo opencv_video opencv_ocl) +set(OPENCV_DEPENDENCIES opencv_calib3d opencv_core opencv_features2d opencv_flann opencv_gpu opencv_highgui opencv_imgproc opencv_ml opencv_nonfree opencv_objdetect opencv_photo opencv_video) set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} ${OpenCV_LIBS}) # Find Alphanum diff --git a/openbr/core/qtutils.cpp b/openbr/core/qtutils.cpp index c16a20b..e57537b 100644 --- a/openbr/core/qtutils.cpp +++ b/openbr/core/qtutils.cpp @@ -81,7 +81,7 @@ void readFile(const QString &file, QStringList &lines) { QByteArray data; readFile(file, data); - lines = QString(data).split(QRegularExpression("(\n|\r\n|\r)"), QString::SkipEmptyParts); + lines = QString(data).split(QRegularExpression("[\n|\r\n|\r]"), QString::SkipEmptyParts); for (int i=0; i attributes; - - TemplateList readBlock(bool *done) - { - *done = true; - TemplateList templates; - QStringList lines = QtUtils::readLines(file); - for (int i=0; i= 2147483648) /* Don't use face detection results for now */ { - i+=2; continue; - } else if (ok && attributes.contains(attributeKey)) { - file.set(attributes[attributeKey],true); - } - - // Next line should be "{ numLandmarks dimensions" - // We don't current support more than two dimensions for landmarks - values = lines[++i].split(' '); - int numLandmarks = values.at(1).toInt(&ok); - if (ok) { - QList points; points.reserve(numLandmarks); - for (int j=0; j vals = QtUtils::toFloats(lines[++i].split(' ')); - points.append(QPointF(vals[0], vals[1])); - } - file.setPoints(points); - } - templates.append(file); - } - return templates; - } - - void write(const Template &t) - { - (void) t; - qFatal("Not implemented."); - } - - void init() - { - // attribute codes - attributes[4] = "Glasses"; - attributes[8] = "Beard"; - attributes[16] = "Mustache"; - attributes[256] = "BadImg"; - attributes[512] = "Cropped"; - attributes[2048] = "BadEye"; - } -}; - -BR_REGISTER(Gallery, shapeGallery) - #ifdef CVMATIO using namespace cv; diff --git a/openbr/plugins/stasm4.cmake b/openbr/plugins/stasm4.cmake index 5f35a66..42c8de5 100644 --- a/openbr/plugins/stasm4.cmake +++ b/openbr/plugins/stasm4.cmake @@ -2,19 +2,14 @@ set(BR_WITH_STASM4 ON CACHE BOOL "Build with Stasm") if(${BR_WITH_STASM4}) find_package(Stasm4 REQUIRED) - - include_directories(${STASM4_DIR}/include) - set(BR_THIRDPARTY_SRC ${BR_THIRDPARTY_SRC} plugins/stasm4.cpp) - set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} ${STASM4_LIBS}) + set(BR_THIRDPARTY_LIBS ${BR_THIRDPARTY_LIBS} ${Stasm4_LIBS}) if(WIN32) - install(DIRECTORY ${STASM4_DIR}/bin/ DESTINATION bin) - install(DIRECTORY ${STASM4_DIR}/lib/ DESTINATION lib) + install(DIRECTORY ${Stasm_DIR}/build/ DESTINATION bin) else() - install(DIRECTORY ${STASM4_DIR}/lib/ DESTINATION lib) + install(DIRECTORY ${Stasm_DIR}/build/ DESTINATION lib) endif() - install(DIRECTORY ${STASM4_DIR}/include/ DESTINATION include) - install(DIRECTORY ${STASM4_DATA_DIR} DESTINATION share/openbr/models/stasm) + install(DIRECTORY ${Stasm_DIR}/data/ DESTINATION share/openbr/models/stasm) endif() diff --git a/openbr/plugins/stasm4.cpp b/openbr/plugins/stasm4.cpp index fc0b43e..0a350e3 100644 --- a/openbr/plugins/stasm4.cpp +++ b/openbr/plugins/stasm4.cpp @@ -1,5 +1,5 @@ -#include -#include +#include +#include #include #include #include "openbr_internal.h" @@ -85,11 +85,8 @@ class StasmTransform : public UntrainableTransform else if (src.m().channels() != 1) qFatal("Stasm expects single channel matrices."); - // Because we pass stasmSrc.data as a pointer to a function that has no - // knowledge of OpenCV regions of interest. if (!stasmSrc.isContinuous()) qFatal("Stasm expects continuous matrix data."); - dst = src; int foundFace = 0; diff --git a/share/openbr/cmake/FindStasm4.cmake b/share/openbr/cmake/FindStasm4.cmake index f44fdb3..43fda3b 100644 --- a/share/openbr/cmake/FindStasm4.cmake +++ b/share/openbr/cmake/FindStasm4.cmake @@ -1,62 +1,20 @@ # ================================================================ # The Stasm CMake configuration file # -# Formatting from: http://www.cmake.org/Wiki/CMake:How_To_Find_Libraries -# # Usage from an external project: # In your CMakeLists.txt, add these lines: # -# find_package(STASM4 REQUIRED) -# include_directories(STASM4_INCLUDE_DIR) -# target_link_libraries(MY_TARGET ${STASM4_LIBS}) +# find_package(Stasm4 REQUIRED) +# target_link_libraries(MY_TARGET ${Stasm4_LIBS}) # ================================================================ -include(ExternalProject) - -get_cmake_property(CACHE_VARS CACHE_VARIABLES) -foreach(CACHE_VAR ${CACHE_VARS}) - get_property(CACHE_VAR_HELPSTRING CACHE ${CACHE_VAR} PROPERTY HELPSTRING) - if(CACHE_VAR_HELPSTRING STREQUAL "No help, variable specified on the command line.") - get_property(CACHE_VAR_TYPE CACHE ${CACHE_VAR} PROPERTY TYPE) - if(CACHE_VAR_TYPE STREQUAL "UNINITIALIZED") - set(CACHE_VAR_TYPE) - else() - set(CACHE_VAR_TYPE :${CACHE_VAR_TYPE}) - endif() - if(CACHE_VAR STREQUAL "CMAKE_PREFIX_PATH") - set(CMAKE_PREFIX_PATH "\"${${CACHE_VAR}}\"") - endif() - endif() -endforeach() - -find_path(STASM4_SOURCE_DIR stasm/stasm/include/stasm_lib.h ${CMAKE_SOURCE_DIR}/3rdparty/*) - -set(STASM4_PREFIX "${CMAKE_BINARY_DIR}/stasm") -set(STASM4_INSTALL_DIR "${CMAKE_BINARY_DIR}/stasm") - -# ExternalProject_Add doesn't respect the ; path separator (i.e. ; don't get no respect) -string(REPLACE ";" "::" CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH}") -# Have to use a name other than stasm so it doesn't conflict with the project itself -ExternalProject_Add(external_stasm - URL ${STASM4_SOURCE_DIR} - PREFIX ${STASM4_PREFIX} - LIST_SEPARATOR :: - CMAKE_ARGS -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} - -DCMAKE_INSTALL_PREFIX= - -DCMAKE_BUILD_TYPE=Release - INSTALL_DIR ${STASM4_INSTALL_DIR} - BINARY_DIR "${STASM4_PREFIX}/build" -) +find_path(Stasm_DIR stasm/stasm_lib.h ${CMAKE_SOURCE_DIR}/3rdparty/*) -# We have to fake a library being created to force external_stasm to be built -add_library(fake_stasm UNKNOWN IMPORTED) -add_dependencies(fake_stasm external_stasm) -ExternalProject_Get_Property(external_stasm install_dir) +add_subdirectory(${Stasm_DIR} ${Stasm_DIR}/build) -set(STASM4_FOUND TRUE) -set(STASM4_DIR ${install_dir}) -set(STASM4_DATA_DIR ${install_dir}/src/external_stasm/data) +set(SRC ${SOURCE};${SRC}) -link_directories(${install_dir}/lib) +include_directories(${Stasm_DIR}/stasm) +link_directories(${Stasm_DIR}/build) -set(STASM4_LIBS stasm) +set(Stasm4_LIBS stasm)