Smooth an image by averaging a 5x5-box (gray scale or color)
Usage: smooth_explicitly infile outfile
#include <iostream>
#include <vigra/multi_array.hxx>
{
{
std::cout <<
"Usage: " <<
argv[0] <<
" infile outfile" << std::endl;
std::cout << "(supported formats: " << impexListFormats() << ")" << std::endl;
return 1;
}
try
{
{
Shape2 current;
for(current[1] = 0; current[1] <
inputImage.shape(1); ++current[1])
{
for (current[0] = 0; current[0] <
inputImage.shape(0); ++current[0])
{
Shape2
windowStart = max(Shape2(0), current - Shape2(2));
}
}
}
else
{
Shape2 current;
for(current[1] = 0; current[1] <
inputImage.shape(1); ++current[1])
{
for (current[0] = 0; current[0] <
inputImage.shape(0); ++current[0])
{
Shape2
windowStart = max(Shape2(0), current - Shape2(2));
}
}
}
return 0;
}
catch (std::exception & e)
{
std::cout << e.what() << std::endl;
return 1;
}
}
Argument object for the function exportImage().
Definition imageinfo.hxx:134
Argument object for the function importImage().
Definition imageinfo.hxx:391
Class for a single RGB value.
Definition rgbvalue.hxx:128
size_type size() const
Definition tinyvector.hxx:913
TinyVectorView< VALUETYPE, TO-FROM > subarray() const
Definition tinyvector.hxx:887
image import and export functions