Commit 514f1fae authored by Adrien BAK's avatar Adrien BAK

improved error handling

parent 8a2de2ec
......@@ -6,6 +6,7 @@
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include <iostream>
using namespace cv;
......@@ -55,7 +56,11 @@ int main(int, char** argv)
src = imread( argv[1], 1 );
if( !src.data )
{ return -1; }
{
std::cerr<<"Invalid input image\n";
std::cout<<"Usage : tutorial_HoughCircle_Demo <path_to_input_image>\n";
return -1;
}
// Convert it to gray
cvtColor( src, src_gray, COLOR_BGR2GRAY );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment