| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Before anything else, let's look at some example programs.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The image processing equivalent of "Hello world":
#include <vcl_iostream.h>
#include <vil1/vil1_load.h>
#include <vil1/vil1_save.h>
#include <vepl/vepl_gradient_mag.h>
int main(int argc, char** argv)
{
// The input image:
vil1_image in = vil1_load(argv[1]);
// The filter:
vil1_image out = vepl_gradient_mag(in);
// Write output:
vil1_save(out, argv[2], "pnm");
vcl_cout << "Written image of type PNM to " << argv[2] << vcl_endl;
return 0;
}
|
This example takes one grey-level image, and creates a second whose pixel values are the gradient magnitudes of the first.
| [ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by Ian Scott on January, 10 2008 using texi2html 1.76.