diff --git a/Code/KirbyTrack.c b/Code/KirbyTrack.c index 2e1af02..58515fe 100644 --- a/Code/KirbyTrack.c +++ b/Code/KirbyTrack.c @@ -5,10 +5,8 @@ * \brief Figure Imposé : Suivi d'un objet coloré. * * \details Suivie d'un Kirby (Rose) ou d'une étoile (Jaune) par une caméra avec mode interface utilisateur ou configuration - * \bug (Résolu ?) SFML ne supporte qu'un nombre limité de sprite en fonction du PC * \bug Affichage OpenCV incompatible avec SFML * \todo Optimisation du chargement de la frame en image SFML - * \todo Verifier les angles du RESET */ @@ -234,8 +232,8 @@ sf::Vector2i PosMouse = sf::Mouse::getPosition(window); tracking = 0; //Reset Position moteur - angle[0]=0; //ANGLES A VERIFIER - angle[1]=0; + angle[0]=60; //ANGLES A VERIFIER + angle[1]=100; controle_moteur(angle); aye.play(); @@ -284,5 +282,28 @@ sf::Vector2i PosMouse = sf::Mouse::getPosition(window); return EXIT_SUCCESS; } +/* + //musique + if(aye.getStatus()==sf::Sound::Stopped){ + aye.setPitch(0.5); + aye.setVolume(150); + aye.setLoop(true); + aye.play(); + } +*/ +/* + //Link + sf::Texture txLink; + sf::Sprite Link; + + if (!txLink.loadFromFile("Stock SFML/link.png")){ + printf("Erreur chargement image SFML\n" ); + break; + } + + Link.setTexture(txLink); + Link.setPosition(sf::Vector2f(posX-75, posY-75)); + window.draw(Link); +*/ diff --git a/Code/Makefile b/Code/Makefile index a4bd5f9..99cb423 100644 --- a/Code/Makefile +++ b/Code/Makefile @@ -1,5 +1,5 @@ -EXEC= Navy KirbyTrack +EXEC= Navy KirbyTrack LDFLAGS = -lsfml-graphics -lsfml-window -lsfml-system -lsfml-audio `pkg-config opencv --libs` CFLAGS = -Wall -g3 -pg `pkg-config opencv --cflags` diff --git a/Code/Makefile~ b/Code/Makefile~ deleted file mode 100644 index e30a1b3..0000000 --- a/Code/Makefile~ +++ /dev/null @@ -1,14 +0,0 @@ -all : KirbyTrack - - -KirbyTrack : KirbyTrack.o - gcc -o $@ $< `pkg-config opencv --libs` -lsfml-graphics -lsfml-window -lsfml-audio -lsfml-system - -KirbyTrack.o : KirbyTrack.c - gcc -o $@ -c $< `pkg-config opencv --cflags` - -clean: - rm -rf *.o - -mrproper : clean - rm -rf KirbyTrack diff --git a/Code/Navy.c b/Code/Navy.c index 5454aad..e3fdb66 100644 --- a/Code/Navy.c +++ b/Code/Navy.c @@ -5,21 +5,79 @@ * \brief Figure Libre * * \details Suivie d'un Kirby (Rose) ou d'une étoile (Jaune) par une caméra avec mode interface utilisateur ou configuration - * - * \todo Reprendre nouvelle structure SFML de Kirbytrack + * + * \todo Stabiliser detection faciale */ #include "fonction.h" +//#include "fonction.c" //Pour le problème de référence indéfinie à la compilation +/** + * \fn int main(int argc, char* argv[]) + * \brief Entrée du programme + * \author Antoine / Jacques + * \return EXIT_SUCCESS : Arrêt normal du programme, EXIT_FAILURE : Le programme a rencontrée une erreur au cours de son execution + */ int main(int argc, char* argv[]) { - //Initialisations + //Initialisations int height,width; //parameters of the image we are working on - int posX, posY; //Position objet - int boucle; - double angle[2] = {100,100}; - int tracking; + int boucle = 1; //On effectuera la boucle principale au moins une fois + int i; + float scale_x, scale_y; + int BGR[3]; + + //Initialisation detection visage + CvHaarClassifierCascade* cascade = init_cascade(); + face* tab_face[MAX_FACE]; + for (i=0;i<2;i++){ + tab_face[i] = (face*)malloc(sizeof(face)); + } + int rdy[MAX_FACE]; + + //Link + sf::Texture txLink; + sf::Sprite Link; + + if (!txLink.loadFromFile("Stock SFML/link.png")){ + printf("Erreur chargement image SFML\n" ); + return EXIT_FAILURE; + } + + sf::Vector2u vec_link = txLink.getSize(); + + //Ganon + sf::Texture txGanon; + sf::Sprite Ganon; + + if (!txGanon.loadFromFile("Stock SFML/ganon.png")){ + printf("Erreur chargement image SFML\n" ); + return EXIT_FAILURE; + } + + sf::Vector2u vec_ganon = txGanon.getSize(); + + //Initialisation SFML + + sf::Texture txFlux; + sf::Sprite spFlux; + sf::Image imFlux; + sf::Event event; + + //Chargement son + sf::Music aile; + if (!aile.openFromFile("Stock SFML/aile.ogg")) + return EXIT_FAILURE; + aile.setLoop(true); + aile.play(); + + sf::Music hey; + if (!hey.openFromFile("Stock SFML/hey_listen.ogg")) + return EXIT_FAILURE; + sf::Music watchout; + if (!watchout.openFromFile("Stock SFML/watchout.ogg")) + return EXIT_FAILURE; //Ouverture flux camera CvCapture* capture = cvCaptureFromCAM( 0 ); @@ -27,52 +85,28 @@ int main(int argc, char* argv[]) if( !capture ){ printf("ERROR: capture is NULL \n" ); exit(EXIT_FAILURE); - } + } - //Initialisation frame + + // grab an image from the capture IplImage* frame = cvQueryFrame( capture ); - height = frame->height; - width = frame->width; - CvSize size = cvSize(width,height); - IplImage* hsv_frame = cvCreateImage(size, IPL_DEPTH_8U, 3); // image converted to HSV plane - IplImage* threshold = cvCreateImage(size, IPL_DEPTH_8U, 1); - - //Initialisation detection visage - CvHaarClassifierCascade* cascade = init_cascade(); - -#ifdef SFML - //Initialisation SFML - sf::Texture txFlux; - sf::Sprite spFlux; - sf::Image imFlux; - sf::Event event; - - tracking = 0; //Pas de tracking de base en mode SFML - //Création de la fenetre principale - sf::RenderWindow window(sf::VideoMode(width+300, height), "KirbyTrack"); -#endif - //Controle couleur -#ifdef KIRBY - int tab_HSV[6] = {152,179,48,255,101,255}; -#endif + // get the image data + height = frame->height; + width = frame->width; + + // capture size - + // CvSize size = cvSize(width,height); + -#ifdef ETOILE - int tab_HSV[6] = {20,30,100,255,100,255}; -#endif -#ifdef CONFIG - //Affichage du panneau de config - config(tab_HSV,tab_HSV+1,tab_HSV+2,tab_HSV+3,tab_HSV+4,tab_HSV+5); + //Création de la fenetre principale + sf::RenderWindow window(sf::VideoMode(width, height), "KirbyTrack"); + - boucle = 1; - tracking = 0; //Tracking de base en mode CONFIG -#endif - while(boucle) { -#ifdef SFML boucle = window.isOpen(); // on inspecte tous les évènements de la fenêtre qui ont été émis depuis la précédente itération @@ -82,7 +116,6 @@ int main(int argc, char* argv[]) if (event.type == sf::Event::Closed) window.close(); } -#endif // Get one frame frame = cvQueryFrame( capture ); @@ -93,20 +126,16 @@ int main(int argc, char* argv[]) } - pface tab_face[2]; detect_and_draw(frame,cascade,tab_face); -#ifdef SFML - //Affichage SFML + +//Affichage SFML /* Clear the screen */ window.clear(sf::Color::White); - //Conversion de la frame en image smfl - /*if(image_CV2SFML(frame, imFlux)){ - printf("Erreur conversion OpenCV-SFML\n"); - break; - } - */ +//Affichage de la frame + + //Le chargement pourrait etre plus optimisé en créant nous me l'image SFML en parcourant l'IplImage //Enregistrement de la frame openCV cvSaveImage("Stock SFML/temp.jpg", frame); @@ -118,133 +147,56 @@ int main(int argc, char* argv[]) } spFlux.setTexture(txFlux); - window.draw(spFlux); - //TEST SFML - sf::Vector2i PosMouse = sf::Mouse::getPosition(window); - //Detection du bouton tracking - if (sf::Mouse::isButtonPressed(sf::Mouse::Left)&&(PosMouse.x>640)&&(PosMouse.x<760)&&(PosMouse.y>0)&&(PosMouse.y<120)){ - //printf("\n\n\n OK \n\n\n"); - if (tracking){ tracking = 0;} - else tracking = 1; - cvWaitKey(100); - } - //printf("Pos Mouse : %d %d \n", PosMouse.x, PosMouse.y); - - //Dessin du bouton de tracking - sf::Texture txBut; - sf::Sprite button_tracking; - - if (!txBut.loadFromFile("Stock SFML/button.png")){ - printf("Erreur chargement image SFML\n" ); - break; - } - - button_tracking.setTexture(txBut); - button_tracking.setScale(0.5,0.5); - button_tracking.setPosition(sf::Vector2f(width+20, 20)); - - if(tracking){ button_tracking.setColor(sf::Color::Green); } - else{ button_tracking.setColor(sf::Color::Red); } - - window.draw(button_tracking); - - //Dessin du bouton reset - sf::Texture txBut2; - sf::Sprite button_reset; - - if (!txBut2.loadFromFile("Stock SFML/button.png")){ - printf("Erreur chargement image SFML\n" ); - break; - } - - button_reset.setTexture(txBut2); - button_reset.setScale(0.5,0.5); - button_reset.setPosition(sf::Vector2f(width+20, 100)); - - window.draw(button_reset); -/* - //musique - if(aye.getStatus()==sf::Sound::Stopped){ - aye.setPitch(0.5); - aye.setVolume(150); - aye.setLoop(true); - aye.play(); - } -*/ - -/* - //Ajout du texte - sf::Font font; - if (!font.loadFromFile("Stock SFML/arial.ttf")){ - printf("Erreur chargement police SFML\n" ); - break; - } - - sf::Text text; - // choix de la police à utiliser - text.setFont(font); // font est un sf::Font - - // choix de la chaîne de caractères à afficher - text.setString("Tracking Moteur"); - - // choix de la taille des caractères - text.setCharacterSize(24); // exprimée en pixels, pas en points ! - - //text.setFillColor(sf::Color::Black); - text.setColor(sf::Color::Black); - - text.setPosition(sf::Vector2f(width+100, 35)); - - window.draw(text); -*/ -/* - //Link - sf::Texture txLink; - sf::Sprite Link; - - if (!txLink.loadFromFile("Stock SFML/link.png")){ - printf("Erreur chargement image SFML\n" ); - break; - } - Link.setTexture(txLink); - Link.setPosition(sf::Vector2f(posX-75, posY-75)); + Link.setOrigin(sf::Vector2f(vec_link.x/2,vec_link.y/2)); + Link.setPosition(sf::Vector2f(tab_face[0]->point.x, tab_face[0]->point.y)); + scale_x = tab_face[0]->largeur / (1.0*vec_link.x); + scale_y = tab_face[0]->largeur / (1.0*vec_link.y); + //printf("%d , %d et%lf, %lf\n",tab_face[0]->largeur,vec_link.x,scale_x,scale_y); + Link.setScale(sf::Vector2f(scale_x, scale_y)); + + Ganon.setTexture(txGanon); + Ganon.setOrigin(sf::Vector2f(vec_ganon.x/2,vec_ganon.y/2)); + Ganon.setPosition(sf::Vector2f(tab_face[1]->point.x, tab_face[1]->point.y)); + scale_x = tab_face[1]->largeur / (1.0*vec_ganon.x); + scale_y = tab_face[1]->largeur / (1.0*vec_ganon.y); + Ganon.setScale(sf::Vector2f(scale_x, scale_y)); window.draw(Link); -*/ + window.draw(Ganon); + /* Update the window */ + window.display(); -#endif - -/* - if(tracking){ - //Mouvements moteurs - //printf("-PREMAJ_ANGLE...: %d %d\n",width,height); - - maj_angle(ajust_pos(posX-width/2,width), ajust_pos(posY-height/2,height), height*JEU, angle); - controle_moteur(angle); - - cvWaitKey(50); - } -*/ - -#ifdef CONFIG - /* - affichage_config(frame, hsv_frame, threshold); //Affichage du flux vidéo et de ses traitements - */ - if( (cvWaitKey(10) ) >= 0 ) break; //Arret capture -#endif - - } - - //cvWaitKey(0); //Fin programme + //Marqueurs rdy + for (i=0 ; ilargeur==0){ + rdy[i]=1; + } + } + + if((tab_face[1]->largeur>0) && (watchout.getStatus()==sf::Sound::Stopped) && rdy[1]){ + watchout.play(); + rdy[1]=0; + } + if((tab_face[0]->largeur>0) && (hey.getStatus()==sf::Sound::Stopped) && rdy[0]){ + hey.play(); + rdy[0]=0; + + printf("a\n"); + get_color(frame, tab_face[0],BGR); + printf("B = %d, G = %d, R = %d\n",BGR[0],BGR[1],BGR[2]); + } + + + +} // Release the capture device housekeeping cvReleaseCapture( &capture ); - cvReleaseImage(&threshold); - cvReleaseImage(&hsv_frame); + cvReleaseImage(&frame); return EXIT_SUCCESS; diff --git a/Code/Stock SFML/ganon.png b/Code/Stock SFML/ganon.png index 0d6309e..6626ad5 100644 Binary files a/Code/Stock SFML/ganon.png and b/Code/Stock SFML/ganon.png differ diff --git a/Code/Stock SFML/link.png b/Code/Stock SFML/link.png index 22a7177..565811c 100644 Binary files a/Code/Stock SFML/link.png and b/Code/Stock SFML/link.png differ diff --git a/Code/Stock SFML/temp.jpg b/Code/Stock SFML/temp.jpg index 339f56a..224da6d 100644 Binary files a/Code/Stock SFML/temp.jpg and b/Code/Stock SFML/temp.jpg differ diff --git a/Code/facedetect.c b/Code/facedetect.c deleted file mode 100644 index 6ff09d7..0000000 --- a/Code/facedetect.c +++ /dev/null @@ -1,125 +0,0 @@ -// Sample Application to demonstrate how Face detection can be done as a part of your source code. - -// Include header files -#include "cv.h" -#include "highgui.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -// Create a string that contains the exact cascade name -const char* cascade_name = -"C:/Program Files/OpenCV/data/haarcascades/haarcascade_frontalface_alt.xml"; -/* "haarcascade_profileface.xml";*/ - - -// Function prototype for detecting and drawing an object from an image -void detect_and_draw( IplImage* image ); - -// Main function, defines the entry point for the program. -int main( int argc, char** argv ) -{ - - //Ouverture flux camera - CvCapture* capture = cvCaptureFromCAM( 0 ); - - if( !capture ){ - printf("ERROR: capture is NULL \n" ); - exit(EXIT_FAILURE); - } - -// Call the function to detect and draw the face positions -detect_and_draw(img); - -// Wait for user input before quitting the program -cvWaitKey(); - -// Release the image -cvReleaseImage(&img); - -// Destroy the window previously created with filename: "result" -cvDestroyWindow("result"); - -// return 0 to indicate successfull execution of the program -return 0; -} - -// Function to detect and draw any faces that is present in an image -void detect_and_draw( IplImage* img ) -{ - -// Create memory for calculations -static CvMemStorage* storage = 0; - -// Create a new Haar classifier -static CvHaarClassifierCascade* cascade = 0; - -int scale = 1; - -// Create a new image based on the input image -IplImage* temp = cvCreateImage( cvSize(img->width/scale,img->height/scale), 8, 3 ); - -// Create two points to represent the face locations -CvPoint pt1, pt2; -int i; - -// Load the [[HaarClassifierCascade]] -cascade = (CvHaarClassifierCascade*)cvLoad( cascade_name, 0, 0, 0 ); - -// Check whether the cascade has loaded successfully. Else report and error and quit -if( !cascade ) -{ -fprintf( stderr, "ERROR: Could not load classifier cascade\n" ); -return; -} - -// Allocate the memory storage -storage = cvCreateMemStorage(0); - -// Create a new named window with title: result -cvNamedWindow( "result", 1 ); - -// Clear the memory storage which was used before -cvClearMemStorage( storage ); - -// Find whether the cascade is loaded, to find the faces. If yes, then: -if( cascade ) -{ - -// There can be more than one face in an image. So create a growable sequence of faces. -// Detect the objects and store them in the sequence -CvSeq* faces = cvHaarDetectObjects( img, cascade, storage, -1.1, 2, CV_HAAR_DO_CANNY_PRUNING, -cvSize(40, 40) ); - -// Loop the number of faces found. -for( i = 0; i < (faces ? faces->total : 0); i++ ) -{ -// Create a new rectangle for drawing the face -CvRect* r = (CvRect*)cvGetSeqElem( faces, i ); - -// Find the dimensions of the face,and scale it if necessary -pt1.x = r->x*scale; -pt2.x = (r->x+r->width)*scale; -pt1.y = r->y*scale; -pt2.y = (r->y+r->height)*scale; - -// Draw the rectangle in the input image -cvRectangle( img, pt1, pt2, CV_RGB(255,0,0), 3, 8, 0 ); -} -} - -// Show the image in the window named "result" -cvShowImage( "result", img ); - -// Release the temp image created. -cvReleaseImage( &temp ); -} diff --git a/Code/fonction.c b/Code/fonction.c index f9b9184..a090a00 100644 --- a/Code/fonction.c +++ b/Code/fonction.c @@ -105,14 +105,14 @@ void traitement(IplImage* frame, IplImage* HSV, IplImage* Binaire, int LowH, int cvSmooth( HSV, HSV, CV_GAUSSIAN, 15, 0,0,0); //suppression des parasites par flou gaussien //Binarisation -/* + CvScalar valinf={(double)LowH,(double)LowS,(double)LowV}; CvScalar valsup={(double)HighH,(double)HighS,(double)HighV}; cvInRangeS(HSV, valinf,valsup, Binaire); -*/ + //En cas d'erreur sur les trois ligne précédentes - cvInRangeS(HSV, CvScalar(LowH,LowS,LowV),CvScalar(HighH,HighS,HighV), Binaire); + //cvInRangeS(HSV, CvScalar(LowH,LowS,LowV),CvScalar(HighH,HighS,HighV), Binaire); //cvSmooth( Binaire, Binaire, CV_GAUSSIAN, 9, 9 ); //Legère suppression des parasites } @@ -197,7 +197,7 @@ CvHaarClassifierCascade* init_cascade(){ } // Function to detect and draw any faces that is present in an image -void detect_and_draw( IplImage* img, CvHaarClassifierCascade* cascade, pface* tab_face) +void detect_and_draw( IplImage* img, CvHaarClassifierCascade* cascade, face** tab_face) { // Create memory for calculations @@ -227,6 +227,10 @@ void detect_and_draw( IplImage* img, CvHaarClassifierCascade* cascade, pface* ta // Detect the objects and store them in the sequence CvSeq* faces = cvHaarDetectObjects( img, cascade, storage,1.1, 2, 0, cvSize(60, 60),cvSize(500, 500)); + //Reset faces + tab_face[0]->largeur = 0; + tab_face[1]->largeur = 0; + // Loop the number of faces found. for( i = 0; i < (faces ? faces->total : 0); i++ ){ // Create a new rectangle for drawing the face @@ -246,7 +250,7 @@ void detect_and_draw( IplImage* img, CvHaarClassifierCascade* cascade, pface* ta tab_face[i]->point.y = (pt1.y + pt2.y)/2; tab_face[i]->largeur = r->width; - printf("VALEURS FACES : %d %d %d\n",tab_face[i]->point.x,tab_face[i]->point.y,tab_face[i]->largeur); + printf("VALEURS FACES n°%d : %d %d %d\n",i, tab_face[i]->point.x,tab_face[i]->point.y,tab_face[i]->largeur); } } } @@ -257,3 +261,35 @@ void detect_and_draw( IplImage* img, CvHaarClassifierCascade* cascade, pface* ta //free cvReleaseImage( &temp ); } + +//Renvoie la couleur moyenne de rec_face +void get_color(IplImage* image, face* rec_face, int* BGR){ + printf("z\n"); + CvScalar colors; + int largeur = rec_face->largeur; +printf("e\n"); + cvSetImageROI(image,cvRect(rec_face->point.x -largeur/2, rec_face->point.y -largeur/2, largeur,largeur)); +printf("r\n"); + colors = cvAvg(image); +printf("t\n"); + cvResetImageROI(image); +printf("y\n"); + BGR[0] = colors.val[0]; + BGR[1] = colors.val[1]; + BGR[2] = colors.val[2]; +printf("u\n"); +} + + + + + + + + + + + + + + diff --git a/Code/fonction.h b/Code/fonction.h index 72db226..c046434 100644 --- a/Code/fonction.h +++ b/Code/fonction.h @@ -39,10 +39,13 @@ * \brief Programme en mode suivi de Kirby (Objet rose) * * \def ETOILE - * \brief Programme en mide suivi de l'étoile (Objet jaune) + * \brief Programme en mode suivi de l'étoile (Objet jaune) * * \def JEU * \brief Coefficient de tolérance pour le suivi d'objet + * + * \def MAX_FACE + * \brief Nombre maximum de faces traitées */ //#define CONFIG #define SFML @@ -52,11 +55,16 @@ #define MAX_FACE 2 - +/** + * \struct face + * \brief Contient les informations sur chaque face détectée : positions, largeur + * \param point coordonnées en x et y du centre de la face + * \param largeur largeur de la face + */ /*STRUCTURE*/ typedef struct _face{ - CvPoint point; - int largeur; + CvPoint point; /*!< coordonnées en x et y du centre de la face */ + int largeur; /*!< largeur de la face */ } face; typedef face* pface; @@ -174,10 +182,44 @@ void Position_moy(IplImage* Binaire, int* posX, int * posY); //Effectue le baric */ void traitement(IplImage* frame, IplImage* HSV, IplImage* Binaire, int LowH, int HighH, int LowS, int HighS, int LowV, int HighV); //Effectue une binarisation de frame en fonction des bornes HSV +/** + * \fn int image_CV2SFML(IplImage* imcv, sf::Image imFlux) + * \brief Convertit une image opencv (IplImage) en une image SFML (sf::Image) + * \author Antoine + * \param imcv image OpenCv à convertir + * \param imFlux image SFML convertie en sortie de la fonction + * \return 0 si la convertion est réussie + * \bug A debugger ! Inutilisable en l'état + */ int image_CV2SFML(IplImage* imcv, sf::Image imFlux); //Construction de imsf (RGBA) à partir de imcv (BGR), avec alpha constant (=1) +/** + * \fn CvHaarClassifierCascade* init_cascade() + * \brief Charge les fichiers cascades pour la reconnaissance faciale + * \details fichier(s) chargé(s) : "haarcascade_frontalface_alt.xml" + * \author Jacques + * \return Renvoie la cascade + */ CvHaarClassifierCascade* init_cascade(); -void detect_and_draw( IplImage* img, CvHaarClassifierCascade* cascade, pface* tab_face ); +/** + * \fn void detect_and_draw( IplImage* img, CvHaarClassifierCascade* cascade, face** tab_face ) + * \brief Détecte et renvoie un rectangle pour chaque visage sur l'image + * \author Jacques + * \param img Image sur laquelle on veut détecter des visages + * \param cascade structure contenant les données pour alimenter l'algorithme de reconnaissance d'image + * \param tab_face tableau des faces détectées + */ +void detect_and_draw( IplImage* img, CvHaarClassifierCascade* cascade, face** tab_face ); + +/** + * \fn int* get_color(IplImage* image, face* rec_face) + * \brief retourne la couleur moyenne des pixels dans rec_face + * \author Antoine / Jacques + * \param image image d'où on cherche la moyenne + * \param imFlux image SFML convertie en sortie de la fonction + * \return 0 si la convertion est réussie + */ +void get_color(IplImage* image, face* rec_face, int* BGR); #endif diff --git a/Code/gmon.out b/Code/gmon.out index f95e3a8..0147f24 100644 Binary files a/Code/gmon.out and b/Code/gmon.out differ diff --git a/Doxy/Doxyfile b/Doxy/Doxyfile index fcc6394..9d72192 100644 --- a/Doxy/Doxyfile +++ b/Doxy/Doxyfile @@ -1403,7 +1403,7 @@ DISABLE_INDEX = NO # The default value is: NO. # This tag requires that the tag GENERATE_HTML is set to YES. -GENERATE_TREEVIEW = NO +GENERATE_TREEVIEW = YES # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that # doxygen will group on one line in the generated HTML documentation. diff --git a/Doxy/html/_kirby_track_8c.html b/Doxy/html/_kirby_track_8c.html index 9a40cde..52b2675 100644 --- a/Doxy/html/_kirby_track_8c.html +++ b/Doxy/html/_kirby_track_8c.html @@ -8,6 +8,13 @@ + + + + +
@@ -77,14 +101,8 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
- -
KirbyTrack.c File Reference
@@ -93,60 +111,13 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');

Figure Imposé : Suivi d'un objet coloré. More...

-
#include <stdio.h>
-#include <stdlib.h>
-#include <cv.h>
-#include <highgui.h>
-#include <SFML/Audio.hpp>
-#include <SFML/Graphics.hpp>
-#include <SFML/Window.hpp>
+
#include "fonction.h"
+#include "fonction.c"

Go to the source code of this file.

- - - - - - - - - - -

-Macros

-#define SFML
 Programme en mode affichage interface utilisateur.
 
-#define KIRBY
 Programme en mode suivi de Kirby (Objet rose)
 
-#define JEU   0.15
 Coefficient de tolérance pour le suivi d'objet.
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -156,277 +127,11 @@ Functions
Author
Jacques / Antoine
Date
avril - mai 2017

Suivie d'un Kirby (Rose) ou d'une étoile (Jaune) par une caméra avec mode interface utilisateur ou configuration

+
Bug:
Affichage OpenCV incompatible avec SFML
+
Todo:
Optimisation du chargement de la frame en image SFML

Definition in file KirbyTrack.c.

Function Documentation

- -
-
-

Functions

void maj_angle (int vecX, int vecY, int rayon, double *angle)
 Met à jour angle selon la distance entre le centre de la caméra et la cible, avec un tolérance circulaire définie par rayon. More...
 
int ajust_pos (int pos, int ref)
 permet d'éviter des positions supérieures à ref considérées comme aberrantes. More...
 
void controle_moteur (double *angle)
 Fonction d'envoie des angles aux moteurs. More...
 
int limite_moteur (int val_pwm)
 Fonction qui vérifie que les valeurs envoyees aux moteurs sont correctes. More...
 
void config (int *LowH, int *HighH, int *LowS, int *HighS, int *LowV, int *HighV)
 Fonction d'affichage du panneau de configuration de la couleur à suivre. More...
 
void affichage_config (IplImage *frame, IplImage *HSV, IplImage *Binaire)
 Fonction d'affichage du flux vidéo, du flux en HSV et de sa binarisation. More...
 
void Affichage_Tracking (IplImage *frame, int posX, int posY, int width, int height)
 Fonction d'affichage des informations de suivi. More...
 
void Position_moy (IplImage *Binaire, int *posX, int *posY)
 Effectue le baricentre des pixels d'une image binaire pour obtenir la postion de l'objet. More...
 
void traitement (IplImage *frame, IplImage *HSV, IplImage *Binaire, int LowH, int HighH, int LowS, int HighS, int LowV, int HighV)
 Effectue une binarisation de frame en fonction des bornes HSV. More...
 
int main (int argc, char *argv[])
 Entrée du programme. More...
 
- - - - - - - - - - - - - - - - - - - - - - - -
void affichage_config (IplImage * frame,
IplImage * HSV,
IplImage * Binaire 
)
-
- -

Fonction d'affichage du flux vidéo, du flux en HSV et de sa binarisation.

-
Author
Antoine
-
Parameters
- - - - -
frameimage contenant la frame capturé par la caméra
HSVimage contenant l'image passé en HSV
Binaireimage contenant l'image binarisée
-
-
- -

Definition at line 505 of file KirbyTrack.c.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Affichage_Tracking (IplImage * frame,
int posX,
int posY,
int width,
int height 
)
-
- -

Fonction d'affichage des informations de suivi.

-

Dessine sur frame la zone de tolérance de suivie au centre de l'image et le curseur de position de l'objet ayant pour coordonées posX et posY

-
Author
Antoine
-
Parameters
- - - - - - -
frameimage a modifier
posXcomposante X du curseur a dessiner
posYcomposante Y du curseur a dessiner
widthlargeur (en pixel) de frame
heighthauteur (en pixel) de frame
-
-
- -

Definition at line 517 of file KirbyTrack.c.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
int ajust_pos (int pos,
int ref 
)
-
- -

permet d'éviter des positions supérieures à ref considérées comme aberrantes.

-

retourne 0 si la position est supérieure à ref.

-
Author
Jacques
-
Parameters
- - - -
posposition à tester
refposition de référence
-
-
-
Returns
renvoie la position corrigée
- -

Definition at line 415 of file KirbyTrack.c.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void config (int * LowH,
int * HighH,
int * LowS,
int * HighS,
int * LowV,
int * HighV 
)
-
- -

Fonction d'affichage du panneau de configuration de la couleur à suivre.

-
Author
Antoine
-

Panneau de configuration comprenant 6 slidebarres pour configurer la couleur suivie en HSV. La fonction modifie les valeurs limites LowH/ HighH de la plage HUE, LowS/HighS de la plage SATURATION, LowV/HighV de la plage VALUE.

-
Parameters
- - - - - - - -
LowHValeur basse de la plage de HUE suivie.
HighHValeur haute de la plage de HUE suivie.
LowSValeur basse de la plage de SATURATION suivie.
HighSValeur haute de la plage de SATURATION suivie.
LowVValeur basse de la plage de VALUE suivie.
HighVValeur haute de la plage de VALUE suivie.
-
-
- -

Definition at line 490 of file KirbyTrack.c.

- -
-
- -
-
- - - - - - - - -
void controle_moteur (double * angle)
-
- -

Fonction d'envoie des angles aux moteurs.

-
Author
Jacques
-
Parameters
- - -
angletableau des angles moteurs
-
-
- -

Definition at line 433 of file KirbyTrack.c.

- -
-
- -
-
- - - - - - - - -
int limite_moteur (int val_pwm)
-
- -

Fonction qui vérifie que les valeurs envoyees aux moteurs sont correctes.

-

Valeur minimale = 30, valeur maximale = 130 (déterminées expérimentalement)

-
Author
Jacques
-
Parameters
- - -
val_pwmvaleur pwm dont on veut vérifier la valeur
-
-
-
Returns
renvoie l'angle corrigée
- -

Definition at line 420 of file KirbyTrack.c.

- -
-
@@ -455,201 +160,20 @@ Functions
Author
Antoine / Jacques
Returns
EXIT_SUCCESS : Arrêt normal du programme, EXIT_FAILURE : Le programme a rencontrée une erreur au cours de son execution
-

Definition at line 162 of file KirbyTrack.c.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void maj_angle (int vecX,
int vecY,
int rayon,
double * angle 
)
-
- -

Met à jour angle selon la distance entre le centre de la caméra et la cible, avec un tolérance circulaire définie par rayon.

-
Author
Jacques
-
Parameters
- - - - - -
vecXcomposante X de la cible par rapport au centre de l'image
vecYcomposante Y de la cible par rapport au centre de l'image
rayontolérance avant changement d'angle
angletableau contenant les deux angles à modifier
-
-
- -

Definition at line 391 of file KirbyTrack.c.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
void Position_moy (IplImage * Binaire,
int * posX,
int * posY 
)
-
- -

Effectue le baricentre des pixels d'une image binaire pour obtenir la postion de l'objet.

-
Author
Antoine
-
Parameters
- - - - -
Binaireimage binarisée (matrice de 0 ou de 1)
posXcontient la composante X du barycentre
posYcontient la composante Y du barycentre
-
-
- -

Definition at line 474 of file KirbyTrack.c.

- -
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void traitement (IplImage * frame,
IplImage * HSV,
IplImage * Binaire,
int LowH,
int HighH,
int LowS,
int HighS,
int LowV,
int HighV 
)
-
- -

Effectue une binarisation de frame en fonction des bornes HSV.

-

Passe la frame en HSV puis binarise l'image en fonction des bornes LowH, HighH, LowS, HighS, LowV, HighV

-
Author
Antoine
-
Parameters
- - - - - - - - - - -
frameimage contenant la frame capturé par la caméra
HSVimage contenant l'image passé en HSV au terme de la fonction
Binaireimage contenant l'image binarisée au terme de la fonction
LowHValeur basse de la plage de HUE suivie.
HighHValeur haute de la plage de HUE suivie.
LowSValeur basse de la plage de SATURATION suivie.
HighSValeur haute de la plage de SATURATION suivie.
LowVValeur basse de la plage de VALUE suivie.
HighVValeur haute de la plage de VALUE suivie.
-
-
- -

Definition at line 453 of file KirbyTrack.c.

+

Definition at line 23 of file KirbyTrack.c.

+ - + diff --git a/Doxy/html/_kirby_track_8c.js b/Doxy/html/_kirby_track_8c.js new file mode 100644 index 0000000..f67226d --- /dev/null +++ b/Doxy/html/_kirby_track_8c.js @@ -0,0 +1,4 @@ +var _kirby_track_8c = +[ + [ "main", "_kirby_track_8c.html#a0ddf1224851353fc92bfbff6f499fa97", null ] +]; \ No newline at end of file diff --git a/Doxy/html/_kirby_track_8c_source.html b/Doxy/html/_kirby_track_8c_source.html index c348af6..f3c7931 100644 --- a/Doxy/html/_kirby_track_8c_source.html +++ b/Doxy/html/_kirby_track_8c_source.html @@ -8,6 +8,13 @@ + + + + +
@@ -77,444 +101,325 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
- -
KirbyTrack.c
Go to the documentation of this file.
1 
-
12 #include <stdio.h>
-
13 #include <stdlib.h>
-
14 #include <cv.h>
-
15 #include <highgui.h>
+
13 #include "fonction.h"
+
14 #include "fonction.c" //Pour le problème de référence indéfinie à la compilation
+
15 
16 
-
17 #include <SFML/Audio.hpp>
-
18 #include <SFML/Graphics.hpp>
-
19 #include <SFML/Window.hpp>
-
36 //#define CONFIG
-
37 #define SFML
-
38 
-
39 #define KIRBY
-
40 //#define ETOILE
-
41 
-
42 #define JEU 0.15
-
43 
-
44 //ATTENTION AFFICHAGE OPENCV INCOMPATIBLE AVEC AFFICHAGE SFML
-
45 //ATTENTION SFML SUPPORTE UN NOMBRE LIMITE DE SPRITE EN FCT DU PC
-
46 
-
47 /*Headers*/
-
57 void maj_angle(int vecX, int vecY, int rayon, double* angle); //Met à jour l'angle selon la distance CentreCamera - Cible
-
58 
-
68 int ajust_pos(int pos, int ref);
-
69 
-
77 void controle_moteur(double* angle);//Envoie les angles au moteur
-
78 
-
87 int limite_moteur(int val_pwm);//Verifie que les valeurs envoyees aux moteurs sont correctes
-
88 
-
103 void config(int* LowH, int* HighH, int* LowS, int* HighS, int* LowV, int* HighV); //Affiche le panneau de configuration de tracking avec les arguments comme valeur de base
-
104 
-
113 void affichage_config(IplImage* frame, IplImage* HSV, IplImage* Binaire); //Affiche le flux vidéos et ses différent traitements
-
114 
-
127 void Affichage_Tracking(IplImage* frame, int posX, int posY, int width, int height); //Dessine les informations de tracking sur frame
-
128 
-
137 void Position_moy(IplImage* Binaire, int* posX, int * posY); //Effectue le baricentre des pixels d'une image binaire pour obtenir la postion de l'objet
+
23 int main(int argc, char* argv[])
+
24 {
+
25  //Initialisations
+
26  int height,width; //parameters of the image we are working on
+
27  int posX, posY; //Position objet
+
28  int boucle = 1; //On effectuera la boucle principale au moins une fois
+
29 
+
30  double angle[2] = {100,100};
+
31 
+
32  int tracking; //0 = tracking OFF
+
33 
+
34 
+
35 #ifdef SFML
+
36  //Initialisation SFML
+
37 
+
38  sf::Texture txFlux;
+
39  sf::Sprite spFlux;
+
40  sf::Image imFlux;
+
41  sf::Event event;
+
42 
+
43  tracking = 0; //Pas de tracking de base en mode SFML
+
44 
+
45  //Chargement boutons
+
46  sf::Texture txBut;
+
47  sf::Sprite button_tracking;
+
48  sf::Sprite button_reset;
+
49 
+
50  if (!txBut.loadFromFile("Stock SFML/button.png")){
+
51  printf("Erreur chargement image SFML\n" );
+
52  return EXIT_FAILURE;
+
53  }
+
54 
+
55  //Chargement texte
+
56  sf::Font font;
+
57  if (!font.loadFromFile("Stock SFML/arial.ttf")){
+
58  printf("Erreur chargement police SFML\n" );
+
59  return EXIT_FAILURE;
+
60  }
+
61 
+
62  sf::Text text_track;
+
63  sf::Text text_reset;
+
64 
+
65  //Chargement son
+
66  sf::Music aye;
+
67  if (!aye.openFromFile("Stock SFML/Aye Sir.ogg"))
+
68  return EXIT_FAILURE;
+
69 
+
70 #endif
+
71 
+
72  //Ouverture flux camera
+
73  CvCapture* capture = cvCaptureFromCAM( 0 );
+
74 
+
75  if( !capture ){
+
76  printf("ERROR: capture is NULL \n" );
+
77  exit(EXIT_FAILURE);
+
78  }
+
79 
+
80 
+
81  // grab an image from the capture
+
82  IplImage* frame = cvQueryFrame( capture );
+
83 
+
84  // get the image data
+
85  height = frame->height;
+
86  width = frame->width;
+
87 
+
88  // capture size -
+
89  CvSize size = cvSize(width,height);
+
90 
+
91 
+
92 #ifdef SFML
+
93  //Création de la fenetre principale
+
94  sf::RenderWindow window(sf::VideoMode(width+300, height), "KirbyTrack");
+
95 #endif
+
96 
+
97  // Initialize different images that are going to be used in the program
+
98  IplImage* hsv_frame = cvCreateImage(size, IPL_DEPTH_8U, 3); // image converted to HSV plane
+
99  IplImage* threshold = cvCreateImage(size, IPL_DEPTH_8U, 1);
+
100 
+
101 
+
102  //Controle couleur
+
103 #ifdef KIRBY
+
104  //Setup Kirby
+
105  int iLowH = 152;
+
106  int iHighH = 179;
+
107 
+
108  int iLowS = 48;
+
109  int iHighS = 255;
+
110 
+
111  int iLowV = 101;
+
112  int iHighV = 255;
+
113 #endif
+
114 #ifdef ETOILE
+
115  //Setup Etoile
+
116  int iLowH = 20;
+
117  int iHighH = 30;
+
118 
+
119  int iLowS = 100;
+
120  int iHighS = 255;
+
121 
+
122  int iLowV = 100;
+
123  int iHighV = 255;
+
124 #endif
+
125 
+
126 #ifdef CONFIG
+
127  //Affichage du panneau de config
+
128  config(&iLowH, &iHighH, &iLowS, &iHighS, &iLowV, &iHighV);
+
129 
+
130  tracking = 1; //Tracking de base en mode CONFIG
+
131 #endif
+
132 
+
133  while(boucle)
+
134  {
+
135 
+
136 #ifdef SFML
+
137  boucle = window.isOpen();
138 
-
154 void traitement(IplImage* frame, IplImage* HSV, IplImage* Binaire, int LowH, int HighH, int LowS, int HighS, int LowV, int HighV); //Effectue une binarisation de frame en fonction des bornes HSV
-
155 
-
162 int main(int argc, char* argv[])
-
163 {
-
164  //Initialisations
-
165  int height,width; //parameters of the image we are working on
-
166  int posX, posY; //Position objet
-
167  int boucle;
+
139  // on inspecte tous les évènements de la fenêtre qui ont été émis depuis la précédente itération
+
140  while (window.pollEvent(event))
+
141  {
+
142  // évènement "fermeture demandée" : on ferme la fenêtre
+
143  if (event.type == sf::Event::Closed)
+
144  window.close();
+
145  }
+
146 #endif
+
147  // Get one frame
+
148  frame = cvQueryFrame( capture );
+
149 
+
150  if( !frame ){
+
151  perror("ERROR: frame is null...");
+
152  break;
+
153  }
+
154 
+
155  //Binarisation du flux vidéo
+
156  traitement(frame, hsv_frame, threshold, iLowH, iHighH, iLowS, iHighS, iLowV, iHighV);
+
157 
+
158  // Calculate the moments to estimate the position of the ball
+
159  Position_moy(threshold, &posX, &posY);
+
160 
+
161  //Dessine les informations de tracking sur frame
+
162  Affichage_Tracking(frame, posX, posY, width, height);
+
163 
+
164 #ifdef SFML
+
165 //Affichage SFML
+
166  /* Clear the screen */
+
167  window.clear(sf::Color::White);
168 
-
169  double angle[2] = {100,100};
+
169 //Affichage de la frame
170 
-
171  int tracking; //0 = tracking OFF
-
172 , 1 = ON
-
173 
-
174 
-
175 #ifdef SFML
-
176  //Initialisation SFML
-
177 
-
178  sf::Texture txFlux;
-
179  sf::Sprite spFlux;
-
180  sf::Image imFlux;
-
181  sf::Event event;
-
182 
-
183  tracking = 0; //Pas de tracking de base en mode SFML
-
184 
-
185 #endif
-
186 
-
187  //Ouverture flux camera
-
188  CvCapture* capture = cvCaptureFromCAM( 0 );
+
171  //Le chargement pourrait etre plus optimisé en créant nous me l'image SFML en parcourant l'IplImage
+
172 
+
173  //Enregistrement de la frame openCV
+
174  cvSaveImage("Stock SFML/temp.jpg", frame);
+
175 
+
176  //Chargement de la frame en texture SFML
+
177  if (!txFlux.loadFromFile("Stock SFML/temp.jpg")){
+
178  printf("Erreur chargement image SFML\n" );
+
179  break;
+
180  }
+
181 
+
182  spFlux.setTexture(txFlux);
+
183  window.draw(spFlux);
+
184 
+
185 //Dessin des boutons
+
186  button_tracking.setTexture(txBut);
+
187  button_tracking.setScale(0.5,0.5);
+
188  button_tracking.setPosition(sf::Vector2f(width+20, 20));
189 
-
190  if( !capture ){
-
191  printf("ERROR: capture is NULL \n" );
-
192  exit(EXIT_FAILURE);
-
193  }
-
194 
-
195 
-
196  // grab an image from the capture
-
197  IplImage* frame = cvQueryFrame( capture );
-
198 
-
199  // get the image data
-
200  height = frame->height;
-
201  width = frame->width;
-
202 
-
203  // capture size -
-
204  CvSize size = cvSize(width,height);
-
205 
-
206 
-
207 #ifdef SFML
-
208  //Création de la fenetre principale
-
209  sf::RenderWindow window(sf::VideoMode(width+300, height), "KirbyTrack");
-
210 #endif
-
211 
-
212  // Initialize different images that are going to be used in the program
-
213  IplImage* hsv_frame = cvCreateImage(size, IPL_DEPTH_8U, 3); // image converted to HSV plane
-
214  IplImage* threshold = cvCreateImage(size, IPL_DEPTH_8U, 1);
-
215 
-
216 
-
217  //Controle couleur
-
218 #ifdef KIRBY
-
219  //Setup Kirby
-
220  int iLowH = 152;
-
221  int iHighH = 179;
-
222 
-
223  int iLowS = 48;
-
224  int iHighS = 255;
-
225 
-
226  int iLowV = 101;
-
227  int iHighV = 255;
-
228 #endif
-
229 #ifdef ETOILE
-
230  //Setup Etoile
-
231  int iLowH = 20;
-
232  int iHighH = 30;
-
233 
-
234  int iLowS = 100;
-
235  int iHighS = 255;
-
236 
-
237  int iLowV = 100;
-
238  int iHighV = 255;
-
239 #endif
-
240 
-
241 #ifdef CONFIG
-
242  //Affichage du panneau de config
-
243  config(&iLowH, &iHighH, &iLowS, &iHighS, &iLowV, &iHighV);
+
190  button_reset.setTexture(txBut);
+
191  button_reset.setScale(0.5,0.5);
+
192  button_reset.setPosition(sf::Vector2f(width+20, 100));
+
193 
+
194  if(tracking){ button_tracking.setColor(sf::Color::Green); }
+
195  else{ button_tracking.setColor(sf::Color::Red); }
+
196 
+
197 //Ajout du texte
+
198  // choix de la police à utiliser
+
199  text_track.setFont(font); // font est un sf::Font
+
200  text_reset.setFont(font);
+
201 
+
202  // choix de la chaîne de caractères à afficher
+
203  text_track.setString("Tracking Moteurs");
+
204  text_reset.setString("Reset Moteurs");
+
205 
+
206  // choix de la taille des caractères
+
207  text_track.setCharacterSize(24); // exprimée en pixels, pas en points !
+
208  text_reset.setCharacterSize(24);
+
209 
+
210  //text.setFillColor(sf::Color::Black);
+
211  text_track.setColor(sf::Color::Black);
+
212  text_reset.setColor(sf::Color::Black);
+
213 
+
214  text_track.setPosition(sf::Vector2f(width+100, 35));
+
215  text_reset.setPosition(sf::Vector2f(width+100, 115));
+
216 
+
217 
+
218 //Detection du bouton tracking
+
219 sf::Vector2i PosMouse = sf::Mouse::getPosition(window);
+
220  if (sf::Mouse::isButtonPressed(sf::Mouse::Left)&&(PosMouse.x>640)&&(PosMouse.x<760)&&(PosMouse.y>0)&&(PosMouse.y<110)){
+
221  //printf("\n\n\n OK \n\n\n");
+
222  if (tracking){ tracking = 0;}
+
223  else tracking = 1;
+
224 
+
225  aye.play();
+
226 
+
227  cvWaitKey(100);
+
228  }
+
229 
+
230 //Detection du bouton reset
+
231  if (sf::Mouse::isButtonPressed(sf::Mouse::Left)&&(PosMouse.x>640)&&(PosMouse.x<760)&&(PosMouse.y>110)&&(PosMouse.y<160)){
+
232 
+
233  tracking = 0;
+
234  //Reset Position moteur
+
235  angle[0]=60; //ANGLES A VERIFIER
+
236  angle[1]=100;
+
237  controle_moteur(angle);
+
238 
+
239  aye.play();
+
240 
+
241  cvWaitKey(100);
+
242  }
+
243  //printf("Pos Mouse : %d %d \n", PosMouse.x, PosMouse.y);
244 
-
245  boucle = 1;
-
246  tracking = 1; //Tracking de base en mode CONFIG
-
247 #endif
-
248 
-
249  while(boucle)
-
250  {
+
245 
+
246  /* Update the window */
+
247  window.draw(button_tracking);
+
248  window.draw(button_reset);
+
249  window.draw(text_track);
+
250  window.draw(text_reset);
251 
-
252 #ifdef SFML
-
253  boucle = window.isOpen();
-
254 
-
255  // on inspecte tous les évènements de la fenêtre qui ont été émis depuis la précédente itération
-
256  while (window.pollEvent(event))
-
257  {
-
258  // évènement "fermeture demandée" : on ferme la fenêtre
-
259  if (event.type == sf::Event::Closed)
-
260  window.close();
-
261  }
-
262 #endif
-
263 
-
264  // Get one frame
-
265  frame = cvQueryFrame( capture );
-
266 
-
267  if( !frame ){
-
268  perror("ERROR: frame is null...");
-
269  break;
-
270  }
-
271 
-
272  //Binarisation du flux vidéo
-
273  traitement(frame, hsv_frame, threshold, iLowH, iHighH, iLowS, iHighS, iLowV, iHighV);
-
274 
-
275  // Calculate the moments to estimate the position of the ball
-
276  Position_moy(threshold, &posX, &posY);
-
277 
-
278  //Dessine les informations de tracking sur frame
-
279  Affichage_Tracking(frame, posX, posY, width, height);
-
280 
-
281 
-
282 #ifdef SFML
-
283 //Affichage SFML
-
284  /* Clear the screen */
-
285  window.clear(sf::Color::White);
-
286 
-
287 //Affichage de la frame
-
288 
-
289  //Le chargement pourrait etre plus optimisé en créant nous me l'image SFML en parcourant l'IplImage
-
290 
-
291  //Enregistrement de la frame openCV
-
292  cvSaveImage("Stock SFML/temp.jpg", frame);
-
293 
-
294  //Chargement de la frame en texture SFML
-
295  if (!txFlux.loadFromFile("Stock SFML/temp.jpg")){
-
296  printf("Erreur chargement image SFML\n" );
-
297  break;
-
298  }
-
299 
-
300  spFlux.setTexture(txFlux);
-
301  window.draw(spFlux);
-
302 
-
303 
-
304  sf::Vector2i PosMouse = sf::Mouse::getPosition(window);
-
305 //Detection du bouton tracking
-
306  if (sf::Mouse::isButtonPressed(sf::Mouse::Left)&&(PosMouse.x>640)&&(PosMouse.x<760)&&(PosMouse.y>0)&&(PosMouse.y<120)){
-
307  //printf("\n\n\n OK \n\n\n");
-
308  if (tracking){ tracking = 0;}
-
309  else tracking = 1;
-
310  cvWaitKey(100);
-
311  }
-
312  //printf("Pos Mouse : %d %d \n", PosMouse.x, PosMouse.y);
-
313 
-
314 //Dessin du bouton de tracking
-
315  sf::Texture txBut;
-
316  sf::Sprite button_tracking;
-
317 
-
318  if (!txBut.loadFromFile("Stock SFML/button.png")){
-
319  printf("Erreur chargement image SFML\n" );
-
320  break;
-
321  }
-
322 
-
323  button_tracking.setTexture(txBut);
-
324  button_tracking.setScale(0.5,0.5);
-
325  button_tracking.setPosition(sf::Vector2f(width+20, 20));
-
326 
-
327  if(tracking){ button_tracking.setColor(sf::Color::Green); }
-
328  else{ button_tracking.setColor(sf::Color::Red); }
-
329 
-
330  window.draw(button_tracking);
-
331 
-
332 //Ajout du texte
-
333  sf::Font font;
-
334  if (!font.loadFromFile("Stock SFML/arial.ttf")){
-
335  printf("Erreur chargement police SFML\n" );
-
336  break;
-
337  }
-
338 
-
339  sf::Text text;
-
340  // choix de la police à utiliser
-
341  text.setFont(font); // font est un sf::Font
-
342 
-
343  // choix de la chaîne de caractères à afficher
-
344  text.setString("Tracking Moteur");
-
345 
-
346  // choix de la taille des caractères
-
347  text.setCharacterSize(24); // exprimée en pixels, pas en points !
-
348 
-
349  //text.setFillColor(sf::Color::Black);
-
350  text.setColor(sf::Color::Black);
-
351 
-
352  text.setPosition(sf::Vector2f(width+100, 35));
-
353 
-
354  window.draw(text);
-
355 
-
356  /* Update the window */
-
357  window.display();
-
358 
-
359 #endif
-
360 //Envoie données moteurs
-
361  if(tracking){
-
362  //Mouvements moteurs
-
363  //printf("-PREMAJ_ANGLE...: %d %d\n",width,height);
-
364 
-
365  maj_angle(ajust_pos(posX-width/2,width), ajust_pos(posY-height/2,height), height*JEU, angle);
-
366  controle_moteur(angle);
-
367 
-
368  cvWaitKey(50);
-
369  }
-
370 
-
371 
-
372 #ifdef CONFIG
-
373  affichage_config(frame, hsv_frame, threshold); //Affichage du flux vidéo et de ses traitements
-
374 
-
375  if( (cvWaitKey(10) ) >= 0 ) break; //Arret capture
-
376 #endif
-
377 
-
378  }
-
379 
-
380  // Release the capture device housekeeping
-
381  cvReleaseCapture( &capture );
-
382 
-
383  cvReleaseImage(&threshold);
-
384  cvReleaseImage(&hsv_frame);
-
385  cvReleaseImage(&frame);
-
386 
-
387  return EXIT_SUCCESS;
-
388 }
-
389 
-
390 
-
391 void maj_angle(int vecX, int vecY, int rayon, double* angle){
-
392  //On ajustera coeff fonction du rayon. Si la cible est à une distance 5*r, il sera 5x plus rapide que s'il était à 1*r
-
393 
-
394  double coeffx, coeffy;
-
395  int l0, l1;
-
396 
-
397  //printf("-MAJ_ANGLE...Valeur maj_angle arguments : %d %d %d\n\tAnciens angles : %d %d\n\t",vecX,vecY,rayon,(int)angle[0],(int)angle[1]);
-
398 
-
399 
-
400  //Ajout d'un angle moteur pondéré par la distance
-
401  coeffx = -0.2*vecX/rayon;
-
402  coeffy = 0.2*vecY/rayon;
-
403  angle[0] += coeffx;
-
404  angle[1] += coeffy;
-
405 
-
406  //Majoration - minoration des angles moteurs
-
407  l0 = limite_moteur(angle[0]);
-
408  l1 = limite_moteur(angle[1]);
-
409  if (l0 != 0) angle[0] = l0;
-
410  if (l1 != 0) angle[1] = l1;
-
411 
-
412  //printf("Nouveaux angles : %lf %lf %d %d\n",angle[0],angle[1],(int)angle[0],(int)angle[0]);
-
413 }
-
414 
-
415 int ajust_pos(int pos, int ref){
-
416  if (pos > ref) return 0;
-
417  else return pos;
-
418 }
-
419 
-
420 int limite_moteur(int val_pwm){
-
421  int MAX_PWM = 130, MIN_PWM = 30;
-
422  if (val_pwm > MAX_PWM){
-
423  return MAX_PWM;
-
424  }
-
425  else if (val_pwm < MIN_PWM){
-
426  return MIN_PWM;
-
427  }
-
428  else{
-
429  return 0;
-
430  }
-
431 }
-
432 
-
433 void controle_moteur(double* angle){
-
434 
-
435  //Ouverture port serie
-
436  FILE* fichier = NULL;
-
437  fichier = fopen("/dev/ttyACM0","w");
-
438  if(fichier==NULL){
-
439  printf("Erreur ouverture fichier\n");
-
440  perror("fopen failed for /dev/ttyACM0" );
-
441  exit( EXIT_FAILURE );
-
442  }
-
443 
-
444  //Ecriture angles
-
445  fprintf(fichier,"%d\n",(int)angle[0]);
-
446  fprintf(fichier,"%d\n",(int)angle[1]);
-
447 
-
448  //Fermeture
-
449  fclose(fichier);
-
450  return;
-
451 }
-
452 
-
453 void traitement(IplImage* frame, IplImage* HSV, IplImage* Binaire, int LowH, int HighH, int LowS, int HighS, int LowV, int HighV){ //Effectue une binarisation de frame en fonction des bornes HSV
-
454 
-
455  // Covert color space to HSV as it is much easier to filter colors in the HSV color-space.
-
456  cvCvtColor(frame, HSV, CV_BGR2HSV);
-
457 
-
458  //Blur
-
459  cvSmooth( HSV, HSV, CV_GAUSSIAN, 15, 0,0,0); //suppression des parasites par flou gaussien
-
460 
-
461  //Binarisation
-
462 
-
463  CvScalar valinf={(double)LowH,(double)LowS,(double)LowV};
-
464  CvScalar valsup={(double)HighH,(double)HighS,(double)HighV};
-
465 
-
466  cvInRangeS(HSV, valinf,valsup, Binaire);
-
467 
-
468  //En cas d'erreur sur les trois ligne précédentes
-
469  //cvInRangeS(HSV, CvScalar(LowH,LowS,LowV),CvScalar(HighH,HighS,HighV), Binaire);
-
470 
-
471  //cvSmooth( Binaire, Binaire, CV_GAUSSIAN, 9, 9 ); //Legère suppression des parasites
-
472 }
-
473 
-
474 void Position_moy(IplImage* Binaire, int* posX, int * posY){ //Effectue le baricentre des pixels d'une image binaire pour obtenir la postion de l'objet
-
475 
-
476  CvMoments *moments = (CvMoments*)malloc(sizeof(CvMoments));
-
477 
-
478  cvMoments(Binaire, moments, 1);
-
479  // The actual moment values
-
480  double moment10 = cvGetSpatialMoment(moments, 1, 0);
-
481  double moment01 = cvGetSpatialMoment(moments, 0, 1);
-
482  double area = cvGetCentralMoment(moments, 0, 0);
-
483 
-
484  *posX = moment10/area;
-
485  *posY = moment01/area;
-
486 
-
487  free(moments);
-
488 }
-
489 
-
490 void config(int* LowH, int* HighH, int* LowS, int* HighS, int* LowV, int* HighV){ //Affiche le panneau de configuration de tracking avec les arguments comme valeur de base
-
491 
-
492  cvNamedWindow("Control", CV_WINDOW_AUTOSIZE); //create a window called "Control"
-
493 
-
494  //Create trackbars in "Control" window
-
495  cvCreateTrackbar("LowH", "Control", LowH, 179,NULL); //Hue (0 - 179)
-
496  cvCreateTrackbar("HighH", "Control", HighH, 179,NULL);
-
497 
-
498  cvCreateTrackbar("LowS", "Control", LowS, 255,NULL); //Saturation (0 - 255)
-
499  cvCreateTrackbar("HighS", "Control", HighS, 255,NULL);
-
500 
-
501  cvCreateTrackbar("LowV", "Control", LowV, 255,NULL); //Value (0 - 255)
-
502  cvCreateTrackbar("HighV", "Control", HighV, 255,NULL);
-
503 }
-
504 
-
505 void affichage_config(IplImage* frame, IplImage* HSV, IplImage* Binaire){ //Affiche le flux vidéos et ses différent traitements
-
506 
-
507  // Create a window in which the captured images will be presented
-
508  cvNamedWindow( "HSV", CV_WINDOW_AUTOSIZE );
-
509  cvNamedWindow( "Binaire", CV_WINDOW_AUTOSIZE );
-
510  cvNamedWindow( "Camera", CV_WINDOW_AUTOSIZE );
-
511 
-
512  cvShowImage( "HSV", HSV); // Original stream in the HSV color space
-
513  cvShowImage( "Binaire", Binaire); // The stream after color filtering
-
514  cvShowImage( "Camera", frame ); // Flux caméra avec tracking objet
-
515 }
-
516 
-
517 void Affichage_Tracking(IplImage* frame, int posX, int posY, int width, int height){ //Dessine les informations de tracking sur frame
-
518 
-
519  //Affichage zone suivie objet
-
520  cvCircle(frame, cvPoint(width/2,height/2), height*JEU, CV_RGB(0, 255, 0), 4, 8, 0 );
-
521 
-
522  if(posX<5&&posY<5){ //Si aucun objet spotted, pointeur rouge au centre
-
523  posX=width/2;
-
524  posY=height/2;
-
525  cvLine(frame, cvPoint(posX-20,posY), cvPoint(posX+20,posY), CV_RGB(255, 0, 0), 4, 8, 0 );
-
526  cvLine(frame, cvPoint(posX,posY-20), cvPoint(posX,posY+20), CV_RGB(255, 0, 0), 4, 8, 0 );
-
527  }
-
528  else{ //Objet spotted
-
529  //Affichage position de l'objet
-
530  cvLine(frame, cvPoint(posX-20,posY), cvPoint(posX+20,posY), CV_RGB(0, 0, 255), 4, 8, 0 );
-
531  cvLine(frame, cvPoint(posX,posY-20), cvPoint(posX,posY+20), CV_RGB(0, 0, 255), 4, 8, 0 );
-
532  }
-
533 }
-
void Position_moy(IplImage *Binaire, int *posX, int *posY)
Effectue le baricentre des pixels d'une image binaire pour obtenir la postion de l'objet.
Definition: KirbyTrack.c:474
-
void config(int *LowH, int *HighH, int *LowS, int *HighS, int *LowV, int *HighV)
Fonction d'affichage du panneau de configuration de la couleur à suivre.
Definition: KirbyTrack.c:490
-
#define JEU
Coefficient de tolérance pour le suivi d'objet.
Definition: KirbyTrack.c:42
-
int ajust_pos(int pos, int ref)
permet d'éviter des positions supérieures à ref considérées comme aberrantes.
Definition: KirbyTrack.c:415
-
void maj_angle(int vecX, int vecY, int rayon, double *angle)
Met à jour angle selon la distance entre le centre de la caméra et la cible, avec un tolérance circul...
Definition: KirbyTrack.c:391
-
int limite_moteur(int val_pwm)
Fonction qui vérifie que les valeurs envoyees aux moteurs sont correctes.
Definition: KirbyTrack.c:420
-
void Affichage_Tracking(IplImage *frame, int posX, int posY, int width, int height)
Fonction d'affichage des informations de suivi.
Definition: KirbyTrack.c:517
-
int main(int argc, char *argv[])
Entrée du programme.
Definition: KirbyTrack.c:162
-
void controle_moteur(double *angle)
Fonction d'envoie des angles aux moteurs.
Definition: KirbyTrack.c:433
-
void affichage_config(IplImage *frame, IplImage *HSV, IplImage *Binaire)
Fonction d'affichage du flux vidéo, du flux en HSV et de sa binarisation.
Definition: KirbyTrack.c:505
-
void traitement(IplImage *frame, IplImage *HSV, IplImage *Binaire, int LowH, int HighH, int LowS, int HighS, int LowV, int HighV)
Effectue une binarisation de frame en fonction des bornes HSV.
Definition: KirbyTrack.c:453
+
252  window.display();
+
253 
+
254 #endif
+
255 //Envoie données moteurs
+
256  if(tracking){
+
257  //Mouvements moteurs
+
258  //printf("-PREMAJ_ANGLE...: %d %d\n",width,height);
+
259 
+
260  maj_angle(ajust_pos(posX-width/2,width), ajust_pos(posY-height/2,height), height*JEU, angle);
+
261  controle_moteur(angle);
+
262 
+
263  cvWaitKey(50);
+
264  }
+
265 
+
266 
+
267 #ifdef CONFIG
+
268  affichage_config(frame, hsv_frame, threshold); //Affichage du flux vidéo et de ses traitements
+
269 
+
270  if( (cvWaitKey(10) ) >= 0 ) break; //Arret capture
+
271 #endif
+
272 
+
273  }
+
274 
+
275  // Release the capture device housekeeping
+
276  cvReleaseCapture( &capture );
+
277 
+
278  cvReleaseImage(&threshold);
+
279  cvReleaseImage(&hsv_frame);
+
280  cvReleaseImage(&frame);
+
281 
+
282  return EXIT_SUCCESS;
+
283 }
+
284 
+
285 /*
+
286  //musique
+
287  if(aye.getStatus()==sf::Sound::Stopped){
+
288  aye.setPitch(0.5);
+
289  aye.setVolume(150);
+
290  aye.setLoop(true);
+
291  aye.play();
+
292  }
+
293 */
+
294 
+
295 /*
+
296  //Link
+
297  sf::Texture txLink;
+
298  sf::Sprite Link;
+
299 
+
300  if (!txLink.loadFromFile("Stock SFML/link.png")){
+
301  printf("Erreur chargement image SFML\n" );
+
302  break;
+
303  }
+
304 
+
305  Link.setTexture(txLink);
+
306  Link.setPosition(sf::Vector2f(posX-75, posY-75));
+
307 
+
308  window.draw(Link);
+
309 */
+
void config(int *LowH, int *HighH, int *LowS, int *HighS, int *LowV, int *HighV)
Fonction d'affichage du panneau de configuration de la couleur à suivre.
Definition: fonction.c:136
+
void Position_moy(IplImage *Binaire, int *posX, int *posY)
Effectue le baricentre des pixels d'une image binaire pour obtenir la postion de l'objet.
Definition: fonction.c:120
+
int ajust_pos(int pos, int ref)
permet d'éviter des positions supérieures à ref considérées comme aberrantes.
Definition: fonction.c:36
+
void traitement(IplImage *frame, IplImage *HSV, IplImage *Binaire, int LowH, int HighH, int LowS, int HighS, int LowV, int HighV)
Effectue une binarisation de frame en fonction des bornes HSV.
Definition: fonction.c:99
+
void maj_angle(int vecX, int vecY, int rayon, double *angle)
Met à jour angle selon la distance entre le centre de la caméra et la cible, avec un tolérance circul...
Definition: fonction.c:12
+
#define JEU
Coefficient de tolérance pour le suivi d'objet.
+
Bibliothèque, Headers et Documentation des fonctions.
+
void affichage_config(IplImage *frame, IplImage *HSV, IplImage *Binaire)
Fonction d'affichage du flux vidéo, du flux en HSV et de sa binarisation.
Definition: fonction.c:151
+
Fonctions utilisés dans les programmes.
+
int main(int argc, char *argv[])
Entrée du programme.
Definition: KirbyTrack.c:23
+
void controle_moteur(double *angle)
Fonction d'envoie des angles aux moteurs.
Definition: fonction.c:54
+
void Affichage_Tracking(IplImage *frame, int posX, int posY, int width, int height)
Fonction d'affichage des informations de suivi.
Definition: fonction.c:163
+ - + diff --git a/Doxy/html/_navy_8c.html b/Doxy/html/_navy_8c.html new file mode 100644 index 0000000..8388ad1 --- /dev/null +++ b/Doxy/html/_navy_8c.html @@ -0,0 +1,143 @@ + + + + + + +CamAdventure: /nfs/home/sasl/eleves/rob/3408212/rob3-projetsinfo-g15-2017/Code/Navy.c File Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
CamAdventure +
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
Navy.c File Reference
+
+
+ +

Figure Libre. +More...

+
#include "fonction.h"
+
+

Go to the source code of this file.

+ + + + +

+Functions

+int main (int argc, char *argv[])
 
+

Detailed Description

+

Figure Libre.

+
Author
Jacques / Antoine
+
Date
avril - mai 2017
+

Suivie d'un Kirby (Rose) ou d'une étoile (Jaune) par une caméra avec mode interface utilisateur ou configuration

+ +

Definition in file Navy.c.

+
+
+ + + + diff --git a/Doxy/html/_navy_8c.js b/Doxy/html/_navy_8c.js new file mode 100644 index 0000000..94d21e0 --- /dev/null +++ b/Doxy/html/_navy_8c.js @@ -0,0 +1,4 @@ +var _navy_8c = +[ + [ "main", "_navy_8c.html#a0ddf1224851353fc92bfbff6f499fa97", null ] +]; \ No newline at end of file diff --git a/Doxy/html/_navy_8c_source.html b/Doxy/html/_navy_8c_source.html index ee3fd10..abf7d5a 100644 --- a/Doxy/html/_navy_8c_source.html +++ b/Doxy/html/_navy_8c_source.html @@ -8,6 +8,13 @@ + + + + +
@@ -77,507 +101,225 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
- -
Navy.c
-
1 #include <stdio.h>
-
2 #include <stdlib.h>
-
3 #include <cv.h>
-
4 #include <highgui.h>
-
5 //#include <opencv2/highgui.hpp> //Pour le cvRound
-
6 //#include "opencv2/videoio/videoio_c.h" //Pour le CvCapture*
-
7 
-
8 //#include <cxcore.h>
-
9 //#include <SFML/Window.h>
-
10 #include <SFML/Audio.hpp>
-
11 #include <SFML/Graphics.hpp>
-
12 #include <SFML/Window.hpp>
-
13 #include <SFML/System.hpp> //inutilisé pour le moment
+Go to the documentation of this file.
1 
+
11 #include "fonction.h"
+
12 //#include "fonction.c" //Pour le problème de référence indéfinie à la compilation
+
13 
14 
-
15 //#define CONFIG
-
16 #define SFML
-
17 
-
18 #define KIRBY
-
19 //#define ETOILE
-
20 
-
21 #define JEU 0.15
-
22 
-
23 //ATTENTION AFFICHAGE OPENCV INCOMPATIBLE AVEC AFFICHAGE SFML
-
24 //ATTENTION SFML SUPPORTE UN NOMBRE LIMITE DE SPRITE EN FCT DU PC
-
25 
-
26 /*Headers*/
-
27 void maj_angle(int vecX, int vecY, int rayon, double* angle); //Met à jour l'angle selon la distance CentreCamera - Cible
-
28 int ajust_pos(int pos, int ref);
-
29 void controle_moteur(double* angle);//Envoie les angles au moteur
-
30 int limite_moteur(int val_pwm);//Verifie que les valeurs envoyees aux moteurs sont correctes
-
31 
-
32 void config(int* LowH, int* HighH, int* LowS, int* HighS, int* LowV, int* HighV); //Affiche le panneau de configuration de tracking avec les arguments comme valeur de base
-
33 void affichage_config(IplImage* frame, IplImage* HSV, IplImage* Binaire); //Affiche le flux vidéos et ses différent traitements
-
34 void Affichage_Tracking(IplImage* frame, int posX, int posY, int width, int height); //Dessine les informations de tracking sur frame
-
35 
-
36 void Position_moy(IplImage* Binaire, int* posX, int * posY); //Effectue le baricentre des pixels d'une image binaire pour obtenir la postion de l'objet
-
37 void traitement(IplImage* frame, IplImage* HSV, IplImage* Binaire, int LowH, int HighH, int LowS, int HighS, int LowV, int HighV); //Effectue une binarisation de frame en fonction des bornes HSV
-
38 
-
39 int image_CV2SFML(IplImage* imcv, sf::Image imFlux); //Construction de imsf (RGBA) à partir de imcv (BGR), avec alpha constant (=1)
-
40 
-
41 
-
42 int main(int argc, char* argv[])
-
43 {
-
44  //Initialisations
-
45  int height,width; //parameters of the image we are working on
-
46  int posX, posY; //Position objet
-
47  int boucle;
+
21 int main(int argc, char* argv[])
+
22 {
+
23  //Initialisations
+
24  int height,width; //parameters of the image we are working on
+
25  int boucle = 1; //On effectuera la boucle principale au moins une fois
+
26  int i;
+
27  float scale_x, scale_y;
+
28  int BGR[3];
+
29 
+
30  //Initialisation detection visage
+
31  CvHaarClassifierCascade* cascade = init_cascade();
+
32  face* tab_face[MAX_FACE];
+
33  for (i=0;i<2;i++){
+
34  tab_face[i] = (face*)malloc(sizeof(face));
+
35  }
+
36  int rdy[MAX_FACE];
+
37 
+
38  //Link
+
39  sf::Texture txLink;
+
40  sf::Sprite Link;
+
41 
+
42  if (!txLink.loadFromFile("Stock SFML/link.png")){
+
43  printf("Erreur chargement image SFML\n" );
+
44  return EXIT_FAILURE;
+
45  }
+
46 
+
47  sf::Vector2u vec_link = txLink.getSize();
48 
-
49  double angle[2] = {100,100};
-
50 
-
51  int tracking;
-
52 
-
53 
-
54 #ifdef SFML
-
55  //Initialisation SFML
-
56 
-
57  sf::Texture txFlux;
-
58  sf::Sprite spFlux;
-
59  sf::Image imFlux;
-
60  sf::Event event;
+
49  //Ganon
+
50  sf::Texture txGanon;
+
51  sf::Sprite Ganon;
+
52 
+
53  if (!txGanon.loadFromFile("Stock SFML/ganon.png")){
+
54  printf("Erreur chargement image SFML\n" );
+
55  return EXIT_FAILURE;
+
56  }
+
57 
+
58  sf::Vector2u vec_ganon = txGanon.getSize();
+
59 
+
60  //Initialisation SFML
61 
-
62  tracking = 0; //Pas de tracking de base en mode SFML
-
63 
-
64 #endif
-
65 
-
66  //Ouverture flux camera
-
67  CvCapture* capture = cvCaptureFromCAM( 0 );
-
68 
-
69  if( !capture ){
-
70  printf("ERROR: capture is NULL \n" );
-
71  exit(EXIT_FAILURE);
-
72  }
+
62  sf::Texture txFlux;
+
63  sf::Sprite spFlux;
+
64  sf::Image imFlux;
+
65  sf::Event event;
+
66 
+
67  //Chargement son
+
68  sf::Music aile;
+
69  if (!aile.openFromFile("Stock SFML/aile.ogg"))
+
70  return EXIT_FAILURE;
+
71  aile.setLoop(true);
+
72  aile.play();
73 
-
74 
-
75  // grab an image from the capture
-
76  IplImage* frame = cvQueryFrame( capture );
-
77 
-
78  // get the image data
-
79  height = frame->height;
-
80  width = frame->width;
-
81 
-
82  // capture size -
-
83  CvSize size = cvSize(width,height);
-
84 
-
85 
-
86 #ifdef SFML
-
87  //Création de la fenetre principale
-
88  sf::RenderWindow window(sf::VideoMode(width+300, height), "KirbyTrack");
-
89 #endif
-
90 
-
91  // Initialize different images that are going to be used in the program
-
92  IplImage* hsv_frame = cvCreateImage(size, IPL_DEPTH_8U, 3); // image converted to HSV plane
-
93  IplImage* threshold = cvCreateImage(size, IPL_DEPTH_8U, 1);
-
94 
-
95 
-
96  //Controle couleur
-
97 #ifdef KIRBY
-
98  //Setup Kirby
-
99  int iLowH = 152;
-
100  int iHighH = 179;
+
74  sf::Music hey;
+
75  if (!hey.openFromFile("Stock SFML/hey_listen.ogg"))
+
76  return EXIT_FAILURE;
+
77  sf::Music watchout;
+
78  if (!watchout.openFromFile("Stock SFML/watchout.ogg"))
+
79  return EXIT_FAILURE;
+
80 
+
81  //Ouverture flux camera
+
82  CvCapture* capture = cvCaptureFromCAM( 0 );
+
83 
+
84  if( !capture ){
+
85  printf("ERROR: capture is NULL \n" );
+
86  exit(EXIT_FAILURE);
+
87  }
+
88 
+
89 
+
90  // grab an image from the capture
+
91  IplImage* frame = cvQueryFrame( capture );
+
92 
+
93  // get the image data
+
94  height = frame->height;
+
95  width = frame->width;
+
96 
+
97  // capture size -
+
98  // CvSize size = cvSize(width,height);
+
99 
+
100 
101 
-
102  int iLowS = 48;
-
103  int iHighS = 255;
-
104 
-
105  int iLowV = 101;
-
106  int iHighV = 255;
-
107 #endif
-
108 #ifdef ETOILE
-
109  //Setup Etoile
-
110  int iLowH = 20;
-
111  int iHighH = 30;
-
112 
-
113  int iLowS = 100;
-
114  int iHighS = 255;
-
115 
-
116  int iLowV = 100;
-
117  int iHighV = 255;
-
118 #endif
-
119 
-
120 #ifdef CONFIG
-
121  //Affichage du panneau de config
-
122  config(&iLowH, &iHighH, &iLowS, &iHighS, &iLowV, &iHighV);
-
123 
-
124  boucle = 1;
-
125  tracking = 1; //Tracking de base en mode CONFIG
-
126 #endif
-
127 
-
128  while(boucle)
-
129  {
+
102  //Création de la fenetre principale
+
103  sf::RenderWindow window(sf::VideoMode(width, height), "KirbyTrack");
+
104 
+
105 
+
106  while(boucle)
+
107  {
+
108 
+
109  boucle = window.isOpen();
+
110 
+
111  // on inspecte tous les évènements de la fenêtre qui ont été émis depuis la précédente itération
+
112  while (window.pollEvent(event))
+
113  {
+
114  // évènement "fermeture demandée" : on ferme la fenêtre
+
115  if (event.type == sf::Event::Closed)
+
116  window.close();
+
117  }
+
118 
+
119  // Get one frame
+
120  frame = cvQueryFrame( capture );
+
121 
+
122  if( !frame ){
+
123  perror("ERROR: frame is null...");
+
124  break;
+
125  }
+
126 
+
127 
+
128  detect_and_draw(frame,cascade,tab_face);
+
129 
130 
-
131 #ifdef SFML
-
132  boucle = window.isOpen();
-
133 
-
134  // on inspecte tous les évènements de la fenêtre qui ont été émis depuis la précédente itération
-
135  while (window.pollEvent(event))
-
136  {
-
137  // évènement "fermeture demandée" : on ferme la fenêtre
-
138  if (event.type == sf::Event::Closed)
-
139  window.close();
-
140  }
-
141 #endif
-
142 
-
143  // Get one frame
-
144  frame = cvQueryFrame( capture );
-
145 
-
146  if( !frame ){
-
147  perror("ERROR: frame is null...");
-
148  break;
-
149  }
+
131 //Affichage SFML
+
132  /* Clear the screen */
+
133  window.clear(sf::Color::White);
+
134 
+
135 //Affichage de la frame
+
136 
+
137  //Le chargement pourrait etre plus optimisé en créant nous me l'image SFML en parcourant l'IplImage
+
138 
+
139  //Enregistrement de la frame openCV
+
140  cvSaveImage("Stock SFML/temp.jpg", frame);
+
141 
+
142  //Chargement de la frame en texture SFML
+
143  if (!txFlux.loadFromFile("Stock SFML/temp.jpg")){
+
144  printf("Erreur chargement image SFML\n" );
+
145  break;
+
146  }
+
147 
+
148  spFlux.setTexture(txFlux);
+
149  window.draw(spFlux);
150 
-
151  //Binarisation du flux vidéo
-
152  traitement(frame, hsv_frame, threshold, iLowH, iHighH, iLowS, iHighS, iLowV, iHighV);
-
153 
-
154  // Calculate the moments to estimate the position of the ball
-
155  Position_moy(threshold, &posX, &posY);
-
156 
-
157  //Dessine les informations de tracking sur frame
-
158  Affichage_Tracking(frame, posX, posY, width, height);
-
159 
-
160 
-
161 #ifdef SFML
-
162  //Affichage SFML
-
163  /* Clear the screen */
-
164  window.clear(sf::Color::White);
+
151  Link.setTexture(txLink);
+
152  Link.setOrigin(sf::Vector2f(vec_link.x/2,vec_link.y/2));
+
153  Link.setPosition(sf::Vector2f(tab_face[0]->point.x, tab_face[0]->point.y));
+
154  scale_x = tab_face[0]->largeur / (1.0*vec_link.x);
+
155  scale_y = tab_face[0]->largeur / (1.0*vec_link.y);
+
156  //printf("%d , %d et%lf, %lf\n",tab_face[0]->largeur,vec_link.x,scale_x,scale_y);
+
157  Link.setScale(sf::Vector2f(scale_x, scale_y));
+
158 
+
159  Ganon.setTexture(txGanon);
+
160  Ganon.setOrigin(sf::Vector2f(vec_ganon.x/2,vec_ganon.y/2));
+
161  Ganon.setPosition(sf::Vector2f(tab_face[1]->point.x, tab_face[1]->point.y));
+
162  scale_x = tab_face[1]->largeur / (1.0*vec_ganon.x);
+
163  scale_y = tab_face[1]->largeur / (1.0*vec_ganon.y);
+
164  Ganon.setScale(sf::Vector2f(scale_x, scale_y));
165 
-
166  //Conversion de la frame en image smfl
-
167  /*if(image_CV2SFML(frame, imFlux)){
-
168  printf("Erreur conversion OpenCV-SFML\n");
-
169  break;
-
170  }
-
171  */
-
172 
-
173  //Enregistrement de la frame openCV
-
174  cvSaveImage("Stock SFML/temp.jpg", frame);
-
175 
-
176  //Chargement de la frame en texture SFML
-
177  if (!txFlux.loadFromFile("Stock SFML/temp.jpg")){
-
178  printf("Erreur chargement image SFML\n" );
-
179  break;
-
180  }
-
181 
-
182  spFlux.setTexture(txFlux);
-
183 
-
184  window.draw(spFlux);
-
185 
-
186 //TEST SFML
-
187  sf::Vector2i PosMouse = sf::Mouse::getPosition(window);
-
188  //Detection du bouton tracking
-
189  if (sf::Mouse::isButtonPressed(sf::Mouse::Left)&&(PosMouse.x>640)&&(PosMouse.x<760)&&(PosMouse.y>0)&&(PosMouse.y<120)){
-
190  //printf("\n\n\n OK \n\n\n");
-
191  if (tracking){ tracking = 0;}
-
192  else tracking = 1;
-
193  cvWaitKey(100);
-
194  }
-
195  //printf("Pos Mouse : %d %d \n", PosMouse.x, PosMouse.y);
-
196 
-
197  //Dessin du bouton de tracking
-
198  sf::Texture txBut;
-
199  sf::Sprite button_tracking;
-
200 
-
201  if (!txBut.loadFromFile("Stock SFML/button.png")){
-
202  printf("Erreur chargement image SFML\n" );
-
203  break;
-
204  }
-
205 
-
206  button_tracking.setTexture(txBut);
-
207  button_tracking.setScale(0.5,0.5);
-
208  button_tracking.setPosition(sf::Vector2f(width+20, 20));
-
209 
-
210  if(tracking){ button_tracking.setColor(sf::Color::Green); }
-
211  else{ button_tracking.setColor(sf::Color::Red); }
-
212 
-
213  window.draw(button_tracking);
-
214 
-
215  //Dessin du bouton reset
-
216  sf::Texture txBut2;
-
217  sf::Sprite button_reset;
-
218 
-
219  if (!txBut2.loadFromFile("Stock SFML/button.png")){
-
220  printf("Erreur chargement image SFML\n" );
-
221  break;
-
222  }
-
223 
-
224  button_reset.setTexture(txBut2);
-
225  button_reset.setScale(0.5,0.5);
-
226  button_reset.setPosition(sf::Vector2f(width+20, 100));
-
227 
-
228  window.draw(button_reset);
-
229 
-
230 /*
-
231  //Ajout du texte
-
232  sf::Font font;
-
233  if (!font.loadFromFile("Stock SFML/arial.ttf")){
-
234  printf("Erreur chargement police SFML\n" );
-
235  break;
-
236  }
-
237 
-
238  sf::Text text;
-
239  // choix de la police à utiliser
-
240  text.setFont(font); // font est un sf::Font
-
241 
-
242  // choix de la chaîne de caractères à afficher
-
243  text.setString("Tracking Moteur");
-
244 
-
245  // choix de la taille des caractères
-
246  text.setCharacterSize(24); // exprimée en pixels, pas en points !
-
247 
-
248  //text.setFillColor(sf::Color::Black);
-
249  text.setColor(sf::Color::Black);
-
250 
-
251  text.setPosition(sf::Vector2f(width+100, 35));
-
252 
-
253  window.draw(text);
-
254 */
-
255 /*
-
256  //Link
-
257  sf::Texture txLink;
-
258  sf::Sprite Link;
-
259 
-
260  if (!txLink.loadFromFile("Stock SFML/link.png")){
-
261  printf("Erreur chargement image SFML\n" );
-
262  break;
-
263  }
-
264 
-
265  Link.setTexture(txLink);
-
266  Link.setPosition(sf::Vector2f(posX-75, posY-75));
-
267 
-
268  window.draw(Link);
-
269 */
-
270  /* Update the window */
-
271  window.display();
-
272 
-
273 #endif
-
274 
-
275  if(tracking){
-
276  //Mouvements moteurs
-
277  //printf("-PREMAJ_ANGLE...: %d %d\n",width,height);
-
278 
-
279  maj_angle(ajust_pos(posX-width/2,width), ajust_pos(posY-height/2,height), height*JEU, angle);
-
280  controle_moteur(angle);
-
281 
-
282  cvWaitKey(50);
-
283  }
-
284 
-
285 
-
286 #ifdef CONFIG
-
287  affichage_config(frame, hsv_frame, threshold); //Affichage du flux vidéo et de ses traitements
-
288 
-
289  if( (cvWaitKey(10) ) >= 0 ) break; //Arret capture
-
290 #endif
-
291 
-
292  }
-
293 
-
294  //cvWaitKey(0); //Fin programme
-
295 
-
296  // Release the capture device housekeeping
-
297  cvReleaseCapture( &capture );
-
298 
-
299  cvReleaseImage(&threshold);
-
300  cvReleaseImage(&hsv_frame);
-
301  cvReleaseImage(&frame);
-
302 
-
303  return EXIT_SUCCESS;
-
304 }
-
305 
-
306 
-
307 void maj_angle(int vecX, int vecY, int rayon, double* angle){
-
308  //On ajustera coeff fonction du rayon. Si la cible est à une distance 5*r, il sera 5x plus rapide que s'il était à 1*r
-
309 
-
310  double coeffx, coeffy;
-
311  int l0, l1;
-
312 
-
313  //printf("-MAJ_ANGLE...Valeur maj_angle arguments : %d %d %d\n\tAnciens angles : %d %d\n\t",vecX,vecY,rayon,(int)angle[0],(int)angle[1]);
-
314 
-
315 
-
316  //Ajout d'un angle moteur pondéré par la distance
-
317  coeffx = -0.2*vecX/rayon;
-
318  coeffy = 0.2*vecY/rayon;
-
319  angle[0] += coeffx;
-
320  angle[1] += coeffy;
-
321 
-
322  //Majoration - minoration des angles moteurs
-
323  l0 = limite_moteur(angle[0]);
-
324  l1 = limite_moteur(angle[1]);
-
325  if (l0 != 0) angle[0] = l0;
-
326  if (l1 != 0) angle[1] = l1;
-
327 
-
328  //printf("Nouveaux angles : %lf %lf %d %d\n",angle[0],angle[1],(int)angle[0],(int)angle[0]);
-
329 }
-
330 
-
331 int ajust_pos(int pos, int ref){
-
332  if (pos > ref) return 0;
-
333  else return pos;
-
334 }
-
335 
-
336 int limite_moteur(int val_pwm){
-
337  int MAX_PWM = 130, MIN_PWM = 30;
-
338  if (val_pwm > MAX_PWM){
-
339  return MAX_PWM;
-
340  }
-
341  else if (val_pwm < MIN_PWM){
-
342  return MIN_PWM;
-
343  }
-
344  else{
-
345  return 0;
-
346  }
-
347 }
-
348 
-
349 void controle_moteur(double* angle){
-
350 
-
351  //Ouverture port serie
-
352  FILE* fichier = NULL;
-
353  fichier = fopen("/dev/ttyACM0","w");
-
354  if(fichier==NULL){
-
355  printf("Erreur ouverture fichier\n");
-
356  perror("fopen failed for /dev/ttyACM0" );
-
357  exit( EXIT_FAILURE );
-
358  }
-
359 
-
360  //Ecriture angles
-
361  fprintf(fichier,"%d\n",(int)angle[0]);
-
362  fprintf(fichier,"%d\n",(int)angle[1]);
-
363 
-
364  //Fermeture
-
365  fclose(fichier);
-
366  return;
-
367 }
-
368 
-
369 int image_CV2SFML(IplImage* imcv, sf::Image imFlux){
-
370 
-
371  int R, G, B;
-
372  int w = imcv->widthStep;
-
373  char* ptr = imcv->imageData;
-
374 
-
375  imFlux.create(imcv->width,imcv->height, NULL); //Initialise une image vide
-
376 
-
377  for( int y=0; y<imcv->height; y++ ) {
-
378  //uchar* ptr = (uchar*) ( imcv->imageData + y * imcv->widthStep );
-
379  for( int x=0; x<imcv->width; x++ ) {
-
380  //Recupération du pixel
-
381  B = ptr[y*w + 3*x];
-
382  G = ptr[y*w + 3*x + 1];
-
383  R = ptr[y*w + 3*x + 2];
-
384 
-
385  //Ecriture du pixel associé
-
386  imFlux.setPixel(x,y,sf::Color(R,G,B,1)); //Alpha channel = 1
-
387  }
-
388  }
-
389 
-
390  return 0;
-
391 }
-
392 
-
393 
-
394 void traitement(IplImage* frame, IplImage* HSV, IplImage* Binaire, int LowH, int HighH, int LowS, int HighS, int LowV, int HighV){ //Effectue une binarisation de frame en fonction des bornes HSV
-
395 
-
396  // Covert color space to HSV as it is much easier to filter colors in the HSV color-space.
-
397  cvCvtColor(frame, HSV, CV_BGR2HSV);
-
398 
-
399  //Blur
-
400  cvSmooth( HSV, HSV, CV_GAUSSIAN, 15, 0,0,0); //suppression des parasites par flou gaussien
-
401 
-
402  //Binarisation
-
403 
-
404  CvScalar valinf={(double)LowH,(double)LowS,(double)LowV};
-
405  CvScalar valsup={(double)HighH,(double)HighS,(double)HighV};
-
406 
-
407  cvInRangeS(HSV, valinf,valsup, Binaire);
-
408 
-
409  //En cas d'erreur sur les trois ligne précédentes
-
410  //cvInRangeS(HSV, CvScalar(LowH,LowS,LowV),CvScalar(HighH,HighS,HighV), Binaire);
-
411 
-
412  //cvSmooth( Binaire, Binaire, CV_GAUSSIAN, 9, 9 ); //Legère suppression des parasites
-
413 }
-
414 
-
415 void Position_moy(IplImage* Binaire, int* posX, int * posY){ //Effectue le baricentre des pixels d'une image binaire pour obtenir la postion de l'objet
-
416 
-
417  CvMoments *moments = (CvMoments*)malloc(sizeof(CvMoments));
-
418 
-
419  cvMoments(Binaire, moments, 1);
-
420  // The actual moment values
-
421  double moment10 = cvGetSpatialMoment(moments, 1, 0);
-
422  double moment01 = cvGetSpatialMoment(moments, 0, 1);
-
423  double area = cvGetCentralMoment(moments, 0, 0);
-
424 
-
425  *posX = moment10/area;
-
426  *posY = moment01/area;
-
427 
-
428  free(moments);
-
429 }
-
430 
-
431 void config(int* LowH, int* HighH, int* LowS, int* HighS, int* LowV, int* HighV){ //Affiche le panneau de configuration de tracking avec les arguments comme valeur de base
-
432 
-
433  cvNamedWindow("Control", CV_WINDOW_AUTOSIZE); //create a window called "Control"
-
434 
-
435  //Create trackbars in "Control" window
-
436  cvCreateTrackbar("LowH", "Control", LowH, 179,NULL); //Hue (0 - 179)
-
437  cvCreateTrackbar("HighH", "Control", HighH, 179,NULL);
-
438 
-
439  cvCreateTrackbar("LowS", "Control", LowS, 255,NULL); //Saturation (0 - 255)
-
440  cvCreateTrackbar("HighS", "Control", HighS, 255,NULL);
-
441 
-
442  cvCreateTrackbar("LowV", "Control", LowV, 255,NULL); //Value (0 - 255)
-
443  cvCreateTrackbar("HighV", "Control", HighV, 255,NULL);
-
444 }
-
445 
-
446 void affichage_config(IplImage* frame, IplImage* HSV, IplImage* Binaire){ //Affiche le flux vidéos et ses différent traitements
-
447 
-
448  // Create a window in which the captured images will be presented
-
449  cvNamedWindow( "HSV", CV_WINDOW_AUTOSIZE );
-
450  cvNamedWindow( "Binaire", CV_WINDOW_AUTOSIZE );
-
451  cvNamedWindow( "Camera", CV_WINDOW_AUTOSIZE );
-
452 
-
453  cvShowImage( "HSV", HSV); // Original stream in the HSV color space
-
454  cvShowImage( "Binaire", Binaire); // The stream after color filtering
-
455  cvShowImage( "Camera", frame ); // Flux caméra avec tracking objet
-
456 }
-
457 
-
458 void Affichage_Tracking(IplImage* frame, int posX, int posY, int width, int height){ //Dessine les informations de tracking sur frame
-
459 
-
460  //Affichage zone suivie objet
-
461  cvCircle(frame, cvPoint(width/2,height/2), height*JEU, CV_RGB(0, 255, 0), 4, 8, 0 );
-
462 
-
463  if(posX<5&&posY<5){ //Si aucun objet spotted, pointeur rouge au centre
-
464  posX=width/2;
-
465  posY=height/2;
-
466  cvLine(frame, cvPoint(posX-20,posY), cvPoint(posX+20,posY), CV_RGB(255, 0, 0), 4, 8, 0 );
-
467  cvLine(frame, cvPoint(posX,posY-20), cvPoint(posX,posY+20), CV_RGB(255, 0, 0), 4, 8, 0 );
-
468  }
-
469  else{ //Objet spotted
-
470  //Affichage position de l'objet
-
471  cvLine(frame, cvPoint(posX-20,posY), cvPoint(posX+20,posY), CV_RGB(0, 0, 255), 4, 8, 0 );
-
472  cvLine(frame, cvPoint(posX,posY-20), cvPoint(posX,posY+20), CV_RGB(0, 0, 255), 4, 8, 0 );
-
473  }
-
474 }
-
void Position_moy(IplImage *Binaire, int *posX, int *posY)
Effectue le baricentre des pixels d'une image binaire pour obtenir la postion de l'objet.
Definition: KirbyTrack.c:474
-
void config(int *LowH, int *HighH, int *LowS, int *HighS, int *LowV, int *HighV)
Fonction d'affichage du panneau de configuration de la couleur à suivre.
Definition: KirbyTrack.c:490
-
#define JEU
Coefficient de tolérance pour le suivi d'objet.
Definition: KirbyTrack.c:42
-
int ajust_pos(int pos, int ref)
permet d'éviter des positions supérieures à ref considérées comme aberrantes.
Definition: KirbyTrack.c:415
-
void maj_angle(int vecX, int vecY, int rayon, double *angle)
Met à jour angle selon la distance entre le centre de la caméra et la cible, avec un tolérance circul...
Definition: KirbyTrack.c:391
-
int limite_moteur(int val_pwm)
Fonction qui vérifie que les valeurs envoyees aux moteurs sont correctes.
Definition: KirbyTrack.c:420
-
void Affichage_Tracking(IplImage *frame, int posX, int posY, int width, int height)
Fonction d'affichage des informations de suivi.
Definition: KirbyTrack.c:517
-
int main(int argc, char *argv[])
Entrée du programme.
Definition: KirbyTrack.c:162
-
void controle_moteur(double *angle)
Fonction d'envoie des angles aux moteurs.
Definition: KirbyTrack.c:433
-
void affichage_config(IplImage *frame, IplImage *HSV, IplImage *Binaire)
Fonction d'affichage du flux vidéo, du flux en HSV et de sa binarisation.
Definition: KirbyTrack.c:505
-
void traitement(IplImage *frame, IplImage *HSV, IplImage *Binaire, int LowH, int HighH, int LowS, int HighS, int LowV, int HighV)
Effectue une binarisation de frame en fonction des bornes HSV.
Definition: KirbyTrack.c:453
+
166  window.draw(Link);
+
167  window.draw(Ganon);
+
168 
+
169  /* Update the window */
+
170 
+
171  window.display();
+
172 
+
173  //Marqueurs rdy
+
174  for (i=0 ; i<MAX_FACE ; i++){
+
175  if(tab_face[i]->largeur==0){
+
176  rdy[i]=1;
+
177  }
+
178  }
+
179 
+
180  if((tab_face[1]->largeur>0) && (watchout.getStatus()==sf::Sound::Stopped) && rdy[1]){
+
181  watchout.play();
+
182  rdy[1]=0;
+
183  }
+
184  if((tab_face[0]->largeur>0) && (hey.getStatus()==sf::Sound::Stopped) && rdy[0]){
+
185  hey.play();
+
186  rdy[0]=0;
+
187 
+
188  printf("a\n");
+
189  get_color(frame, tab_face[0],BGR);
+
190  printf("B = %d, G = %d, R = %d\n",BGR[0],BGR[1],BGR[2]);
+
191  }
+
192 
+
193 
+
194 
+
195 }
+
196  // Release the capture device housekeeping
+
197  cvReleaseCapture( &capture );
+
198 
+
199  cvReleaseImage(&frame);
+
200 
+
201  return EXIT_SUCCESS;
+
202 }
+
203 
+
204 /*
+
205  //musique
+
206  if(aye.getStatus()==sf::Sound::Stopped){
+
207  aye.setPitch(0.5);
+
208  aye.setVolume(150);
+
209  aye.setLoop(true);
+
210  aye.play();
+
211  }
+
212 */
+
213 
+
void detect_and_draw(IplImage *img, CvHaarClassifierCascade *cascade, face **tab_face)
Détecte et renvoie un rectangle pour chaque visage sur l'image.
Definition: fonction.c:200
+
CvHaarClassifierCascade * init_cascade()
Charge les fichiers cascades pour la reconnaissance faciale.
Definition: fonction.c:182
+
Bibliothèque, Headers et Documentation des fonctions.
+
#define MAX_FACE
Nombre maximum de faces traitées.
Definition: fonction.h:55
+
int main(int argc, char *argv[])
Entrée du programme.
Definition: KirbyTrack.c:23
+
Contient les informations sur chaque face détectée : positions, largeur.
+
- + diff --git a/Doxy/html/annotated.html b/Doxy/html/annotated.html new file mode 100644 index 0000000..bcc188e --- /dev/null +++ b/Doxy/html/annotated.html @@ -0,0 +1,127 @@ + + + + + + +CamAdventure: Class List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
CamAdventure +
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
Class List
+
+
+
Here are the classes, structs, unions and interfaces with brief descriptions:
+ + + +
oC_face
\CfaceContient les informations sur chaque face détectée : positions, largeur
+
+
+
+ + + + diff --git a/Doxy/html/annotated.js b/Doxy/html/annotated.js new file mode 100644 index 0000000..0850247 --- /dev/null +++ b/Doxy/html/annotated.js @@ -0,0 +1,5 @@ +var annotated = +[ + [ "_face", "struct__face.html", "struct__face" ], + [ "face", "structface.html", null ] +]; \ No newline at end of file diff --git a/Doxy/html/bug.html b/Doxy/html/bug.html new file mode 100644 index 0000000..e850b95 --- /dev/null +++ b/Doxy/html/bug.html @@ -0,0 +1,122 @@ + + + + + + +CamAdventure: Bug List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
CamAdventure +
+
+
+ + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
Bug List
+
+
+
+
Member image_CV2SFML (IplImage *imcv, sf::Image imFlux)
+
A debugger ! Inutilisable en l'état
+
File KirbyTrack.c
+
Affichage OpenCV incompatible avec SFML
+
Member traitement (IplImage *frame, IplImage *HSV, IplImage *Binaire, int LowH, int HighH, int LowS, int HighS, int LowV, int HighV)
+
Nécessite changement de l'utilisation de cvInRangeS sur certain PC
+
+
+
+ + + + diff --git a/Doxy/html/classes.html b/Doxy/html/classes.html new file mode 100644 index 0000000..465d84f --- /dev/null +++ b/Doxy/html/classes.html @@ -0,0 +1,131 @@ + + + + + + +CamAdventure: Class Index + + + + + + + + + + + + + +
+
+ + + + + + + +
+
CamAdventure +
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
Class Index
+
+
+
F | _
+ + + + + +
  _  
+
  f  
+
_face   face   
+
F | _
+
+
+ + + + diff --git a/Doxy/html/dir_23fdee2f6995db16c755697cdf620cf4.html b/Doxy/html/dir_23fdee2f6995db16c755697cdf620cf4.html index 7139bf6..20fcdd3 100644 --- a/Doxy/html/dir_23fdee2f6995db16c755697cdf620cf4.html +++ b/Doxy/html/dir_23fdee2f6995db16c755697cdf620cf4.html @@ -8,6 +8,13 @@ + + + + +
@@ -71,11 +95,6 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
- -
Code Directory Reference
@@ -84,18 +103,29 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search'); + + + + + + - + +

Files

file  fonction.c [code]
 Fonctions utilisés dans les programmes.
 
file  fonction.h [code]
 Bibliothèque, Headers et Documentation des fonctions.
 
file  KirbyTrack.c [code]
 Figure Imposé : Suivi d'un objet coloré.
 
file  Navy.c [code]
file  Navy.c [code]
 Figure Libre.
 
+ - + diff --git a/Doxy/html/dir_23fdee2f6995db16c755697cdf620cf4.js b/Doxy/html/dir_23fdee2f6995db16c755697cdf620cf4.js new file mode 100644 index 0000000..16a4885 --- /dev/null +++ b/Doxy/html/dir_23fdee2f6995db16c755697cdf620cf4.js @@ -0,0 +1,7 @@ +var dir_23fdee2f6995db16c755697cdf620cf4 = +[ + [ "fonction.c", "fonction_8c.html", "fonction_8c" ], + [ "fonction.h", "fonction_8h.html", "fonction_8h" ], + [ "KirbyTrack.c", "_kirby_track_8c.html", "_kirby_track_8c" ], + [ "Navy.c", "_navy_8c.html", "_navy_8c" ] +]; \ No newline at end of file diff --git a/Doxy/html/facedetect_8c_source.html b/Doxy/html/facedetect_8c_source.html new file mode 100644 index 0000000..967007c --- /dev/null +++ b/Doxy/html/facedetect_8c_source.html @@ -0,0 +1,226 @@ + + + + + + +CamAdventure: /nfs/home/sasl/eleves/rob/3408212/rob3-projetsinfo-g15-2017/Code/facedetect.c Source File + + + + + + + + + +
+
+ + + + + + + +
+
CamAdventure +
+
+
+ + + + + + + + + +
+ +
+ + +
+
+
+
facedetect.c
+
+
+
1 // Sample Application to demonstrate how Face detection can be done as a part of your source code.
+
2 
+
3 // Include header files
+
4 #include "cv.h"
+
5 #include "highgui.h"
+
6 
+
7 #include <stdio.h>
+
8 #include <stdlib.h>
+
9 #include <string.h>
+
10 #include <assert.h>
+
11 #include <math.h>
+
12 #include <float.h>
+
13 #include <limits.h>
+
14 #include <time.h>
+
15 #include <ctype.h>
+
16 
+
17 
+
18 // Create a string that contains the exact cascade name
+
19 const char* cascade_name =
+
20 "C:/Program Files/OpenCV/data/haarcascades/haarcascade_frontalface_alt.xml";
+
21 /* "haarcascade_profileface.xml";*/
+
22 
+
23 
+
24 // Function prototype for detecting and drawing an object from an image
+
25 void detect_and_draw( IplImage* image );
+
26 
+
27 // Main function, defines the entry point for the program.
+
28 int main( int argc, char** argv )
+
29 {
+
30 
+
31  //Ouverture flux camera
+
32  CvCapture* capture = cvCaptureFromCAM( 0 );
+
33 
+
34  if( !capture ){
+
35  printf("ERROR: capture is NULL \n" );
+
36  exit(EXIT_FAILURE);
+
37  }
+
38 
+
39 // Call the function to detect and draw the face positions
+
40 detect_and_draw(img);
+
41 
+
42 // Wait for user input before quitting the program
+
43 cvWaitKey();
+
44 
+
45 // Release the image
+
46 cvReleaseImage(&img);
+
47 
+
48 // Destroy the window previously created with filename: "result"
+
49 cvDestroyWindow("result");
+
50 
+
51 // return 0 to indicate successfull execution of the program
+
52 return 0;
+
53 }
+
54 
+
55 // Function to detect and draw any faces that is present in an image
+
56 void detect_and_draw( IplImage* img )
+
57 {
+
58 
+
59 // Create memory for calculations
+
60 static CvMemStorage* storage = 0;
+
61 
+
62 // Create a new Haar classifier
+
63 static CvHaarClassifierCascade* cascade = 0;
+
64 
+
65 int scale = 1;
+
66 
+
67 // Create a new image based on the input image
+
68 IplImage* temp = cvCreateImage( cvSize(img->width/scale,img->height/scale), 8, 3 );
+
69 
+
70 // Create two points to represent the face locations
+
71 CvPoint pt1, pt2;
+
72 int i;
+
73 
+
74 // Load the [[HaarClassifierCascade]]
+
75 cascade = (CvHaarClassifierCascade*)cvLoad( cascade_name, 0, 0, 0 );
+
76 
+
77 // Check whether the cascade has loaded successfully. Else report and error and quit
+
78 if( !cascade )
+
79 {
+
80 fprintf( stderr, "ERROR: Could not load classifier cascade\n" );
+
81 return;
+
82 }
+
83 
+
84 // Allocate the memory storage
+
85 storage = cvCreateMemStorage(0);
+
86 
+
87 // Create a new named window with title: result
+
88 cvNamedWindow( "result", 1 );
+
89 
+
90 // Clear the memory storage which was used before
+
91 cvClearMemStorage( storage );
+
92 
+
93 // Find whether the cascade is loaded, to find the faces. If yes, then:
+
94 if( cascade )
+
95 {
+
96 
+
97 // There can be more than one face in an image. So create a growable sequence of faces.
+
98 // Detect the objects and store them in the sequence
+
99 CvSeq* faces = cvHaarDetectObjects( img, cascade, storage,
+
100 1.1, 2, CV_HAAR_DO_CANNY_PRUNING,
+
101 cvSize(40, 40) );
+
102 
+
103 // Loop the number of faces found.
+
104 for( i = 0; i < (faces ? faces->total : 0); i++ )
+
105 {
+
106 // Create a new rectangle for drawing the face
+
107 CvRect* r = (CvRect*)cvGetSeqElem( faces, i );
+
108 
+
109 // Find the dimensions of the face,and scale it if necessary
+
110 pt1.x = r->x*scale;
+
111 pt2.x = (r->x+r->width)*scale;
+
112 pt1.y = r->y*scale;
+
113 pt2.y = (r->y+r->height)*scale;
+
114 
+
115 // Draw the rectangle in the input image
+
116 cvRectangle( img, pt1, pt2, CV_RGB(255,0,0), 3, 8, 0 );
+
117 }
+
118 }
+
119 
+
120 // Show the image in the window named "result"
+
121 cvShowImage( "result", img );
+
122 
+
123 // Release the temp image created.
+
124 cvReleaseImage( &temp );
+
125 }
+
int main(int argc, char *argv[])
Entrée du programme.
Definition: KirbyTrack.c:164
+
+ + + + diff --git a/Doxy/html/files.html b/Doxy/html/files.html index 1ec8a6b..9a31e6c 100644 --- a/Doxy/html/files.html +++ b/Doxy/html/files.html @@ -8,6 +8,13 @@ + + + + +
@@ -86,16 +109,21 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Here is a list of all documented files with brief descriptions:
[detail level 12]
- - + + + +
\-Code
 o*KirbyTrack.cFigure Imposé : Suivi d'un objet coloré
 \*Navy.c
 o*fonction.cFonctions utilisés dans les programmes
 o*fonction.hBibliothèque, Headers et Documentation des fonctions
 o*KirbyTrack.cFigure Imposé : Suivi d'un objet coloré
 \*Navy.cFigure Libre
+ - + diff --git a/Doxy/html/files.js b/Doxy/html/files.js new file mode 100644 index 0000000..99d0fda --- /dev/null +++ b/Doxy/html/files.js @@ -0,0 +1,4 @@ +var files = +[ + [ "Code", "dir_23fdee2f6995db16c755697cdf620cf4.html", "dir_23fdee2f6995db16c755697cdf620cf4" ] +]; \ No newline at end of file diff --git a/Doxy/html/fonction_8c.html b/Doxy/html/fonction_8c.html new file mode 100644 index 0000000..90ceae5 --- /dev/null +++ b/Doxy/html/fonction_8c.html @@ -0,0 +1,740 @@ + + + + + + +CamAdventure: /nfs/home/sasl/eleves/rob/3408212/rob3-projetsinfo-g15-2017/Code/fonction.c File Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
CamAdventure +
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
fonction.c File Reference
+
+
+ +

Fonctions utilisés dans les programmes. +More...

+
#include "fonction.h"
+
+

Go to the source code of this file.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

void maj_angle (int vecX, int vecY, int rayon, double *angle)
 Met à jour angle selon la distance entre le centre de la caméra et la cible, avec un tolérance circulaire définie par rayon. More...
 
int ajust_pos (int pos, int ref)
 permet d'éviter des positions supérieures à ref considérées comme aberrantes. More...
 
int limite_moteur (int val_pwm)
 Fonction qui vérifie que les valeurs envoyees aux moteurs sont correctes. More...
 
void controle_moteur (double *angle)
 Fonction d'envoie des angles aux moteurs. More...
 
int image_CV2SFML (IplImage *imcv, sf::Image imFlux)
 Convertit une image opencv (IplImage) en une image SFML (sf::Image) More...
 
void traitement (IplImage *frame, IplImage *HSV, IplImage *Binaire, int LowH, int HighH, int LowS, int HighS, int LowV, int HighV)
 Effectue une binarisation de frame en fonction des bornes HSV. More...
 
void Position_moy (IplImage *Binaire, int *posX, int *posY)
 Effectue le baricentre des pixels d'une image binaire pour obtenir la postion de l'objet. More...
 
void config (int *LowH, int *HighH, int *LowS, int *HighS, int *LowV, int *HighV)
 Fonction d'affichage du panneau de configuration de la couleur à suivre. More...
 
void affichage_config (IplImage *frame, IplImage *HSV, IplImage *Binaire)
 Fonction d'affichage du flux vidéo, du flux en HSV et de sa binarisation. More...
 
void Affichage_Tracking (IplImage *frame, int posX, int posY, int width, int height)
 Fonction d'affichage des informations de suivi. More...
 
CvHaarClassifierCascade * init_cascade ()
 Charge les fichiers cascades pour la reconnaissance faciale. More...
 
void detect_and_draw (IplImage *img, CvHaarClassifierCascade *cascade, face **tab_face)
 Détecte et renvoie un rectangle pour chaque visage sur l'image. More...
 
+void get_color (IplImage *image, face *rec_face, int *BGR)
 
+

Detailed Description

+

Fonctions utilisés dans les programmes.

+
Author
Jacques / Antoine
+
Date
avril - mai 2017
+ +

Definition in file fonction.c.

+

Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void affichage_config (IplImage * frame,
IplImage * HSV,
IplImage * Binaire 
)
+
+ +

Fonction d'affichage du flux vidéo, du flux en HSV et de sa binarisation.

+
Author
Antoine
+
Parameters
+ + + + +
frameimage contenant la frame capturé par la caméra
HSVimage contenant l'image passé en HSV
Binaireimage contenant l'image binarisée
+
+
+ +

Definition at line 151 of file fonction.c.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Affichage_Tracking (IplImage * frame,
int posX,
int posY,
int width,
int height 
)
+
+ +

Fonction d'affichage des informations de suivi.

+

Dessine sur frame la zone de tolérance de suivie au centre de l'image et le curseur de position de l'objet ayant pour coordonées posX et posY

+
Author
Antoine
+
Parameters
+ + + + + + +
frameimage a modifier
posXcomposante X du curseur a dessiner
posYcomposante Y du curseur a dessiner
widthlargeur (en pixel) de frame
heighthauteur (en pixel) de frame
+
+
+ +

Definition at line 163 of file fonction.c.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
int ajust_pos (int pos,
int ref 
)
+
+ +

permet d'éviter des positions supérieures à ref considérées comme aberrantes.

+

retourne 0 si la position est supérieure à ref.

+
Author
Jacques
+
Parameters
+ + + +
posposition à tester
refposition de référence
+
+
+
Returns
renvoie la position corrigée
+ +

Definition at line 36 of file fonction.c.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void config (int * LowH,
int * HighH,
int * LowS,
int * HighS,
int * LowV,
int * HighV 
)
+
+ +

Fonction d'affichage du panneau de configuration de la couleur à suivre.

+
Author
Antoine
+

Panneau de configuration comprenant 6 slidebarres pour configurer la couleur suivie en HSV. La fonction modifie les valeurs limites LowH/ HighH de la plage HUE, LowS/HighS de la plage SATURATION, LowV/HighV de la plage VALUE.

+
Parameters
+ + + + + + + +
LowHValeur basse de la plage de HUE suivie.
HighHValeur haute de la plage de HUE suivie.
LowSValeur basse de la plage de SATURATION suivie.
HighSValeur haute de la plage de SATURATION suivie.
LowVValeur basse de la plage de VALUE suivie.
HighVValeur haute de la plage de VALUE suivie.
+
+
+ +

Definition at line 136 of file fonction.c.

+ +
+
+ +
+
+ + + + + + + + +
void controle_moteur (double * angle)
+
+ +

Fonction d'envoie des angles aux moteurs.

+
Author
Jacques
+
Parameters
+ + +
angletableau des angles moteurs
+
+
+ +

Definition at line 54 of file fonction.c.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void detect_and_draw (IplImage * img,
CvHaarClassifierCascade * cascade,
face ** tab_face 
)
+
+ +

Détecte et renvoie un rectangle pour chaque visage sur l'image.

+
Author
Jacques
+
Parameters
+ + + + +
imgImage sur laquelle on veut détecter des visages
cascadestructure contenant les données pour alimenter l'algorithme de reconnaissance d'image
tab_facetableau des faces détectées
+
+
+ +

Definition at line 200 of file fonction.c.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
int image_CV2SFML (IplImage * imcv,
sf::Image imFlux 
)
+
+ +

Convertit une image opencv (IplImage) en une image SFML (sf::Image)

+
Author
Antoine
+
Parameters
+ + + +
imcvimage OpenCv à convertir
imFluximage SFML convertie en sortie de la fonction
+
+
+
Returns
0 si la convertion est réussie
+
Bug:
A debugger ! Inutilisable en l'état
+ +

Definition at line 74 of file fonction.c.

+ +
+
+ +
+
+ + + + + + + +
CvHaarClassifierCascade * init_cascade ()
+
+ +

Charge les fichiers cascades pour la reconnaissance faciale.

+

fichier(s) chargé(s) : "haarcascade_frontalface_alt.xml"

+
Author
Jacques
+
Returns
Renvoie la cascade
+ +

Definition at line 182 of file fonction.c.

+ +
+
+ +
+
+ + + + + + + + +
int limite_moteur (int val_pwm)
+
+ +

Fonction qui vérifie que les valeurs envoyees aux moteurs sont correctes.

+

Valeur minimale = 30, valeur maximale = 130 (déterminées expérimentalement)

+
Author
Jacques
+
Parameters
+ + +
val_pwmvaleur pwm dont on veut vérifier la valeur
+
+
+
Returns
renvoie l'angle corrigée
+ +

Definition at line 41 of file fonction.c.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void maj_angle (int vecX,
int vecY,
int rayon,
double * angle 
)
+
+ +

Met à jour angle selon la distance entre le centre de la caméra et la cible, avec un tolérance circulaire définie par rayon.

+
Author
Jacques
+
Parameters
+ + + + + +
vecXcomposante X de la cible par rapport au centre de l'image
vecYcomposante Y de la cible par rapport au centre de l'image
rayontolérance avant changement d'angle
angletableau contenant les deux angles à modifier
+
+
+ +

Definition at line 12 of file fonction.c.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Position_moy (IplImage * Binaire,
int * posX,
int * posY 
)
+
+ +

Effectue le baricentre des pixels d'une image binaire pour obtenir la postion de l'objet.

+
Author
Antoine
+
Parameters
+ + + + +
Binaireimage binarisée (matrice de 0 ou de 1)
posXcontient la composante X du barycentre
posYcontient la composante Y du barycentre
+
+
+ +

Definition at line 120 of file fonction.c.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void traitement (IplImage * frame,
IplImage * HSV,
IplImage * Binaire,
int LowH,
int HighH,
int LowS,
int HighS,
int LowV,
int HighV 
)
+
+ +

Effectue une binarisation de frame en fonction des bornes HSV.

+

Passe la frame en HSV puis binarise l'image en fonction des bornes LowH, HighH, LowS, HighS, LowV, HighV

+
Author
Antoine
+
Parameters
+ + + + + + + + + + +
frameimage contenant la frame capturé par la caméra
HSVimage contenant l'image passé en HSV au terme de la fonction
Binaireimage contenant l'image binarisée au terme de la fonction
LowHValeur basse de la plage de HUE suivie.
HighHValeur haute de la plage de HUE suivie.
LowSValeur basse de la plage de SATURATION suivie.
HighSValeur haute de la plage de SATURATION suivie.
LowVValeur basse de la plage de VALUE suivie.
HighVValeur haute de la plage de VALUE suivie.
+
+
+
Bug:
Nécessite changement de l'utilisation de cvInRangeS sur certain PC
+ +

Definition at line 99 of file fonction.c.

+ +
+
+
+
+ + + + diff --git a/Doxy/html/fonction_8c.js b/Doxy/html/fonction_8c.js new file mode 100644 index 0000000..a1bf6af --- /dev/null +++ b/Doxy/html/fonction_8c.js @@ -0,0 +1,16 @@ +var fonction_8c = +[ + [ "affichage_config", "fonction_8c.html#acc438fce8178d1d5aac4595f19529275", null ], + [ "Affichage_Tracking", "fonction_8c.html#a91b1b1daf28d90b5299a9a0486f5bdf1", null ], + [ "ajust_pos", "fonction_8c.html#ae89e5fc7460ea890fa61d54fd209c1ae", null ], + [ "config", "fonction_8c.html#adcdd0544c8eb462cd2835ec99fa0f181", null ], + [ "controle_moteur", "fonction_8c.html#ad3f512a54511a63b30a8967077736766", null ], + [ "detect_and_draw", "fonction_8c.html#ab9c63795209f514f5d3554bc9450b8de", null ], + [ "get_color", "fonction_8c.html#a6544632f3a5db05caf6d23b1f8820880", null ], + [ "image_CV2SFML", "fonction_8c.html#ad2cc53a42ff2450413bbb199bb4c1072", null ], + [ "init_cascade", "fonction_8c.html#a5e1058b3e8eb605a74ffdd7a26637b1e", null ], + [ "limite_moteur", "fonction_8c.html#a9397b95e9279b0b9cd371c9a2b4514a2", null ], + [ "maj_angle", "fonction_8c.html#a93cca84f54fe35dc9ad87eac3583889b", null ], + [ "Position_moy", "fonction_8c.html#ac3e9405c4ebaa936308670c050285ae1", null ], + [ "traitement", "fonction_8c.html#a96b1dd5c66492425a00921b6eaaacc89", null ] +]; \ No newline at end of file diff --git a/Doxy/html/fonction_8c_source.html b/Doxy/html/fonction_8c_source.html new file mode 100644 index 0000000..40d399e --- /dev/null +++ b/Doxy/html/fonction_8c_source.html @@ -0,0 +1,425 @@ + + + + + + +CamAdventure: /nfs/home/sasl/eleves/rob/3408212/rob3-projetsinfo-g15-2017/Code/fonction.c Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
CamAdventure +
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
fonction.c
+
+
+Go to the documentation of this file.
1 
+
9 #include "fonction.h"
+
10 
+
11 
+
12 void maj_angle(int vecX, int vecY, int rayon, double* angle){
+
13  //On ajustera coeff fonction du rayon. Si la cible est à une distance 5*r, il sera 5x plus rapide que s'il était à 1*r
+
14 
+
15  double coeffx, coeffy;
+
16  int l0, l1;
+
17 
+
18  //printf("-MAJ_ANGLE...Valeur maj_angle arguments : %d %d %d\n\tAnciens angles : %d %d\n\t",vecX,vecY,rayon,(int)angle[0],(int)angle[1]);
+
19 
+
20 
+
21  //Ajout d'un angle moteur pondéré par la distance
+
22  coeffx = -0.2*vecX/rayon;
+
23  coeffy = 0.2*vecY/rayon;
+
24  angle[0] += coeffx;
+
25  angle[1] += coeffy;
+
26 
+
27  //Majoration - minoration des angles moteurs
+
28  l0 = limite_moteur(angle[0]);
+
29  l1 = limite_moteur(angle[1]);
+
30  if (l0 != 0) angle[0] = l0;
+
31  if (l1 != 0) angle[1] = l1;
+
32 
+
33  //printf("Nouveaux angles : %lf %lf %d %d\n",angle[0],angle[1],(int)angle[0],(int)angle[0]);
+
34 }
+
35 
+
36 int ajust_pos(int pos, int ref){
+
37  if (pos > ref) return 0;
+
38  else return pos;
+
39 }
+
40 
+
41 int limite_moteur(int val_pwm){
+
42  int MAX_PWM = 130, MIN_PWM = 30;
+
43  if (val_pwm > MAX_PWM){
+
44  return MAX_PWM;
+
45  }
+
46  else if (val_pwm < MIN_PWM){
+
47  return MIN_PWM;
+
48  }
+
49  else{
+
50  return 0;
+
51  }
+
52 }
+
53 
+
54 void controle_moteur(double* angle){
+
55 
+
56  //Ouverture port serie
+
57  FILE* fichier = NULL;
+
58  fichier = fopen("/dev/ttyACM0","w");
+
59  if(fichier==NULL){
+
60  printf("Erreur ouverture fichier\n");
+
61  perror("fopen failed for /dev/ttyACM0" );
+
62  exit( EXIT_FAILURE );
+
63  }
+
64 
+
65  //Ecriture angles
+
66  fprintf(fichier,"%d\n",(int)angle[0]);
+
67  fprintf(fichier,"%d\n",(int)angle[1]);
+
68 
+
69  //Fermeture
+
70  fclose(fichier);
+
71  return;
+
72 }
+
73 
+
74 int image_CV2SFML(IplImage* imcv, sf::Image imFlux){
+
75 
+
76  int R, G, B;
+
77  int w = imcv->widthStep;
+
78  char* ptr = imcv->imageData;
+
79 
+
80  imFlux.create(imcv->width,imcv->height, NULL); //Initialise une image vide
+
81 
+
82  for( int y=0; y<imcv->height; y++ ) {
+
83  //uchar* ptr = (uchar*) ( imcv->imageData + y * imcv->widthStep );
+
84  for( int x=0; x<imcv->width; x++ ) {
+
85  //Recupération du pixel
+
86  B = ptr[y*w + 3*x];
+
87  G = ptr[y*w + 3*x + 1];
+
88  R = ptr[y*w + 3*x + 2];
+
89 
+
90  //Ecriture du pixel associé
+
91  imFlux.setPixel(x,y,sf::Color(R,G,B,1)); //Alpha channel = 1
+
92  }
+
93  }
+
94 
+
95  return 0;
+
96 }
+
97 
+
98 
+
99 void traitement(IplImage* frame, IplImage* HSV, IplImage* Binaire, int LowH, int HighH, int LowS, int HighS, int LowV, int HighV){ //Effectue une binarisation de frame en fonction des bornes HSV
+
100 
+
101  // Covert color space to HSV as it is much easier to filter colors in the HSV color-space.
+
102  cvCvtColor(frame, HSV, CV_BGR2HSV);
+
103 
+
104  //Blur
+
105  cvSmooth( HSV, HSV, CV_GAUSSIAN, 15, 0,0,0); //suppression des parasites par flou gaussien
+
106 
+
107  //Binarisation
+
108 
+
109  CvScalar valinf={(double)LowH,(double)LowS,(double)LowV};
+
110  CvScalar valsup={(double)HighH,(double)HighS,(double)HighV};
+
111 
+
112  cvInRangeS(HSV, valinf,valsup, Binaire);
+
113 
+
114  //En cas d'erreur sur les trois ligne précédentes
+
115  //cvInRangeS(HSV, CvScalar(LowH,LowS,LowV),CvScalar(HighH,HighS,HighV), Binaire);
+
116 
+
117  //cvSmooth( Binaire, Binaire, CV_GAUSSIAN, 9, 9 ); //Legère suppression des parasites
+
118 }
+
119 
+
120 void Position_moy(IplImage* Binaire, int* posX, int * posY){ //Effectue le baricentre des pixels d'une image binaire pour obtenir la postion de l'objet
+
121 
+
122  CvMoments *moments = (CvMoments*)malloc(sizeof(CvMoments));
+
123 
+
124  cvMoments(Binaire, moments, 1);
+
125  // The actual moment values
+
126  double moment10 = cvGetSpatialMoment(moments, 1, 0);
+
127  double moment01 = cvGetSpatialMoment(moments, 0, 1);
+
128  double area = cvGetCentralMoment(moments, 0, 0);
+
129 
+
130  *posX = moment10/area;
+
131  *posY = moment01/area;
+
132 
+
133  free(moments);
+
134 }
+
135 
+
136 void config(int* LowH, int* HighH, int* LowS, int* HighS, int* LowV, int* HighV){ //Affiche le panneau de configuration de tracking avec les arguments comme valeur de base
+
137 
+
138  cvNamedWindow("Control", CV_WINDOW_AUTOSIZE); //create a window called "Control"
+
139 
+
140  //Create trackbars in "Control" window
+
141  cvCreateTrackbar("LowH", "Control", LowH, 179,NULL); //Hue (0 - 179)
+
142  cvCreateTrackbar("HighH", "Control", HighH, 179,NULL);
+
143 
+
144  cvCreateTrackbar("LowS", "Control", LowS, 255,NULL); //Saturation (0 - 255)
+
145  cvCreateTrackbar("HighS", "Control", HighS, 255,NULL);
+
146 
+
147  cvCreateTrackbar("LowV", "Control", LowV, 255,NULL); //Value (0 - 255)
+
148  cvCreateTrackbar("HighV", "Control", HighV, 255,NULL);
+
149 }
+
150 
+
151 void affichage_config(IplImage* frame, IplImage* HSV, IplImage* Binaire){ //Affiche le flux vidéos et ses différent traitements
+
152 
+
153  // Create a window in which the captured images will be presented
+
154  cvNamedWindow( "HSV", CV_WINDOW_AUTOSIZE );
+
155  cvNamedWindow( "Binaire", CV_WINDOW_AUTOSIZE );
+
156  cvNamedWindow( "Camera", CV_WINDOW_AUTOSIZE );
+
157 
+
158  cvShowImage( "HSV", HSV); // Original stream in the HSV color space
+
159  cvShowImage( "Binaire", Binaire); // The stream after color filtering
+
160  cvShowImage( "Camera", frame ); // Flux caméra avec tracking objet
+
161 }
+
162 
+
163 void Affichage_Tracking(IplImage* frame, int posX, int posY, int width, int height){ //Dessine les informations de tracking sur frame
+
164 
+
165  //Affichage zone suivie objet
+
166  cvCircle(frame, cvPoint(width/2,height/2), height*JEU, CV_RGB(0, 255, 0), 4, 8, 0 );
+
167 
+
168  if(posX<5&&posY<5){ //Si aucun objet spotted, pointeur rouge au centre
+
169  posX=width/2;
+
170  posY=height/2;
+
171  cvLine(frame, cvPoint(posX-20,posY), cvPoint(posX+20,posY), CV_RGB(255, 0, 0), 4, 8, 0 );
+
172  cvLine(frame, cvPoint(posX,posY-20), cvPoint(posX,posY+20), CV_RGB(255, 0, 0), 4, 8, 0 );
+
173  }
+
174  else{ //Objet spotted
+
175  //Affichage position de l'objet
+
176  cvLine(frame, cvPoint(posX-20,posY), cvPoint(posX+20,posY), CV_RGB(0, 0, 255), 4, 8, 0 );
+
177  cvLine(frame, cvPoint(posX,posY-20), cvPoint(posX,posY+20), CV_RGB(0, 0, 255), 4, 8, 0 );
+
178  }
+
179 }
+
180 
+
181 
+
182 CvHaarClassifierCascade* init_cascade(){
+
183  // Create a new Haar classifier
+
184  CvHaarClassifierCascade* cascade = 0;
+
185  const char* cascade_name = "haarcascade_frontalface_alt.xml";
+
186 
+
187 
+
188  cascade = (CvHaarClassifierCascade*)cvLoad( cascade_name, 0, 0, 0 );
+
189 
+
190  // Check whether the cascade has loaded successfully. Else report and error and quit
+
191  if( !cascade ){
+
192  fprintf( stderr, "ERROR: Could not load classifier cascade\n" );
+
193  perror(" ");
+
194  return NULL;
+
195  }
+
196  return cascade;
+
197 }
+
198 
+
199 // Function to detect and draw any faces that is present in an image
+
200 void detect_and_draw( IplImage* img, CvHaarClassifierCascade* cascade, face** tab_face)
+
201 {
+
202 
+
203  // Create memory for calculations
+
204  static CvMemStorage* storage = 0;
+
205  int scale = 1;
+
206 
+
207  // Create a new image based on the input image
+
208  IplImage* temp = cvCreateImage( cvSize(img->width/scale,img->height/scale), 8, 3 );
+
209 
+
210  // Create two points to represent the face locations
+
211  CvPoint pt1, pt2;
+
212  int i;
+
213 
+
214  // Allocate the memory storage
+
215  storage = cvCreateMemStorage(0);
+
216 
+
217  // Create a new named window with title: result
+
218  cvNamedWindow( "result", 1 );
+
219 
+
220  // Clear the memory storage which was used before
+
221  cvClearMemStorage( storage );
+
222 
+
223  // Find whether the cascade is loaded, to find the faces. If yes, then:
+
224  if( cascade ){
+
225 
+
226  // There can be more than one face in an image. So create a growable sequence of faces.
+
227  // Detect the objects and store them in the sequence
+
228  CvSeq* faces = cvHaarDetectObjects( img, cascade, storage,1.1, 2, 0, cvSize(60, 60),cvSize(500, 500));
+
229 
+
230  //Reset faces
+
231  tab_face[0]->largeur = 0;
+
232  tab_face[1]->largeur = 0;
+
233 
+
234  // Loop the number of faces found.
+
235  for( i = 0; i < (faces ? faces->total : 0); i++ ){
+
236  // Create a new rectangle for drawing the face
+
237  CvRect* r = (CvRect*)cvGetSeqElem( faces, i );
+
238 
+
239  // Find the dimensions of the face,and scale it if necessary
+
240  pt1.x = r->x*scale;
+
241  pt2.x = (r->x+r->width)*scale;
+
242  pt1.y = r->y*scale;
+
243  pt2.y = (r->y+r->height)*scale;
+
244 
+
245  // Draw the rectangle in the input image
+
246  cvRectangle( img, pt1, pt2, CV_RGB(255,0,0), 3, 8, 0 );
+
247 
+
248  if(i < MAX_FACE){
+
249  tab_face[i]->point.x = (pt1.x + pt2.x)/2;
+
250  tab_face[i]->point.y = (pt1.y + pt2.y)/2;
+
251  tab_face[i]->largeur = r->width;
+
252 
+
253  printf("VALEURS FACES n°%d : %d %d %d\n",i, tab_face[i]->point.x,tab_face[i]->point.y,tab_face[i]->largeur);
+
254  }
+
255  }
+
256  }
+
257 
+
258  // Show the image in the window named "result"
+
259  cvShowImage( "result", img );
+
260 
+
261  //free
+
262  cvReleaseImage( &temp );
+
263 }
+
264 
+
265 //Renvoie la couleur moyenne de rec_face
+
266 void get_color(IplImage* image, face* rec_face, int* BGR){
+
267  printf("z\n");
+
268  CvScalar colors;
+
269  int largeur = rec_face->largeur;
+
270 printf("e\n");
+
271  cvSetImageROI(image,cvRect(rec_face->point.x -largeur/2, rec_face->point.y -largeur/2, largeur,largeur));
+
272 printf("r\n");
+
273  colors = cvAvg(image);
+
274 printf("t\n");
+
275  cvResetImageROI(image);
+
276 printf("y\n");
+
277  BGR[0] = colors.val[0];
+
278  BGR[1] = colors.val[1];
+
279  BGR[2] = colors.val[2];
+
280 printf("u\n");
+
281 }
+
282 
+
283 
+
284 
+
285 
+
286 
+
287 
+
288 
+
289 
+
290 
+
291 
+
292 
+
293 
+
294 
+
295 
+
void config(int *LowH, int *HighH, int *LowS, int *HighS, int *LowV, int *HighV)
Fonction d'affichage du panneau de configuration de la couleur à suivre.
Definition: fonction.c:136
+
void detect_and_draw(IplImage *img, CvHaarClassifierCascade *cascade, face **tab_face)
Détecte et renvoie un rectangle pour chaque visage sur l'image.
Definition: fonction.c:200
+
CvHaarClassifierCascade * init_cascade()
Charge les fichiers cascades pour la reconnaissance faciale.
Definition: fonction.c:182
+
void Position_moy(IplImage *Binaire, int *posX, int *posY)
Effectue le baricentre des pixels d'une image binaire pour obtenir la postion de l'objet.
Definition: fonction.c:120
+
int ajust_pos(int pos, int ref)
permet d'éviter des positions supérieures à ref considérées comme aberrantes.
Definition: fonction.c:36
+
void traitement(IplImage *frame, IplImage *HSV, IplImage *Binaire, int LowH, int HighH, int LowS, int HighS, int LowV, int HighV)
Effectue une binarisation de frame en fonction des bornes HSV.
Definition: fonction.c:99
+
void maj_angle(int vecX, int vecY, int rayon, double *angle)
Met à jour angle selon la distance entre le centre de la caméra et la cible, avec un tolérance circul...
Definition: fonction.c:12
+
#define JEU
Coefficient de tolérance pour le suivi d'objet.
+
Bibliothèque, Headers et Documentation des fonctions.
+
#define MAX_FACE
Nombre maximum de faces traitées.
Definition: fonction.h:55
+
void affichage_config(IplImage *frame, IplImage *HSV, IplImage *Binaire)
Fonction d'affichage du flux vidéo, du flux en HSV et de sa binarisation.
Definition: fonction.c:151
+
int limite_moteur(int val_pwm)
Fonction qui vérifie que les valeurs envoyees aux moteurs sont correctes.
Definition: fonction.c:41
+
void controle_moteur(double *angle)
Fonction d'envoie des angles aux moteurs.
Definition: fonction.c:54
+
void Affichage_Tracking(IplImage *frame, int posX, int posY, int width, int height)
Fonction d'affichage des informations de suivi.
Definition: fonction.c:163
+
int image_CV2SFML(IplImage *imcv, sf::Image imFlux)
Convertit une image opencv (IplImage) en une image SFML (sf::Image)
Definition: fonction.c:74
+
Contient les informations sur chaque face détectée : positions, largeur.
+
+
+ + + + diff --git a/Doxy/html/fonction_8h.html b/Doxy/html/fonction_8h.html new file mode 100644 index 0000000..235f984 --- /dev/null +++ b/Doxy/html/fonction_8h.html @@ -0,0 +1,782 @@ + + + + + + +CamAdventure: /nfs/home/sasl/eleves/rob/3408212/rob3-projetsinfo-g15-2017/Code/fonction.h File Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
CamAdventure +
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
fonction.h File Reference
+
+
+ +

Bibliothèque, Headers et Documentation des fonctions. +More...

+
#include <stdio.h>
+#include <stdlib.h>
+#include <cv.h>
+#include <highgui.h>
+#include <SFML/Audio.hpp>
+#include <SFML/Graphics.hpp>
+#include <SFML/Window.hpp>
+
+

Go to the source code of this file.

+ + + + +

+Classes

struct  _face
 
+ + + + + + + + + + + + + +

+Macros

+#define JEU   0.15
 Coefficient de tolérance pour le suivi d'objet.
 
+#define SFML
 Programme en mode affichage interface utilisateur.
 
+#define KIRBY
 Programme en mode suivi de Kirby (Objet rose)
 
+#define MAX_FACE   2
 Nombre maximum de faces traitées.
 
+ + + + + +

+Typedefs

+typedef struct _face face
 
+typedef facepface
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

void maj_angle (int vecX, int vecY, int rayon, double *angle)
 Met à jour angle selon la distance entre le centre de la caméra et la cible, avec un tolérance circulaire définie par rayon. More...
 
int ajust_pos (int pos, int ref)
 permet d'éviter des positions supérieures à ref considérées comme aberrantes. More...
 
void controle_moteur (double *angle)
 Fonction d'envoie des angles aux moteurs. More...
 
int limite_moteur (int val_pwm)
 Fonction qui vérifie que les valeurs envoyees aux moteurs sont correctes. More...
 
void config (int *LowH, int *HighH, int *LowS, int *HighS, int *LowV, int *HighV)
 Fonction d'affichage du panneau de configuration de la couleur à suivre. More...
 
void affichage_config (IplImage *frame, IplImage *HSV, IplImage *Binaire)
 Fonction d'affichage du flux vidéo, du flux en HSV et de sa binarisation. More...
 
void Affichage_Tracking (IplImage *frame, int posX, int posY, int width, int height)
 Fonction d'affichage des informations de suivi. More...
 
void Position_moy (IplImage *Binaire, int *posX, int *posY)
 Effectue le baricentre des pixels d'une image binaire pour obtenir la postion de l'objet. More...
 
void traitement (IplImage *frame, IplImage *HSV, IplImage *Binaire, int LowH, int HighH, int LowS, int HighS, int LowV, int HighV)
 Effectue une binarisation de frame en fonction des bornes HSV. More...
 
int image_CV2SFML (IplImage *imcv, sf::Image imFlux)
 Convertit une image opencv (IplImage) en une image SFML (sf::Image) More...
 
CvHaarClassifierCascade * init_cascade ()
 Charge les fichiers cascades pour la reconnaissance faciale. More...
 
void detect_and_draw (IplImage *img, CvHaarClassifierCascade *cascade, face **tab_face)
 Détecte et renvoie un rectangle pour chaque visage sur l'image. More...
 
+void get_color (IplImage *image, face *rec_face, int *BGR)
 
+

Detailed Description

+

Bibliothèque, Headers et Documentation des fonctions.

+
Author
Jacques / Antoine
+
Date
avril - mai 2017
+ +

Definition in file fonction.h.

+

Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void affichage_config (IplImage * frame,
IplImage * HSV,
IplImage * Binaire 
)
+
+ +

Fonction d'affichage du flux vidéo, du flux en HSV et de sa binarisation.

+
Author
Antoine
+
Parameters
+ + + + +
frameimage contenant la frame capturé par la caméra
HSVimage contenant l'image passé en HSV
Binaireimage contenant l'image binarisée
+
+
+ +

Definition at line 151 of file fonction.c.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void Affichage_Tracking (IplImage * frame,
int posX,
int posY,
int width,
int height 
)
+
+ +

Fonction d'affichage des informations de suivi.

+

Dessine sur frame la zone de tolérance de suivie au centre de l'image et le curseur de position de l'objet ayant pour coordonées posX et posY

+
Author
Antoine
+
Parameters
+ + + + + + +
frameimage a modifier
posXcomposante X du curseur a dessiner
posYcomposante Y du curseur a dessiner
widthlargeur (en pixel) de frame
heighthauteur (en pixel) de frame
+
+
+ +

Definition at line 163 of file fonction.c.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
int ajust_pos (int pos,
int ref 
)
+
+ +

permet d'éviter des positions supérieures à ref considérées comme aberrantes.

+

retourne 0 si la position est supérieure à ref.

+
Author
Jacques
+
Parameters
+ + + +
posposition à tester
refposition de référence
+
+
+
Returns
renvoie la position corrigée
+ +

Definition at line 36 of file fonction.c.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void config (int * LowH,
int * HighH,
int * LowS,
int * HighS,
int * LowV,
int * HighV 
)
+
+ +

Fonction d'affichage du panneau de configuration de la couleur à suivre.

+
Author
Antoine
+

Panneau de configuration comprenant 6 slidebarres pour configurer la couleur suivie en HSV. La fonction modifie les valeurs limites LowH/ HighH de la plage HUE, LowS/HighS de la plage SATURATION, LowV/HighV de la plage VALUE.

+
Parameters
+ + + + + + + +
LowHValeur basse de la plage de HUE suivie.
HighHValeur haute de la plage de HUE suivie.
LowSValeur basse de la plage de SATURATION suivie.
HighSValeur haute de la plage de SATURATION suivie.
LowVValeur basse de la plage de VALUE suivie.
HighVValeur haute de la plage de VALUE suivie.
+
+
+ +

Definition at line 136 of file fonction.c.

+ +
+
+ +
+
+ + + + + + + + +
void controle_moteur (double * angle)
+
+ +

Fonction d'envoie des angles aux moteurs.

+
Author
Jacques
+
Parameters
+ + +
angletableau des angles moteurs
+
+
+ +

Definition at line 54 of file fonction.c.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void detect_and_draw (IplImage * img,
CvHaarClassifierCascade * cascade,
face ** tab_face 
)
+
+ +

Détecte et renvoie un rectangle pour chaque visage sur l'image.

+
Author
Jacques
+
Parameters
+ + + + +
imgImage sur laquelle on veut détecter des visages
cascadestructure contenant les données pour alimenter l'algorithme de reconnaissance d'image
tab_facetableau des faces détectées
+
+
+ +

Definition at line 200 of file fonction.c.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
int image_CV2SFML (IplImage * imcv,
sf::Image imFlux 
)
+
+ +

Convertit une image opencv (IplImage) en une image SFML (sf::Image)

+
Author
Antoine
+
Parameters
+ + + +
imcvimage OpenCv à convertir
imFluximage SFML convertie en sortie de la fonction
+
+
+
Returns
0 si la convertion est réussie
+
Bug:
A debugger ! Inutilisable en l'état
+ +

Definition at line 74 of file fonction.c.

+ +
+
+ +
+
+ + + + + + + +
CvHaarClassifierCascade* init_cascade ()
+
+ +

Charge les fichiers cascades pour la reconnaissance faciale.

+

fichier(s) chargé(s) : "haarcascade_frontalface_alt.xml"

+
Author
Jacques
+
Returns
Renvoie la cascade
+ +

Definition at line 182 of file fonction.c.

+ +
+
+ +
+
+ + + + + + + + +
int limite_moteur (int val_pwm)
+
+ +

Fonction qui vérifie que les valeurs envoyees aux moteurs sont correctes.

+

Valeur minimale = 30, valeur maximale = 130 (déterminées expérimentalement)

+
Author
Jacques
+
Parameters
+ + +
val_pwmvaleur pwm dont on veut vérifier la valeur
+
+
+
Returns
renvoie l'angle corrigée
+ +

Definition at line 41 of file fonction.c.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void maj_angle (int vecX,
int vecY,
int rayon,
double * angle 
)
+
+ +

Met à jour angle selon la distance entre le centre de la caméra et la cible, avec un tolérance circulaire définie par rayon.

+
Author
Jacques
+
Parameters
+ + + + + +
vecXcomposante X de la cible par rapport au centre de l'image
vecYcomposante Y de la cible par rapport au centre de l'image
rayontolérance avant changement d'angle
angletableau contenant les deux angles à modifier
+
+
+ +

Definition at line 12 of file fonction.c.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void Position_moy (IplImage * Binaire,
int * posX,
int * posY 
)
+
+ +

Effectue le baricentre des pixels d'une image binaire pour obtenir la postion de l'objet.

+
Author
Antoine
+
Parameters
+ + + + +
Binaireimage binarisée (matrice de 0 ou de 1)
posXcontient la composante X du barycentre
posYcontient la composante Y du barycentre
+
+
+ +

Definition at line 120 of file fonction.c.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void traitement (IplImage * frame,
IplImage * HSV,
IplImage * Binaire,
int LowH,
int HighH,
int LowS,
int HighS,
int LowV,
int HighV 
)
+
+ +

Effectue une binarisation de frame en fonction des bornes HSV.

+

Passe la frame en HSV puis binarise l'image en fonction des bornes LowH, HighH, LowS, HighS, LowV, HighV

+
Author
Antoine
+
Parameters
+ + + + + + + + + + +
frameimage contenant la frame capturé par la caméra
HSVimage contenant l'image passé en HSV au terme de la fonction
Binaireimage contenant l'image binarisée au terme de la fonction
LowHValeur basse de la plage de HUE suivie.
HighHValeur haute de la plage de HUE suivie.
LowSValeur basse de la plage de SATURATION suivie.
HighSValeur haute de la plage de SATURATION suivie.
LowVValeur basse de la plage de VALUE suivie.
HighVValeur haute de la plage de VALUE suivie.
+
+
+
Bug:
Nécessite changement de l'utilisation de cvInRangeS sur certain PC
+ +

Definition at line 99 of file fonction.c.

+ +
+
+
+
+ + + + diff --git a/Doxy/html/fonction_8h.js b/Doxy/html/fonction_8h.js new file mode 100644 index 0000000..6a45874 --- /dev/null +++ b/Doxy/html/fonction_8h.js @@ -0,0 +1,23 @@ +var fonction_8h = +[ + [ "_face", "struct__face.html", "struct__face" ], + [ "JEU", "fonction_8h.html#afb63dbc6e533233f41d03e8b8a3bc570", null ], + [ "KIRBY", "fonction_8h.html#a9270f8e0b3866a58cfa3a7173da21abd", null ], + [ "MAX_FACE", "fonction_8h.html#a12190c71ff3acb9694bb2f782a1dfcdb", null ], + [ "SFML", "fonction_8h.html#a28c9f30d423e9c1ca6fa15a0ec9a0032", null ], + [ "face", "fonction_8h.html#aa1b85a6249980781b9354232e9bd2408", null ], + [ "pface", "fonction_8h.html#a77e86465703f18d4b5dc36ce5c34d609", null ], + [ "affichage_config", "fonction_8h.html#acc438fce8178d1d5aac4595f19529275", null ], + [ "Affichage_Tracking", "fonction_8h.html#a91b1b1daf28d90b5299a9a0486f5bdf1", null ], + [ "ajust_pos", "fonction_8h.html#ae89e5fc7460ea890fa61d54fd209c1ae", null ], + [ "config", "fonction_8h.html#adcdd0544c8eb462cd2835ec99fa0f181", null ], + [ "controle_moteur", "fonction_8h.html#ad3f512a54511a63b30a8967077736766", null ], + [ "detect_and_draw", "fonction_8h.html#ab9c63795209f514f5d3554bc9450b8de", null ], + [ "get_color", "fonction_8h.html#a6544632f3a5db05caf6d23b1f8820880", null ], + [ "image_CV2SFML", "fonction_8h.html#ad2cc53a42ff2450413bbb199bb4c1072", null ], + [ "init_cascade", "fonction_8h.html#a942c8619bb73ca7c3bb7e6fcf1875294", null ], + [ "limite_moteur", "fonction_8h.html#a9397b95e9279b0b9cd371c9a2b4514a2", null ], + [ "maj_angle", "fonction_8h.html#a93cca84f54fe35dc9ad87eac3583889b", null ], + [ "Position_moy", "fonction_8h.html#ac3e9405c4ebaa936308670c050285ae1", null ], + [ "traitement", "fonction_8h.html#a96b1dd5c66492425a00921b6eaaacc89", null ] +]; \ No newline at end of file diff --git a/Doxy/html/fonction_8h_source.html b/Doxy/html/fonction_8h_source.html new file mode 100644 index 0000000..756650a --- /dev/null +++ b/Doxy/html/fonction_8h_source.html @@ -0,0 +1,206 @@ + + + + + + +CamAdventure: /nfs/home/sasl/eleves/rob/3408212/rob3-projetsinfo-g15-2017/Code/fonction.h Source File + + + + + + + + + + + + + +
+
+ + + + + + + +
+
CamAdventure +
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
fonction.h
+
+
+Go to the documentation of this file.
1 #ifndef FONCTION_H
+
2 #define FONCTION_H
+
3 
+
13 /*INCLUDE*/
+
14 #include <stdio.h>
+
15 #include <stdlib.h>
+
16 #include <cv.h>
+
17 #include <highgui.h>
+
18 //#include <opencv2/highgui.hpp> //Pour le cvRound
+
19 //#include "opencv2/videoio/videoio_c.h" //Pour le CvCapture*
+
20 //#include <cxcore.h>
+
21 //#include <SFML/Window.h>
+
22 #include <SFML/Audio.hpp>
+
23 #include <SFML/Graphics.hpp>
+
24 #include <SFML/Window.hpp>
+
25 //#include <SFML/System.hpp> //inutilisé pour le moment
+
26 
+
27 /*DEFINE*/
+
28 //ATTENTION AFFICHAGE OPENCV INCOMPATIBLE AVEC AFFICHAGE SFML
+
29 //ATTENTION SFML SUPPORTE UN NOMBRE LIMITE DE SPRITE EN FCT DU PC
+
30 #define JEU 0.15
+
31 
+
50 //#define CONFIG
+
51 #define SFML
+
52 #define KIRBY
+
53 //#define ETOILE
+
54 
+
55 #define MAX_FACE 2
+
56 
+
57 
+
64 /*STRUCTURE*/
+
65 typedef struct _face{
+
66  CvPoint point;
+
67  int largeur;
+
68 } face;
+
69 
+
70 typedef face* pface;
+
71 
+
72 
+
73 
+
74 /*HEADERS*/
+
75 
+
85 void maj_angle(int vecX, int vecY, int rayon, double* angle); //Met à jour l'angle selon la distance CentreCamera - Cible
+
86 
+
96 int ajust_pos(int pos, int ref);
+
97 
+
105 void controle_moteur(double* angle);//Envoie les angles au moteur
+
106 
+
115 int limite_moteur(int val_pwm);//Verifie que les valeurs envoyees aux moteurs sont correctes
+
116 
+
131 void config(int* LowH, int* HighH, int* LowS, int* HighS, int* LowV, int* HighV); //Affiche le panneau de configuration de tracking avec les arguments comme valeur de base
+
132 
+
141 void affichage_config(IplImage* frame, IplImage* HSV, IplImage* Binaire); //Affiche le flux vidéos et ses différent traitements
+
142 
+
155 void Affichage_Tracking(IplImage* frame, int posX, int posY, int width, int height); //Dessine les informations de tracking sur frame
+
156 
+
165 void Position_moy(IplImage* Binaire, int* posX, int * posY); //Effectue le baricentre des pixels d'une image binaire pour obtenir la postion de l'objet
+
166 
+
183 void traitement(IplImage* frame, IplImage* HSV, IplImage* Binaire, int LowH, int HighH, int LowS, int HighS, int LowV, int HighV); //Effectue une binarisation de frame en fonction des bornes HSV
+
184 
+
194 int image_CV2SFML(IplImage* imcv, sf::Image imFlux); //Construction de imsf (RGBA) à partir de imcv (BGR), avec alpha constant (=1)
+
195 
+
203 CvHaarClassifierCascade* init_cascade();
+
204 
+
213 void detect_and_draw( IplImage* img, CvHaarClassifierCascade* cascade, face** tab_face );
+
214 
+
223 void get_color(IplImage* image, face* rec_face, int* BGR);
+
224 
+
225 #endif
+
CvPoint point
Definition: fonction.h:66
+
void Position_moy(IplImage *Binaire, int *posX, int *posY)
Effectue le baricentre des pixels d'une image binaire pour obtenir la postion de l'objet.
Definition: fonction.c:120
+
int limite_moteur(int val_pwm)
Fonction qui vérifie que les valeurs envoyees aux moteurs sont correctes.
Definition: fonction.c:41
+
void detect_and_draw(IplImage *img, CvHaarClassifierCascade *cascade, face **tab_face)
Détecte et renvoie un rectangle pour chaque visage sur l'image.
Definition: fonction.c:200
+
CvHaarClassifierCascade * init_cascade()
Charge les fichiers cascades pour la reconnaissance faciale.
Definition: fonction.c:182
+
void traitement(IplImage *frame, IplImage *HSV, IplImage *Binaire, int LowH, int HighH, int LowS, int HighS, int LowV, int HighV)
Effectue une binarisation de frame en fonction des bornes HSV.
Definition: fonction.c:99
+
void affichage_config(IplImage *frame, IplImage *HSV, IplImage *Binaire)
Fonction d'affichage du flux vidéo, du flux en HSV et de sa binarisation.
Definition: fonction.c:151
+
int image_CV2SFML(IplImage *imcv, sf::Image imFlux)
Convertit une image opencv (IplImage) en une image SFML (sf::Image)
Definition: fonction.c:74
+
void maj_angle(int vecX, int vecY, int rayon, double *angle)
Met à jour angle selon la distance entre le centre de la caméra et la cible, avec un tolérance circul...
Definition: fonction.c:12
+
int largeur
Definition: fonction.h:67
+
Definition: fonction.h:65
+
int ajust_pos(int pos, int ref)
permet d'éviter des positions supérieures à ref considérées comme aberrantes.
Definition: fonction.c:36
+
void controle_moteur(double *angle)
Fonction d'envoie des angles aux moteurs.
Definition: fonction.c:54
+
void Affichage_Tracking(IplImage *frame, int posX, int posY, int width, int height)
Fonction d'affichage des informations de suivi.
Definition: fonction.c:163
+
void config(int *LowH, int *HighH, int *LowS, int *HighS, int *LowV, int *HighV)
Fonction d'affichage du panneau de configuration de la couleur à suivre.
Definition: fonction.c:136
+
Contient les informations sur chaque face détectée : positions, largeur.
+
+
+ + + + diff --git a/Doxy/html/functions.html b/Doxy/html/functions.html new file mode 100644 index 0000000..46687c7 --- /dev/null +++ b/Doxy/html/functions.html @@ -0,0 +1,131 @@ + + + + + + +CamAdventure: Class Members + + + + + + + + + + + + + +
+
+ + + + + + + +
+
CamAdventure +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
Here is a list of all documented class members with links to the class documentation for each member:
+
+
+ + + + diff --git a/Doxy/html/functions_vars.html b/Doxy/html/functions_vars.html new file mode 100644 index 0000000..e7e055a --- /dev/null +++ b/Doxy/html/functions_vars.html @@ -0,0 +1,131 @@ + + + + + + +CamAdventure: Class Members - Variables + + + + + + + + + + + + + +
+
+ + + + + + + +
+
CamAdventure +
+
+
+ + + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
+ + + + diff --git a/Doxy/html/globals.html b/Doxy/html/globals.html index 6e4fb9a..3e8224f 100644 --- a/Doxy/html/globals.html +++ b/Doxy/html/globals.html @@ -8,6 +8,13 @@ + + + + +
@@ -88,51 +111,78 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Here is a list of all documented file members with links to the documentation:
+
- + diff --git a/Doxy/html/globals_defs.html b/Doxy/html/globals_defs.html index 87a3b10..e136fbd 100644 --- a/Doxy/html/globals_defs.html +++ b/Doxy/html/globals_defs.html @@ -8,6 +8,13 @@ + + + + +
@@ -88,21 +111,27 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
 
+
- + diff --git a/Doxy/html/globals_func.html b/Doxy/html/globals_func.html index 1a4b5f5..bddaa5c 100644 --- a/Doxy/html/globals_func.html +++ b/Doxy/html/globals_func.html @@ -8,6 +8,13 @@ + + + + +
@@ -88,42 +111,66 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
 
+
- + diff --git a/Doxy/html/globals_type.html b/Doxy/html/globals_type.html new file mode 100644 index 0000000..85834db --- /dev/null +++ b/Doxy/html/globals_type.html @@ -0,0 +1,108 @@ + + + + + + +CamAdventure: File Members + + + + + + + + + +
+
+ + + + + + + +
+
CamAdventure +
+
+
+ + + + + + +
+ + + + +
+ +
+ +
+
+ + + + diff --git a/Doxy/html/index.html b/Doxy/html/index.html index fc88367..64d4e3a 100644 --- a/Doxy/html/index.html +++ b/Doxy/html/index.html @@ -8,6 +8,13 @@ + + + + +
@@ -78,11 +101,14 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
+ - + diff --git a/Doxy/html/jquery.js b/Doxy/html/jquery.js index 6aa2e4c..d1e7eb9 100644 --- a/Doxy/html/jquery.js +++ b/Doxy/html/jquery.js @@ -29,6 +29,47 @@ ax.optgroup=ax.option;ax.tbody=ax.tfoot=ax.colgroup=ax.caption=ax.thead;ax.th=ax if(bA>0){if(bv!=="border"){for(;bx)<[^<]*)*<\/script>/gi,q=/^(?:select|textarea)/i,h=/\s+/,br=/([?&])_=[^&]*/,K=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,A=b.fn.load,aa={},r={},aE,s,aV=["*/"]+["*"];try{aE=bl.href}catch(aw){aE=av.createElement("a");aE.href="";aE=aE.href}s=K.exec(aE.toLowerCase())||[];function f(e){return function(by,bA){if(typeof by!=="string"){bA=by;by="*"}if(b.isFunction(bA)){var bx=by.toLowerCase().split(h),bw=0,bz=bx.length,bv,bB,bC;for(;bw=0){var e=bw.slice(by,bw.length);bw=bw.slice(0,by)}var bx="GET";if(bz){if(b.isFunction(bz)){bA=bz;bz=L}else{if(typeof bz==="object"){bz=b.param(bz,b.ajaxSettings.traditional);bx="POST"}}}var bv=this;b.ajax({url:bw,type:bx,dataType:"html",data:bz,complete:function(bC,bB,bD){bD=bC.responseText;if(bC.isResolved()){bC.done(function(bE){bD=bE});bv.html(e?b("
").append(bD.replace(a6,"")).find(e):bD)}if(bA){bv.each(bA,[bD,bB,bC])}}});return this},serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||q.test(this.nodeName)||aZ.test(this.type))}).map(function(e,bv){var bw=b(this).val();return bw==null?null:b.isArray(bw)?b.map(bw,function(by,bx){return{name:bv.name,value:by.replace(bs,"\r\n")}}):{name:bv.name,value:bw.replace(bs,"\r\n")}}).get()}});b.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bv){b.fn[bv]=function(bw){return this.on(bv,bw)}});b.each(["get","post"],function(e,bv){b[bv]=function(bw,by,bz,bx){if(b.isFunction(by)){bx=bx||bz;bz=by;by=L}return b.ajax({type:bv,url:bw,data:by,success:bz,dataType:bx})}});b.extend({getScript:function(e,bv){return b.get(e,L,bv,"script")},getJSON:function(e,bv,bw){return b.get(e,bv,bw,"json")},ajaxSetup:function(bv,e){if(e){am(bv,b.ajaxSettings)}else{e=bv;bv=b.ajaxSettings}am(bv,e);return bv},ajaxSettings:{url:aE,isLocal:aM.test(s[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":aV},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":bb.String,"text html":true,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:f(aa),ajaxTransport:f(r),ajax:function(bz,bx){if(typeof bz==="object"){bx=bz;bz=L}bx=bx||{};var bD=b.ajaxSetup({},bx),bS=bD.context||bD,bG=bS!==bD&&(bS.nodeType||bS instanceof b)?b(bS):b.event,bR=b.Deferred(),bN=b.Callbacks("once memory"),bB=bD.statusCode||{},bC,bH={},bO={},bQ,by,bL,bE,bI,bA=0,bw,bK,bJ={readyState:0,setRequestHeader:function(bT,bU){if(!bA){var e=bT.toLowerCase();bT=bO[e]=bO[e]||bT;bH[bT]=bU}return this},getAllResponseHeaders:function(){return bA===2?bQ:null},getResponseHeader:function(bT){var e;if(bA===2){if(!by){by={};while((e=aD.exec(bQ))){by[e[1].toLowerCase()]=e[2]}}e=by[bT.toLowerCase()]}return e===L?null:e},overrideMimeType:function(e){if(!bA){bD.mimeType=e}return this},abort:function(e){e=e||"abort";if(bL){bL.abort(e)}bF(0,e);return this}};function bF(bZ,bU,b0,bW){if(bA===2){return}bA=2;if(bE){clearTimeout(bE)}bL=L;bQ=bW||"";bJ.readyState=bZ>0?4:0;var bT,b4,b3,bX=bU,bY=b0?bj(bD,bJ,b0):L,bV,b2;if(bZ>=200&&bZ<300||bZ===304){if(bD.ifModified){if((bV=bJ.getResponseHeader("Last-Modified"))){b.lastModified[bC]=bV}if((b2=bJ.getResponseHeader("Etag"))){b.etag[bC]=b2}}if(bZ===304){bX="notmodified";bT=true}else{try{b4=G(bD,bY);bX="success";bT=true}catch(b1){bX="parsererror";b3=b1}}}else{b3=bX;if(!bX||bZ){bX="error";if(bZ<0){bZ=0}}}bJ.status=bZ;bJ.statusText=""+(bU||bX);if(bT){bR.resolveWith(bS,[b4,bX,bJ])}else{bR.rejectWith(bS,[bJ,bX,b3])}bJ.statusCode(bB);bB=L;if(bw){bG.trigger("ajax"+(bT?"Success":"Error"),[bJ,bD,bT?b4:b3])}bN.fireWith(bS,[bJ,bX]);if(bw){bG.trigger("ajaxComplete",[bJ,bD]);if(!(--b.active)){b.event.trigger("ajaxStop")}}}bR.promise(bJ);bJ.success=bJ.done;bJ.error=bJ.fail;bJ.complete=bN.add;bJ.statusCode=function(bT){if(bT){var e;if(bA<2){for(e in bT){bB[e]=[bB[e],bT[e]]}}else{e=bT[bJ.status];bJ.then(e,e)}}return this};bD.url=((bz||bD.url)+"").replace(bq,"").replace(c,s[1]+"//");bD.dataTypes=b.trim(bD.dataType||"*").toLowerCase().split(h);if(bD.crossDomain==null){bI=K.exec(bD.url.toLowerCase());bD.crossDomain=!!(bI&&(bI[1]!=s[1]||bI[2]!=s[2]||(bI[3]||(bI[1]==="http:"?80:443))!=(s[3]||(s[1]==="http:"?80:443))))}if(bD.data&&bD.processData&&typeof bD.data!=="string"){bD.data=b.param(bD.data,bD.traditional)}aW(aa,bD,bx,bJ);if(bA===2){return false}bw=bD.global;bD.type=bD.type.toUpperCase();bD.hasContent=!aQ.test(bD.type);if(bw&&b.active++===0){b.event.trigger("ajaxStart")}if(!bD.hasContent){if(bD.data){bD.url+=(M.test(bD.url)?"&":"?")+bD.data;delete bD.data}bC=bD.url;if(bD.cache===false){var bv=b.now(),bP=bD.url.replace(br,"$1_="+bv);bD.url=bP+((bP===bD.url)?(M.test(bD.url)?"&":"?")+"_="+bv:"")}}if(bD.data&&bD.hasContent&&bD.contentType!==false||bx.contentType){bJ.setRequestHeader("Content-Type",bD.contentType)}if(bD.ifModified){bC=bC||bD.url;if(b.lastModified[bC]){bJ.setRequestHeader("If-Modified-Since",b.lastModified[bC])}if(b.etag[bC]){bJ.setRequestHeader("If-None-Match",b.etag[bC])}}bJ.setRequestHeader("Accept",bD.dataTypes[0]&&bD.accepts[bD.dataTypes[0]]?bD.accepts[bD.dataTypes[0]]+(bD.dataTypes[0]!=="*"?", "+aV+"; q=0.01":""):bD.accepts["*"]);for(bK in bD.headers){bJ.setRequestHeader(bK,bD.headers[bK])}if(bD.beforeSend&&(bD.beforeSend.call(bS,bJ,bD)===false||bA===2)){bJ.abort();return false}for(bK in {success:1,error:1,complete:1}){bJ[bK](bD[bK])}bL=aW(r,bD,bx,bJ);if(!bL){bF(-1,"No Transport")}else{bJ.readyState=1;if(bw){bG.trigger("ajaxSend",[bJ,bD])}if(bD.async&&bD.timeout>0){bE=setTimeout(function(){bJ.abort("timeout")},bD.timeout)}try{bA=1;bL.send(bH,bF)}catch(bM){if(bA<2){bF(-1,bM)}else{throw bM}}}return bJ},param:function(e,bw){var bv=[],by=function(bz,bA){bA=b.isFunction(bA)?bA():bA;bv[bv.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bw===L){bw=b.ajaxSettings.traditional}if(b.isArray(e)||(e.jquery&&!b.isPlainObject(e))){b.each(e,function(){by(this.name,this.value)})}else{for(var bx in e){v(bx,e[bx],bw,by)}}return bv.join("&").replace(k,"+")}});function v(bw,by,bv,bx){if(b.isArray(by)){b.each(by,function(bA,bz){if(bv||ap.test(bw)){bx(bw,bz)}else{v(bw+"["+(typeof bz==="object"||b.isArray(bz)?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&by!=null&&typeof by==="object"){for(var e in by){v(bw+"["+e+"]",by[e],bv,bx)}}else{bx(bw,by)}}}b.extend({active:0,lastModified:{},etag:{}});function bj(bD,bC,bz){var bv=bD.contents,bB=bD.dataTypes,bw=bD.responseFields,by,bA,bx,e;for(bA in bw){if(bA in bz){bC[bw[bA]]=bz[bA]}}while(bB[0]==="*"){bB.shift();if(by===L){by=bD.mimeType||bC.getResponseHeader("content-type")}}if(by){for(bA in bv){if(bv[bA]&&bv[bA].test(by)){bB.unshift(bA);break}}}if(bB[0] in bz){bx=bB[0]}else{for(bA in bz){if(!bB[0]||bD.converters[bA+" "+bB[0]]){bx=bA;break}if(!e){e=bA}}bx=bx||e}if(bx){if(bx!==bB[0]){bB.unshift(bx)}return bz[bx]}}function G(bH,bz){if(bH.dataFilter){bz=bH.dataFilter(bz,bH.dataType)}var bD=bH.dataTypes,bG={},bA,bE,bw=bD.length,bB,bC=bD[0],bx,by,bF,bv,e;for(bA=1;bA=bw.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();bw.animatedProperties[this.prop]=true;for(bA in bw.animatedProperties){if(bw.animatedProperties[bA]!==true){e=false}}if(e){if(bw.overflow!=null&&!b.support.shrinkWrapBlocks){b.each(["","X","Y"],function(bC,bD){bz.style["overflow"+bD]=bw.overflow[bC]})}if(bw.hide){b(bz).hide()}if(bw.hide||bw.show){for(bA in bw.animatedProperties){b.style(bz,bA,bw.orig[bA]);b.removeData(bz,"fxshow"+bA,true);b.removeData(bz,"toggle"+bA,true)}}bv=bw.complete;if(bv){bw.complete=false;bv.call(bz)}}return false}else{if(bw.duration==Infinity){this.now=bx}else{bB=bx-this.startTime;this.state=bB/bw.duration;this.pos=b.easing[bw.animatedProperties[this.prop]](this.state,bB,0,1,bw.duration);this.now=this.start+((this.end-this.start)*this.pos)}this.update()}return true}};b.extend(b.fx,{tick:function(){var bw,bv=b.timers,e=0;for(;e").appendTo(e),bw=bv.css("display");bv.remove();if(bw==="none"||bw===""){if(!a8){a8=av.createElement("iframe");a8.frameBorder=a8.width=a8.height=0}e.appendChild(a8);if(!m||!a8.createElement){m=(a8.contentWindow||a8.contentDocument).document;m.write((av.compatMode==="CSS1Compat"?"":"")+"");m.close()}bv=m.createElement(bx);m.body.appendChild(bv);bw=b.css(bv,"display");e.removeChild(a8)}Q[bx]=bw}return Q[bx]}var V=/^t(?:able|d|h)$/i,ad=/^(?:body|html)$/i;if("getBoundingClientRect" in av.documentElement){b.fn.offset=function(bI){var by=this[0],bB;if(bI){return this.each(function(e){b.offset.setOffset(this,bI,e)})}if(!by||!by.ownerDocument){return null}if(by===by.ownerDocument.body){return b.offset.bodyOffset(by)}try{bB=by.getBoundingClientRect()}catch(bF){}var bH=by.ownerDocument,bw=bH.documentElement;if(!bB||!b.contains(bw,by)){return bB?{top:bB.top,left:bB.left}:{top:0,left:0}}var bC=bH.body,bD=aK(bH),bA=bw.clientTop||bC.clientTop||0,bE=bw.clientLeft||bC.clientLeft||0,bv=bD.pageYOffset||b.support.boxModel&&bw.scrollTop||bC.scrollTop,bz=bD.pageXOffset||b.support.boxModel&&bw.scrollLeft||bC.scrollLeft,bG=bB.top+bv-bA,bx=bB.left+bz-bE;return{top:bG,left:bx}}}else{b.fn.offset=function(bF){var bz=this[0];if(bF){return this.each(function(bG){b.offset.setOffset(this,bF,bG)})}if(!bz||!bz.ownerDocument){return null}if(bz===bz.ownerDocument.body){return b.offset.bodyOffset(bz)}var bC,bw=bz.offsetParent,bv=bz,bE=bz.ownerDocument,bx=bE.documentElement,bA=bE.body,bB=bE.defaultView,e=bB?bB.getComputedStyle(bz,null):bz.currentStyle,bD=bz.offsetTop,by=bz.offsetLeft;while((bz=bz.parentNode)&&bz!==bA&&bz!==bx){if(b.support.fixedPosition&&e.position==="fixed"){break}bC=bB?bB.getComputedStyle(bz,null):bz.currentStyle;bD-=bz.scrollTop;by-=bz.scrollLeft;if(bz===bw){bD+=bz.offsetTop;by+=bz.offsetLeft;if(b.support.doesNotAddBorder&&!(b.support.doesAddBorderForTableAndCells&&V.test(bz.nodeName))){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}bv=bw;bw=bz.offsetParent}if(b.support.subtractsBorderForOverflowNotVisible&&bC.overflow!=="visible"){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}e=bC}if(e.position==="relative"||e.position==="static"){bD+=bA.offsetTop;by+=bA.offsetLeft}if(b.support.fixedPosition&&e.position==="fixed"){bD+=Math.max(bx.scrollTop,bA.scrollTop);by+=Math.max(bx.scrollLeft,bA.scrollLeft)}return{top:bD,left:by}}}b.offset={bodyOffset:function(e){var bw=e.offsetTop,bv=e.offsetLeft;if(b.support.doesNotIncludeMarginInBodyOffset){bw+=parseFloat(b.css(e,"marginTop"))||0;bv+=parseFloat(b.css(e,"marginLeft"))||0}return{top:bw,left:bv}},setOffset:function(bx,bG,bA){var bB=b.css(bx,"position");if(bB==="static"){bx.style.position="relative"}var bz=b(bx),bv=bz.offset(),e=b.css(bx,"top"),bE=b.css(bx,"left"),bF=(bB==="absolute"||bB==="fixed")&&b.inArray("auto",[e,bE])>-1,bD={},bC={},bw,by;if(bF){bC=bz.position();bw=bC.top;by=bC.left}else{bw=parseFloat(e)||0;by=parseFloat(bE)||0}if(b.isFunction(bG)){bG=bG.call(bx,bA,bv)}if(bG.top!=null){bD.top=(bG.top-bv.top)+bw}if(bG.left!=null){bD.left=(bG.left-bv.left)+by}if("using" in bG){bG.using.call(bx,bD)}else{bz.css(bD)}}};b.fn.extend({position:function(){if(!this[0]){return null}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),e=ad.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(b.css(bw,"marginTop"))||0;bx.left-=parseFloat(b.css(bw,"marginLeft"))||0;e.top+=parseFloat(b.css(bv[0],"borderTopWidth"))||0;e.left+=parseFloat(b.css(bv[0],"borderLeftWidth"))||0;return{top:bx.top-e.top,left:bx.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||av.body;while(e&&(!ad.test(e.nodeName)&&b.css(e,"position")==="static")){e=e.offsetParent}return e})}});b.each(["Left","Top"],function(bv,e){var bw="scroll"+e;b.fn[bw]=function(bz){var bx,by;if(bz===L){bx=this[0];if(!bx){return null}by=aK(bx);return by?("pageXOffset" in by)?by[bv?"pageYOffset":"pageXOffset"]:b.support.boxModel&&by.document.documentElement[bw]||by.document.body[bw]:bx[bw]}return this.each(function(){by=aK(this);if(by){by.scrollTo(!bv?bz:b(by).scrollLeft(),bv?bz:b(by).scrollTop())}else{this[bw]=bz}})}});function aK(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}b.each(["Height","Width"],function(bv,e){var bw=e.toLowerCase();b.fn["inner"+e]=function(){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,"padding")):this[bw]():null};b.fn["outer"+e]=function(by){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,by?"margin":"border")):this[bw]():null};b.fn[bw]=function(bz){var bA=this[0];if(!bA){return bz==null?null:this}if(b.isFunction(bz)){return this.each(function(bE){var bD=b(this);bD[bw](bz.call(this,bE,bD[bw]()))})}if(b.isWindow(bA)){var bB=bA.document.documentElement["client"+e],bx=bA.document.body;return bA.document.compatMode==="CSS1Compat"&&bB||bx&&bx["client"+e]||bB}else{if(bA.nodeType===9){return Math.max(bA.documentElement["client"+e],bA.body["scroll"+e],bA.documentElement["scroll"+e],bA.body["offset"+e],bA.documentElement["offset"+e])}else{if(bz===L){var bC=b.css(bA,bw),by=parseFloat(bC);return b.isNumeric(by)?by:bC}else{return this.css(bw,typeof bz==="string"?bz:bz+"px")}}}}});bb.jQuery=bb.$=b;if(typeof define==="function"&&define.amd&&define.amd.jQuery){define("jquery",[],function(){return b })}})(window); +/*! + * jQuery UI 1.8.18 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI + */ +(function(a,d){a.ui=a.ui||{};if(a.ui.version){return}a.extend(a.ui,{version:"1.8.18",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(e,f){return typeof e==="number"?this.each(function(){var g=this;setTimeout(function(){a(g).focus();if(f){f.call(g)}},e)}):this._focus.apply(this,arguments)},scrollParent:function(){var e;if((a.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){e=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(a.curCSS(this,"position",1))&&(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}else{e=this.parents().filter(function(){return(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!e.length?a(document):e},zIndex:function(h){if(h!==d){return this.css("zIndex",h)}if(this.length){var f=a(this[0]),e,g;while(f.length&&f[0]!==document){e=f.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){g=parseInt(f.css("zIndex"),10);if(!isNaN(g)&&g!==0){return g}}f=f.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});a.each(["Width","Height"],function(g,e){var f=e==="Width"?["Left","Right"]:["Top","Bottom"],h=e.toLowerCase(),k={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};function j(m,l,i,n){a.each(f,function(){l-=parseFloat(a.curCSS(m,"padding"+this,true))||0;if(i){l-=parseFloat(a.curCSS(m,"border"+this+"Width",true))||0}if(n){l-=parseFloat(a.curCSS(m,"margin"+this,true))||0}});return l}a.fn["inner"+e]=function(i){if(i===d){return k["inner"+e].call(this)}return this.each(function(){a(this).css(h,j(this,i)+"px")})};a.fn["outer"+e]=function(i,l){if(typeof i!=="number"){return k["outer"+e].call(this,i)}return this.each(function(){a(this).css(h,j(this,i,true,l)+"px")})}});function c(g,e){var j=g.nodeName.toLowerCase();if("area"===j){var i=g.parentNode,h=i.name,f;if(!g.href||!h||i.nodeName.toLowerCase()!=="map"){return false}f=a("img[usemap=#"+h+"]")[0];return !!f&&b(f)}return(/input|select|textarea|button|object/.test(j)?!g.disabled:"a"==j?g.href||e:e)&&b(g)}function b(e){return !a(e).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.extend(a.expr[":"],{data:function(g,f,e){return !!a.data(g,e[3])},focusable:function(e){return c(e,!isNaN(a.attr(e,"tabindex")))},tabbable:function(g){var e=a.attr(g,"tabindex"),f=isNaN(e);return(f||e>=0)&&c(g,!f)}});a(function(){var e=document.body,f=e.appendChild(f=document.createElement("div"));f.offsetHeight;a.extend(f.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=f.offsetHeight===100;a.support.selectstart="onselectstart" in f;e.removeChild(f).style.display="none"});a.extend(a.ui,{plugin:{add:function(f,g,j){var h=a.ui[f].prototype;for(var e in j){h.plugins[e]=h.plugins[e]||[];h.plugins[e].push([g,j[e]])}},call:function(e,g,f){var j=e.plugins[g];if(!j||!e.element[0].parentNode){return}for(var h=0;h0){return true}h[e]=1;g=(h[e]>0);h[e]=0;return g},isOverAxis:function(f,e,g){return(f>e)&&(f<(e+g))},isOver:function(j,f,i,h,e,g){return a.ui.isOverAxis(j,i,e)&&a.ui.isOverAxis(f,h,g)}})})(jQuery);/*! + * jQuery UI Widget 1.8.18 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Widget + */ +(function(b,d){if(b.cleanData){var c=b.cleanData;b.cleanData=function(f){for(var g=0,h;(h=f[g])!=null;g++){try{b(h).triggerHandler("remove")}catch(j){}}c(f)}}else{var a=b.fn.remove;b.fn.remove=function(e,f){return this.each(function(){if(!f){if(!e||b.filter(e,[this]).length){b("*",this).add([this]).each(function(){try{b(this).triggerHandler("remove")}catch(g){}})}}return a.call(b(this),e,f)})}}b.widget=function(f,h,e){var g=f.split(".")[0],j;f=f.split(".")[1];j=g+"-"+f;if(!e){e=h;h=b.Widget}b.expr[":"][j]=function(k){return !!b.data(k,f)};b[g]=b[g]||{};b[g][f]=function(k,l){if(arguments.length){this._createWidget(k,l)}};var i=new h();i.options=b.extend(true,{},i.options);b[g][f].prototype=b.extend(true,i,{namespace:g,widgetName:f,widgetEventPrefix:b[g][f].prototype.widgetEventPrefix||f,widgetBaseClass:j},e);b.widget.bridge(f,b[g][f])};b.widget.bridge=function(f,e){b.fn[f]=function(i){var g=typeof i==="string",h=Array.prototype.slice.call(arguments,1),j=this;i=!g&&h.length?b.extend.apply(null,[true,i].concat(h)):i;if(g&&i.charAt(0)==="_"){return j}if(g){this.each(function(){var k=b.data(this,f),l=k&&b.isFunction(k[i])?k[i].apply(k,h):k;if(l!==k&&l!==d){j=l;return false}})}else{this.each(function(){var k=b.data(this,f);if(k){k.option(i||{})._init()}else{b.data(this,f,new e(i,this))}})}return j}};b.Widget=function(e,f){if(arguments.length){this._createWidget(e,f)}};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(f,g){b.data(g,this.widgetName,this);this.element=b(g);this.options=b.extend(true,{},this.options,this._getCreateOptions(),f);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(f,g){var e=f;if(arguments.length===0){return b.extend({},this.options)}if(typeof f==="string"){if(g===d){return this.options[f]}e={};e[f]=g}this._setOptions(e);return this},_setOptions:function(f){var e=this;b.each(f,function(g,h){e._setOption(g,h)});return this},_setOption:function(e,f){this.options[e]=f;if(e==="disabled"){this.widget()[f?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",f)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(e,f,g){var j,i,h=this.options[e];g=g||{};f=b.Event(f);f.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase();f.target=this.element[0];i=f.originalEvent;if(i){for(j in i){if(!(j in f)){f[j]=i[j]}}}this.element.trigger(f,g);return !(b.isFunction(h)&&h.call(this.element[0],f,g)===false||f.isDefaultPrevented())}}})(jQuery);/*! + * jQuery UI Mouse 1.8.18 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Mouse + * + * Depends: + * jquery.ui.widget.js + */ +(function(b,c){var a=false;b(document).mouseup(function(d){a=false});b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var d=this;this.element.bind("mousedown."+this.widgetName,function(e){return d._mouseDown(e)}).bind("click."+this.widgetName,function(e){if(true===b.data(e.target,d.widgetName+".preventClickEvent")){b.removeData(e.target,d.widgetName+".preventClickEvent");e.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(f){if(a){return}(this._mouseStarted&&this._mouseUp(f));this._mouseDownEvent=f;var e=this,g=(f.which==1),d=(typeof this.options.cancel=="string"&&f.target.nodeName?b(f.target).closest(this.options.cancel).length:false);if(!g||d||!this._mouseCapture(f)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(f)&&this._mouseDelayMet(f)){this._mouseStarted=(this._mouseStart(f)!==false);if(!this._mouseStarted){f.preventDefault();return true}}if(true===b.data(f.target,this.widgetName+".preventClickEvent")){b.removeData(f.target,this.widgetName+".preventClickEvent")}this._mouseMoveDelegate=function(h){return e._mouseMove(h)};this._mouseUpDelegate=function(h){return e._mouseUp(h)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);f.preventDefault();a=true;return true},_mouseMove:function(d){if(b.browser.msie&&!(document.documentMode>=9)&&!d.button){return this._mouseUp(d)}if(this._mouseStarted){this._mouseDrag(d);return d.preventDefault()}if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,d)!==false);(this._mouseStarted?this._mouseDrag(d):this._mouseUp(d))}return !this._mouseStarted},_mouseUp:function(d){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(d.target==this._mouseDownEvent.target){b.data(d.target,this.widgetName+".preventClickEvent",true)}this._mouseStop(d)}return false},_mouseDistanceMet:function(d){return(Math.max(Math.abs(this._mouseDownEvent.pageX-d.pageX),Math.abs(this._mouseDownEvent.pageY-d.pageY))>=this.options.distance)},_mouseDelayMet:function(d){return this.mouseDelayMet},_mouseStart:function(d){},_mouseDrag:function(d){},_mouseStop:function(d){},_mouseCapture:function(d){return true}})})(jQuery);(function(c,d){c.widget("ui.resizable",c.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){var f=this,k=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(k.aspectRatio),aspectRatio:k.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:k.helper||k.ghost||k.animate?k.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){this.element.wrap(c('
').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=k.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var l=this.handles.split(",");this.handles={};for(var g=0;g
');if(/sw|se|ne|nw/.test(j)){h.css({zIndex:++k.zIndex})}if("se"==j){h.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[j]=".ui-resizable-"+j;this.element.append(h)}}this._renderAxis=function(q){q=q||this.element;for(var n in this.handles){if(this.handles[n].constructor==String){this.handles[n]=c(this.handles[n],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var o=c(this.handles[n],this.element),p=0;p=/sw|ne|nw|se|n|s/.test(n)?o.outerHeight():o.outerWidth();var m=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");q.css(m,p);this._proportionallyResize()}if(!c(this.handles[n]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!f.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}f.axis=i&&i[1]?i[1]:"se"}});if(k.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){if(k.disabled){return}c(this).removeClass("ui-resizable-autohide");f._handles.show()},function(){if(k.disabled){return}if(!f.resizing){c(this).addClass("ui-resizable-autohide");f._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var e=function(g){c(g).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){e(this.element);var f=this.element;f.after(this.originalElement.css({position:f.css("position"),width:f.outerWidth(),height:f.outerHeight(),top:f.css("top"),left:f.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);e(this.originalElement);return this},_mouseCapture:function(f){var g=false;for(var e in this.handles){if(c(this.handles[e])[0]==f.target){g=true}}return !this.options.disabled&&g},_mouseStart:function(g){var j=this.options,f=this.element.position(),e=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(e.is(".ui-draggable")||(/absolute/).test(e.css("position"))){e.css({position:"absolute",top:f.top,left:f.left})}this._renderProxy();var k=b(this.helper.css("left")),h=b(this.helper.css("top"));if(j.containment){k+=c(j.containment).scrollLeft()||0;h+=c(j.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:k,top:h};this.size=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalSize=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalPosition={left:k,top:h};this.sizeDiff={width:e.outerWidth()-e.width(),height:e.outerHeight()-e.height()};this.originalMousePosition={left:g.pageX,top:g.pageY};this.aspectRatio=(typeof j.aspectRatio=="number")?j.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var i=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",i=="auto"?this.axis+"-resize":i);e.addClass("ui-resizable-resizing");this._propagate("start",g);return true},_mouseDrag:function(e){var h=this.helper,g=this.options,m={},q=this,j=this.originalMousePosition,n=this.axis;var r=(e.pageX-j.left)||0,p=(e.pageY-j.top)||0;var i=this._change[n];if(!i){return false}var l=i.apply(this,[e,r,p]),k=c.browser.msie&&c.browser.version<7,f=this.sizeDiff;this._updateVirtualBoundaries(e.shiftKey);if(this._aspectRatio||e.shiftKey){l=this._updateRatio(l,e)}l=this._respectSize(l,e);this._propagate("resize",e);h.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(l);this._trigger("resize",e,this.ui());return false},_mouseStop:function(h){this.resizing=false;var i=this.options,m=this;if(this._helper){var g=this._proportionallyResizeElements,e=g.length&&(/textarea/i).test(g[0].nodeName),f=e&&c.ui.hasScroll(g[0],"left")?0:m.sizeDiff.height,k=e?0:m.sizeDiff.width;var n={width:(m.helper.width()-k),height:(m.helper.height()-f)},j=(parseInt(m.element.css("left"),10)+(m.position.left-m.originalPosition.left))||null,l=(parseInt(m.element.css("top"),10)+(m.position.top-m.originalPosition.top))||null;if(!i.animate){this.element.css(c.extend(n,{top:l,left:j}))}m.helper.height(m.size.height);m.helper.width(m.size.width);if(this._helper&&!i.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",h);if(this._helper){this.helper.remove()}return false},_updateVirtualBoundaries:function(g){var j=this.options,i,h,f,k,e;e={minWidth:a(j.minWidth)?j.minWidth:0,maxWidth:a(j.maxWidth)?j.maxWidth:Infinity,minHeight:a(j.minHeight)?j.minHeight:0,maxHeight:a(j.maxHeight)?j.maxHeight:Infinity};if(this._aspectRatio||g){i=e.minHeight*this.aspectRatio;f=e.minWidth/this.aspectRatio;h=e.maxHeight*this.aspectRatio;k=e.maxWidth/this.aspectRatio;if(i>e.minWidth){e.minWidth=i}if(f>e.minHeight){e.minHeight=f}if(hl.width),s=a(l.height)&&i.minHeight&&(i.minHeight>l.height);if(h){l.width=i.minWidth}if(s){l.height=i.minHeight}if(t){l.width=i.maxWidth}if(m){l.height=i.maxHeight}var f=this.originalPosition.left+this.originalSize.width,p=this.position.top+this.size.height;var k=/sw|nw|w/.test(q),e=/nw|ne|n/.test(q);if(h&&k){l.left=f-i.minWidth}if(t&&k){l.left=f-i.maxWidth}if(s&&e){l.top=p-i.minHeight}if(m&&e){l.top=p-i.maxHeight}var n=!l.width&&!l.height;if(n&&!l.left&&l.top){l.top=null}else{if(n&&!l.top&&l.left){l.left=null}}return l},_proportionallyResize:function(){var k=this.options;if(!this._proportionallyResizeElements.length){return}var g=this.helper||this.element;for(var f=0;f');var e=c.browser.msie&&c.browser.version<7,g=(e?1:0),h=(e?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+h,height:this.element.outerHeight()+h,position:"absolute",left:this.elementOffset.left-g+"px",top:this.elementOffset.top-g+"px",zIndex:++i.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(g,f,e){return{width:this.originalSize.width+f}},w:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{left:i.left+f,width:g.width-f}},n:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{top:i.top+e,height:g.height-e}},s:function(g,f,e){return{height:this.originalSize.height+e}},se:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},sw:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[g,f,e]))},ne:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},nw:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[g,f,e]))}},_propagate:function(f,e){c.ui.plugin.call(this,f,[e,this.ui()]);(f!="resize"&&this._trigger(f,e,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});c.extend(c.ui.resizable,{version:"1.8.18"});c.ui.plugin.add("resizable","alsoResize",{start:function(f,g){var e=c(this).data("resizable"),i=e.options;var h=function(j){c(j).each(function(){var k=c(this);k.data("resizable-alsoresize",{width:parseInt(k.width(),10),height:parseInt(k.height(),10),left:parseInt(k.css("left"),10),top:parseInt(k.css("top"),10)})})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.parentNode){if(i.alsoResize.length){i.alsoResize=i.alsoResize[0];h(i.alsoResize)}else{c.each(i.alsoResize,function(j){h(j)})}}else{h(i.alsoResize)}},resize:function(g,i){var f=c(this).data("resizable"),j=f.options,h=f.originalSize,l=f.originalPosition;var k={height:(f.size.height-h.height)||0,width:(f.size.width-h.width)||0,top:(f.position.top-l.top)||0,left:(f.position.left-l.left)||0},e=function(m,n){c(m).each(function(){var q=c(this),r=c(this).data("resizable-alsoresize"),p={},o=n&&n.length?n:q.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];c.each(o,function(s,u){var t=(r[u]||0)+(k[u]||0);if(t&&t>=0){p[u]=t||null}});q.css(p)})};if(typeof(j.alsoResize)=="object"&&!j.alsoResize.nodeType){c.each(j.alsoResize,function(m,n){e(m,n)})}else{e(j.alsoResize)}},stop:function(e,f){c(this).removeData("resizable-alsoresize")}});c.ui.plugin.add("resizable","animate",{stop:function(i,n){var p=c(this).data("resizable"),j=p.options;var h=p._proportionallyResizeElements,e=h.length&&(/textarea/i).test(h[0].nodeName),f=e&&c.ui.hasScroll(h[0],"left")?0:p.sizeDiff.height,l=e?0:p.sizeDiff.width;var g={width:(p.size.width-l),height:(p.size.height-f)},k=(parseInt(p.element.css("left"),10)+(p.position.left-p.originalPosition.left))||null,m=(parseInt(p.element.css("top"),10)+(p.position.top-p.originalPosition.top))||null; +p.element.animate(c.extend(g,m&&k?{top:m,left:k}:{}),{duration:j.animateDuration,easing:j.animateEasing,step:function(){var o={width:parseInt(p.element.css("width"),10),height:parseInt(p.element.css("height"),10),top:parseInt(p.element.css("top"),10),left:parseInt(p.element.css("left"),10)};if(h&&h.length){c(h[0]).css({width:o.width,height:o.height})}p._updateCache(o);p._propagate("resize",i)}})}});c.ui.plugin.add("resizable","containment",{start:function(f,r){var t=c(this).data("resizable"),j=t.options,l=t.element;var g=j.containment,k=(g instanceof c)?g.get(0):(/parent/.test(g))?l.parent().get(0):g;if(!k){return}t.containerElement=c(k);if(/document/.test(g)||g==document){t.containerOffset={left:0,top:0};t.containerPosition={left:0,top:0};t.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var n=c(k),i=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){i[p]=b(n.css("padding"+o))});t.containerOffset=n.offset();t.containerPosition=n.position();t.containerSize={height:(n.innerHeight()-i[3]),width:(n.innerWidth()-i[1])};var q=t.containerOffset,e=t.containerSize.height,m=t.containerSize.width,h=(c.ui.hasScroll(k,"left")?k.scrollWidth:m),s=(c.ui.hasScroll(k)?k.scrollHeight:e);t.parentData={element:k,left:q.left,top:q.top,width:h,height:s}}},resize:function(g,q){var t=c(this).data("resizable"),i=t.options,f=t.containerSize,p=t.containerOffset,m=t.size,n=t.position,r=t._aspectRatio||g.shiftKey,e={top:0,left:0},h=t.containerElement;if(h[0]!=document&&(/static/).test(h.css("position"))){e=p}if(n.left<(t._helper?p.left:0)){t.size.width=t.size.width+(t._helper?(t.position.left-p.left):(t.position.left-e.left));if(r){t.size.height=t.size.width/i.aspectRatio}t.position.left=i.helper?p.left:0}if(n.top<(t._helper?p.top:0)){t.size.height=t.size.height+(t._helper?(t.position.top-p.top):t.position.top);if(r){t.size.width=t.size.height*i.aspectRatio}t.position.top=t._helper?p.top:0}t.offset.left=t.parentData.left+t.position.left;t.offset.top=t.parentData.top+t.position.top;var l=Math.abs((t._helper?t.offset.left-e.left:(t.offset.left-e.left))+t.sizeDiff.width),s=Math.abs((t._helper?t.offset.top-e.top:(t.offset.top-p.top))+t.sizeDiff.height);var k=t.containerElement.get(0)==t.element.parent().get(0),j=/relative|absolute/.test(t.containerElement.css("position"));if(k&&j){l-=t.parentData.left}if(l+t.size.width>=t.parentData.width){t.size.width=t.parentData.width-l;if(r){t.size.height=t.size.width/t.aspectRatio}}if(s+t.size.height>=t.parentData.height){t.size.height=t.parentData.height-s;if(r){t.size.width=t.size.height*t.aspectRatio}}},stop:function(f,n){var q=c(this).data("resizable"),g=q.options,l=q.position,m=q.containerOffset,e=q.containerPosition,i=q.containerElement;var j=c(q.helper),r=j.offset(),p=j.outerWidth()-q.sizeDiff.width,k=j.outerHeight()-q.sizeDiff.height;if(q._helper&&!g.animate&&(/relative/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}if(q._helper&&!g.animate&&(/static/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}}});c.ui.plugin.add("resizable","ghost",{start:function(g,h){var e=c(this).data("resizable"),i=e.options,f=e.size;e.ghost=e.originalElement.clone();e.ghost.css({opacity:0.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost=="string"?i.ghost:"");e.ghost.appendTo(e.helper)},resize:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost){e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})}},stop:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost&&e.helper){e.helper.get(0).removeChild(e.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(e,m){var p=c(this).data("resizable"),h=p.options,k=p.size,i=p.originalSize,j=p.originalPosition,n=p.axis,l=h._aspectRatio||e.shiftKey;h.grid=typeof h.grid=="number"?[h.grid,h.grid]:h.grid;var g=Math.round((k.width-i.width)/(h.grid[0]||1))*(h.grid[0]||1),f=Math.round((k.height-i.height)/(h.grid[1]||1))*(h.grid[1]||1);if(/^(se|s|e)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f}else{if(/^(ne)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f}else{if(/^(sw)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.left=j.left-g}else{p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f;p.position.left=j.left-g}}}}});var b=function(e){return parseInt(e,10)||0};var a=function(e){return !isNaN(parseInt(e,10))}})(jQuery);/*! + * jQuery hashchange event - v1.3 - 7/21/2010 + * http://benalman.com/projects/jquery-hashchange-plugin/ + * + * Copyright (c) 2010 "Cowboy" Ben Alman + * Dual licensed under the MIT and GPL licenses. + * http://benalman.com/about/license/ + */ +(function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$(' + + +
+
+
Related Pages
+
+
+
Here is a list of all related documentation pages:
+
+ + + + + diff --git a/Doxy/html/resize.js b/Doxy/html/resize.js new file mode 100644 index 0000000..304fcb6 --- /dev/null +++ b/Doxy/html/resize.js @@ -0,0 +1,97 @@ +var cookie_namespace = 'doxygen'; +var sidenav,navtree,content,header; + +function readCookie(cookie) +{ + var myCookie = cookie_namespace+"_"+cookie+"="; + if (document.cookie) + { + var index = document.cookie.indexOf(myCookie); + if (index != -1) + { + var valStart = index + myCookie.length; + var valEnd = document.cookie.indexOf(";", valStart); + if (valEnd == -1) + { + valEnd = document.cookie.length; + } + var val = document.cookie.substring(valStart, valEnd); + return val; + } + } + return 0; +} + +function writeCookie(cookie, val, expiration) +{ + if (val==undefined) return; + if (expiration == null) + { + var date = new Date(); + date.setTime(date.getTime()+(10*365*24*60*60*1000)); // default expiration is one week + expiration = date.toGMTString(); + } + document.cookie = cookie_namespace + "_" + cookie + "=" + val + "; expires=" + expiration+"; path=/"; +} + +function resizeWidth() +{ + var windowWidth = $(window).width() + "px"; + var sidenavWidth = $(sidenav).outerWidth(); + content.css({marginLeft:parseInt(sidenavWidth)+"px"}); + writeCookie('width',sidenavWidth, null); +} + +function restoreWidth(navWidth) +{ + var windowWidth = $(window).width() + "px"; + content.css({marginLeft:parseInt(navWidth)+6+"px"}); + sidenav.css({width:navWidth + "px"}); +} + +function resizeHeight() +{ + var headerHeight = header.outerHeight(); + var footerHeight = footer.outerHeight(); + var windowHeight = $(window).height() - headerHeight - footerHeight; + content.css({height:windowHeight + "px"}); + navtree.css({height:windowHeight + "px"}); + sidenav.css({height:windowHeight + "px",top: headerHeight+"px"}); +} + +function initResizable() +{ + header = $("#top"); + sidenav = $("#side-nav"); + content = $("#doc-content"); + navtree = $("#nav-tree"); + footer = $("#nav-path"); + $(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } }); + $(window).resize(function() { resizeHeight(); }); + var width = readCookie('width'); + if (width) { restoreWidth(width); } else { resizeWidth(); } + resizeHeight(); + var url = location.href; + var i=url.indexOf("#"); + if (i>=0) window.location.hash=url.substr(i); + var _preventDefault = function(evt) { evt.preventDefault(); }; + $("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault); + $(document).bind('touchmove',function(e){ + var device = navigator.userAgent.toLowerCase(); + var ios = device.match(/(iphone|ipod|ipad)/); + if (ios) { + try { + var target = e.target; + while (target) { + if ($(target).css('-webkit-overflow-scrolling')=='touch') return; + target = target.parentNode; + } + e.preventDefault(); + } catch(err) { + e.preventDefault(); + } + } + }); +} + + diff --git a/Doxy/html/search/all_0.js b/Doxy/html/search/all_0.js index d8833e9..a8d580a 100644 --- a/Doxy/html/search/all_0.js +++ b/Doxy/html/search/all_0.js @@ -1,6 +1,4 @@ var searchData= [ - ['affichage_5fconfig',['affichage_config',['../_kirby_track_8c.html#acc438fce8178d1d5aac4595f19529275',1,'KirbyTrack.c']]], - ['affichage_5ftracking',['Affichage_Tracking',['../_kirby_track_8c.html#a91b1b1daf28d90b5299a9a0486f5bdf1',1,'KirbyTrack.c']]], - ['ajust_5fpos',['ajust_pos',['../_kirby_track_8c.html#ae89e5fc7460ea890fa61d54fd209c1ae',1,'KirbyTrack.c']]] + ['_5fface',['_face',['../struct__face.html',1,'']]] ]; diff --git a/Doxy/html/search/all_1.js b/Doxy/html/search/all_1.js index 3cdfa7c..5ac54b7 100644 --- a/Doxy/html/search/all_1.js +++ b/Doxy/html/search/all_1.js @@ -1,5 +1,6 @@ var searchData= [ - ['config',['config',['../_kirby_track_8c.html#adcdd0544c8eb462cd2835ec99fa0f181',1,'KirbyTrack.c']]], - ['controle_5fmoteur',['controle_moteur',['../_kirby_track_8c.html#ad3f512a54511a63b30a8967077736766',1,'KirbyTrack.c']]] + ['affichage_5fconfig',['affichage_config',['../fonction_8c.html#acc438fce8178d1d5aac4595f19529275',1,'affichage_config(IplImage *frame, IplImage *HSV, IplImage *Binaire): fonction.c'],['../fonction_8h.html#acc438fce8178d1d5aac4595f19529275',1,'affichage_config(IplImage *frame, IplImage *HSV, IplImage *Binaire): fonction.c']]], + ['affichage_5ftracking',['Affichage_Tracking',['../fonction_8c.html#a91b1b1daf28d90b5299a9a0486f5bdf1',1,'Affichage_Tracking(IplImage *frame, int posX, int posY, int width, int height): fonction.c'],['../fonction_8h.html#a91b1b1daf28d90b5299a9a0486f5bdf1',1,'Affichage_Tracking(IplImage *frame, int posX, int posY, int width, int height): fonction.c']]], + ['ajust_5fpos',['ajust_pos',['../fonction_8c.html#ae89e5fc7460ea890fa61d54fd209c1ae',1,'ajust_pos(int pos, int ref): fonction.c'],['../fonction_8h.html#ae89e5fc7460ea890fa61d54fd209c1ae',1,'ajust_pos(int pos, int ref): fonction.c']]] ]; diff --git a/Doxy/html/search/all_2.js b/Doxy/html/search/all_2.js index ce58e68..8d42650 100644 --- a/Doxy/html/search/all_2.js +++ b/Doxy/html/search/all_2.js @@ -1,4 +1,4 @@ var searchData= [ - ['jeu',['JEU',['../_kirby_track_8c.html#afb63dbc6e533233f41d03e8b8a3bc570',1,'KirbyTrack.c']]] + ['bug_20list',['Bug List',['../bug.html',1,'']]] ]; diff --git a/Doxy/html/search/all_3.js b/Doxy/html/search/all_3.js index 67ce492..b788ca9 100644 --- a/Doxy/html/search/all_3.js +++ b/Doxy/html/search/all_3.js @@ -1,5 +1,5 @@ var searchData= [ - ['kirby',['KIRBY',['../_kirby_track_8c.html#a9270f8e0b3866a58cfa3a7173da21abd',1,'KirbyTrack.c']]], - ['kirbytrack_2ec',['KirbyTrack.c',['../_kirby_track_8c.html',1,'']]] + ['config',['config',['../fonction_8c.html#adcdd0544c8eb462cd2835ec99fa0f181',1,'config(int *LowH, int *HighH, int *LowS, int *HighS, int *LowV, int *HighV): fonction.c'],['../fonction_8h.html#adcdd0544c8eb462cd2835ec99fa0f181',1,'config(int *LowH, int *HighH, int *LowS, int *HighS, int *LowV, int *HighV): fonction.c']]], + ['controle_5fmoteur',['controle_moteur',['../fonction_8c.html#ad3f512a54511a63b30a8967077736766',1,'controle_moteur(double *angle): fonction.c'],['../fonction_8h.html#ad3f512a54511a63b30a8967077736766',1,'controle_moteur(double *angle): fonction.c']]] ]; diff --git a/Doxy/html/search/all_4.js b/Doxy/html/search/all_4.js index 17d116a..8b4efb4 100644 --- a/Doxy/html/search/all_4.js +++ b/Doxy/html/search/all_4.js @@ -1,4 +1,4 @@ var searchData= [ - ['limite_5fmoteur',['limite_moteur',['../_kirby_track_8c.html#a9397b95e9279b0b9cd371c9a2b4514a2',1,'KirbyTrack.c']]] + ['detect_5fand_5fdraw',['detect_and_draw',['../fonction_8c.html#ab9c63795209f514f5d3554bc9450b8de',1,'detect_and_draw(IplImage *img, CvHaarClassifierCascade *cascade, face **tab_face): fonction.c'],['../fonction_8h.html#ab9c63795209f514f5d3554bc9450b8de',1,'detect_and_draw(IplImage *img, CvHaarClassifierCascade *cascade, face **tab_face): fonction.c']]] ]; diff --git a/Doxy/html/search/all_5.js b/Doxy/html/search/all_5.js index 4c10f10..fae2c88 100644 --- a/Doxy/html/search/all_5.js +++ b/Doxy/html/search/all_5.js @@ -1,5 +1,6 @@ var searchData= [ - ['main',['main',['../_kirby_track_8c.html#a0ddf1224851353fc92bfbff6f499fa97',1,'KirbyTrack.c']]], - ['maj_5fangle',['maj_angle',['../_kirby_track_8c.html#a93cca84f54fe35dc9ad87eac3583889b',1,'KirbyTrack.c']]] + ['face',['face',['../structface.html',1,'']]], + ['fonction_2ec',['fonction.c',['../fonction_8c.html',1,'']]], + ['fonction_2eh',['fonction.h',['../fonction_8h.html',1,'']]] ]; diff --git a/Doxy/html/search/all_6.js b/Doxy/html/search/all_6.js index 379736e..b6b3632 100644 --- a/Doxy/html/search/all_6.js +++ b/Doxy/html/search/all_6.js @@ -1,4 +1,5 @@ var searchData= [ - ['position_5fmoy',['Position_moy',['../_kirby_track_8c.html#ac3e9405c4ebaa936308670c050285ae1',1,'KirbyTrack.c']]] + ['image_5fcv2sfml',['image_CV2SFML',['../fonction_8c.html#ad2cc53a42ff2450413bbb199bb4c1072',1,'image_CV2SFML(IplImage *imcv, sf::Image imFlux): fonction.c'],['../fonction_8h.html#ad2cc53a42ff2450413bbb199bb4c1072',1,'image_CV2SFML(IplImage *imcv, sf::Image imFlux): fonction.c']]], + ['init_5fcascade',['init_cascade',['../fonction_8c.html#a5e1058b3e8eb605a74ffdd7a26637b1e',1,'init_cascade(): fonction.c'],['../fonction_8h.html#a942c8619bb73ca7c3bb7e6fcf1875294',1,'init_cascade(): fonction.c']]] ]; diff --git a/Doxy/html/search/all_7.js b/Doxy/html/search/all_7.js index d2158f4..23371d0 100644 --- a/Doxy/html/search/all_7.js +++ b/Doxy/html/search/all_7.js @@ -1,4 +1,4 @@ var searchData= [ - ['sfml',['SFML',['../_kirby_track_8c.html#a28c9f30d423e9c1ca6fa15a0ec9a0032',1,'KirbyTrack.c']]] + ['jeu',['JEU',['../fonction_8h.html#afb63dbc6e533233f41d03e8b8a3bc570',1,'fonction.h']]] ]; diff --git a/Doxy/html/search/all_8.js b/Doxy/html/search/all_8.js index 4a0ff6f..33bd788 100644 --- a/Doxy/html/search/all_8.js +++ b/Doxy/html/search/all_8.js @@ -1,4 +1,5 @@ var searchData= [ - ['traitement',['traitement',['../_kirby_track_8c.html#a96b1dd5c66492425a00921b6eaaacc89',1,'KirbyTrack.c']]] + ['kirby',['KIRBY',['../fonction_8h.html#a9270f8e0b3866a58cfa3a7173da21abd',1,'fonction.h']]], + ['kirbytrack_2ec',['KirbyTrack.c',['../_kirby_track_8c.html',1,'']]] ]; diff --git a/Doxy/html/search/all_9.html b/Doxy/html/search/all_9.html new file mode 100644 index 0000000..cd46d44 --- /dev/null +++ b/Doxy/html/search/all_9.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/Doxy/html/search/all_9.js b/Doxy/html/search/all_9.js new file mode 100644 index 0000000..5c2619f --- /dev/null +++ b/Doxy/html/search/all_9.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['largeur',['largeur',['../struct__face.html#aa08c659931ad517a99d28131c5bb22fe',1,'_face']]], + ['limite_5fmoteur',['limite_moteur',['../fonction_8c.html#a9397b95e9279b0b9cd371c9a2b4514a2',1,'limite_moteur(int val_pwm): fonction.c'],['../fonction_8h.html#a9397b95e9279b0b9cd371c9a2b4514a2',1,'limite_moteur(int val_pwm): fonction.c']]] +]; diff --git a/Doxy/html/search/all_a.html b/Doxy/html/search/all_a.html new file mode 100644 index 0000000..eab6553 --- /dev/null +++ b/Doxy/html/search/all_a.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/Doxy/html/search/all_a.js b/Doxy/html/search/all_a.js new file mode 100644 index 0000000..d844d1d --- /dev/null +++ b/Doxy/html/search/all_a.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['main',['main',['../_kirby_track_8c.html#a0ddf1224851353fc92bfbff6f499fa97',1,'KirbyTrack.c']]], + ['maj_5fangle',['maj_angle',['../fonction_8c.html#a93cca84f54fe35dc9ad87eac3583889b',1,'maj_angle(int vecX, int vecY, int rayon, double *angle): fonction.c'],['../fonction_8h.html#a93cca84f54fe35dc9ad87eac3583889b',1,'maj_angle(int vecX, int vecY, int rayon, double *angle): fonction.c']]], + ['max_5fface',['MAX_FACE',['../fonction_8h.html#a12190c71ff3acb9694bb2f782a1dfcdb',1,'fonction.h']]] +]; diff --git a/Doxy/html/search/all_b.html b/Doxy/html/search/all_b.html new file mode 100644 index 0000000..a2c161e --- /dev/null +++ b/Doxy/html/search/all_b.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/Doxy/html/search/all_b.js b/Doxy/html/search/all_b.js new file mode 100644 index 0000000..abf5379 --- /dev/null +++ b/Doxy/html/search/all_b.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['navy_2ec',['Navy.c',['../_navy_8c.html',1,'']]] +]; diff --git a/Doxy/html/search/all_c.html b/Doxy/html/search/all_c.html new file mode 100644 index 0000000..bdd3ee2 --- /dev/null +++ b/Doxy/html/search/all_c.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/Doxy/html/search/all_c.js b/Doxy/html/search/all_c.js new file mode 100644 index 0000000..cd42513 --- /dev/null +++ b/Doxy/html/search/all_c.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['point',['point',['../struct__face.html#a03aff2c43bbe1ff2add8e60729d1836a',1,'_face']]], + ['position_5fmoy',['Position_moy',['../fonction_8c.html#ac3e9405c4ebaa936308670c050285ae1',1,'Position_moy(IplImage *Binaire, int *posX, int *posY): fonction.c'],['../fonction_8h.html#ac3e9405c4ebaa936308670c050285ae1',1,'Position_moy(IplImage *Binaire, int *posX, int *posY): fonction.c']]] +]; diff --git a/Doxy/html/search/all_d.html b/Doxy/html/search/all_d.html new file mode 100644 index 0000000..d510933 --- /dev/null +++ b/Doxy/html/search/all_d.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/Doxy/html/search/all_d.js b/Doxy/html/search/all_d.js new file mode 100644 index 0000000..878216e --- /dev/null +++ b/Doxy/html/search/all_d.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['sfml',['SFML',['../fonction_8h.html#a28c9f30d423e9c1ca6fa15a0ec9a0032',1,'fonction.h']]] +]; diff --git a/Doxy/html/search/all_e.html b/Doxy/html/search/all_e.html new file mode 100644 index 0000000..3cda017 --- /dev/null +++ b/Doxy/html/search/all_e.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/Doxy/html/search/all_e.js b/Doxy/html/search/all_e.js new file mode 100644 index 0000000..e7a9677 --- /dev/null +++ b/Doxy/html/search/all_e.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['todo_20list',['Todo List',['../todo.html',1,'']]], + ['traitement',['traitement',['../fonction_8c.html#a96b1dd5c66492425a00921b6eaaacc89',1,'traitement(IplImage *frame, IplImage *HSV, IplImage *Binaire, int LowH, int HighH, int LowS, int HighS, int LowV, int HighV): fonction.c'],['../fonction_8h.html#a96b1dd5c66492425a00921b6eaaacc89',1,'traitement(IplImage *frame, IplImage *HSV, IplImage *Binaire, int LowH, int HighH, int LowS, int HighS, int LowV, int HighV): fonction.c']]] +]; diff --git a/Doxy/html/search/all_f.html b/Doxy/html/search/all_f.html new file mode 100644 index 0000000..7419b02 --- /dev/null +++ b/Doxy/html/search/all_f.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/Doxy/html/search/all_f.js b/Doxy/html/search/all_f.js new file mode 100644 index 0000000..e7a9677 --- /dev/null +++ b/Doxy/html/search/all_f.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['todo_20list',['Todo List',['../todo.html',1,'']]], + ['traitement',['traitement',['../fonction_8c.html#a96b1dd5c66492425a00921b6eaaacc89',1,'traitement(IplImage *frame, IplImage *HSV, IplImage *Binaire, int LowH, int HighH, int LowS, int HighS, int LowV, int HighV): fonction.c'],['../fonction_8h.html#a96b1dd5c66492425a00921b6eaaacc89',1,'traitement(IplImage *frame, IplImage *HSV, IplImage *Binaire, int LowH, int HighH, int LowS, int HighS, int LowV, int HighV): fonction.c']]] +]; diff --git a/Doxy/html/search/classes_0.html b/Doxy/html/search/classes_0.html new file mode 100644 index 0000000..fabdc03 --- /dev/null +++ b/Doxy/html/search/classes_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/Doxy/html/search/classes_0.js b/Doxy/html/search/classes_0.js new file mode 100644 index 0000000..a8d580a --- /dev/null +++ b/Doxy/html/search/classes_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['_5fface',['_face',['../struct__face.html',1,'']]] +]; diff --git a/Doxy/html/search/classes_1.html b/Doxy/html/search/classes_1.html new file mode 100644 index 0000000..800b6ae --- /dev/null +++ b/Doxy/html/search/classes_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/Doxy/html/search/classes_1.js b/Doxy/html/search/classes_1.js new file mode 100644 index 0000000..733b6e9 --- /dev/null +++ b/Doxy/html/search/classes_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['face',['face',['../structface.html',1,'']]] +]; diff --git a/Doxy/html/search/defines_0.js b/Doxy/html/search/defines_0.js index ce58e68..23371d0 100644 --- a/Doxy/html/search/defines_0.js +++ b/Doxy/html/search/defines_0.js @@ -1,4 +1,4 @@ var searchData= [ - ['jeu',['JEU',['../_kirby_track_8c.html#afb63dbc6e533233f41d03e8b8a3bc570',1,'KirbyTrack.c']]] + ['jeu',['JEU',['../fonction_8h.html#afb63dbc6e533233f41d03e8b8a3bc570',1,'fonction.h']]] ]; diff --git a/Doxy/html/search/defines_1.js b/Doxy/html/search/defines_1.js index 303a63b..c77d5d7 100644 --- a/Doxy/html/search/defines_1.js +++ b/Doxy/html/search/defines_1.js @@ -1,4 +1,4 @@ var searchData= [ - ['kirby',['KIRBY',['../_kirby_track_8c.html#a9270f8e0b3866a58cfa3a7173da21abd',1,'KirbyTrack.c']]] + ['kirby',['KIRBY',['../fonction_8h.html#a9270f8e0b3866a58cfa3a7173da21abd',1,'fonction.h']]] ]; diff --git a/Doxy/html/search/defines_2.js b/Doxy/html/search/defines_2.js index d2158f4..696612f 100644 --- a/Doxy/html/search/defines_2.js +++ b/Doxy/html/search/defines_2.js @@ -1,4 +1,4 @@ var searchData= [ - ['sfml',['SFML',['../_kirby_track_8c.html#a28c9f30d423e9c1ca6fa15a0ec9a0032',1,'KirbyTrack.c']]] + ['max_5fface',['MAX_FACE',['../fonction_8h.html#a12190c71ff3acb9694bb2f782a1dfcdb',1,'fonction.h']]] ]; diff --git a/Doxy/html/search/defines_3.html b/Doxy/html/search/defines_3.html new file mode 100644 index 0000000..e575d66 --- /dev/null +++ b/Doxy/html/search/defines_3.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/Doxy/html/search/defines_3.js b/Doxy/html/search/defines_3.js new file mode 100644 index 0000000..878216e --- /dev/null +++ b/Doxy/html/search/defines_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['sfml',['SFML',['../fonction_8h.html#a28c9f30d423e9c1ca6fa15a0ec9a0032',1,'fonction.h']]] +]; diff --git a/Doxy/html/search/files_0.js b/Doxy/html/search/files_0.js index 54b92d3..5a7535b 100644 --- a/Doxy/html/search/files_0.js +++ b/Doxy/html/search/files_0.js @@ -1,4 +1,5 @@ var searchData= [ - ['kirbytrack_2ec',['KirbyTrack.c',['../_kirby_track_8c.html',1,'']]] + ['fonction_2ec',['fonction.c',['../fonction_8c.html',1,'']]], + ['fonction_2eh',['fonction.h',['../fonction_8h.html',1,'']]] ]; diff --git a/Doxy/html/search/files_1.html b/Doxy/html/search/files_1.html new file mode 100644 index 0000000..eca1c80 --- /dev/null +++ b/Doxy/html/search/files_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/Doxy/html/search/files_1.js b/Doxy/html/search/files_1.js new file mode 100644 index 0000000..54b92d3 --- /dev/null +++ b/Doxy/html/search/files_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['kirbytrack_2ec',['KirbyTrack.c',['../_kirby_track_8c.html',1,'']]] +]; diff --git a/Doxy/html/search/files_2.html b/Doxy/html/search/files_2.html new file mode 100644 index 0000000..04a8a46 --- /dev/null +++ b/Doxy/html/search/files_2.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/Doxy/html/search/files_2.js b/Doxy/html/search/files_2.js new file mode 100644 index 0000000..abf5379 --- /dev/null +++ b/Doxy/html/search/files_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['navy_2ec',['Navy.c',['../_navy_8c.html',1,'']]] +]; diff --git a/Doxy/html/search/functions_0.js b/Doxy/html/search/functions_0.js index d8833e9..5ac54b7 100644 --- a/Doxy/html/search/functions_0.js +++ b/Doxy/html/search/functions_0.js @@ -1,6 +1,6 @@ var searchData= [ - ['affichage_5fconfig',['affichage_config',['../_kirby_track_8c.html#acc438fce8178d1d5aac4595f19529275',1,'KirbyTrack.c']]], - ['affichage_5ftracking',['Affichage_Tracking',['../_kirby_track_8c.html#a91b1b1daf28d90b5299a9a0486f5bdf1',1,'KirbyTrack.c']]], - ['ajust_5fpos',['ajust_pos',['../_kirby_track_8c.html#ae89e5fc7460ea890fa61d54fd209c1ae',1,'KirbyTrack.c']]] + ['affichage_5fconfig',['affichage_config',['../fonction_8c.html#acc438fce8178d1d5aac4595f19529275',1,'affichage_config(IplImage *frame, IplImage *HSV, IplImage *Binaire): fonction.c'],['../fonction_8h.html#acc438fce8178d1d5aac4595f19529275',1,'affichage_config(IplImage *frame, IplImage *HSV, IplImage *Binaire): fonction.c']]], + ['affichage_5ftracking',['Affichage_Tracking',['../fonction_8c.html#a91b1b1daf28d90b5299a9a0486f5bdf1',1,'Affichage_Tracking(IplImage *frame, int posX, int posY, int width, int height): fonction.c'],['../fonction_8h.html#a91b1b1daf28d90b5299a9a0486f5bdf1',1,'Affichage_Tracking(IplImage *frame, int posX, int posY, int width, int height): fonction.c']]], + ['ajust_5fpos',['ajust_pos',['../fonction_8c.html#ae89e5fc7460ea890fa61d54fd209c1ae',1,'ajust_pos(int pos, int ref): fonction.c'],['../fonction_8h.html#ae89e5fc7460ea890fa61d54fd209c1ae',1,'ajust_pos(int pos, int ref): fonction.c']]] ]; diff --git a/Doxy/html/search/functions_1.js b/Doxy/html/search/functions_1.js index 3cdfa7c..b788ca9 100644 --- a/Doxy/html/search/functions_1.js +++ b/Doxy/html/search/functions_1.js @@ -1,5 +1,5 @@ var searchData= [ - ['config',['config',['../_kirby_track_8c.html#adcdd0544c8eb462cd2835ec99fa0f181',1,'KirbyTrack.c']]], - ['controle_5fmoteur',['controle_moteur',['../_kirby_track_8c.html#ad3f512a54511a63b30a8967077736766',1,'KirbyTrack.c']]] + ['config',['config',['../fonction_8c.html#adcdd0544c8eb462cd2835ec99fa0f181',1,'config(int *LowH, int *HighH, int *LowS, int *HighS, int *LowV, int *HighV): fonction.c'],['../fonction_8h.html#adcdd0544c8eb462cd2835ec99fa0f181',1,'config(int *LowH, int *HighH, int *LowS, int *HighS, int *LowV, int *HighV): fonction.c']]], + ['controle_5fmoteur',['controle_moteur',['../fonction_8c.html#ad3f512a54511a63b30a8967077736766',1,'controle_moteur(double *angle): fonction.c'],['../fonction_8h.html#ad3f512a54511a63b30a8967077736766',1,'controle_moteur(double *angle): fonction.c']]] ]; diff --git a/Doxy/html/search/functions_2.js b/Doxy/html/search/functions_2.js index 17d116a..8b4efb4 100644 --- a/Doxy/html/search/functions_2.js +++ b/Doxy/html/search/functions_2.js @@ -1,4 +1,4 @@ var searchData= [ - ['limite_5fmoteur',['limite_moteur',['../_kirby_track_8c.html#a9397b95e9279b0b9cd371c9a2b4514a2',1,'KirbyTrack.c']]] + ['detect_5fand_5fdraw',['detect_and_draw',['../fonction_8c.html#ab9c63795209f514f5d3554bc9450b8de',1,'detect_and_draw(IplImage *img, CvHaarClassifierCascade *cascade, face **tab_face): fonction.c'],['../fonction_8h.html#ab9c63795209f514f5d3554bc9450b8de',1,'detect_and_draw(IplImage *img, CvHaarClassifierCascade *cascade, face **tab_face): fonction.c']]] ]; diff --git a/Doxy/html/search/functions_3.js b/Doxy/html/search/functions_3.js index 4c10f10..b6b3632 100644 --- a/Doxy/html/search/functions_3.js +++ b/Doxy/html/search/functions_3.js @@ -1,5 +1,5 @@ var searchData= [ - ['main',['main',['../_kirby_track_8c.html#a0ddf1224851353fc92bfbff6f499fa97',1,'KirbyTrack.c']]], - ['maj_5fangle',['maj_angle',['../_kirby_track_8c.html#a93cca84f54fe35dc9ad87eac3583889b',1,'KirbyTrack.c']]] + ['image_5fcv2sfml',['image_CV2SFML',['../fonction_8c.html#ad2cc53a42ff2450413bbb199bb4c1072',1,'image_CV2SFML(IplImage *imcv, sf::Image imFlux): fonction.c'],['../fonction_8h.html#ad2cc53a42ff2450413bbb199bb4c1072',1,'image_CV2SFML(IplImage *imcv, sf::Image imFlux): fonction.c']]], + ['init_5fcascade',['init_cascade',['../fonction_8c.html#a5e1058b3e8eb605a74ffdd7a26637b1e',1,'init_cascade(): fonction.c'],['../fonction_8h.html#a942c8619bb73ca7c3bb7e6fcf1875294',1,'init_cascade(): fonction.c']]] ]; diff --git a/Doxy/html/search/functions_4.js b/Doxy/html/search/functions_4.js index 379736e..97fc930 100644 --- a/Doxy/html/search/functions_4.js +++ b/Doxy/html/search/functions_4.js @@ -1,4 +1,4 @@ var searchData= [ - ['position_5fmoy',['Position_moy',['../_kirby_track_8c.html#ac3e9405c4ebaa936308670c050285ae1',1,'KirbyTrack.c']]] + ['limite_5fmoteur',['limite_moteur',['../fonction_8c.html#a9397b95e9279b0b9cd371c9a2b4514a2',1,'limite_moteur(int val_pwm): fonction.c'],['../fonction_8h.html#a9397b95e9279b0b9cd371c9a2b4514a2',1,'limite_moteur(int val_pwm): fonction.c']]] ]; diff --git a/Doxy/html/search/functions_5.js b/Doxy/html/search/functions_5.js index 4a0ff6f..8e9b9f0 100644 --- a/Doxy/html/search/functions_5.js +++ b/Doxy/html/search/functions_5.js @@ -1,4 +1,5 @@ var searchData= [ - ['traitement',['traitement',['../_kirby_track_8c.html#a96b1dd5c66492425a00921b6eaaacc89',1,'KirbyTrack.c']]] + ['main',['main',['../_kirby_track_8c.html#a0ddf1224851353fc92bfbff6f499fa97',1,'KirbyTrack.c']]], + ['maj_5fangle',['maj_angle',['../fonction_8c.html#a93cca84f54fe35dc9ad87eac3583889b',1,'maj_angle(int vecX, int vecY, int rayon, double *angle): fonction.c'],['../fonction_8h.html#a93cca84f54fe35dc9ad87eac3583889b',1,'maj_angle(int vecX, int vecY, int rayon, double *angle): fonction.c']]] ]; diff --git a/Doxy/html/search/functions_6.html b/Doxy/html/search/functions_6.html new file mode 100644 index 0000000..c9faaa6 --- /dev/null +++ b/Doxy/html/search/functions_6.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/Doxy/html/search/functions_6.js b/Doxy/html/search/functions_6.js new file mode 100644 index 0000000..189c7f7 --- /dev/null +++ b/Doxy/html/search/functions_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['position_5fmoy',['Position_moy',['../fonction_8c.html#ac3e9405c4ebaa936308670c050285ae1',1,'Position_moy(IplImage *Binaire, int *posX, int *posY): fonction.c'],['../fonction_8h.html#ac3e9405c4ebaa936308670c050285ae1',1,'Position_moy(IplImage *Binaire, int *posX, int *posY): fonction.c']]] +]; diff --git a/Doxy/html/search/functions_7.html b/Doxy/html/search/functions_7.html new file mode 100644 index 0000000..ec330da --- /dev/null +++ b/Doxy/html/search/functions_7.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/Doxy/html/search/functions_7.js b/Doxy/html/search/functions_7.js new file mode 100644 index 0000000..763aae7 --- /dev/null +++ b/Doxy/html/search/functions_7.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['traitement',['traitement',['../fonction_8c.html#a96b1dd5c66492425a00921b6eaaacc89',1,'traitement(IplImage *frame, IplImage *HSV, IplImage *Binaire, int LowH, int HighH, int LowS, int HighS, int LowV, int HighV): fonction.c'],['../fonction_8h.html#a96b1dd5c66492425a00921b6eaaacc89',1,'traitement(IplImage *frame, IplImage *HSV, IplImage *Binaire, int LowH, int HighH, int LowS, int HighS, int LowV, int HighV): fonction.c']]] +]; diff --git a/Doxy/html/search/functions_8.html b/Doxy/html/search/functions_8.html new file mode 100644 index 0000000..afd4fac --- /dev/null +++ b/Doxy/html/search/functions_8.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/Doxy/html/search/functions_8.js b/Doxy/html/search/functions_8.js new file mode 100644 index 0000000..763aae7 --- /dev/null +++ b/Doxy/html/search/functions_8.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['traitement',['traitement',['../fonction_8c.html#a96b1dd5c66492425a00921b6eaaacc89',1,'traitement(IplImage *frame, IplImage *HSV, IplImage *Binaire, int LowH, int HighH, int LowS, int HighS, int LowV, int HighV): fonction.c'],['../fonction_8h.html#a96b1dd5c66492425a00921b6eaaacc89',1,'traitement(IplImage *frame, IplImage *HSV, IplImage *Binaire, int LowH, int HighH, int LowS, int HighS, int LowV, int HighV): fonction.c']]] +]; diff --git a/Doxy/html/search/pages_0.html b/Doxy/html/search/pages_0.html new file mode 100644 index 0000000..c51c834 --- /dev/null +++ b/Doxy/html/search/pages_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/Doxy/html/search/pages_0.js b/Doxy/html/search/pages_0.js new file mode 100644 index 0000000..8d42650 --- /dev/null +++ b/Doxy/html/search/pages_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['bug_20list',['Bug List',['../bug.html',1,'']]] +]; diff --git a/Doxy/html/search/pages_1.html b/Doxy/html/search/pages_1.html new file mode 100644 index 0000000..2a98fce --- /dev/null +++ b/Doxy/html/search/pages_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/Doxy/html/search/pages_1.js b/Doxy/html/search/pages_1.js new file mode 100644 index 0000000..441b2de --- /dev/null +++ b/Doxy/html/search/pages_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['todo_20list',['Todo List',['../todo.html',1,'']]] +]; diff --git a/Doxy/html/search/search.js b/Doxy/html/search/search.js index 3164801..5aa94f6 100644 --- a/Doxy/html/search/search.js +++ b/Doxy/html/search/search.js @@ -7,18 +7,24 @@ var indexSectionsWithContent = { - 0: "acjklmpst", - 1: "k", - 2: "aclmpt", - 3: "jks" + 0: "_abcdfijklmnpst", + 1: "_f", + 2: "fkn", + 3: "acdilmpt", + 4: "lp", + 5: "jkms", + 6: "bt" }; var indexSectionNames = { 0: "all", - 1: "files", - 2: "functions", - 3: "defines" + 1: "classes", + 2: "files", + 3: "functions", + 4: "variables", + 5: "defines", + 6: "pages" }; function convertToId(search) diff --git a/Doxy/html/search/typedefs_0.html b/Doxy/html/search/typedefs_0.html new file mode 100644 index 0000000..8d6b78f --- /dev/null +++ b/Doxy/html/search/typedefs_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/Doxy/html/search/typedefs_0.js b/Doxy/html/search/typedefs_0.js new file mode 100644 index 0000000..717fc6f --- /dev/null +++ b/Doxy/html/search/typedefs_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['face',['face',['../fonction_8h.html#aa1b85a6249980781b9354232e9bd2408',1,'fonction.h']]] +]; diff --git a/Doxy/html/search/typedefs_1.html b/Doxy/html/search/typedefs_1.html new file mode 100644 index 0000000..455fe2b --- /dev/null +++ b/Doxy/html/search/typedefs_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/Doxy/html/search/typedefs_1.js b/Doxy/html/search/typedefs_1.js new file mode 100644 index 0000000..34098c6 --- /dev/null +++ b/Doxy/html/search/typedefs_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['pface',['pface',['../fonction_8h.html#a77e86465703f18d4b5dc36ce5c34d609',1,'fonction.h']]] +]; diff --git a/Doxy/html/search/variables_0.html b/Doxy/html/search/variables_0.html new file mode 100644 index 0000000..1b8adc9 --- /dev/null +++ b/Doxy/html/search/variables_0.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/Doxy/html/search/variables_0.js b/Doxy/html/search/variables_0.js new file mode 100644 index 0000000..eabf52a --- /dev/null +++ b/Doxy/html/search/variables_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['largeur',['largeur',['../struct__face.html#aa08c659931ad517a99d28131c5bb22fe',1,'_face']]] +]; diff --git a/Doxy/html/search/variables_1.html b/Doxy/html/search/variables_1.html new file mode 100644 index 0000000..78f63cd --- /dev/null +++ b/Doxy/html/search/variables_1.html @@ -0,0 +1,26 @@ + + + + + + + + + +
+
Loading...
+
+ +
Searching...
+
No Matches
+ +
+ + diff --git a/Doxy/html/search/variables_1.js b/Doxy/html/search/variables_1.js new file mode 100644 index 0000000..271af82 --- /dev/null +++ b/Doxy/html/search/variables_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['point',['point',['../struct__face.html#a03aff2c43bbe1ff2add8e60729d1836a',1,'_face']]] +]; diff --git a/Doxy/html/struct__face-members.html b/Doxy/html/struct__face-members.html new file mode 100644 index 0000000..d41307a --- /dev/null +++ b/Doxy/html/struct__face-members.html @@ -0,0 +1,126 @@ + + + + + + +CamAdventure: Member List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
CamAdventure +
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
_face Member List
+
+
+ +

This is the complete list of members for _face, including all inherited members.

+ + + +
largeur_face
point_face
+
+ + + + diff --git a/Doxy/html/struct__face.html b/Doxy/html/struct__face.html new file mode 100644 index 0000000..1412e2d --- /dev/null +++ b/Doxy/html/struct__face.html @@ -0,0 +1,170 @@ + + + + + + +CamAdventure: _face Struct Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
CamAdventure +
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ +
+
_face Struct Reference
+
+
+ + + + + + +

+Public Attributes

CvPoint point
 
int largeur
 
+

Detailed Description

+
+

Definition at line 65 of file fonction.h.

+

Member Data Documentation

+ +
+
+ + + + +
int _face::largeur
+
+

largeur de la face

+ +

Definition at line 67 of file fonction.h.

+ +
+
+ +
+
+ + + + +
CvPoint _face::point
+
+

coordonnées en x et y du centre de la face

+ +

Definition at line 66 of file fonction.h.

+ +
+
+
The documentation for this struct was generated from the following file:
    +
  • /nfs/home/sasl/eleves/rob/3408212/rob3-projetsinfo-g15-2017/Code/fonction.h
  • +
+
+
+ + + + diff --git a/Doxy/html/struct__face.js b/Doxy/html/struct__face.js new file mode 100644 index 0000000..bde4e71 --- /dev/null +++ b/Doxy/html/struct__face.js @@ -0,0 +1,5 @@ +var struct__face = +[ + [ "largeur", "struct__face.html#aa08c659931ad517a99d28131c5bb22fe", null ], + [ "point", "struct__face.html#a03aff2c43bbe1ff2add8e60729d1836a", null ] +]; \ No newline at end of file diff --git a/Doxy/html/structface.html b/Doxy/html/structface.html new file mode 100644 index 0000000..eaacbab --- /dev/null +++ b/Doxy/html/structface.html @@ -0,0 +1,139 @@ + + + + + + +CamAdventure: face Struct Reference + + + + + + + + + + + + + +
+
+ + + + + + + +
+
CamAdventure +
+
+
+ + + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
face Struct Reference
+
+
+ +

Contient les informations sur chaque face détectée : positions, largeur. + More...

+ +

#include <fonction.h>

+

Detailed Description

+

Contient les informations sur chaque face détectée : positions, largeur.

+
Parameters
+ + + +
pointcoordonnées en x et y du centre de la face
largeurlargeur de la face
+
+
+

The documentation for this struct was generated from the following file:
    +
  • /nfs/home/sasl/eleves/rob/3408212/rob3-projetsinfo-g15-2017/Code/fonction.h
  • +
+
+
+ + + + diff --git a/Doxy/html/todo.html b/Doxy/html/todo.html new file mode 100644 index 0000000..555da41 --- /dev/null +++ b/Doxy/html/todo.html @@ -0,0 +1,118 @@ + + + + + + +CamAdventure: Todo List + + + + + + + + + + + + + +
+
+ + + + + + + +
+
CamAdventure +
+
+
+ + + + +
+
+ +
+
+
+ +
+ + + + +
+ +
+ +
+
+
Todo List
+
+
+
+
File KirbyTrack.c
+
Optimisation du chargement de la frame en image SFML
+
+
+
+ + + +