#include <iostream>
int main(
int argc,
char* argv[])
{
int num,type;
Mat src = imread( samples::findFile( parser.
get<
String>(
"@input") ), IMREAD_COLOR);
{
cout << "Could not open or find the image!\n" << endl;
cout << "Usage: " << argv[0] << " <Input image>" << endl;
exit(0);
}
cout << endl;
cout << " Edge Preserve Filter" << endl;
cout << "----------------------" << endl;
cout << "Options: " << endl;
cout << endl;
cout << "1) Edge Preserve Smoothing" << endl;
cout << " -> Using Normalized convolution Filter" << endl;
cout << " -> Using Recursive Filter" << endl;
cout << "2) Detail Enhancement" << endl;
cout << "3) Pencil sketch/Color Pencil Drawing" << endl;
cout << "4) Stylization" << endl;
cout << endl;
cout << "Press number 1-4 to choose from above techniques: ";
cin >> num;
if(num == 1)
{
cout << endl;
cout << "Press 1 for Normalized Convolution Filter and 2 for Recursive Filter: ";
cin >> type;
edgePreservingFilter(src,img,type);
imshow("Edge Preserve Smoothing",img);
}
else if(num == 2)
{
detailEnhance(src,img);
imshow("Detail Enhanced",img);
}
else if(num == 3)
{
pencilSketch(src,img1, img, 10 , 0.1f, 0.03f);
imshow("Pencil Sketch",img1);
imshow("Color Pencil Sketch",img);
}
else if(num == 4)
{
stylization(src,img);
imshow("Stylization",img);
}
waitKey(0);
}
Designed for command line parsing.
Definition utility.hpp:890
T get(const String &name, bool space_delete=true) const
Access arguments by name.
Definition utility.hpp:956
n-dimensional dense array class
Definition mat.hpp:829
bool empty() const
Returns true if the array has no elements.
std::string String
Definition cvstd.hpp:151
int main(int argc, char *argv[])
Definition highgui_qt.cpp:3