improved error handling
This commit is contained in:
parent
8a2de2ecca
commit
514f1fae95
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#include "opencv2/highgui/highgui.hpp"
|
#include "opencv2/highgui/highgui.hpp"
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
#include "opencv2/imgproc/imgproc.hpp"
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
using namespace cv;
|
using namespace cv;
|
||||||
|
|
||||||
@ -55,7 +56,11 @@ int main(int, char** argv)
|
|||||||
src = imread( argv[1], 1 );
|
src = imread( argv[1], 1 );
|
||||||
|
|
||||||
if( !src.data )
|
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
|
// Convert it to gray
|
||||||
cvtColor( src, src_gray, COLOR_BGR2GRAY );
|
cvtColor( src, src_gray, COLOR_BGR2GRAY );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user