0

I installed opencv[dnn] for windows 64-bit using vcpkg. Here's what ./vcpkg list returns

jsoncpp:x64-windows                                1.9.1            jsoncpp is an implementation of a JSON reader an...
libjpeg-turbo:x64-windows                          2.0.3            libjpeg-turbo is a JPEG image codec that uses SI...
liblzma:x64-windows                                5.2.4-2          Compression library with an API similar to that ...
libpng:x64-windows                                 1.6.37-5         libpng is a library implementing an interface fo...
libwebp:x64-windows                                1.0.2-7          Lossy compression of digital photographic images.
opencv4:x64-windows                                4.1.1-3          computer vision library
opencv4[dnn]:x64-windows                                            Enable dnn module
opencv4[jpeg]:x64-windows                                           JPEG support for opencv
opencv4[opengl]:x64-windows                                         opengl support for opencv
opencv4[png]:x64-windows                                            PNG support for opencv
opencv4[tiff]:x64-windows                                           TIFF support for opencv
opencv4[webp]:x64-windows                                           WebP support for opencv
opengl:x64-windows                                 0.0-5            Open Graphics Library (OpenGL)[3][4][5] is a cro...
protobuf:x64-windows                               3.10.0           Protocol Buffers - Google's data interchange format
tiff:x64-windows                                   4.0.10-8         A library that supports the manipulation of TIFF...
zlib:x64-windows                                   1.2.11-5         A compression library

So I think it's definitely there, and the line of code in visual studio #include <opencv2\dnn.hpp> does not throw any errors, but upon typing cv::dnn::Net net; I get the error that namespace cv::dnn has no member 'Net' even though I know that it does.

Then on compilation using Visual Studio 2019, I get a ton of errors in other files like in async.hpp which comes with OpenCV, saying Error C3646 'CV_NOEXCEPT': unknown override specifier (compiling source file src\main.cpp) ...opencv2\core\async.hpp 34 and get more compilation errors in the following files:

  • dnn.hpp
  • async.hpp
  • dict.hpp
  • version.hpp
  • layer.hpp
  • dnn.inl.hpp
  • interface_engine.hpp

I believe these are all linked to the dnn module being included.

Edit: I also installed jsoncpp using vcpkg and it works fine.

Hint33
  • 15
  • 2
  • 8

1 Answers1

0

include this: #include "opencv2/dnn/dnn.hpp"

Kot
  • 13
  • 3