How to fix this?

Unhandled exception at 0x00007FFE24D24ED9 in Opencv.exe: Microsoft C++ exception: cv::Exception at memory location

please show, what you did to achieve this

1 Like

please help me fix this issue , i have uploaded the code here.

please replace the useless screenshot with a TEXT version, thank you.

#include <opencv2/imgcodecs.hpp> 
#include <opencv2/highgui.hpp> 
#include <opencv2/imgproc.hpp> 
#include <iostream> 

using namespace cv; 
using namespace std; 
///////////////// Images ////////////////////// 

int main() {

    string path = "H:\Wallpaper"; 
    Mat img = imread(path); 
    imshow("Image", img); 
    return 0; 

please check img.empty() after imread()
(your path looks invalid/not an image)

also, 1st time noob uses a file path, right ?
NEVER use a single \. it must be either \\ or /

is it necessary to use gpu for open cv , ihave nividia GTX1650

no, it is not necessary.