diff --git a/samples/cpp/fitellipse.cpp b/samples/cpp/fitellipse.cpp index c7a4ebabc1..49e306b05d 100644 --- a/samples/cpp/fitellipse.cpp +++ b/samples/cpp/fitellipse.cpp @@ -16,12 +16,19 @@ ********************************************************************************/ #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/highgui/highgui.hpp" - #include - using namespace cv; using namespace std; +void help() +{ + cout << + "\nThis program is demonstration for ellipse fitting. The program finds\n" + "contours and approximate it by ellipses.\n" + "Call:\n" + "./fitellipse [image_name -- Default stuff.jpg]\n" << endl; +} + int sliderPos = 70; Mat image; @@ -34,7 +41,7 @@ int main( int argc, char** argv ) image = imread(filename, 0); if( image.empty() ) { - cout << "Usage: fitellipse \n"; + cout << "Couldn't open image " << filename << "\nUsage: fitellipse \n"; return 0; }