diff options
Diffstat (limited to 'multi/SRC/clicksCVXO.cpp')
-rw-r--r-- | multi/SRC/clicksCVXO.cpp | 648 |
1 files changed, 0 insertions, 648 deletions
diff --git a/multi/SRC/clicksCVXO.cpp b/multi/SRC/clicksCVXO.cpp deleted file mode 100644 index 5a2386c..0000000 --- a/multi/SRC/clicksCVXO.cpp +++ /dev/null @@ -1,648 +0,0 @@ -/* - * clicksCV.cpp - * - * Created on: 28/06/2010 - * Author: smarichal - */ - -#ifdef _WIN32 -#include <windows.h> -#endif -#include <stdio.h> -#include <stdlib.h> -#ifndef __APPLE__ -#include <GL/gl.h> -#include <GL/glut.h> -#else -#include <OpenGL/gl.h> -#include <GLUT/glut.h> -#endif -#include <AR/gsub.h> -#include <AR/video.h> -#include <AR/param.h> -#include <AR/ar.h> -#include <AR/arMulti.h> -#include <opencv/cv.h> -#include <opencv/highgui.h> -#include "Utilidades.h" -#include "cvUtilities.h" -#include "UtilidadesSDL.h" -#include "stdio.h" -#include "stdlib.h" -#include <unistd.h> -#include <math.h> -#include <formatopixel.h> - -#include "cvUtilities.h" - - /************************************************************************************************************************* - * CONFIGURACIONES GENERALES DE LA APLICACION - *************************************************************************************************************************/ -int mostrarVideo = 0; -int dibujarCubos = 0; - -int mostrarRadar = 1; - - /************************************************************************************************************************* - * CONFIGURACION DE RECONOCIMIENTO DE COLORES - *************************************************************************************************************************/ -#define MIN_AREA 600 -#define MAX_AREA 1500 - -int min_area = MIN_AREA; -int max_area = MAX_AREA; -#define MIN_H 0 -#define MAX_H 0 -#define MIN_S 0 -#define MAX_S 0 -#define MIN_B 0 -#define MAX_B 0 -#define CANT_HISTORIA 4 -#define UMBRAL 5 -#define UMBRAL_AREA_APUNTADOR 20 //El area del apuntador y el area del marcador tienen una relacion definida mediante calibracion. Usamos un - //umbral de error al que declaramos como UMBRAL_AREA_APUNTADOR. Es decir si la zona de estudio donde buscamos el - //apuntador mide 300 y la relacion es de 1/2 (el apuntador mide la mitad del marcador) entonces buscaremos apuntadores entre - //las cotas (150 - UMBRAL_AREA_APUNTADOR) y (150 - UMBRAL_AREA_APUNTADOR) -#define ERODE 2 -#define DILATE 1 -#define SMOOTH 0 -#define OFFSET_ROI 5 //Cuanto mas grande mas grande sera el ROI donde busco el apuntador -#define MIN_AREA_WIDTH_HEIGHT 5 //Este valor sirve para indicar cual es el area minima en la cual se busca un apuntador. - //Por ejemplo si el marcador se encuentra apenas dentro de la pantalla y el height o el width no superan este valor entonces - //el area no sera analizada en busca de un apuntador - -int umbral = UMBRAL; -int minH = MIN_H, maxH = MAX_H, minS = MIN_S, maxS = MAX_S, minB = MIN_B,maxB = MAX_B; -int num_apuntadores =0; - -int debugImg = 0; //Parametro para hayObjetoColor. Si se le pasa 1 y se le pasa una ventana entonces va reproduciendo el ROI. Sino crea una ventana nueva pero detiene la aplicacion hasta tocar una tecla - /******************************************************************************************************************************** - * CONFIGURACION DE ARTOOLKIT Y MARCADORES - ********************************************************************************************************************************/ - -#define MAX_MARCADORES 30 -/* set up the video format globals */ - -#ifdef _WIN32 -char *vconf = "Data\\WDM_camera_flipV.xml"; -#else -char *vconf = ""; -#endif - -int xsize, ysize; -int thresh = 100; -int count = 0; - -char *cparam_name = "Data/camera_para.dat"; -ARParam cparam; - -char *config_name = "Data/prototipo1/prototipo1.dat"; -ARMultiMarkerInfoT *config; - - -IplImage* img =NULL; -uchar* data1 =NULL; -IplImage* mono_Image = NULL; - -/*La posicion i del arreglo corresponde al marcador con con patt_id=i*/ -ARCoordMarcador marcadoresOcultos[MAX_MARCADORES]; //MAX_MARCADORES es la maxima cantidad -1 de marcadores que la aplicacion puede manejar. - - - -/************************************************************************************************************************************** - * ************************************************************************************************************************************ - * VARIABLES DEL PROTOTIPO - * ************************************************************************************************************************************ - * ************************************************************************************************************************************/ - -/* Representacion de los elementos*/ -Elemento elementos[MAX_MARCADORES]; //El indice el elemento coincide con el id del elemento que tambien coincide con el id del marcador artoolkit -int cantElementosCargados = 0; - -int elementoConjuntoA = -1; //indice del elemento del conjunto A seleccionado -int elementoConjuntoB = -1; //indice del elemento del conjunto B seleccionado -int correspondenciaCorrecta = 0; //indica si el elemento del conjunto A y el del conjunto B - // que se seleccionaron se corresponden -int correspondenciaIncorrecta = 0; - -int xNombreRelacion = 400; -int yNombreRelacion = 20; - -int xConjuntoA = 20; -int xConjuntoB = 550; - -int yConjuntoA = 150; -int yConjuntoB = 150; - -int anchoPantalla = 900; -int altoPantalla = 800; - -//Son los id de las imagenes actualmente desplegadas en la pantalla -int idSDLImagenPantallaA = -1; -int idSDLImagenPantallaB = -1; - -//Sonidos del click y de error -char clickSound[255]; -char errorSound[255]; - -//Variable para mantener el historico de los ultimos marcadores seleccionados -//Lo usamos como buffer circular -Historico historico; - -#define CONJUNTO_A 0 -#define CONJUNTO_B 1 - - - - /*************************************************************************************************************************************** - * DECALRACIONES DE FUNCIONES AUXILIARES - ****************************************************************************************************************************************/ -static void init(void); -static void cleanup(void); -static void keyEvent( unsigned char key, int x, int y); -static void mainLoop(void); -static void draw(); - -int main(int argc, char **argv) -{ - glutInit(&argc, argv); - init(); - - arVideoCapStart(); - argMainLoop( NULL, keyEvent, mainLoop ); - return (0); -} - -static int cargarDeFichero(void) { - FILE *fich; - char c; - fich=fopen("DataXO/conf.con","r"); - if(fich != NULL) { - fscanf(fich," %c",&c); - if(c=='#'){ //si el separador es correcto y no es fin de fichero carga valores; - fscanf(fich,"%d",&minH); - fscanf(fich,"%d",&maxH); - fscanf(fich,"%d",&minS); - fscanf(fich,"%d",&maxS); - fscanf(fich,"%d",&minB); - fscanf(fich,"%d",&maxB); - } - fclose(fich); - printf("Configuracion HSV cargada:\n"); - printf("minH = %d , maxH = %d\n",minH,maxH); - printf("minS = %d , maxS = %d\n",minS,maxS); - printf("minB = %d , maxB = %d\n",minB,maxB); - return 1; - }else{ - printf("Se usaran los valores por defecto, el motivo es: No se puede leer el archivo de configuracion\n"); - } - return 0; -} - -static void keyEvent( unsigned char key, int x, int y) -{ - /* quit if the ESC key is pressed */ - if( key == 0x1b ) { - printf("*** %f (frame/sec)\n", (double)count/arUtilTimer()); - cleanup(); - exit(0); - } - - - if( key == 'v' ) { - mostrarVideo = 1 - mostrarVideo; - if(!mostrarVideo){ - argCleanWindow(0,0); - } - } - - if( key == 'c' ) { - dibujarCubos = 1 - dibujarCubos; - if(!dibujarCubos){ - argCleanWindow(0,0); - } - } - - if( key == 'r' ) { - mostrarRadar = 1 - mostrarRadar; - if(!mostrarRadar){ - argCleanWindow(2,1); - } - } - - if( key == 't' ) { - printf("count = %d\n",count); - printf("timer = %f\n",arUtilTimer()); - printf("*** %f (frame/sec)\n", (double)count/arUtilTimer()); - printf("Enter new threshold value (current = %d): ", thresh); - scanf("%d",&thresh); while( getchar()!='\n' ); - printf("\n"); - count = 0; - } - - /* turn on and off the debug mode with right mouse */ - if( key == 'd' ) { - printf("*** %f (frame/sec)\n", (double)count/arUtilTimer()); - arDebug = 1 - arDebug; - if( arDebug == 0 ) { - glClearColor( 0.0, 0.0, 0.0, 0.0 ); - glClear(GL_COLOR_BUFFER_BIT); - argSwapBuffers(); - glClear(GL_COLOR_BUFFER_BIT); - argSwapBuffers(); - } - count = 0; - } - - if( key == '+' ) { - minH += 5; - printf("*** Aumento hue: %d", minH); - } - - if( key == '-' ) { - minH -= 5; - printf("*** Disminuyo hue: %d", minH); - } - - -} - -/** - * Recibe el indice del marcador no detectado y chequea si algun apuntador esta colisionando con el mismo. - * Devuelve el area del apuntador detectado o 0 en caso de no haber detectado ninguno. - */ -float hayColision(int indiceMarcdor, ARUint8 *dataPtr){ -//TODO Ver si es necesario crear la imagen opencv en color o solo con pasar del dataPtr alcanza para crear la mono y pasarsela al hayContorno - int resultado[2]; - calcularPuntoOrigen(marcadoresOcultos[indiceMarcdor].vertex, resultado); - - float v0_x = marcadoresOcultos[indiceMarcdor].vertex[resultado[0]][0]; - float v0_y = marcadoresOcultos[indiceMarcdor].vertex[resultado[0]][1]; - float v2_x = marcadoresOcultos[indiceMarcdor].vertex[resultado[1]][0]; - float v2_y = marcadoresOcultos[indiceMarcdor].vertex[resultado[1]][1]; - - int xStart = 0; - if(v0_x>OFFSET_ROI){ //Chequeo para no salirme del ancho de la pantalla - xStart = v0_x - OFFSET_ROI; - } - - int yStart = 0; - if(v0_y > OFFSET_ROI){ //Chequeo para no salirme del alto de la pantalla - yStart = v0_y - OFFSET_ROI; - } - - int widthZonaEstudio = abs( v2_x - xStart) + OFFSET_ROI; - if(xStart + widthZonaEstudio > xsize){ //Chequeo para no salirme del ancho de la pantalla - widthZonaEstudio = xsize - xStart; - } - - int heightZonaEstudio = abs(v2_y - yStart) + OFFSET_ROI; - if(yStart + heightZonaEstudio > ysize){ //Chequeo para no salirme del alto de la pantalla - heightZonaEstudio = ysize - yStart; - } - - cvSetImageData( img, (uchar*)(dataPtr), img->width* img->nChannels ); - img->origin = IPL_ORIGIN_TL; - cvZero(mono_Image); //FIXME Es necesario? Probar sin esto - float area = -1; - - //Calculo el area de la zona de estudio. Segun este area vamos a obtener la cota minima y maxima del area del apuntador esperado segun la calibracion que se hay realizado - //Por ejemplo si el apuntador ocupa 1/8 del marcador, y el area de la zona de estudio (que es aproximadamente el area del marcador) es de 800, entonces - //buscaremos un apuntador de (800)*(1/8) = 100 +/- UMBRAL_AREA_APUNTADOR - int areaZonaEstudio = heightZonaEstudio*widthZonaEstudio; - - if(heightZonaEstudio>MIN_AREA_WIDTH_HEIGHT && widthZonaEstudio > MIN_AREA_WIDTH_HEIGHT){ //Ver definicion de MIN_AREA_WIDTH_HEIGHT para comprender mejor este chequeo - //area = fabs(hayObjetoColor(img,mono_Image,minH,maxH,minS,maxS,minB,maxB,0,xStart,yStart,widthZonaEstudio,heightZonaEstudio,min_area,ERODE,DILATE)); - //FIXME Esta llamada es vieja, hay que cambiarla por una llamada a hayApuntador y reducir la logica de esta funcion - area = fabs(hayObjetoColor(img,mono_Image,minH,maxH,minS,maxS,minB,maxB, - debugImg,xStart,yStart,widthZonaEstudio,heightZonaEstudio,min_area,10000, - ERODE,DILATE,SMOOTH,0,NULL,NULL)); - if(area>0){ - printf("Area zona estudio = %d\n",areaZonaEstudio); - printf("Area apuntador = %f\n",area); - /************************************************************************************************************ - * DESCOMENTAR EL SIGUIENTE CODIGO PARA VER LOS SEGMENTOS DE IMAGEN EN LOS CUALES SE DETECTO EL APUNTADOR - * mostrarTarget(img,xStart,yStart,widthZonaEstudio,heightZonaEstudio); - * mostrarTarget(mono_Image,xStart,yStart,widthZonaEstudio,heightZonaEstudio); - * **********************************************************************************************************/ - } - } - return area; -} - - -void actualizarPantalla(){ - if(elementoConjuntoA!=-1 || elementoConjuntoB!=-1){ - - if(elementoConjuntoA!=-1){ - - if(elementos[elementoConjuntoA].idImagenSDL == idSDLImagenPantallaA && idSDLImagenPantallaA >= 0){ - printf("Se sigue seleccionando la misma imagen, no se hace nada"); - }else{ - if(idSDLImagenPantallaA!=-1){ - OcultarImage(idSDLImagenPantallaA,0); - } - if( (elementos[elementoConjuntoA].idImagenSDL == -1) ){ //Todavia no se cargo la imagen para este elemento - printf("voy a desplegar la imagen: %s\n",elementos[elementoConjuntoA].imagen); - elementos[elementoConjuntoA].idImagenSDL = PlayImageConTitulo( elementos[elementoConjuntoA].imagen, elementos[elementoConjuntoA].nombre,xConjuntoA,yConjuntoA,0); - idSDLImagenPantallaA = elementos[elementoConjuntoA].idImagenSDL; //Actualizo el id de la imagen mostrada actualmente - printf("IdSDLA = %d\n",idSDLImagenPantallaA); - PlaySound(clickSound); - }else{ - mostrarImagen(elementos[elementoConjuntoA].idImagenSDL,0); - idSDLImagenPantallaA = elementos[elementoConjuntoA].idImagenSDL; - PlaySound(clickSound); - } - } - } - - if(elementoConjuntoB!=-1){ - if(elementos[elementoConjuntoB].idImagenSDL == idSDLImagenPantallaB && idSDLImagenPantallaB > 0){ - printf("Se sigue seleccionando la misma imagen, no se hace nada"); - }else{ - if(idSDLImagenPantallaB!=-1){ - OcultarImage(idSDLImagenPantallaB,0); - } - if( (elementos[elementoConjuntoB].idImagenSDL == -1) ){ //Todavia no se cargo la imagen para este elemento - elementos[elementoConjuntoB].idImagenSDL = PlayImageConTitulo( elementos[elementoConjuntoB].imagen, elementos[elementoConjuntoB].nombre,xConjuntoB,yConjuntoB,0); - idSDLImagenPantallaB = elementos[elementoConjuntoB].idImagenSDL; //Actualizo el id de la imagen mostrada actualmente - PlaySound(clickSound); - }else{ - mostrarImagen(elementos[elementoConjuntoB].idImagenSDL,0); - idSDLImagenPantallaB = elementos[elementoConjuntoB].idImagenSDL; - PlaySound(clickSound); - } - } - } - - if(correspondenciaCorrecta){ - OcultarZona(xNombreRelacion,yNombreRelacion,anchoPantalla - xNombreRelacion,yConjuntoA - 5,0); //Borro la zona superior de la pantalla que es donde esta escrito el texto - EscribirTexto(elementos[elementoConjuntoA].nombreRelacion,xNombreRelacion,yNombreRelacion,0); - PlaySound(elementos[elementoConjuntoA].sonido); - }else if(correspondenciaIncorrecta){ - PlaySound(errorSound); - } - - }else{ - EscribirTexto("Prototipo - Estado Inicial",xNombreRelacion,yNombreRelacion,0); - } - //Actualizo la pantalla - printf("Flip antes\n"); - flip(); - printf("Flip dsps\n"); -} - -void testearRegistroDeColisiones(){ - int cant = registrarColision(5,&historico); - printf("cant = %d\n",cant); - cant = registrarColision(5,&historico); - printf("cant = %d\n",cant); - cant = registrarColision(5,&historico); - printf("cant = %d\n",cant); - cant = registrarColision(5,&historico); - printf("cant = %d\n",cant); - cant = registrarColision(3,&historico); - printf("cant = %d\n",cant); -} -/* main loop */ -static void mainLoop(void) -{ - ARUint8 *dataPtr; - ARMarkerInfo *marker_info; - int marker_num; - double err; - int i; - - - /* grab a video frame */ - - arUtilSleep(90000); - if( (dataPtr = (ARUint8 *)arVideoGetImage()) == NULL ) { - printf("sleep\n"); - arUtilSleep(2); - return; - } - if( count == 0 ) arUtilTimerReset(); - count++; - - if(img==NULL){ - img = crearImagenCv2(dataPtr,xsize,ysize); - } - - /* detect the markers in the video frame */ - if( arDetectMarkerLite(dataPtr, thresh, &marker_info, &marker_num) < 0 ) { - cleanup(); - exit(0); - } - - - - //argSwapBuffers(); - if(mostrarVideo){ - argDrawMode2D(); - if( !arDebug ) { - argDispImage( dataPtr, 0,0 ); - } - else { - argDispImage( dataPtr, 1, 1 ); - if( arImageProcMode == AR_IMAGE_PROC_IN_HALF ) - argDispHalfImage( arImage, 0, 0 ); - else - argDispImage( arImage, 0, 0); - - glColor3f( 1.0, 0.0, 0.0 ); - glLineWidth(6.0); - for( i = 0; i < marker_num; i++ ) { - argDrawSquare( marker_info[i].vertex, 0, 0 ); - } - glLineWidth( 1.0 ); - } - } - - if(mostrarRadar){ - argDrawMode2D(); - argCleanWindow(2,1); - dibujarLimitesPantalla(xsize, ysize); - for( i = 0; i < marker_num; i++ ) { - dibujarMiniMarcador(0,0,marker_info[i].vertex,1); - } - } - arVideoCapNext(); - - if( (err=arMultiGetTransMat(marker_info, marker_num, config)) < 0 ) { - argSwapBuffers(); - return; - } - - if(err > 100.0 ) { - printf("saliendo 2\n"); - argSwapBuffers(); - return; - } - - if(mostrarVideo || dibujarCubos){ - argDrawMode3D(); - argDraw3dCamera( 0, 0 ); - glClearDepth( 1.0 ); - glClear(GL_DEPTH_BUFFER_BIT); - } - //printf("Marcadores detectados = %d\n",marker_num); - - - if(marker_num>0){ - for( i = 0; i < config->marker_num; i++ ) { - if( (dibujarCubos)&&(config->marker[i].visible >= 0 )){ - draw( config->trans, config->marker[i].trans, 0 ); - }else { - /* - * MARCADOR NO DETECTADO. - * * TENEMOS SUS COORDENADAS - * - Marker Coordinates (Xm,Ym) - * - Camera Coordinates (Xc,Yc) - * * NECESITAMOS SUS COORDENADAS - * - Ideal Screen Coordinates (xc,yc) - * - */ - double hXi_hYi[3][4]; - obtenerCoordenadasIdealesMarcadorNoDetectado(config->trans,config->marker[i],hXi_hYi,marcadoresOcultos[i].vertex); - - double Xi,Yi; - if(hXi_hYi[2][3]!=0){ //TODO que pasa si h==0? - marcadoresOcultos[i].centro[0] = hXi_hYi[0][3]/hXi_hYi[2][3]; - marcadoresOcultos[i].centro[1] = hXi_hYi[1][3]/hXi_hYi[2][3]; - }else{ - marcadoresOcultos[i].centro[0] = hXi_hYi[0][3]; - marcadoresOcultos[i].centro[1] = hXi_hYi[1][3]; - } - - if(dibujarCubos){ - dibujarPuntosMarcadorNoDetectado(Xi,Yi,marcadoresOcultos[i].vertex); - } - if(mostrarRadar){ - argDrawMode2D(); - dibujarMiniMarcador(0,0,marcadoresOcultos[i].vertex,0); - } - - int area = hayColision(i,dataPtr); //Chequea que algun apuntado este colisionando con el marcador i - if(area>0){ - int cant = registrarColision(i,&historico); - if(cant>=CANT_HISTORIA){ - correspondenciaCorrecta = 0; - correspondenciaIncorrecta = 0; - if(elementos[i].conjunto == CONJUNTO_A){ - //printf("es de conjunto A y ") - elementoConjuntoA =config->marker[i].patt_id; - elementoConjuntoB =-1; //Dejo sin seleccionar elementos del conjunto B - }else if(elementos[i].conjunto == CONJUNTO_B){ - if(elementoConjuntoA==-1){ //No hay elemento del conjunto A seleccionado previamente - printf("PRIMERO SELECCIONAR ELEMENTO DEL CONJUNTO A\n"); - }else{ - elementoConjuntoB = config->marker[i].patt_id; - if(elementos[elementoConjuntoA].idElementoRelacionado == elementos[elementoConjuntoB].idPatt){ - //Exito, se realizo la correspondencia correctamente - correspondenciaCorrecta = 1; - printf("EXITO!!!\n"); - printf("%s %s %s",elementos[elementoConjuntoA].nombre,elementos[elementoConjuntoA].nombreRelacion,elementos[elementoConjuntoB].nombre); - }else{ - correspondenciaIncorrecta = 1; - } - } - }else{ - fprintf(stderr, "Error, el elemento seleccionado no pertenece ni al conjunto A ni al B\n"); - cleanup(); - exit(0); - } - printf("&&&&&&&&&&& COLISION CON MARCADOR %d &&&&&&&&&&&&&&&\n",i); - actualizarPantalla(); - break; // Por ahora cuando se detecta la primera colision ya frenamos - }else{ - printf("Colision nro %d con marcador %d\n",cant,i); - } - } - - } - - } - } - - if(mostrarRadar || mostrarVideo || dibujarCubos){ - argSwapBuffers(); - } -} - - -static void init( void ) -{ - ARParam wparam; - //Cargo configuracion del color a detectar - cargarDeFichero(); - //Cargo archivo de configuracion de los elementos a detectar - cantElementosCargados = leerConfiguracionElementos("prototipo1.config",elementos,MAX_MARCADORES,clickSound,errorSound); - printf("Se cargaron %d elementos\n",cantElementosCargados); - imprimirPropiedadesElementos(elementos,cantElementosCargados); - /* open the video path */ - if( arVideoOpen( vconf ) < 0 ) exit(0); - /* find the size of the window */ - if( arVideoInqSize(&xsize, &ysize) < 0 ) exit(0); - printf("Image size (x,y) = (%d,%d)\n", xsize, ysize); - if(xsize<500){ - printf("min_area = %d\n", MIN_AREA/2); - min_area = MIN_AREA/2; - }else{ - printf("min_area = %d\n", MIN_AREA); - min_area = MIN_AREA; - } - - /* set the initial camera parameters */ - if( arParamLoad(cparam_name, 1, &wparam) < 0 ) { - printf("Camera parameter load error !!\n"); - exit(0); - } - arParamChangeSize( &wparam, xsize, ysize, &cparam ); - arInitCparam( &cparam ); - printf("*** Camera Parameter ***\n"); - arParamDisp( &cparam ); - - if( (config = arMultiReadConfigFile(config_name)) == NULL ) { - printf("config data load error !!\n"); - exit(0); - } - - /* open the graphics window */ - argInit( &cparam, 1.0, 0, 2, 1, 0 ); - arFittingMode = AR_FITTING_TO_INPUT;//AR_FITTING_TO_IDEAL; - arImageProcMode = AR_IMAGE_PROC_IN_HALF; - argDrawMode = AR_DRAW_BY_TEXTURE_MAPPING; - argTexmapMode = AR_DRAW_TEXTURE_HALF_IMAGE; - - printf("Inicializo data e img\n"); - data1= new uchar[xsize* AR_PIX_SIZE_DEFAULT*ysize]; // Creo data1 del maximo tamanio que pueda necesitar - img = crearImagenCv2(data1,xsize,ysize); // Idem con la imagenCv - mono_Image =cvCreateImage( cvGetSize(img), 8, 1 ); - - //Inicializacion de sdl - if(!initSDL(anchoPantalla,altoPantalla)){ - cleanup(); - exit(0); - } - CargarFondo("Data/prototipo1/fondoPrototipo1.bmp",1); - - - //Inicializo historial - initHistorico(&historico,CANT_HISTORIA,-1); - - //Inicialmente mostramos el radar - //cleanup(); - //exit(0); - //PlayImageConTitulo( elementos[0].imagen, elementos[0].nombre,xConjuntoA,yConjuntoA,0); - //flip(); -} - -/* cleanup function called when program exits */ -static void cleanup(void) -{ - arVideoCapStop(); - arVideoClose(); - argCleanup(); - cleanUpSDL(); -} |