Skip to content
zmoratto edited this page Sep 14, 2010 · 1 revision

A Vision Workbench Hello World!

This is an example of a complete source file that reads in an image, blurs it, and writes it out to disk.

#include <vw/ImageView.h>
#include <vw/PixelTypes.h>
#include <vw/FileIO.h>
#include <vw/Filter.h>
using namespace vw;
int main(int argc, char** argv) {
  // Read in a color image from a jpeg file on disk.
  ImageView< PixelRGB<double> > input_image;
  read_image(input_image, "input_file.jpg");
  // Blur with a sigma of 1 pixel
  ImageView< PixelRGB<double> > output_image = GaussianFilter(input_image, 1.0);
  write_image("output_file.jpg", output_image);
  return 0;
}

Clone this wiki locally