Ask Your Question

Revision history [back]

Unhandled exception at 0x000007FEFD87A06D in ConsoleApplication1.exe: Microsoft C++ exception: cv::Exception at memory location 0x000000000013F000. occurred

hey

i was trying to play with the openCV 4.0.0 and visual studio 2017 after trying to run realy basic program on a 200X200 pixel picture

#include<opencv2\opencv.hpp>
#include<iostream>
#include<stdint.h>
using namespace std;
using namespace cv;
int main()
{
    Mat bwimg;
    Mat img = imread("C:/CV/lena.jpg");
    namedWindow("image", WINDOW_NORMAL);
    cvtColor(img, bwimg, cv::COLOR_RGB2GRAY);

    for (int r = 0; r <= bwimg.rows; r++) {
        for (int c = 0; c <= bwimg.cols; c++) {
            bwimg.at<uint8_t>(r, c) = bwimg.at<uint8_t>(r, c)*0.5f;
        }
    }

    imshow("image", bwimg);


    waitKey(0);
        return 0;
}

after running this program i got

"Unhandled exception at 0x000007FEFDA06D in ConsoleApplication1.exe: Microsoft C++ exception: cv::Exception at memory location 0x000000000013F000."

can anyone help fix that?