Esempio n. 1
0
void send_expose(void) {
    static int frame, running, num;

    if (running) return;
    fprintf(stderr,"Capturing frame: %d ", frame);
    running=1;

    while ((ioctl(grab_fd, VIDIOCSYNC, &frame)) < 0) {
        fprintf(stderr, "Waiting frame: %d\n", frame);
    }

    /* refer the frame */
    buf = grab_data + grab_vm.offsets[frame];
    blend_images(logo_image, 50, 50, 3, buf, COLS, ROWS, DEPTH, 150, 80, 180);

    gdk_threads_enter();
    on_darea_expose(darea); // exibe
    gdk_threads_leave();

// test
    //grab_buf.frame = (frame==0)?1:0;
    grab_buf.frame = frame;
    if(ioctl(grab_fd, VIDIOCMCAPTURE, &grab_buf)<0) {
        perror("VIDIOCMCAPTURE");
        exit(-1);
    }
    fprintf(stderr,"Queing frame: %d\n ", frame);
    frame++;
    if (frame>=grab_vm.frames) frame = 0;
    running=0;
}
Esempio n. 2
0
void Panorama::run()
{
	open_images();
	calc_features();
	create_matchs();
	remove_outliers();
	calc_camera_params();
	calc_gains();
	blend_images();
}