#include <iostream>
#include <vigra/multi_array.hxx>
#include <vigra/edgedetection.hxx>
int main(int argc, char ** argv)
{
if(argc != 3)
{
std::cout << "Usage: " << argv[0] << " infile outfile" << std::endl;
return 1;
}
try
{
ImageImportInfo info(argv[1]);
vigra_precondition(info.isGrayscale(), "Sorry, cannot operate on color images");
MultiArray<2, UInt8> in(info.shape());
int which;
std::cout << "Use Canny or Shen-Castan detector (1 or 2) ? ";
std::cin >> which;
double scale;
std::cout << "Operator scale ? ";
std::cin >> scale;
double threshold;
std::cout << "Gradient threshold ? ";
std::cin >> threshold;
MultiArray<2, UInt8> out(info.shape());
out = 255;
if(which == 2)
{
}
else
{
}
}
catch (std::exception & e)
{
std::cout << e.what() << std::endl;
return 1;
}
return 0;
}
void importImage(...)
Read an image from a file.
void exportImage(...)
Write an image to a file.
image import and export functions
std::string impexListFormats()
List the image formats VIGRA can read and write.
void cannyEdgeImage(...)
Detect and mark edges in an edge image using Canny's algorithm.
void differenceOfExponentialEdgeImage(...)
Detect and mark edges in an edge image using the Shen/Castan zero-crossing detector.