Commit a81374c1 authored by ttagu99's avatar ttagu99 Committed by Dikay900

findcontour_example check image empty

parent 66fc6126
......@@ -26,8 +26,13 @@ void thresh_callback(int, void* );
*/
int main( int, char** argv )
{
/// Load source image and convert it to gray
src = imread( argv[1], 1 );
/// Load source image
src = imread(argv[1]);
if (src.empty())
{
cerr << "No image supplied ..." << endl;
return -1;
}
/// Convert image to gray and blur it
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