Compile error: fatal error: opencv2/dnn/dnn.hpp: No such file or directory

asked 2019-09-24 15:56:21 -0600

alvin gravatar image

I get the error message when trying to build my application, I have installed the opencv_contrib, I can use it from python, e.g. cv2.dnn, but when I try to build a simple c++ application I get this error. Here is my code:

#include <iostream>
#include <string>
#include <fstream>
#include <opencv2/opencv.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/dnn/dnn.hpp>

using namespace std;

int main(int argc, char **argv)
{
    cv::Mat image;
    return 0;
  }
edit retag flag offensive close merge delete