Ask Your Question

Revision history [back]

The code i used and it worked for me


include <opencv2 highgui="" highgui.hpp="">

include <opencv2 core="" core.hpp="">

include <iostream>

using namespace std;

using namespace cv;

int main() {

cv::Mat img = imread("left.jpg");

if (img.empty())

{

cout <<"error" <<endl;

}

else

{

cout <<"image read" <<endl;

}

return 0;

}


Hope this helps you :)

The code i used and it worked for me


include <opencv2 highgui="" highgui.hpp="">

include <opencv2 core="" core.hpp="">

include <iostream>

using namespace std;

using namespace cv;

int main() {

cv::Mat img = imread("left.jpg");

if (img.empty())

{

cout <<"error" <<endl;

}

else

{

cout <<"image read" <<endl;

}

return 0;

}


Hope this helps you :)

The code i used and it worked for me


include opencv2/highgui/highgui.hpp

include <opencv2 highgui="" highgui.hpp="">

opencv2/core/core.hpp

include <opencv2 core="" core.hpp="">

iostream

include <iostream>

(include the above files and the rest of the code goes down here)

using namespace std;

using namespace cv;

int main() {

cv::Mat img = imread("left.jpg");

if (img.empty())

{

cout <<"error" <<endl;

}

else

{

cout <<"image read" <<endl;

}

return 0;

}


Hope this helps you :)

The code i used and it worked for me

include opencv2/highgui/highgui.hpp

include opencv2/core/core.hpp

include iostream

(include the above files and the rest of the code goes down here)

using namespace std;

std; using namespace cv; int main() {

using namespace cv;

int main() {

cv::Mat img = imread("left.jpg");

imread("left.jpg"); if (img.empty())

if (img.empty())

{

{

 cout <<"error" <<endl;
}

}

else {

else

{

 cout <<"image read" <<endl;

}

return 0;

}

}

return 0;

}


Hope this helps you :)