Measure boundary and corner strengths with the boundaryTensor(): boundarytensor.cxx
Usage: example_boundarytensor infile
, creates boundarystrength.tif
and cornerstrength.tif
#include <iostream>
#include <vigra/multi_array.hxx>
#include <vigra/tensorutilities.hxx>
#include <vigra/boundarytensor.hxx>
{
{
std::cout <<
"Usage: " <<
argv[0] <<
" infile" << std::endl;
std::cout << "(supported formats: " << impexListFormats() << ")" << std::endl;
std::cout << "creates: boundarystrength.tif, cornerstrength.tif" << std::endl;
return 1;
}
try
{
double scale;
std::cout << "Operator scale ? ";
std::cin >> scale;
{
}
{
for(int b=0; b<3; ++b)
{
boundaryTensor(
in.bindElementChannel(b),
bandtensor, scale);
}
}
else
{
std::cerr << "Sorry, can only operate on gray and color images.\n";
return 1;
}
}
catch (std::exception & e)
{
std::cout << e.what() << std::endl;
return 1;
}
return 0;
}
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
image import and export functions