cv::Mat mat; works fine but cv::dnn::Net net; throws errors

asked 2019-11-20 20:11:12 -0600

bllu gravatar image

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.

edit retag flag offensive close merge delete

Comments

4.1.0 is not the latest version !

if you try to build with the opencv_contrib modules, you need exactly the same version, try to use the master branch for both.

berak gravatar imageberak ( 2019-11-21 06:25:52 -0600 )edit
1

How do I figure out what I'm building with? All I did was set the includes and linker and then run the debugger to compile. Also I have opencv 4.1.2. I don't even think I have any opencv_contrib downloaded

bllu gravatar imagebllu ( 2019-11-21 13:31:26 -0600 )edit

ok, i misread it then ;(

berak gravatar imageberak ( 2019-11-23 05:05:50 -0600 )edit