I have the latest version of OpenCV and the latest version of Visual Studio 2019.
I installed and setup OpenCV using this tutorial. Even with these imports include <opencv2/opencv.hpp>
include <opencv2/imgproc.hpp>
include <opencv2/highgui.hpp>
include <opencv2/dnn.hpp>
this code throws an error cv::dnn::Net net;
but cv::Mat output_image;
does NOT throw an error. And then on compilation, I get over 200 errors saying: error C3646: 'CV_NOEXCEPT': unknown override specifier, error C2143: syntax error: missing ';' before '{', error C2871: '__CV_CAT': a namespace with this name does not exist, and so on.