Installation / Demo file error

Semantic Image Segmentation with Conditional Random Fields
newcomer

Installation / Demo file error

Postby newcomer » Tue Aug 18, 2020, 18:36

Hi!

I am rather unexperienced in C++ and have some trouble with installing the DGM library. I'm using Windows 10 / VS 2019. I installed OpenCV first and it seemed to work for a small demo file.

When installing DGM according to the documentation (building from source / Windows) I get to the second last step, but the file copyOpenCVDLL.bat outputs The system cannot find the path specified. I cannot find the required dll files in the OpenCV distribution manually neither, there is just the opencv_world440.dll. Shall I copy this one instead?

I tried to run the Demo 2D code, but Visual Studio cannot find the function "print_help()" and the "Timer::start()" / "Timer::stop()"... After removing these parts from the main function, I get a compilation error namespace 'std' has no member 'optional' in the GraphPairwise.h and IGraphPairwise.h and a few more.

Can anyone help me with these issues, please? Seems to me that I am missing some library somewhere...

Thanks a lot!

User avatar
Creator
Posts: 157
Joined: Tue Dec 16, 2008, 20:52
Location: Hannover, Germany
Contact:

Re: Installation / Demo file error

Postby Creator » Thu Aug 20, 2020, 20:53

Hi!

the presence of the opencv_world440.dll file in your OpenCV folder indicates that you installed OpenCV with the pre-built binaries. That means that the file opencv_world440.dll was compiled for a specific Windows and Visual Studio versions, which might be different from yours. That's why I would recommend to build the OpenCV binaries from the sources manually.

Function print_help() is defined in the Demo 2D code: https://github.com/Project-10/DGM/blob/ ... o%202D.cpp It is very strange that compile does not see it. Did you change smth in the files ?

newcomer

Re: Installation / Demo file error

Postby newcomer » Mon Aug 24, 2020, 09:00

Thanks for your reply! I built OpenCV from source now, it seems to work. I could copy the required dll files to DGM. Thanks also for pointing me to the Demo2D.cpp file on GitHub, I just copied&pasted from the Tutorial page https://research.project-10.de/dgmdoc/a01845.html - print_help function and the timer work now.

Yet, I try to compile the Demo 2D code in my own project, but still get a few errors including "namespace std has no member optional" from GraphPairwise.h and IGraphPairwise.h. However, the Demo2D.exe is successfully built within the DGM project. I specified the IDE configurations (additional include and libraries). Do you have an idea where this error could come from?

Thanks a lot!

User avatar
Creator
Posts: 157
Joined: Tue Dec 16, 2008, 20:52
Location: Hannover, Germany
Contact:

Re: Installation / Demo file error

Postby Creator » Mon Aug 24, 2020, 15:09

The member optional came to C++ starting from the version C++17, and was not present in the C++14 or C++11 or even classical C++98. It looks like your compiler does not support C++17. From other hand the Visual Studio 2019 compiler must support optional.
Thus my current guess would be that there is smth wrong with the compilation flags. Maybe it makes sense to generate your own project with CMake as well, for example, using this CMakeLists file: viewtopic.php?f=31&t=1028#p2091


Return to “Direct Graphical Models”

Who is online

Users browsing this forum: No registered users and 27 guests