示例#1
0
TextureView::TextureView(std::size_t id, mve::CameraInfo const & camera,
    mve::ByteImage::Ptr image)
    : id(id), image(image) {

    width = image->width();
    height = image->height();

    camera.fill_calibration(*projection, width, height);
    camera.fill_camera_pos(*pos);
    camera.fill_viewing_direction(*viewdir);
    camera.fill_world_to_cam(*world_to_cam);
}
示例#2
0
TextureView::TextureView(std::size_t id, mve::CameraInfo const & camera,
    std::string const & image_file)
    : id(id), image_file(image_file) {

    mve::image::ImageHeaders header;
    try {
         header = mve::image::load_file_headers(image_file);
    } catch (util::Exception e) {
        std::cerr << "Could not load image header of " << image_file << std::endl;
        std::cerr << e.what() << std::endl;
        std::exit(EXIT_FAILURE);
    }

    width = header.width;
    height = header.height;

    camera.fill_calibration(*projection, width, height);
    camera.fill_camera_pos(*pos);
    camera.fill_viewing_direction(*viewdir);
    camera.fill_world_to_cam(*world_to_cam);
}