Download presentation
Presentation is loading. Please wait.
Published byDomenic Bishop Modified over 9 years ago
1
Kim, Sung-Ho School of Computer, Information and Communication Engineering Sangji Univ.
2
Compile simpleVRML with OpenVRML How does ARToolkit work? Tutorials References Contents Contents
3
OpenVRML 로 simpleVRML 컴파일하기 – Setting OpenGL Library – Download libpng-1.2.8.exe – Delete OpenVRML\dependencies\lib\libpng.lib Install libpng-1.2.8.exe – Copy C:\Program Files\GnuWin32\lib\libpng.lib to OpenVRML\dependencies\lib – Download jpeg-6b-4.exe – Delete OpenVRML\dependencies\lib\libjpeg.lib – Install jpeg-6b-4.exe – Copy C:\Program Files\GnuWin32\lib\jpeg.lib to OpenVRML\dependencies\lib – Rename it from jpeg.lib to libjpeg.lib – Copy jpeg62.dll, and libpng13.dll, and zlib1.dll from C:\Program Files\GnuWin32\bin to {ARToolKit}\bin – Copy msvcp71d.dll & msvcr71d.dll to {ARToolKit}\bin Compile simpleVRML with OpenVRML Compile simpleVRML with OpenVRML
4
OpenVRML 로 simpleVRML 컴파일하기 ( 계속 ) – OpenVRML/src/openvrml-0.14.3/ide-projects/windows/VisualC7/OpenVRML 에서 OpenVRML.sln 파일을 MS Visual Studio 에서 열기 – Compile antlr project (Debug mode) AST.hpp & Token.hpp Error : inline operator <(RefToken l, RefToken r); // {return true; } => int inline operator <(RefToken l, RefToken r); // {return true; } – lookat project Pass – Compile openvrml project If error : std::_Equal … http://www.boost.org/ 에서 boost download, OpenGL Lib 와 같은 방법으로 배치 및 MS Visual Studio 의 Include, lib 에 폴더 등록 http://www.boost.org/ img.cpp 파일의 40 번째 라인에 삽입 – JPEG 관련 오류 방지 #define XMD_H #ifdef FAR #undef FAR #endif Project Properties > Configuration Properties > C/C++ > Preprocessor > Preprocessor Definitions (Debug mode & Release mode) 에 OPENVRML_ENABLE_IMAGETEXTURE_NODE 및 OPENVRML_ENABLE_GZIP 삽입 Compile simpleVRML with OpenVRML (Continued…) Compile simpleVRML with OpenVRML (Continued…)
5
OpenVRML 로 simpleVRML 컴파일하기 ( 계속 ) – Compile openvrml-gl project & regex project Error : size_t regerror(errcode, preg, errbuf, errbuf_size) int errcode; …… => size_t regerror(int errcode, const regex_t *preg, char *errbuf, size_t errbuf_size) … – Setting Project antlr, openvrml, openvrml-gl and regex Project > Properties > Configuration Properties > Librarian > General > Output File Release mode : $(OutDir)/*.lib, Debug mode : $(OutDir)/*d.lib – Rebuild Resolution 각각의 Release & Debug 폴더 삭제 후 Debug & Release mode 각각에 대한 Rebuild Solution Compile simpleVRML with OpenVRML (Continued…) Compile simpleVRML with OpenVRML (Continued…)
6
OpenVRML 로 simpleVRML 컴파일하기 ( 계속 ) – Copy OpenVRML\antlr\Release\antlr.lib to OpenVRML\lib – Copy OpenVRML\openvrml\Release\openvrml.lib to OpenVRML\lib – Copy OpenVRML\openvrml-gl\Release\openvrml-gl.lib to OpenVRML\lib – Copy OpenVRML\regex\Release\regex.lib to OpenVRML\lib – Copy antlrd.lib, antlr.lib, openvrmld.lib, openvrml.lib, openvrml-gld.lib, openvrml-gl.lib, regexd.lib, regex.lib to {ARToolKit}\lib Compile simpleVRML with OpenVRML (Continued…) Compile simpleVRML with OpenVRML (Continued…)
7
OpenVRML 로 simpleVRML 컴파일하기 ( 계속 ) – {ARToolkit}/ARToolkit.sln 을 MS Visual Studio 에서 열기 – libARvideo 의 Project > Properties > Configuration Properties > Linker > Input > Additional Dependencies (Debug mode) DSVLd.lib => DSVL.lib – simpleVRML 의 Project > Properties > Configuration Properties > Linker > Input > Additional Dependencies (Debug mode) opengl32.lib glu32.lib glut32.lib libARvrmld.lib libARvideod.lib libARd.lib liARgsub_lited.lib openvrmld.lib openvrml-gld.lib antlrd.lib regexd.lib ws2_32.lib libjpeg.lib libpng.lib zlib.lib – simpleVRML 의 Project > Properties > Configuration Properties > Debugging > Working Directory /bin – Rebuild Only simpleVRML Compile simpleVRML with OpenVRML (Continued…) Compile simpleVRML with OpenVRML (Continued…)
8
OpenVRML 로 simpleVRML 컴파일하기 ( 계속 ) – Project libARvrml Project > Properties > Configuration Properties > VC++ Directories > Include Directories 에 OpenVRML/include/openvrml 추가 Project > Properties > Configuration Properties > VC++ Directories > Include Directories 에 OpenVRML/dependencies/include 추가 Project > Properties > Configuration Properties > VC++ Directories > Library Directories 에 OpenVRML/lib 추가 Project > Properties > Configuration Properties > VC++ Directories > Library Directories 에 OpenVRML/dependencies/lib 추가 – Rebuild Only libARvrml (Debug mode & Release mode) Project > Properties > Configuration Properties > Librarian > General > Output File Release mode : $(OutDir)/*.lib, Debug mode : $(OutDir)/*d.lib Compile simpleVRML with OpenVRML (Continued…) Compile simpleVRML with OpenVRML (Continued…)
9
OpenVRML 로 simpleVRML 컴파일하기 ( 계속 ) – Project simpleVRML Project > Properties > Configuration Properties > Linker > Input > Additional Dependencies (Debug mode) – openvrmld.lib openvrml-gld.lib antlrd.lib regexd.lib 삽입 – Rebuild Only simpleVRML (Debug mode & Release mode) Project > Properties > Configuration Properties > Librarian > General > Output File Release mode : $(ProjectDir)../../bin/$(ProjectName).exe Debug mode : $(ProjectDir)../../bin/$(ProjectName)d.exe – If error 발생시 Project > Properties > Configuration Properties > Linker > Input > Additional Dependencies (Debug mode) – libc.lib libcd.lib libcmt.lib libcmtd.lib msvcrt.lib 삭제 Camera parameter 관련 Error – simpleVRML 의 Project > Properties > Configuration Properties > Debugging > Working Directory 를 /bin 으로 변경 Compile simpleVRML with OpenVRML (Continued…) Compile simpleVRML with OpenVRML (Continued…) 실행은 Release mode 에서만 가능 실행은 Release mode 에서만 가능
10
Basic Principles of ARToolkit – The camera captures video of the real world and sends it to the computer. – Software on the computer searches through each video frame for any square shapes. – If a square is found, the software uses some mathematics to calculate the position of the camera relative to the black square. – Once the position of the camera is known a computer graphics model is drawn from that same position. – This model is drawn on top of the video of the real world and so appears stuck on the square marker. – The final output is shown back in the handheld display, so when the user looks through the display they see graphics overlaid on the real world How does ARToolkit work? How does ARToolkit work?
11
Basic Principles of ARToolkit (Continued…) How does ARToolkit work? (Continued…) How does ARToolkit work? (Continued…)
12
Limitations of ARToolkit – If users cover up part of the pattern with their hands or other objects the virtual object will disappear. – There are also range issues : Tracking range for different sized patterns – This range is also affected somewhat by pattern complexity – Tracking is also affected by the marker orientation relative to the camera – The tracking results are also affected by lighting conditions How does ARToolkit work? (Continued…) How does ARToolkit work? (Continued…) Pattern Size(inches)Usable Range(inches) 2.7516 3.5025 4.2534 7.3750
13
How does ARToolkit work? (Continued..) How does ARToolkit work? (Continued..) Steps of ARToolkit static void mainLoop(void) { static int contF = 0; ARUint8 *dataPtr; ARMarkerInfo *marker_info; int marker_num; int j, k; /* grab a video frame */ if( (dataPtr = (ARUint8 *)arVideoGetImage()) == NULL ) { arUtilSleep(2); return; } if( count == 0 ) arUtilTimerReset(); count++; argDrawMode2D();...
14
How does ARToolkit work? (Continued..) How does ARToolkit work? (Continued..) Steps of ARToolkit (Continued…)..... /* 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();.....
15
How does ARToolkit work? (Continued..) How does ARToolkit work? (Continued..) Steps of ARToolkit (Continued…).... 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 ) {....
16
How does ARToolkit work? (Continued..) How does ARToolkit work? (Continued..) Steps of ARToolkit (Continued…).... /* 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(); }
17
How does ARToolkit work? (Continued..) How does ARToolkit work? (Continued..) Steps of ARToolkit (Continued…) 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 ); ……
18
Tutorial 1 : Tracking Stability – http://www.hitl.washington.edu/artoolkit/documentation/tutorialhistory.htm http://www.hitl.washington.edu/artoolkit/documentation/tutorialhistory.htm Tutorial 2 : Camera and Marker Relationships – http://www.hitl.washington.edu/artoolkit/documentation/tutorialcamera.htm http://www.hitl.washington.edu/artoolkit/documentation/tutorialcamera.htm Tutorial 3 : Multi-Marker Tracking – http://www.hitl.washington.edu/artoolkit/documentation/tutorialmulti.htm http://www.hitl.washington.edu/artoolkit/documentation/tutorialmulti.htm Tutorial 4 : simpleLite – http://www.hitl.washington.edu/artoolkit/documentation/devstartup.htm http://www.hitl.washington.edu/artoolkit/documentation/devstartup.htm Tutorial 5 : simpleTest2 – http://www.hitl.washington.edu/artoolkit/documentation/tutorialhistory.htm http://www.hitl.washington.edu/artoolkit/documentation/tutorialhistory.htm Tutorial 6 : Recognized Multiple Patterns – http://www.hitl.washington.edu/artoolkit/documentation/devmulti.htm http://www.hitl.washington.edu/artoolkit/documentation/devmulti.htm Build Notes : ARToolkit & OpenVRML – Build Notes for running ARTOOLKIT integrated with OpenVRML on windows platform with Visual Studio 2005 Build Notes for running ARTOOLKIT integrated with OpenVRML on windows platform with Visual Studio 2005 ARToolkit for Dummies – http://isa.umh.es/vr2/euron06/doc/labs/ARToolkit_for_Dummies.pdf http://isa.umh.es/vr2/euron06/doc/labs/ARToolkit_for_Dummies.pdf ARToolkit Tutorials ARToolkit Tutorials
19
http://www.hitl.washington.edu/artoolkit/documentation/tutorialhistory.htm – ARToolkit/examples/simple2/ – ARToolkit/bin/simpleTest2.exe Tutorial : Tracking Stability Tutorial : Tracking Stability
20
http://www.hitl.washington.edu/artoolkit/documentation/tutorialcamera.htm – ARToolkit/examples/simple/ – ARToolkit/examples/exview/ Tutorial : Camera & Marker Relationships Tutorial : Camera & Marker Relationships
21
http://www.hitl.washington.edu/artoolkit/documentation/tutorialmulti.htm – ARToolkit/examples/multi/ – ARToolkit/bin/multiTest.exe Tutorial : Multi-Marker Tracking Tutorial : Multi-Marker Tracking
22
http://www.artoolworks.com/support/library/ARToolKit_tutorial_1:_First_simple_ ARToolKit_scene http://www.hitl.washington.edu/artoolkit/documentation/devstartup.htm – ARToolkit/examples/simpleLite/ Tutorial : simpleLite Tutorial : simpleLite
23
http://www.hitl.washington.edu/artoolkit/documentation/tutorialhistory.htm – ARToolkit/examples/simple2/ – ARToolkit/bin/simpleTest2.exe Tutorial : simpleTest2 Tutorial : simpleTest2
24
http://www.hitl.washington.edu/artoolkit/documentation/devmulti.htm – ARToolkit/examples/twoView/ Tutorial : Recognized Multiple Patterns Tutorial : Recognized Multiple Patterns
25
Add an include file – #include Use PlaySound() function – PlaySound(“file.wav”, NULL, SND_ASYNC); Another methods – FMOD (http://www.fmod.org) – Audiere (http://audiere.sourceforge.net/) Tutorial : Add Sound File Tutorial : Add Sound File
26
Texture Mapping Sample – Image & Movie Image & Movie Tutorial : Add Texture Mapping Tutorial : Add Texture Mapping
27
http://www.hitl.washington.edu/artoolkit/documentation/ http://isa.umh.es/vr2/euron06/doc/labs/ARToolkit_for_Dummies.pdf http://www.hitl.washington.edu/artoolkit/Papers http://gekko.tistory.com/45 http://www.artoolworks.com/ARToolKit_Professional.html http://www.pragprog.com/titles/cfar/augmented-reality http://jpyun56.wordpress.com/2010/01/18/augmented-reality- application%EB%93%A4/ http://www.se.rit.edu/~jrv/research/ar/ http://cafe.naver.com/opencv http://calmarea.net/?p=167 http://blog.naver.com/PostView.nhn?blogId=piccoro77&logNo=100064267687&vi ewDate=¤tPage=1&listtype=0&userTopListOpen=false&userTopListCount =5&userTopListManageOpen=false&userTopListCurrentPage=undefined http://shine10e.tistory.com/59 http://augmentedrealityindia.org/2011/10/09/artoolkit-n-openvrml/References References
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.