update cpp samples and tutorials
This commit is contained in:
@@ -27,13 +27,13 @@ using namespace cv;
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
CV_Assert(argc == 2);
|
||||
Mat I;
|
||||
I = imread(argv[1]);
|
||||
Mat src;
|
||||
src = imread(argv[1], IMREAD_COLOR);
|
||||
|
||||
Mat gray = Mat(I.size(),CV_8UC1);
|
||||
Mat color_boost = Mat(I.size(),CV_8UC3);
|
||||
Mat gray = Mat(src.size(),CV_8UC1);
|
||||
Mat color_boost = Mat(src.size(),CV_8UC3);
|
||||
|
||||
decolor(I,gray,color_boost);
|
||||
decolor(src,gray,color_boost);
|
||||
imshow("grayscale",gray);
|
||||
imshow("color_boost",color_boost);
|
||||
waitKey(0);
|
||||
|
||||
@@ -35,9 +35,9 @@ int main(int argc, char* argv[])
|
||||
|
||||
int num,type;
|
||||
|
||||
Mat I = imread(argv[1]);
|
||||
Mat src = imread(argv[1], IMREAD_COLOR);
|
||||
|
||||
if(I.empty())
|
||||
if(src.empty())
|
||||
{
|
||||
cout << "Image not found" << endl;
|
||||
exit(0);
|
||||
@@ -71,25 +71,25 @@ int main(int argc, char* argv[])
|
||||
|
||||
cin >> type;
|
||||
|
||||
edgePreservingFilter(I,img,type);
|
||||
edgePreservingFilter(src,img,type);
|
||||
imshow("Edge Preserve Smoothing",img);
|
||||
|
||||
}
|
||||
else if(num == 2)
|
||||
{
|
||||
detailEnhance(I,img);
|
||||
detailEnhance(src,img);
|
||||
imshow("Detail Enhanced",img);
|
||||
}
|
||||
else if(num == 3)
|
||||
{
|
||||
Mat img1;
|
||||
pencilSketch(I,img1, img, 10 , 0.1f, 0.03f);
|
||||
pencilSketch(src,img1, img, 10 , 0.1f, 0.03f);
|
||||
imshow("Pencil Sketch",img1);
|
||||
imshow("Color Pencil Sketch",img);
|
||||
}
|
||||
else if(num == 4)
|
||||
{
|
||||
stylization(I,img);
|
||||
stylization(src,img);
|
||||
imshow("Stylization",img);
|
||||
}
|
||||
waitKey(0);
|
||||
|
||||
Reference in New Issue
Block a user