load image with openCV Mat c++

前端 未结 5 796
梦谈多话
梦谈多话 2020-11-30 15:26

I want to load an image using Mat in openCV

My code is:

Mat I = imread(\"C:/images/apple.jpg\", 0);
namedWindow( \"Display window\", CV_WINDOW_AUTOSI         


        
5条回答
  •  悲&欢浪女
    2020-11-30 15:47

    I don't know why you don't have include problem because normally it .hpp file so you're suppose to do

    #include 
    #include 
    

    But your code seems good but add a cv::waitKey(0); after your imshow.

提交回复
热议问题