DGM compile error

Semantic Image Segmentation with Conditional Random Fields
Bryan
Posts: 11
Joined: Mon Jun 12, 2017, 00:21
Contact:

DGM compile error

Postby Bryan » Mon Jun 12, 2017, 00:25

Hi! I followed your instruction to install DGM. After installing the opencv, I opened .sln and compiled the DGM all build in Debug mode. So many errors in VS2013.
Random.h CameraControl.h AveragePrecision.cpp have errors which are in the attachment in detail. Could you please tell me what is wrong?
Attachments
errorss.PNG
errors.PNG
error.PNG

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

Re: DGM compile error

Postby Creator » Sat Jun 17, 2017, 12:03

Which version of the DGM do you use? 1.5.1 or 1.4.2?
As far as I understand from the mistakes, you have to update your Visual Studio at least till Visual Studio 2015. You can download a free version of the visual studio from the Microsoft web site.

Bryan
Posts: 11
Joined: Mon Jun 12, 2017, 00:21
Contact:

Re: DGM compile error

Postby Bryan » Sun Jun 18, 2017, 14:30

I use DGM 1.5.1. So I must change my VS to 2015. If i use 1.4.2, could I still use vs2013?

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

Re: DGM compile error

Postby Creator » Sun Jun 18, 2017, 14:30

These mistakes may be result of that fact that vc2013 does not fully support c++11. DGM 1.4.2 also uses c++11.
If you use 1.5.1 you have to apply CMake for generating the visual studio solution. You can try to uncheck the support of the PPL in CMake configuration procedure. That must reduce the number of errors. But I suggest you to switch to the Visual Studio 2015 or 2017, rebuild OpenCV with it and then compile DGM library. I think this is the optimal solution.

Bryan
Posts: 11
Joined: Mon Jun 12, 2017, 00:21
Contact:

Re: DGM compile error

Postby Bryan » Tue Jun 20, 2017, 21:57

I have downloaded the DGM opencv_2.4.13 branch from github. And I downloaded opencv2.4.13.exe and extracted the folder including build and source folder. And I compiled with cmake-gui and open .sln with 2013 VS and compile, then get the following result.
Attachments
!cid_ii_159505b95a359eff.png

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

Re: DGM compile error

Postby Creator » Wed Jun 21, 2017, 21:48

The errors in Random.h CameraControl.h and AveragePrecision.cpp are caused by the fact, that your Visual Studio does not fully support the C++11 standard. Here, I can suggest you 2 solutions:
  1. Download and Install Visual Studio 2015 (or 2017) Community (free): https://www.visualstudio.com/downloads/ (the best silution). In this case you will be obliged to re-build the OpenCV library. This procedure is very the same as for building the DGM
  2. Exclude the C++11 code from the library:
    • delete AveragePrecision.cpp and AveragePrecision.h and exclude it from the CMakeLists.txt file and from the “#include” directives
    • disable ENABLE_PPL in the types.h file
    • rewrite the function T rand(T min, T max) in random.h file

Bryan
Posts: 11
Joined: Mon Jun 12, 2017, 00:21
Contact:

Re: DGM compile error

Postby Bryan » Sun Jun 25, 2017, 21:43

Thank you for your patient reply. I have followed your first propose and change to VS2015 platform. I built 14 projects successfully. Then I didn't move content of install folder to build folder as the instruction (http://research.project-10.de/dgm/doc/a ... nstall_dgm) said. Next I new a project with VS2015 and added two property (opencv32.props,debug__.props), one for opencv3.2 setting(opencv setting is ok, I think) and another for DGM. At the same time I copied code of demo train to main.cpp and compiled them but error appeared just like attachment showed.
Attachments
error.PNG
error.PNG (5.22 KiB) Viewed 19303 times

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

Re: DGM compile error

Postby Creator » Tue Jun 27, 2017, 21:07

I can’t say from the attached image the reason for these two errors... “print_help” seems very strange to me, have you copied the source code of the demo_train completely?
As a remedy, and in order to gain fast results, I would suggest you to edit the demo_train code directly in the library. Optionally, f you need to work in a separate project, please try to edit your new project setting manually, with respect to the demo_train settings. Just add new dependencies in the C/C++ and Linker directories of the project’s property pages.

Bryan
Posts: 11
Joined: Mon Jun 12, 2017, 00:21
Contact:

Re: DGM compile error

Postby Bryan » Sun Jul 02, 2017, 00:46

I found I missed something so I renew a project add DGM/demos/demo_train.cpp and the two properties (debug__.props and opencv32.props) and compiled. Many LNK errors. Then I removed demo_train.cpp and add extract.cpp and extract.h, the errors is the same with above. Maybe I met something serious. If you can, I think remote assistant is the best way. You can control my PC and figure it out. Thank you!
Attachments
LNKE.PNG
LNK.PNG
image.png

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

Re: DGM compile error

Postby Creator » Sun Jul 02, 2017, 14:36

It looks like the errors with linking visual studio libraries. I think that copying the properties files does not work.


Return to “Direct Graphical Models”

Who is online

Users browsing this forum: No registered users and 3 guests