Skip to content

Code Example: Create a View from Images

andre-schulz edited this page Apr 5, 2016 · 4 revisions

Wiki HomeMVE Developers Guide ▸ Code Example: Create a View from Images

#include "mve/image.h"
#include "mve/image_io.h"
#include "mve/view.h"

int
main (void)
{
	// Load images.
	mve::ByteImage::Ptr img1, img2;
	img1 = mve::image::load_file("/tmp/image_0000.jpg");
	img2 = mve::image::load_file("/tmp/undistorted_0000.png");

	// Add images to view and save.
	mve::View::Ptr view = mve::View::create();
	view->set_image(img1, "original");
	view->set_image(img2, "undistorted");
	view->save_view_as("/tmp/view.mve");

	return 0;
}