working on VC ++ 2010 after compilation gives an error Unhandled exception in "0x751ec54f" in "OPCV.exe": Microsoft C ++ exception: cv :: Exception at 0x0038f3f8 .. loaded all libraries, no syntax (IntelliSence) errors please help solve Source problem:

#include <opencv2/imgproc/imgproc.hpp> #include <opencv2/objdetect/objdetect.hpp> #include <opencv2/highgui/highgui.hpp> #include <iostream> using namespace std; using namespace cv; int main(int argc, const char** argv) { // load image and convert to gray scale Mat inImg = imread("pic.jpg", CV_LOAD_IMAGE_COLOR); Mat outImg = imread("pic.jpg", CV_LOAD_IMAGE_COLOR); if (inImg.empty()) { cout << "Error: cannot load source image!\n"; return -1; } for( int y = 0; y < inImg.rows; y++ ) { for( int x = 0; x < inImg.cols; x++ ) { // remove the following line, and add your code to process the input image if ((inImg.at<Vec3b>(y,x)[0]+inImg.at<Vec3b>(y,x)[1]+inImg.at<Vec3b>(y,x)[2])/3>80) { outImg.at<Vec3b>(y,x) = 0; } else outImg.at<Vec3b>(y,x) = 255; } } imshow("Result: ", outImg); return 0; 

}

  • Trace - there is an error. You have a runtime error. - nick_n_a
  • And how to do it, you can explain - Baxodir Ramazonov

0