revamped
This commit is contained in:
@@ -6,6 +6,21 @@
|
|||||||
using namespace cv;
|
using namespace cv;
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
void help()
|
||||||
|
{
|
||||||
|
cout << "\nCool inpainging demo. Inpainting repairs damage to images by floodfilling the damage \n"
|
||||||
|
<< "with surrounding image areas.\n"
|
||||||
|
"Using OpenCV version %s\n" << CV_VERSION << "\n"
|
||||||
|
"Usage:\n"
|
||||||
|
"./inpaint [image_name -- Default fruits.jpg]\n" << endl;
|
||||||
|
|
||||||
|
cout << "Hot keys: \n"
|
||||||
|
"\tESC - quit the program\n"
|
||||||
|
"\tr - restore the original image\n"
|
||||||
|
"\ti or SPACE - run inpainting algorithm\n"
|
||||||
|
"\t\t(before running it, paint something on the image)\n" << endl;
|
||||||
|
}
|
||||||
|
|
||||||
Mat img, inpaintMask;
|
Mat img, inpaintMask;
|
||||||
Point prevPt(-1,-1);
|
Point prevPt(-1,-1);
|
||||||
|
|
||||||
@@ -34,15 +49,11 @@ int main( int argc, char** argv )
|
|||||||
Mat img0 = imread(filename, -1);
|
Mat img0 = imread(filename, -1);
|
||||||
if(img0.empty())
|
if(img0.empty())
|
||||||
{
|
{
|
||||||
cout << "Usage: inpaint <image_name>\n";
|
cout << "Couldn't open the image " << filename << ". Usage: inpaint <image_name>\n" << endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
cout << "Hot keys: \n"
|
help();
|
||||||
"\tESC - quit the program\n"
|
|
||||||
"\tr - restore the original image\n"
|
|
||||||
"\ti or SPACE - run inpainting algorithm\n"
|
|
||||||
"\t\t(before running it, paint something on the image)\n";
|
|
||||||
|
|
||||||
namedWindow( "image", 1 );
|
namedWindow( "image", 1 );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user