Kim, Sung-Ho School of Computer, Information and Communication Engineering Sangji Univ.

Slides:



Advertisements
Similar presentations
Programming with OpenGL - Getting started - Hanyang University Han Jae-Hyek.
Advertisements

CS 11 C track: lecture 7 Last week: structs, typedef, linked lists This week: hash tables more on the C preprocessor extern const.
Compilation and Debugging 101. Compilation in C/C++ hello.c Preprocessor Compiler stdio.h tmpXQ.i (C code) hello.o (object file)
 Currently there is no software solution that combines video and animation in to one platform.  Every single change drag changes in all of the environments.
Win8 on Intel Programming Course Desktop : Perceptual Computing Cédric Andreolli Intel.
Introduction to OpenCV Dr. Chung-Hao Chen Haole Guo Sep 2011.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
. Compilation / Pointers Debugging 101. Compilation in C/C++ hello.c Preprocessor Compiler stdio.h tmpXQ.i (C code) hello.o (object file)
OpenGL and Projections
Dojo/G3D Help Session CS196-2 Sunday 1/29. What is Dojo? Game engine Graphics: G3D 
Tutorial 7 Working with Multimedia. XP Objectives Explore various multimedia applications on the Web Learn about sound file formats and properties Embed.
Augmented Reality and 3D modelling Done by Stafford Joemat Supervised by Mr James Connan and Mr Mehrdad Ghaziasgar.
1 INF160 IS Development Environments AUBG, COS dept Lecture 06 Title: Dev Env: Code::Blocks (Extract from Syllabus) Reference:
Shape Recognition and Pose Estimation for Mobile Augmented Reality Author : N. Hagbi, J. El-Sana, O. Bergig, and M. Billinghurst Date : Speaker.
Computer Programming and Basic Software Engineering 9 Building Graphical User Interface Working with Unmanaged Code.
Computing IV Visual C Introduction with OpenCV Example Xinwen Fu.
3D Visualisation of Simulation Data. Informal Seminar 08/03/2004. By Chris Sweet.
CCS APPS CODE COVERAGE. CCS APPS Code Coverage Definition: –The amount of code within a program that is exercised Uses: –Important for discovering code.
Tutorial 7 Working with Multimedia. XP Objectives Explore various multimedia applications on the Web Learn about sound file formats and properties Embed.
Computer Programming for Engineers Introduction to Programming in C Language on Visual C Platform Intro. Comp. Prog. C-Language1.
C O M P U T E R G R A P H I C S Jie chen Computer graphic -- OpenGL Howto.
Using OpenGL in Visual C++ Opengl32.dll and glu32.dll should be in the system folder Opengl32.dll and glu32.dll should be in the system folder Opengl32.lib.
Speaker: Shau-Shiang Hung( 洪紹祥 ) advisor :Shu-Chen Cheng( 鄭淑真 ) Date : 2010/4/8 Computer Graphics and Applications, IEEE Publication Date : March-April.
Addison Wesley is an imprint of © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 5 Working with Images Starting Out with Games & Graphics in.
1 Useful Tools for Making Video Games Part V An overview of.
OpenGl Graphics Programming. Introduction OpenGL is a low-level graphics library specification. It makes available to the programmer a small set of geomteric.
Install and Setup VC++ and OpenGL Introduction to Computer Graphics and Animation (Principle of Computer Graphics) Rattapoom Waranusast.
Object Oriented Programming with C++/ Session 6 / 1 of 44 Multiple Inheritance and Polymorphism Session 6.
CS 450: COMPUTER GRAPHICS INSTALLING GLUT AND GLEW SPRING 2015 DR. MICHAEL J. REALE.
CHAPTER TEN AUTHORING.
Kim, Sung-Ho School of Computer, Information and Communication Engineering Sangji Univ.
CS380 LAB IV OpenGL Jonghyeob Lee Reference1. [OpenGL course slides by Rasmus Stenholt] Reference2. [
1 Scroll Bars Providing Scrollbars. 2 Objectives You will be able to: Use Windows Graphics to display tabular information on a Windows form. Add graphics.
Lecture 9: Lighting and Shading 1  Principles of Interactive Graphics  CMSCD2012  Dr David England, Room 718,  ex 2271
1. OpenGL/GLU/GLUT  OpenGL v4.0 (latest) is the “core” library that is platform independent  GLUT v3.7 is an auxiliary library that handles window creation,
Graphics. Graphic is the important media used to show the appearance of integrative media applications. According to DBP dictionary, graphics mean drawing.
Augmented Reality and 3D modelling By Stafford Joemat Supervised by Mr James Connan.
1 Chapter 12 GUI C/C++ Language Programming Wanxiang Che.
CSE 232: C++ debugging in Visual Studio and emacs C++ Debugging (in Visual Studio and emacs) We’ve looked at programs from a text-based mode –Shell commands.
Programming with Visual Studio 2005.NET A short review of the process.
N from what language did C++ originate? n what’s input, output device? n what’s main memory, memory location, memory address? n what’s a program, data?
Modeling with OpenGL Practice with OpenGL transformations.
Programming with Visual Studio.NET A short review of the process.
Writing a Run Time DLL The application loads the DLL using LoadLibrary() or LoadLibraryEx(). The standard search sequence is used by the operating system.
ARToolKit Settings The department of Computer Engineering Shin ho hwan.
OpenGL Lighting Jian-Liang Lin 2002 Hidden-Surface Removal -1 Original Code: while (1) { get_viewing_point_from_mouse_position(); glClear(GL_COLOR_BUFFER_BIT);
Introduction to the Maya C++ API Brent Haley The Ohio State University
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
CSE 381 – Advanced Game Programming GLSL. Rendering Revisited.
NoufNaief.net TA: Nouf Al-harbi.
Computer Graphics Lab 1 OpenGL.
1 How to Install OpenGL u Software running under Microsoft Windows makes extensive use of "dynamic link libraries." A dynamic link library (DLL) is a set.
Cs423-cotter1 Windows Operating Environment. cs423-cotter2 Windows Operating Environment 32 bit operating environment – Windows XP Microsoft Visual Studio.net,.net2005,
Augmented Reality and 3D modelling Done by Stafford Joemat Supervised by Mr James Connan.
Open project in Microsoft Visual Studio → build program in “Release” mode.
C PREPROCESSOR. Introduction  It is a program that processes our source program before it is passed to the compiler.  Preprocessor commands (often known.
Illumination CSE 410. Basic steps of lighting Enable smooth shading Set global ambient light glShadeModel(GL_SMOOTH); glEnable(GL_NORMALIZE); GLfloat.
CMSC 104, Section 301, Fall Lecture 18, 11/11/02 Functions, Part 1 of 3 Topics Using Predefined Functions Programmer-Defined Functions Using Input.
Sung-Dong Kim Dept. of Computer Engineering, Hansung University Chapter 3 Programming Tools.
Install for 64bit  Glui2.36.zip 을 다운로드  src  msvc  glui.sin 파일을 Visual Studio 2010 으로 열기  _glui library 를 선택후 빌드  빌드시 다음과 같은 오류가 발생하면 error C2252:
1 Building a program in C: Preprocessor, Compilation and Linkage.
Kim, Sung-Ho School of Computer, Information and Communication Engineering Sangji Univ.
Development Environment Setup
OpenGL project setup.
About the Presentations
Quick Start Guide for Visual Studio 2010
1. Open Visual Studio 2008.
The department of Computer Engineering Shin ho hwan
Computer Graphics 4Practical Lesson
Computer Graphics 5Practical Lesson
Presentation transcript:

Kim, Sung-Ho School of Computer, Information and Communication Engineering Sangji Univ.

Compile simpleVRML with OpenVRML How does ARToolkit work? Tutorials References Contents Contents

OpenVRML 로 simpleVRML 컴파일하기 – Setting OpenGL Library – Download libpng exe – Delete OpenVRML\dependencies\lib\libpng.lib Install libpng 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

OpenVRML 로 simpleVRML 컴파일하기 ( 계속 ) – OpenVRML/src/openvrml /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 …  에서 boost download, OpenGL Lib 와 같은 방법으로 배치 및 MS Visual Studio 의 Include, lib 에 폴더 등록 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…)

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…)

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…)

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…)

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…)

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 에서만 가능

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?

Basic Principles of ARToolkit (Continued…) How does ARToolkit work? (Continued…) How does ARToolkit work? (Continued…)

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)

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();...

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();.....

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 ) {....

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(); }

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 ); ……

Tutorial 1 : Tracking Stability – Tutorial 2 : Camera and Marker Relationships – Tutorial 3 : Multi-Marker Tracking – Tutorial 4 : simpleLite – Tutorial 5 : simpleTest2 – Tutorial 6 : Recognized Multiple Patterns – 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 – ARToolkit Tutorials ARToolkit Tutorials

– ARToolkit/examples/simple2/ – ARToolkit/bin/simpleTest2.exe Tutorial : Tracking Stability Tutorial : Tracking Stability

– ARToolkit/examples/simple/ – ARToolkit/examples/exview/ Tutorial : Camera & Marker Relationships Tutorial : Camera & Marker Relationships

– ARToolkit/examples/multi/ – ARToolkit/bin/multiTest.exe Tutorial : Multi-Marker Tracking Tutorial : Multi-Marker Tracking

ARToolKit_scene – ARToolkit/examples/simpleLite/ Tutorial : simpleLite Tutorial : simpleLite

– ARToolkit/examples/simple2/ – ARToolkit/bin/simpleTest2.exe Tutorial : simpleTest2 Tutorial : simpleTest2

– ARToolkit/examples/twoView/ Tutorial : Recognized Multiple Patterns Tutorial : Recognized Multiple Patterns

Add an include file – #include Use PlaySound() function – PlaySound(“file.wav”, NULL, SND_ASYNC); Another methods – FMOD ( – Audiere ( Tutorial : Add Sound File Tutorial : Add Sound File

Texture Mapping Sample – Image & Movie Image & Movie Tutorial : Add Texture Mapping Tutorial : Add Texture Mapping

application%EB%93%A4/ ewDate=&currentPage=1&listtype=0&userTopListOpen=false&userTopListCount =5&userTopListManageOpen=false&userTopListCurrentPage=undefined References