C++ identifier is undefined - open_cv - c++



  • In the test program:

    #include <opencv2/opencv.hpp>
    using namespace cv;
    int main()
    {
        Mat img;
        VideoCapture cap(0);
        while (true)
        {
            cap >> img;
            Mat edges;
            cvtColor(img, edges, CV_BGR2GRAY);
            Canny(edges, edges, 30, 60);
            imshow("window label", edges);
            waitKey(1);
        }
        return 0;
    }
    

    There's a mistake in connection with CV_BGR2GRAY. I've moved all dll files to the project director from bin folder, and I've written in project designs linker (general and input) and c++ (general)



  • Use cv:COLOR_BGR2GRAY instead of cv:CV_BGR2GRAY




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2