// here is were everything begins int main(int argc, char* argv[]) { Demo demo; // process command line options demo.parseOptions(argc, argv); demo.setup(); if (demo.isVideo()) { cout << "Processing video" << endl; // setup image source, window for drawing, serial port... demo.setupVideo(); // the actual processing loop where tags are detected and visualized demo.loop(); } else { cout << "Processing image" << endl; // process single image demo.loadImages(); } return 0; }
int main(int argc, char* argv[]) { ros::init(argc, argv, "ros_apriltags_node"); Demo demo; process_flag = false; // process command line options demo.parseOptions(argc, argv); demo.setup(); if (demo.isVideo()) { cout << "Processing video" << endl; // setup image source, window for drawing, serial port... //demo.setupVideo(); //ros::spinOnce(); // the actual processing loop where tags are detected and visualized demo.loop(); } else { cout << "Processing image" << endl; // process single image demo.loadImages(); } return 0; }
// here is were everything begins int main(int argc, char* argv[]) { ros::init(argc, argv, "Tag_Detector"); ros::NodeHandle nh; image_transport::ImageTransport it(nh); cv::startWindowThread(); demo.setup(); cout << "Initial setup executed"<<endl; image_transport::Subscriber sub = it.subscribe("/ardrone/image_raw", 1, imageCallback); cout << "Image Subscriber executed"<<endl; ros::spin(); return 0; }
// here is were everything begins int main(int argc, char* argv[]) { Demo demo; // process command line options demo.parseOptions(argc, argv); // setup image source, window for drawing, serial port... demo.setup(); // the actual processing loop where tags are detected and visualized demo.loop(); return 0; }
int main(int argC, char* argV) { // Vars Demo *AirShow; // App init AirShow = new(Demo); // Demo init AirShow = new(Demo); AirShow->init("AirShow", 6min); AirShow->reqs(64bit, 1GB, GPU); // Config AirShow->preload("airshow.dat"); AirShow->splash(5); AirShow->config(argC, argV); // Setup AirShow->setup(FullHD, Surround); // Storyline AirShow->intro(45); AirShow->scene(0, "eagle", 30s); AirShow->scene(1, "clouds", 45s); AirShow->scene(2, "dogfight", 60s); AirShow->scene(3, "redarrows", 30s); AirShow->scene(4, "blueangels", 45s); AirShow->scene(5, "lz-129", 45s); AirShow->scene(6, "shuttle", 30s); AirShow->scene(7, "airone", 30s); AirShow->scene(8, "wtc", 45s); AirShow->scene(9, "nuke", 30s); AirShow->credits(30s); // Main loop AirShow->loop(); // Demo shutdown AirShow->shut(); // App exit return 0; }
// APPLICATION ENTRY // ----------------- int main() { int width = 1024; int height = 768; demo_ptr = NULL; is_running = true; //// init glfwSetErrorCallback(error_callback); if(!glfwInit()) { fprintf(stderr, "GLFW Error: %d\n", glfwGetError()); exit(EXIT_FAILURE); } glfwWindowHint(GLFW_DEPTH_BITS, 16); glfwWindowHint(GLFW_FSAA_SAMPLES, 4); //#if JADI_PLATFORM != JADI_OSX // doesn't work if we specify 3.2 - errors on line 78 of DepthOfField.cpp (GL_INVALID_ENUM) //glfwWindowHint( GLFW_OPENGL_VERSION_MAJOR, 3 ); //glfwWindowHint( GLFW_OPENGL_VERSION_MINOR, 2 ); //glfwWindowHint( GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE ); //#endif GLFWwindow window = glfwCreateWindow(width, height, GLFW_WINDOWED, "Simulation", NULL); if(!window) { printf("ERROR: cannot open window.\n"); exit(EXIT_FAILURE); } glfwSetWindowSizeCallback(window, window_size_callback); glfwSetWindowCloseCallback(window, window_close_callback); glfwSetMouseButtonCallback(window, mouse_button_callback); glfwSetCursorPosCallback(window, cursor_callback); glfwSetScrollCallback(window, scroll_callback); glfwSetKeyCallback(window, key_callback); glfwSetCharCallback(window, char_callback); glfwMakeContextCurrent(window); #if JADI_PLATFORM==JADI_OSX glewExperimental = true; #endif GLenum err = glewInit(); if (GLEW_OK != err) { fprintf(stderr, "GLEW Error: %s\n", glewGetErrorString(err)); exit(EXIT_FAILURE); } Demo demo; demo.mouse_x = demo.mouse_y = demo.prev_mouse_x = demo.prev_mouse_y = 0; demo.pressed_mouse_button = 0; demo.is_mouse_down = false; demo_ptr = &demo; demo.window = &window; demo.setup(); while(is_running) { glfwPollEvents(); demo.update(); demo.draw(); glfwSwapBuffers(window); } demo_ptr->onWindowClose(); glfwTerminate(); exit(EXIT_SUCCESS); };