K
K
ko_Otopec2019-04-18 08:19:55
OpenCV
ko_Otopec, 2019-04-18 08:19:55

How to fix an error when displaying an image?

When I try to display an image, it throws the following:
5cb808dd22cd7891177218.png

#include <iostream>
#include <opencv2/core.hpp>
#include "opencv2/imgproc.hpp"
#include "opencv2/highgui.hpp"


using namespace cv;
using namespace std;


int main()
{
  try
  {
    Mat img = imread("C:/1.jpg", IMREAD_UNCHANGED);
    namedWindow("Display window", WINDOW_AUTOSIZE);// Create a window for display.
    imshow("Display window", img);
    waitKey(0);
    
  }
  catch (const std::exception & e)
  {
    cout << e.what() << std::endl;
  }
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
ko_Otopec, 2019-04-18
@ko_Otopec

I tried to search myself, version 4.1.0, CV_LOAD_IMAGE_COLOR has already been renamed in it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question