1 / 24

ARToolkit

ARToolkit. Augmented Reality Toolkit. N G U K Y E E T N T Y. P O N J R O O N Y A T H A N. Ce que nous allons présenter…. Introduction Architecture Installation Principes de développement Tout ce qu’on peut faire avec… Limitations Outils autour de ARToolkit Demo.

gwen
Download Presentation

ARToolkit

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ARToolkit Augmented Reality Toolkit N G U K Y E E T N T Y P O N J R O O N Y A T H A N

  2. Ce que nous allons présenter… • Introduction • Architecture • Installation • Principes de développement • Tout ce qu’on peut faire avec… • Limitations • Outils autour de ARToolkit • Demo NGUYEN Ketty & PONROY Jonathan = 2 =

  3. Qu’est-ceArchitecture Installation Développement Possibilités Limitations Outils Demo En quelques mots… • Librairie C/C++ avec des outils vidéo • Fonctions prédéfinies • Utilisation des différents outils • Réalité augmentée en temps réel Introduction d’objets 3D dans le monde réel par marqueurs NGUYEN Ketty & PONROY Jonathan = 3 =

  4. Qu’est-ceArchitecture Installation Développement Possibilités Limitations Outils Demo Architecture • OpenGL pour le rendu • GLUT pour les évènements et dépendance hardware de la librairie video • API standard sur chaque platform (e.g win32 pour Windows) NGUYEN Ketty & PONROY Jonathan = 4 =

  5. Qu’est-ceArchitecture Installation Développement Possibilités LimitationsOutils Demo Structure • L’utilisateur peut facilement remplacer un module par un autre • Flux de données NGUYEN Ketty & PONROY Jonathan = 5 =

  6. Qu’est-ceArchitecture Installation Développement Possibilités Limitations Outils Demo Installation • Le site http://www.hitl.washington.edu/artoolkit/(section documentation setup ARToolkit) donne la liste des éléments à télécharger • ARToolkit • Glut • Librairies pour la webcam • ReadMe disponible pour chaque application expliquant toute la procédure à suivre • Multi-plateforme : Windows, Linux et Mac NGUYEN Ketty & PONROY Jonathan = 6 =

  7. Qu’est-ceArchitecture Installation Développement Possibilités LimitationsOutils Demo Principes de développement Le fonctionnement global NGUYEN Ketty & PONROY Jonathan = 7 =

  8. Qu’est-ceArchitecture Installation Développement Possibilités LimitationsOutils Demo Chargement d'une image static void mainLoop(void) { static int contF = 0; ARUint8 *dataPtr; ARMarkerInfo *marker_info; int marker_num; int j, k; /* grab a vide frame */ if( (dataPtr = (ARUint8 *)arVideoGetImage()) == NULL ) { arUtilSleep(2); return; } if( count == 0 ) arUtilTimerReset(); count++; argDrawMode2D(); ... NGUYEN Ketty & PONROY Jonathan = 8 =

  9. Qu’est-ceArchitecture Installation Développement Possibilités LimitationsOutils Demo Détection du marqueur ..... /* grab a vide frame */ if( (dataPtr = (ARUint8 *)arVideoGetImage()) == NULL ) { arUtilSleep(2); return; } if( count == 0 ) arUtilTimerReset(); count++; argDrawMode2D(); argDispImage( dataPtr, 0,0 ); /* detect the markers in the video frame */ if( arDetectMarker(dataPtr, thresh, &marker_info, &marker_num) < 0 ) { cleanup(); exit(0); } arVideoCapNext(); ..... NGUYEN Ketty & PONROY Jonathan = 9 =

  10. Qu’est-ceArchitecture Installation Développement Possibilités LimitationsOutils Demo Reconnaissance du symbole .... if( arDetectMarker(dataPtr, thresh, &marker_info, &marker_num) < 0 ) { cleanup(); exit(0); } arVideoCapNext(); /* check for object visibility */ k = -1; for( j = 0; j < marker_num; j++ ) { if( patt_id == marker_info[j].id ) { if( k == -1 ) k = j; else if( marker_info[k].cf < marker_info[j].cf ) k = j; } } if( k == -1 ) { .... NGUYEN Ketty & PONROY Jonathan = 10 =

  11. Qu’est-ceArchitecture Installation Développement Possibilités LimitationsOutils Demo Calcul de la matrice de transformation .... /* check for object visibility */ .... /* get the transformation between the marker and the real camera */ arGetTransMat(&marker_info[k], patt_center, patt_width, patt_trans); draw(); argSwapBuffers(); } NGUYEN Ketty & PONROY Jonathan = 11 =

  12. Qu’est-ceArchitecture Installation Développement Possibilités Limitations Outils Demo Ajout des objets 3D static void draw( void ) { .... /* load the camera transformation matrix */ argConvGlpara(patt_trans, gl_para); glMatrixMode(GL_MODELVIEW); glLoadMatrixd( gl_para ); glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); glLightfv(GL_LIGHT0, GL_POSITION, light_position); glLightfv(GL_LIGHT0, GL_AMBIENT, ambi); glLightfv(GL_LIGHT0, GL_DIFFUSE, lightZeroColor); glMaterialfv(GL_FRONT, GL_SPECULAR, mat_flash); glMaterialfv(GL_FRONT, GL_SHININESS, mat_flash_shiny); glMaterialfv(GL_FRONT, GL_AMBIENT, mat_ambient); glMatrixMode(GL_MODELVIEW); //glTranslatef( 0.0, 0.0, 25.0 ); glTranslatef( 0, 0, 25.0 ); glutSolidCube(50.0); glDisable( GL_LIGHTING ); glDisable( GL_DEPTH_TEST ); NGUYEN Ketty & PONROY Jonathan = 12 =

  13. Qu’est-ceArchitecture Installation Développement Possibilités LimitationsOutils Demo • Un fichier contient l’ensemble des patterns à reconnaître pendant la session • Description du pattern comme suit • Nom • Fichier du pattern • Largeur du marqueur • Centre du marqueur Tout ce qu'on peut faire avec ... Utiliser plusieurs patterns simultanément Ex: #pattern1 cone Data/patt.hiro 80.0 0.0 0.0 NGUYEN Ketty & PONROY Jonathan = 13 =

  14. Qu’est-ceArchitecture Installation Développement Possibilités LimitationsOutils Demo Créer ses propres patterns avec bin/mk_patt NGUYEN Ketty & PONROY Jonathan = 14 =

  15. Qu’est-ceArchitecture Installation Développement Possibilités LimitationsOutils Demo Utilisation du pattern au niveau du code char *patt_name = "Data/patt.hiro"; ..... static void init( void ) { .... arParamChangeSize( &wparam, xsize, ysize, &cparam ); arInitCparam( &cparam ); printf("*** Camera Parameter ***\n"); arParamDisp( &cparam ); if( (patt_id=arLoadPatt(patt_name)) < 0 ) { printf("pattern load error !!\n"); exit(0); } /* open the graphics window */ argInit( &cparam, 1.0, 0, 0, 0, 0 ); } NGUYEN Ketty & PONROY Jonathan = 15 =

  16. Qu’est-ceArchitecture Installation Développement Possibilités Limitations Outils Demo Deux types de calibration (one step, two step) • Two step • Imprimer calib_cpara.pdf et calib_dist.pdf • Lancer calib_dist avant calib_cpara Calibrer la caméra NGUYEN Ketty & PONROY Jonathan = 16 =

  17. Qu’est-ceArchitecture Installation Développement Possibilités Limitations Outils Demo calib_dist • Prendre une autre image et répéter le processus 5 à 10 fois avec des angles de vues différents pour avoir une calibration plus précise • Ce programme donne le facteur de distorsion et les coordonnées du centre de l'image NGUYEN Ketty & PONROY Jonathan = 17 =

  18. Qu’est-ceArchitecture Installation Développement Possibilités LimitationsOutils Demo • Pour trouver la focale et autres paramètres • Entrer les données fournies par calib_dist • Reculer l’image de la caméra • Répéter le processus 5 fois calib_cparam NGUYEN Ketty & PONROY Jonathan = 18 =

  19. Qu’est-ceArchitecture Installation Développement Possibilités LimitationsOutils Demo Pour personnaliser… Par défaut Espacement entre les points : 40mm Distance d’éloignement à la caméra : 100mm Nombre de fois à répéter la procédure : 5 inter_coord[k][j][i+7][0] = 40.0*i;inter_coord[k][j][i+7][1] = 40.0*j; inter_coord[k][j][i+7][2] = 100.0*k; *loop_num = 5; NGUYEN Ketty & PONROY Jonathan = 19 =

  20. Qu’est-ceArchitecture Installation DéveloppementPossibilitésLimitationsOutilsDemo Limitations • Limitations matérielles • Reconnaissance de pattern • Ne pas cacher la moindre zone du pattern • Etre dans de bonnes conditions lumineuses • Avoir des patterns simples • Une vue proche du pattern révèle des sauts si la fonction d'historique n'est pas utilisée • Détection de patterns2D et pas patterns3D NGUYEN Ketty & PONROY Jonathan = 20 =

  21. Qu’est-ceArchitecture Installation DéveloppementPossibilitésLimitationsOutils Demo Module de support du VRML Adaptation pour java Adaptation pour pocket pc Version pour matlab Version améliorée de ARToolkit Outils autour de ARToolkit Modules supplémentaires Outils de création de nouveaux patterns Adaptations Améliorations NGUYEN Ketty & PONROY Jonathan = 21 =

  22. Qu’est-ceArchitecture Installation DéveloppementPossibilitésLimitationsOutils Demo Améliorations • Site sur ARToolkit Plus : • Amélioration sur conditions de luminosité http://studierstube.icg.tu-graz.ac.at/handheld_ar/artoolkitplus.php • Real-time Augmented Reality: • Système de tracking robuste http://www.cv.iit.nrc.ca/research/ar NGUYEN Ketty & PONROY Jonathan = 22 =

  23. Qu’est-ceArchitecture Installation DéveloppementPossibilités Outils LimitationsDemo DEMO NGUYEN Ketty & PONROY Jonathan = 23 =

More Related