#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
int num,type;
CommandLineParser parser(argc, argv, "{@input | lena.jpg | input image}");
if(src.empty())
{
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;
Mat img;
if(num == 1)
{
cout << endl;
cout << "Press 1 for Normalized Convolution Filter and 2 for Recursive Filter: ";
cin >> type;
imshow(
"Edge Preserve Smoothing",img);
}
else if(num == 2)
{
imshow(
"Detail Enhanced",img);
}
else if(num == 3)
{
Mat img1;
imshow(
"Color Pencil Sketch",img);
}
else if(num == 4)
{
}
}
std::string String
Definition: cvstd.hpp:150
cv::String findFile(const cv::String &relative_path, bool required=true, bool silentMode=false)
Try to find requested data file.
void imshow(const String &winname, InputArray mat)
Displays an image in the specified window.
int waitKey(int delay=0)
Waits for a pressed key.
@ IMREAD_COLOR
If set, always convert image to the 3 channel BGR color image.
Definition: imgcodecs.hpp:72
CV_EXPORTS_W Mat imread(const String &filename, int flags=IMREAD_COLOR)
Loads an image from a file.
void detailEnhance(InputArray src, OutputArray dst, float sigma_s=10, float sigma_r=0.15f)
This filter enhances the details of a particular image.
void stylization(InputArray src, OutputArray dst, float sigma_s=60, float sigma_r=0.45f)
Stylization aims to produce digital imagery with a wide variety of effects not focused on photorealis...
void pencilSketch(InputArray src, OutputArray dst1, OutputArray dst2, float sigma_s=60, float sigma_r=0.07f, float shade_factor=0.02f)
Pencil-like non-photorealistic line drawing.
void edgePreservingFilter(InputArray src, OutputArray dst, int flags=1, float sigma_s=60, float sigma_r=0.4f)
Filtering is the fundamental operation in image and video processing. Edge-preserving smoothing filte...
"black box" representation of the file storage associated with a file on disk.
Definition: affine.hpp:52