mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 14:13:15 +08:00
findcontour_example check image empty
This commit is contained in:
parent
369a3d1426
commit
3c797b0ca5
@ -27,8 +27,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 );
|
||||
|
Loading…
Reference in New Issue
Block a user