<!-- iframe showing the search results (closed by default) -->
<divid="MSearchResultsWindow">
<iframesrc="javascript:void(0)"frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<divclass="header">
<divclass="headertitle">
<divclass="title">fonction.h</div></div>
</div><!--header-->
<divclass="contents">
<ahref="fonction_8h.html">Go to the documentation of this file.</a><divclass="fragment"><divclass="line"><aname="l00001"></a><spanclass="lineno"> 1</span> <spanclass="preprocessor">#ifndef FONCTION_H</span></div>
<divclass="line"><aname="l00025"></a><spanclass="lineno"> 25</span> <spanclass="comment">//#include <SFML/System.hpp> //inutilisé pour le moment</span></div>
<divclass="line"><aname="l00028"></a><spanclass="lineno"> 28</span> <spanclass="comment">//ATTENTION AFFICHAGE OPENCV INCOMPATIBLE AVEC AFFICHAGE SFML</span></div>
<divclass="line"><aname="l00029"></a><spanclass="lineno"> 29</span> <spanclass="comment">//ATTENTION SFML SUPPORTE UN NOMBRE LIMITE DE SPRITE EN FCT DU PC</span></div>
<divclass="line"><aname="l00030"></a><spanclass="lineno"> 30</span> <spanclass="preprocessor">#define JEU 0.15</span></div>
<divclass="line"><aname="l00085"></a><spanclass="lineno"> 85</span> <spanclass="keywordtype">void</span><aclass="code"href="fonction_8h.html#a93cca84f54fe35dc9ad87eac3583889b">maj_angle</a>(<spanclass="keywordtype">int</span> vecX, <spanclass="keywordtype">int</span> vecY, <spanclass="keywordtype">int</span> rayon, <spanclass="keywordtype">double</span>* angle); <spanclass="comment">//Met à jour l'angle selon la distance CentreCamera - Cible</span></div>
<divclass="line"><aname="l00105"></a><spanclass="lineno"> 105</span> <spanclass="keywordtype">void</span><aclass="code"href="fonction_8h.html#ad3f512a54511a63b30a8967077736766">controle_moteur</a>(<spanclass="keywordtype">double</span>* angle);<spanclass="comment">//Envoie les angles au moteur</span></div>
<divclass="line"><aname="l00115"></a><spanclass="lineno"> 115</span> <spanclass="keywordtype">int</span><aclass="code"href="fonction_8h.html#a9397b95e9279b0b9cd371c9a2b4514a2">limite_moteur</a>(<spanclass="keywordtype">int</span> val_pwm);<spanclass="comment">//Verifie que les valeurs envoyees aux moteurs sont correctes</span></div>
<divclass="line"><aname="l00131"></a><spanclass="lineno"> 131</span> <spanclass="keywordtype">void</span><aclass="code"href="fonction_8h.html#adcdd0544c8eb462cd2835ec99fa0f181">config</a>(<spanclass="keywordtype">int</span>* LowH, <spanclass="keywordtype">int</span>* HighH, <spanclass="keywordtype">int</span>* LowS, <spanclass="keywordtype">int</span>* HighS, <spanclass="keywordtype">int</span>* LowV, <spanclass="keywordtype">int</span>* HighV); <spanclass="comment">//Affiche le panneau de configuration de tracking avec les arguments comme valeur de base</span></div>
<divclass="line"><aname="l00141"></a><spanclass="lineno"> 141</span> <spanclass="keywordtype">void</span><aclass="code"href="fonction_8h.html#acc438fce8178d1d5aac4595f19529275">affichage_config</a>(IplImage* frame, IplImage* HSV, IplImage* Binaire); <spanclass="comment">//Affiche le flux vidéos et ses différent traitements</span></div>
<divclass="line"><aname="l00165"></a><spanclass="lineno"> 165</span> <spanclass="keywordtype">void</span><aclass="code"href="fonction_8h.html#ac3e9405c4ebaa936308670c050285ae1">Position_moy</a>(IplImage* Binaire, <spanclass="keywordtype">int</span>* posX, <spanclass="keywordtype">int</span> * posY); <spanclass="comment">//Effectue le baricentre des pixels d'une image binaire pour obtenir la postion de l'objet</span></div>
<divclass="line"><aname="l00194"></a><spanclass="lineno"> 194</span> <spanclass="keywordtype">int</span><aclass="code"href="fonction_8h.html#ad2cc53a42ff2450413bbb199bb4c1072">image_CV2SFML</a>(IplImage* imcv, sf::Image imFlux); <spanclass="comment">//Construction de imsf (RGBA) à partir de imcv (BGR), avec alpha constant (=1)</span></div>
<divclass="ttc"id="fonction_8h_html_ac3e9405c4ebaa936308670c050285ae1"><divclass="ttname"><ahref="fonction_8h.html#ac3e9405c4ebaa936308670c050285ae1">Position_moy</a></div><divclass="ttdeci">void Position_moy(IplImage *Binaire, int *posX, int *posY)</div><divclass="ttdoc">Effectue le baricentre des pixels d'une image binaire pour obtenir la postion de l'objet. </div><divclass="ttdef"><b>Definition:</b><ahref="fonction_8c_source.html#l00120">fonction.c:120</a></div></div>
<divclass="ttc"id="fonction_8h_html_a9397b95e9279b0b9cd371c9a2b4514a2"><divclass="ttname"><ahref="fonction_8h.html#a9397b95e9279b0b9cd371c9a2b4514a2">limite_moteur</a></div><divclass="ttdeci">int limite_moteur(int val_pwm)</div><divclass="ttdoc">Fonction qui vérifie que les valeurs envoyees aux moteurs sont correctes. </div><divclass="ttdef"><b>Definition:</b><ahref="fonction_8c_source.html#l00041">fonction.c:41</a></div></div>
<divclass="ttc"id="fonction_8h_html_ab9c63795209f514f5d3554bc9450b8de"><divclass="ttname"><ahref="fonction_8h.html#ab9c63795209f514f5d3554bc9450b8de">detect_and_draw</a></div><divclass="ttdeci">void detect_and_draw(IplImage *img, CvHaarClassifierCascade *cascade, face **tab_face)</div><divclass="ttdoc">Détecte et renvoie un rectangle pour chaque visage sur l'image. </div><divclass="ttdef"><b>Definition:</b><ahref="fonction_8c_source.html#l00200">fonction.c:200</a></div></div>
<divclass="ttc"id="fonction_8h_html_a942c8619bb73ca7c3bb7e6fcf1875294"><divclass="ttname"><ahref="fonction_8h.html#a942c8619bb73ca7c3bb7e6fcf1875294">init_cascade</a></div><divclass="ttdeci">CvHaarClassifierCascade * init_cascade()</div><divclass="ttdoc">Charge les fichiers cascades pour la reconnaissance faciale. </div><divclass="ttdef"><b>Definition:</b><ahref="fonction_8c_source.html#l00182">fonction.c:182</a></div></div>
<divclass="ttc"id="fonction_8h_html_a96b1dd5c66492425a00921b6eaaacc89"><divclass="ttname"><ahref="fonction_8h.html#a96b1dd5c66492425a00921b6eaaacc89">traitement</a></div><divclass="ttdeci">void traitement(IplImage *frame, IplImage *HSV, IplImage *Binaire, int LowH, int HighH, int LowS, int HighS, int LowV, int HighV)</div><divclass="ttdoc">Effectue une binarisation de frame en fonction des bornes HSV. </div><divclass="ttdef"><b>Definition:</b><ahref="fonction_8c_source.html#l00099">fonction.c:99</a></div></div>
<divclass="ttc"id="fonction_8h_html_acc438fce8178d1d5aac4595f19529275"><divclass="ttname"><ahref="fonction_8h.html#acc438fce8178d1d5aac4595f19529275">affichage_config</a></div><divclass="ttdeci">void affichage_config(IplImage *frame, IplImage *HSV, IplImage *Binaire)</div><divclass="ttdoc">Fonction d'affichage du flux vidéo, du flux en HSV et de sa binarisation. </div><divclass="ttdef"><b>Definition:</b><ahref="fonction_8c_source.html#l00151">fonction.c:151</a></div></div>
<divclass="ttc"id="fonction_8h_html_ad2cc53a42ff2450413bbb199bb4c1072"><divclass="ttname"><ahref="fonction_8h.html#ad2cc53a42ff2450413bbb199bb4c1072">image_CV2SFML</a></div><divclass="ttdeci">int image_CV2SFML(IplImage *imcv, sf::Image imFlux)</div><divclass="ttdoc">Convertit une image opencv (IplImage) en une image SFML (sf::Image) </div><divclass="ttdef"><b>Definition:</b><ahref="fonction_8c_source.html#l00074">fonction.c:74</a></div></div>
<divclass="ttc"id="fonction_8h_html_a93cca84f54fe35dc9ad87eac3583889b"><divclass="ttname"><ahref="fonction_8h.html#a93cca84f54fe35dc9ad87eac3583889b">maj_angle</a></div><divclass="ttdeci">void maj_angle(int vecX, int vecY, int rayon, double *angle)</div><divclass="ttdoc">Met à jour angle selon la distance entre le centre de la caméra et la cible, avec un tolérance circul...</div><divclass="ttdef"><b>Definition:</b><ahref="fonction_8c_source.html#l00012">fonction.c:12</a></div></div>
<divclass="ttc"id="fonction_8h_html_ae89e5fc7460ea890fa61d54fd209c1ae"><divclass="ttname"><ahref="fonction_8h.html#ae89e5fc7460ea890fa61d54fd209c1ae">ajust_pos</a></div><divclass="ttdeci">int ajust_pos(int pos, int ref)</div><divclass="ttdoc">permet d'éviter des positions supérieures à ref considérées comme aberrantes. </div><divclass="ttdef"><b>Definition:</b><ahref="fonction_8c_source.html#l00036">fonction.c:36</a></div></div>
<divclass="ttc"id="fonction_8h_html_ad3f512a54511a63b30a8967077736766"><divclass="ttname"><ahref="fonction_8h.html#ad3f512a54511a63b30a8967077736766">controle_moteur</a></div><divclass="ttdeci">void controle_moteur(double *angle)</div><divclass="ttdoc">Fonction d'envoie des angles aux moteurs. </div><divclass="ttdef"><b>Definition:</b><ahref="fonction_8c_source.html#l00054">fonction.c:54</a></div></div>
<divclass="ttc"id="fonction_8h_html_a91b1b1daf28d90b5299a9a0486f5bdf1"><divclass="ttname"><ahref="fonction_8h.html#a91b1b1daf28d90b5299a9a0486f5bdf1">Affichage_Tracking</a></div><divclass="ttdeci">void Affichage_Tracking(IplImage *frame, int posX, int posY, int width, int height)</div><divclass="ttdoc">Fonction d'affichage des informations de suivi. </div><divclass="ttdef"><b>Definition:</b><ahref="fonction_8c_source.html#l00163">fonction.c:163</a></div></div>
<divclass="ttc"id="fonction_8h_html_adcdd0544c8eb462cd2835ec99fa0f181"><divclass="ttname"><ahref="fonction_8h.html#adcdd0544c8eb462cd2835ec99fa0f181">config</a></div><divclass="ttdeci">void config(int *LowH, int *HighH, int *LowS, int *HighS, int *LowV, int *HighV)</div><divclass="ttdoc">Fonction d'affichage du panneau de configuration de la couleur à suivre. </div><divclass="ttdef"><b>Definition:</b><ahref="fonction_8c_source.html#l00136">fonction.c:136</a></div></div>
<divclass="ttc"id="structface_html"><divclass="ttname"><ahref="structface.html">face</a></div><divclass="ttdoc">Contient les informations sur chaque face détectée : positions, largeur. </div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<divid="nav-path"class="navpath"><!-- id is needed for treeview function! -->