open cv error: Assertion failed..........

asked 2016-10-02 10:09:22 -0500

jayshree gravatar image

Hello, I am new to both open cv and ubuntu and I am using open cv 3.1.0 on ubuntu 14.04. I have just installed open cv and trying my first program to display an image, it gets compiled successfully in codelite but I am getting problem in execution. It gives error: open cv error: Assertion failed (size.width>0 && size.height>0), terminate called after throwing an instance of 'cv::excemption', core dumped This is the screenshot of the output: Screenshot from 2016-10-02 19:34:41.png I have got stuck... plz.. help me...!!!! Thanks in advance..!

edit retag flag offensive close merge delete


check if your image is empty before imshow

if (img.empty())
    cout<<"Empty image check pathname";
LBerger gravatar imageLBerger ( 2016-10-02 14:58:18 -0500 )edit

Thank you so much.. I copied the image in debug folder and it works!!!!

jayshree gravatar imagejayshree ( 2016-10-03 11:41:11 -0500 )edit