示例#1
0
文件: mk_patt.c 项目: Aye1/RVProject
main(int argc, char **argv)
{
    init();

    arVideoCapStart();
    argMainLoop( mouseEvent, keyEvent, mainLoop );
}
示例#2
0
int main(int argc, char *argv[])
{
    glutInit(&argc, argv);
    init(argc, argv);
    argSetKeyFunc(keyFunc);
    argSetDispFunc(dispFunc, 0);
    argMainLoop();
}
int main(int argc, char **argv)
{
	glutInit(&argc, argv);
    init();

    argMainLoop( NULL, keyEvent, mainLoop );
	return (0);
}
示例#4
0
文件: exview.c 项目: SNce/ARMaze
main()
{
    if( init() < 0 ) exit(0);

    arVideoCapStart();
    glutMotionFunc( motionEvent );
    argMainLoop( mouseEvent, keyEvent, mainLoop );
}
示例#5
0
文件: main.cpp 项目: SNce/ARMaze
int main(int args, char** argv)
{
	Game* game = new Game();
	Game::init();
	arVideoCapStart();
	argMainLoop(NULL, &Game::keyEvent, &Game::mainLoop);
	return(0);
}
int main(int argc, char *argv[])
{
	glutInit(&argc, argv);
    init();

    arVideoCapStart();
    argMainLoop( NULL, keyEvent, mainLoop );
	return (0);
}
示例#7
0
int main(int argc, char **argv)
{
	glutInit(&argc, argv);
    init();

    arVideoCapStart();
    argMainLoop( mouseEvent, keyEvent, mainLoop );
	return (0);
}
示例#8
0
int main(int argc, char *argv[])
{
	glutInit(&argc, argv);
    init();
    argSetKeyFunc( keyEvent );
    argSetDispFunc( mainLoop, 1 );
    argMainLoop();
    return (0);
}
示例#9
0
int main(int argc, char **argv)
{
    mostraFantasmas = 0;
	glutInit(&argc, argv);
    init();

    arVideoCapStart();
    argMainLoop( NULL, keyEvent, mainLoop );
	return (0);
}
示例#10
0
int main(int argc, char **argv)
{
	print_programmer();
	glutInit(&argc, argv);
	init();

    arVideoCapStart();
	print_how_to_use();
    argMainLoop( NULL, keyEvent, mainLoop );
	return (0);
}
示例#11
0
int main( int argc, char *argv[] )
{
    glutInit(&argc, argv);
    init(argc, argv);
    argSetDispFunc( mainLoop, 1 );
    argSetKeyFunc( keyEvent );
    ar2VideoCapStart(vidL);
    ar2VideoCapStart(vidR);
    argMainLoop();
    return 0;
}
int main(int argc, char **argv)
{
	//initialize applications
	glutInit(&argc, argv);
    init();

	arVideoCapStart();
	//start the main event loop
    argMainLoop( NULL, keyEvent, mainLoop );

	return 0;
}
示例#13
0
文件: arSound.c 项目: ei08047/soundAR
int main(int argc, char **argv)
{
	//initialize applications
	memset(buf, '\0', BUFLEN);
	glutInit(&argc, argv);
	init();
	arVideoCapStart();
	glutTimerFunc(100, update, 0);
	//start the main event loop
	argMainLoop(NULL, keyEvent, mainLoop);
	return 0;
}
示例#14
0
文件: main.cpp 项目: AKIRA5611/AR
int main(int argc,char**argv){

    ARParam cparam;
    ARParam wparam;
    int xsize,ysize;
    glutInit(&argc,argv);

    if(arVideoOpen(vconf_name)<0){
	puts("ビデオデバイスエラー");
	return -1;
    }

    if(arVideoInqSize(&xsize,&ysize) < 0)return -1;

    if(arParamLoad(cparam_name,1,&wparam)< 0){
	puts("パラメータ読み込み失敗");
	return -1;
    }

    arParamChangeSize(&wparam,xsize,ysize,&cparam);
    arInitCparam(&cparam);
    nyobj = nyar_NyARTransMat_O2_create(&cparam);

    if( (patt_id=arLoadPatt(pattern_name)) < 0){
	puts("パターン読み込みエラー");
	return -1;
    }

    argInit(&cparam, 1.0, 0, 0, 0, 0); 
    mqoInit();

    if(Data_Load()==-1)
	return -1;

    arVideoCapStart();
    InitGame();

    arUtilTimerReset();
#ifdef _WIN32
    TIMECAPS Caps;
    timeGetDevCaps(&Caps, sizeof(TIMECAPS)); // 性能取得
    timeBeginPeriod(Caps.wPeriodMin);
#endif
    argMainLoop(MouseEvent,KeyEvent,MainLoop);
#ifdef _WIN32
    timeEndPeriod(Caps.wPeriodMin);
#endif
    nyar_NyARTransMat_O2_free(nyobj);
    return 0;


}
示例#15
0
int main(int argc, char **argv) 
{
	ARParam cparam;
	ARParam wparam;
	int xsize, ysize;

	printf("test\n");


	
	glutInit(&argc, argv);


	
	if (arVideoOpen(vconf_name) < 0) {
		printf("ビデオデバイスのエラー");
		return -1;

	}

	if (arVideoInqSize(&xsize, &ysize) < 0)	return -1;

	if (arParamLoad(cparam_name, 1, &wparam) < 0) {
		printf("カメラパラメータの読み込みに失敗しました\n");
		return -1;

	}

	arParamChangeSize(&wparam, xsize, ysize, &cparam);
	arInitCparam(&cparam);

	if ((patt_id = arLoadPatt(patt_name)) < 0) {
		printf("パターンファイルの読み込みに失敗しました\n");
		return -1;
			
	}

	argInit(&cparam, 1.0, 0, 0, 0, 0);

	arVideoCapStart();

	argMainLoop(MouseEvent, KeyEvent, MainLoop);
	
	return 0;

}
示例#16
0
//=======================================================
// main関数
//=======================================================
int main( int argc, char **argv )
{
	// GLUTの初期化
	glutInit( &argc, argv );

	// ARアプリケーションの初期化
	Init();

	midi_init();
	// ビデオキャプチャの開始
	arVideoCapStart();

	// メインループの開始
	argMainLoop( MouseEvent, KeyEvent, MainLoop );


	return 0;
}
示例#17
0
int main(int argc, char **argv)
{
	glutInit(&argc, argv);
    init( argc, argv );

    argSetKeyFunc(keyEvent);
    argSetMouseFunc(mouseEvent);
    argSetMotionFunc(motionEvent);
    argSetDispFunc(dispImage, 1);

    print_comment(0);
    status = 0;
    point_num = 0;
    arVideoCapStart();
    argMainLoop();
	
	return (0);
}
示例#18
0
int main(int argc, char **argv)
{
	printf("Sample2\n");
	glutInit(&argc, argv);
    init();

	//init for Kinect
	g_MyKinect.Init();
	g_HandDetectorOpenNI.Init(g_MyKinect.context);
	//add Gesture
	g_HandDetectorOpenNI.AddGesture("Click", NULL);
	g_HandDetectorOpenNI.ClickPointerFunc = &ClickPointerFunction;
	g_MyKinect.StartGeneratingAll();
	
	arVideoCapStart();
    argMainLoop( NULL, keyEvent, mainLoop );
	return (0);
}
示例#19
0
int main(int argc, char *argv[])
{
    glutInit(&argc, argv);
    init(argc, argv);

    argSetWindow(w1);
    argSetDispFunc(mainLoop, 1);
    argSetKeyFunc(keyEvent);

    argSetWindow(w2);
    argSetDispFunc(mainLoop, 1);
    argSetKeyFunc(keyEvent);

    count  = 0;
    fps[0] = '\0';
    arVideoCapStart();
    arUtilTimerReset();
    argMainLoop();
    return (0);
}
示例#20
0
int main(int argc, char **argv)
{
	char **argvT;	
	// Display each command-line argument.
    /*
	printf_s( "\nCommand-line arguments:\n" );
    for( count = 0; count < argc; count++ )
        printf_s( "  argv[%d]   %s\n", count, argv[count] );
	*/
	
	if (argc != 5) {
		printf("We need IN directory, out directory, and framerate, geometry");
		// pause 
		printf("Press a key to start  \n");
		getchar();

		exit(-1);
	}

	directory   = argv[1];
	outputDir	= argv[2];
	framerate	= atoi(argv[3]);
	geometry = atoi(argv[4]);

	//glutInit(0, argvT);
	init();



	// pause 
	printf("Press a key to start  \n");
	getchar();


	//arVideoCapStart();
    argMainLoop( NULL, keyEvent, mainLoop );
	return (0);
}
示例#21
0
main(int argc, char **argv)
{
    if( init( argc, argv ) < 0 ) exit(0);

    argMainLoop( NULL, keyEvent, mainLoop );
}
	void main(int argc, char *argv[]) {
		init();
		arVideoCapStart();
		argMainLoop(NULL, keyEvent, mainLoop);
	}
示例#23
0
int main(int argc, char *argv[])
{
	printf("Debut initialisation\n");
    /// Chargement des objets
	//on ne stocke plus dans des mesh, mais dans un tableau possible de mesh à charger. L'id du meche à charger par le patron correspond
	//à l'indice dans le tableau de mesh
	mesh.push_back(new MeshObj("Others\\legoTexture.obj",NULL));
	mesh.push_back(new MeshObj("Others\\brique_lego.obj", NULL));

	printf("Chargement des objets réussi\n");
    /// Initialisation de glut
    glutInit(&argc, argv);
    glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);

    glClearColor(0, 0, 0, 0);
    glEnable(GL_CULL_FACE);
    glCullFace(GL_BACK);

    glEnable(GL_DEPTH_TEST);
    glDepthFunc(GL_LESS);

    glShadeModel(GL_SMOOTH);

    /// Initialisation d'ARToolKit et de la fenetre + appel boucle infini
    arInit();
    arVideoCapStart();
    glutPositionWindow((glutGet(GLUT_SCREEN_WIDTH)-cparam.xsize)/2, (glutGet(GLUT_SCREEN_HEIGHT)-cparam.ysize)/2);
    glutReshapeFunc(resize);
    glutMotionFunc(mouseMove);

	//init du menu d'aide (aide mouvement)
	menu.addBoutton("img\\delete.png",true,0,cparam.ysize-75,75,cparam.ysize);
	menu.addBoutton("img\\move.png",true,75,cparam.ysize-75,150,cparam.ysize);
	menu.addBoutton("img\\resize.png",true,150,cparam.ysize-75,225,cparam.ysize);

	//init bouttons help/scan

	//quit
	quit.addBoutton("img\\quit.png",true,cparam.xsize-120,30,cparam.xsize-16,54+30,true);
	quit.addBoutton("img\\quit1.png",true,cparam.xsize-120,30,cparam.xsize-16,54+30,false);
	difQuit=differ(2000);

	//help; 
	help.addBoutton("img\\aide1.png",true, cparam.xsize-120,54+35,cparam.xsize-16,54+54+35,true);
	help.addBoutton("img\\aide2.png",true, cparam.xsize-120,54+35,cparam.xsize-16,54+54+35,false); //activé
	help.addBoutton("img\\aide3.png",true, cparam.xsize-120,54+35,cparam.xsize-16,54+54+35,false); //selectioné
	difAide=differ(2000); 
	menuShow=false;

	//scan
	scan.addBoutton("img\\scan5.png",true,cparam.xsize-120,54+40+54,cparam.xsize-16,54+54+54+40,true);
	scan.addBoutton("img\\scan6.png",true,cparam.xsize-120,54+40+54,cparam.xsize-16,54+54+54+40,false);
	scan.addBoutton("img\\scan7.png",true,cparam.xsize-120,54+40+54,cparam.xsize-16,54+54+54+40,false);
	difScan=differ(2000);

	/*FMOD_System_Create(&systemSon);
	FMOD_System_Init(systemSon, 2, FMOD_INIT_NORMAL, NULL);
	if(!FMOD_System_CreateSound(systemSon, "Data\\mouseclickDown.wav", FMOD_CREATESAMPLE, 0, &clickDown)) printf("chargement son: ok\n");
	else printf("chargement son: echec\n");
	if(!FMOD_System_CreateSound(systemSon, "Data\\mouseclickUp.wav", FMOD_CREATESAMPLE, 0, &clickUP)) printf("chargement son: ok\n");
	else printf("chargement son: echec\n");*/

	 difIndex=differ(2000);
	 difMajeur=differ(2000);

	printf("Fin initialisation\n");

	argMainLoop(mouseClick, key, mainLoop);
 

    return EXIT_SUCCESS;
}
示例#24
0
int main(int argc, char **argv)
{
	int one = 1;
	glutInit(&one,argv);
	init();
	
	cur_filename = argv[1];

	fprintf(stderr,"%d %s,\n", argc, cur_filename);
	fprintf(stdout,"%s,\t",cur_filename);

	if (argc > 2) {
		fprintf(stderr,"showing graphics\n");
		singleLoop = 0;	
	}

	////

	dataPtr	    = loadImage(cur_filename);


	///
	ARParam  wparam;
	
    /* open the video path */
    //if( arVideoOpen( vconf ) < 0 ) exit(0);
    /* find the size of the window */
    //if( arVideoInqSize(&xsize, &ysize) < 0 ) exit(0);
    //fprintf(stderr,"Image size (x,y) = (%d,%d)\n", xsize, image->rows);

    /* set the initial camera parameters */
    if( arParamLoad(cparam_name, 1, &wparam) < 0 ) {
        fprintf(stderr,"Camera parameter load error !!\n");
        exit(0);
    }
    arParamChangeSize( &wparam, xsize, ysize, &cparam );
    arInitCparam( &cparam );
    //fprintf(stderr,"*** Camera Parameter ***\n");
    //arParamDisp( &cparam );

    if( (patt_id=arLoadPatt(patt_name)) < 0 ) {
        fprintf(stderr,"pattern load error !!\n");
        exit(0);
    }

#if 0

	fprintf(stderr,"xysize %d %d\n\
cparam %g\t%g\t%g\t%g\n \
mat\n \
%g\t%g\t%g\t%g\n \
%g\t%g\t%g\t%g\n \
%g\t%g\t%g\t%g\n", 
		cparam.xsize, cparam.ysize,
		cparam.dist_factor[0], cparam.dist_factor[1], cparam.dist_factor[2], cparam.dist_factor[3], 
		cparam.mat[0][0], cparam.mat[0][1], cparam.mat[0][2], cparam.mat[0][3], 	
		cparam.mat[1][0], cparam.mat[1][1], cparam.mat[1][2], cparam.mat[1][3], 	
		cparam.mat[2][0], cparam.mat[2][1], cparam.mat[2][2], cparam.mat[2][3]	
		);
#endif


    /* open the graphics window */
    argInit( &cparam, 1.0, 0, 0, 0, 0 );
	///



    //arVideoCapStart();

	findMarkers();



	if (singleLoop) {
		//mainLoop();
	} else {
    	argMainLoop( NULL, NULL /*keyEvent*/, mainLoop );
	}
}