00001 #include <cstdlib>
00002
00003 #include <oln/lrde/efigi/misc.hh>
00004 #include <oln/lrde/efigi/io.hh>
00005 #include <oln/lrde/efigi/req.hh>
00006
00007 #include <oln/convol/fast_gaussian.hh>
00008
00009
00010 void usage(char* argv[])
00011 {
00012 std::cerr << "usage: " << argv[0]
00013 << " filein.pgm sigma fileout.pfm" << std::endl;
00014 exit(0);
00015 }
00016
00017
00018
00019
00020 int main(int argc, char* argv[])
00021 {
00022 using namespace oln;
00023
00024 if (argc != 4)
00025 usage(argv);
00026
00027
00028 float sigma = static_cast<float>(std::atof(argv[2]));
00029 assert(sigma > 0);
00030 image2d<float> ima = efigi::load_pfm(argv[1]);
00031 image2d<float> imaG = convol::fast::gaussian(ima, sigma);
00032 efigi::save_pfm(imaG, argv[3]);
00033 }