Feature #3957
This commit is contained in:

committed by
Maksim Shabunin

parent
5cdf0e3e89
commit
297808e6b9
@@ -3,6 +3,7 @@
|
||||
#include "opencv2/highgui/highgui.hpp"
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
|
||||
using namespace cv;
|
||||
|
||||
@@ -58,11 +59,18 @@ static void ErodeDilate(int, void*)
|
||||
|
||||
int main( int argc, char** argv )
|
||||
{
|
||||
char* filename = argc == 2 ? argv[1] : (char*)"../data/baboon.jpg";
|
||||
cv::CommandLineParser parser(argc, argv, "{help h||}{ @image | ../data/baboon.jpg | }");
|
||||
if (parser.has("help"))
|
||||
{
|
||||
help();
|
||||
return 0;
|
||||
}
|
||||
std::string filename = parser.get<std::string>("@image");
|
||||
if( (src = imread(filename,1)).empty() )
|
||||
{
|
||||
help();
|
||||
return -1;
|
||||
|
||||
help();
|
||||
}
|
||||
|
||||
//create windows for output images
|
||||
namedWindow("Open/Close",1);
|
||||
|
Reference in New Issue
Block a user