Commit 4962807c919b542aba997d49cf3bc5e94e974cca

Authored by Josh Klontz
1 parent 6c78c5ee

removed attribute algorithms

openbr/plugins/core/attributealgorithms.cpp deleted
1 -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *  
2 - * Copyright 2012 The MITRE Corporation *  
3 - * *  
4 - * Licensed under the Apache License, Version 2.0 (the "License"); *  
5 - * you may not use this file except in compliance with the License. *  
6 - * You may obtain a copy of the License at *  
7 - * *  
8 - * http://www.apache.org/licenses/LICENSE-2.0 *  
9 - * *  
10 - * Unless required by applicable law or agreed to in writing, software *  
11 - * distributed under the License is distributed on an "AS IS" BASIS, *  
12 - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *  
13 - * See the License for the specific language governing permissions and *  
14 - * limitations under the License. *  
15 - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */  
16 -  
17 -#include <openbr/plugins/openbr_internal.h>  
18 -  
19 -namespace br  
20 -{  
21 -  
22 -/*!  
23 - * \ingroup initializers  
24 - * \brief Initializes global abbreviations with implemented algorithms for attributes  
25 - * \author Babatunde Ogunfemi \cite baba1472  
26 - */  
27 -class AttributeAlgorithmsInitializer : public Initializer  
28 -{  
29 - Q_OBJECT  
30 -  
31 - void initialize() const  
32 - {  
33 - // Constants  
34 - QString BASE="Open+PP5Register+Rename(PP5_Landmark0_Right_Eye,Affine_0)+Rename(PP5_Landmark1_Left_Eye,Affine_1)+Affine(192,240,.345,.475)+Cvt(Gray)+Stasm(false,true,[(66.24,114),(125.76,114)])";  
35 - QString SUBSPACE ="Blur(1.1)+Gamma(0.2)+DoG(1,2)+ContrastEq(0.1,10)+LBP(1,2)+RectRegions(8,8,4,4)+Hist(59)+Cat+PCA(0.95)";  
36 -  
37 - QString NOSE="RectFromStasmNoseWithBridge+ROI+Resize(36,24)+" + SUBSPACE;  
38 - QString MOUTH="RectFromStasmMouth+ROI+Resize(24,36)+" + SUBSPACE;  
39 - QString EYES="RectFromStasmEyes+ROI+Resize(24,36)+" + SUBSPACE;  
40 - QString HAIR="RectFromStasmHair+ROI+Resize(24,36)+" + SUBSPACE;  
41 - QString BROW="RectFromStasmBrow+ROI+Resize(24,36)+" + SUBSPACE;  
42 - QString JAW="RectFromStasmJaw+ROI+Resize(36,36)+" + SUBSPACE;  
43 - QString FACE = "Crop(24,30,144,190)+Resize(36,36)+" + SUBSPACE;  
44 -  
45 - // All Attributes  
46 - Globals->abbreviations.insert("AllAttributes", "AttributeBrow/AttributeMouth/AttributeEyes/AttributeFace/AttributeHair/AttributeNose/AttributeJaw");  
47 - Globals->abbreviations.insert("AllAttributesMatching", "(AttributeBrow)/(AttributeMouth)/(AttributeEyes)/(AttributeFace)/(AttributeHair)/(AttributeNose)/(AttributeJaw):AttributeMatch");  
48 -  
49 - //Individual Attributes  
50 - Globals->abbreviations.insert("AttributeBrow", "(" + BASE+ "+" + BROW + "+"  
51 - "TurkClassifier(eyebrowposition,[closebrows,highbrows],3)/"  
52 - "TurkClassifier(unibrow,[unibrow],3)/"  
53 - "TurkClassifier(eyebroworientation,[eyebrowsdown,eyebrowsuptodown],3)/"  
54 - "TurkClassifier(thickeyebrows,[thickeyebrows,lighteyebrows],3))");  
55 - Globals->abbreviations.insert("AttributeMouth", "(" + BASE + "+" + MOUTH + "+"  
56 - "TurkClassifier(smiling,[smiling],3)/"  
57 - "TurkClassifier(lipthickness,[cherry,big,small],3)/"  
58 - "TurkClassifier(mouthbite,[underbite,overbite],3)/"  
59 - "TurkClassifier(mouthopen,[closed,noteeth,halfteeth,allteeth],3)/"  
60 - "TurkClassifier(mouthwidth,[small,wide],3)/"  
61 - "TurkClassifier(mustache,[nomustache,linemustache,lightmustache,normalmustache,down],3)/"  
62 - "TurkClassifier(mouthasymmetry,[asymmetrical],3))");  
63 - Globals->abbreviations.insert("AttributeEyes", "(" + BASE + "+" + EYES + "+ "  
64 - "TurkClassifier(eyeseparation,[close,wide],3)/"  
65 - "TurkClassifier(eyeslant,[slant2,slant1,wild],3)/"  
66 - "TurkClassifier(benteyes,[bent])/"  
67 - "TurkClassifier(eyecolor,[darkeyes,lighteyes],3)/"  
68 - "TurkClassifier(baggyeyes,[baggy],3)/"  
69 - "TurkClassifier(almondeyes,[almond],3)/"  
70 - "TurkClassifier(buriedeyes,[buriedeyes],3)/"  
71 - "TurkClassifier(sleepyeyes,[sleepy],3)/"  
72 - "TurkClassifier(lineeyes,[line],3)/"  
73 - "TurkClassifier(roundeyes,[round],3)/"  
74 - "TurkClassifier(sharpeyes,[sharp],3)/"  
75 - "TurkClassifier(smalleyes,[smalleyes],3)/"  
76 - "TurkClassifier(glasses,[glasses],3)/"  
77 - "TurkClassifier(eyelashvisibility,[feweyelashes],3))");  
78 - Globals->abbreviations.insert("AttributeFace", "(" + BASE + "+" + FACE + "+"  
79 - "TurkClassifier(gender,[male],3)/"  
80 - "TurkClassifier(faceshape,[round,triangular,rectangular],3)/"  
81 - "TurkClassifier(cheekdensity,[puffy,in,normal],3)/"  
82 - "TurkClassifier(facemarks,[scars,moles,normal],3)/"  
83 - "TurkClassifier(facelength,[long],3)/"  
84 - "TurkClassifier(nosetoeyedist,[short,long],3)/"  
85 - "TurkClassifier(nosetomouthdist,[long,small],3))");  
86 - Globals->abbreviations.insert("AttributeHair", "(" + BASE + "+" + HAIR + "+"  
87 - "TurkClassifier(foreheadwrinkles,[wrinkled],3)/"  
88 - "TurkClassifier(foreheadsize,[smallforehead,largeforehead],3)/"  
89 - "TurkClassifier(haircolor,[darkhair,lighthair,greyhair],3)/"  
90 - "TurkClassifier(hairdensity,[thick,bald,thin,halfbald],3)/"  
91 - "TurkClassifier(widowspeak,[widowspeak],3)/"  
92 - "TurkClassifier(hairstyle,[curlyhair],3))");  
93 - Globals->abbreviations.insert("AttributeNose", "(" + BASE + "+" + NOSE + "+"  
94 - "TurkClassifier(noseorientation,[upnose,downnose],3)/"  
95 - "TurkClassifier(nosewidth,[small,thick],3)/"  
96 - "TurkClassifier(nosesize,[smallnose,bignose],3)/"  
97 - "TurkClassifier(brokennose,[broken],3))");  
98 - Globals->abbreviations.insert("AttributeJaw", "(" + BASE + "+" + JAW + "+"  
99 - "TurkClassifier(beard,[nobeard,bigbeard,lightbeard,goatee,linebeard,normalbeard,lincolnbeard],3)/"  
100 - "TurkClassifier(chinsize,[shortchin,longchin],3))");  
101 - Globals->abbreviations.insert("AttributeMatch", "Fuse(["  
102 - "Turk(eyebrowposition,[closebrows,highbrows],3),"  
103 - "Turk(unibrow,[unibrow],3),"  
104 - "Turk(eyebroworientation,[eyebrowsdown,eyebrowsuptodown],3),"  
105 - "Turk(thickeyebrows,[thickeyebrows,lighteyebrows],3),"  
106 - "Turk(smiling,[smiling],3),"  
107 - "Turk(lipthickness,[cherry,big,small],3),"  
108 - "Turk(mouthbite,[underbite,overbite],3),"  
109 - "Turk(mouthopen,[closed,noteeth,halfteeth,allteeth],3),"  
110 - "Turk(mouthwidth,[small,wide],3),"  
111 - "Turk(mustache,[nomustache,linemustache,lightmustache,normalmustache,down],3),"  
112 - "Turk(mouthasymmetry,[asymmetrical],3),"  
113 - "Turk(eyeseparation,[close,wide],3),"  
114 - "Turk(eyeslant,[slant2,slant1,wild],3),"  
115 - "Turk(benteyes,[bent],3),"  
116 - "Turk(eyecolor,[darkeyes,lighteyes],3),"  
117 - "Turk(baggyeyes,[baggy],3),"  
118 - "Turk(almondeyes,[almond],3),"  
119 - "Turk(buriedeyes,[buriedeyes],3),"  
120 - "Turk(sleepyeyes,[sleepy],3),"  
121 - "Turk(lineeyes,[line],3),"  
122 - "Turk(roundeyes,[round],3),"  
123 - "Turk(sharpeyes,[sharp],3),"  
124 - "Turk(smalleyes,[smalleyes],3),"  
125 - "Turk(glasses,[glasses],3),"  
126 - "Turk(eyelashvisibility,[feweyelashes],3),"  
127 - "Turk(gender,[male],3),"  
128 - "Turk(faceshape,[round,triangular,rectangular],3),"  
129 - "Turk(cheekdensity,[puffy,in,normal],3),"  
130 - "Turk(facemarks,[scars,moles,normal],3),"  
131 - "Turk(facelength,[long],3),"  
132 - "Turk(nosetoeyedist,[short,long],3),"  
133 - "Turk(nosetomouthdist,[long,small],3),"  
134 - "Turk(foreheadwrinkles,[wrinkled],3),"  
135 - "Turk(foreheadsize,[smallforehead,largeforehead],3),"  
136 - "Turk(haircolor,[darkhair,lighthair,greyhair],3),"  
137 - "Turk(hairdensity,[thick,bald,thin,halfbald],3),"  
138 - "Turk(widowspeak,[widowspeak],3),"  
139 - "Turk(hairstyle,[curlyhair],3),"  
140 - "Turk(noseorientation,[upnose,downnose],3),"  
141 - "Turk(nosewidth,[small,thick],3),"  
142 - "Turk(nosesize,[smallnose,bignose],3),"  
143 - "Turk(brokennose,[broken],3),"  
144 - "Turk(beard,[nobeard,bigbeard,lightbeard,goatee,linebeard,normalbeard,lincolnbeard],3),"  
145 - "Turk(chinsize,[shortchin,longchin],3)])");  
146 - }  
147 -};  
148 -  
149 -BR_REGISTER(Initializer, AttributeAlgorithmsInitializer)  
150 -  
151 -} // namespace br  
152 -  
153 -#include "core/attributealgorithms.moc"