Comments (6)
Probably the source of the error is that you use original DGM CMakeLists.txt file to set up your project, which is not really a "correct" way to do so.
Could you please try using the sample CMakeLists.txt file from "Using DGM library with CMake" to set up your project with DGM?
from dgm.
Actually the Cmake I attached is for show how I build the DGM. With the link you sent, I made a basic project and tried to build it. Still I got the same error. The error is again:
[ 50%] Building CXX object CMakeFiles/PROJECT_NAME.dir/main.cpp.o In file included from /usr/local/include/DGM.h:43:0, from /home/aliyasineser/Desktop/example/main.cpp:8: /usr/local/include/DGM/GraphDense.h:6:10: fatal error: densecrf/edgePotentialPotts.h: No such file or directory #include "densecrf/edgePotentialPotts.h" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. CMakeFiles/PROJECT_NAME.dir/build.make:62: recipe for target 'CMakeFiles/PROJECT_NAME.dir/main.cpp.o' failed make[2]: *** [CMakeFiles/PROJECT_NAME.dir/main.cpp.o] Error 1 CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/PROJECT_NAME.dir/all' failed make[1]: *** [CMakeFiles/PROJECT_NAME.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2
And I attached the program. I didn't change anything with cmake, just the source name, dgm and opencv version.
example.zip
from dgm.
@aliyasineser Thank you very much for committing this issue - it was a bug in the library.
Please pull the latest version, now the bug is ought to be fixed.
from dgm.
@ereator thank you. I tried to build library but this time I got the error:
/home/aliyasineser/DGM/modules/DGM/TrainNode.cpp: In member function ‘cv::Mat DirectGraphicalModels::CTrainNode::getNodePotentials(const cv::Mat&, const cv::Mat&, float) const’: /home/aliyasineser/DGM/modules/DGM/TrainNode.cpp:46:10: error: ‘word DirectGraphicalModels::ITrain::m_nFeatures’ is private within this context Mat vec(m_nFeatures, 1, CV_8UC1); ^~~~~~~~~~~ In file included from /home/aliyasineser/DGM/modules/DGM/TrainNode.h:5:0, from /home/aliyasineser/DGM/modules/DGM/TrainNode.cpp:1: /home/aliyasineser/DGM/modules/DGM/ITrain.h:41:8: note: declared private here word m_nFeatures; ///< The number of features (length of the feature vector) ^~~~~~~~~~~ /home/aliyasineser/DGM/modules/DGM/TrainNode.cpp: In member function ‘cv::Mat DirectGraphicalModels::CTrainNode::getNodePotentials(const vec_mat_t&, const cv::Mat&, float) const’: /home/aliyasineser/DGM/modules/DGM/TrainNode.cpp:82:10: error: ‘word DirectGraphicalModels::ITrain::m_nFeatures’ is private within this context Mat vec(m_nFeatures, 1, CV_8UC1); ^~~~~~~~~~~ In file included from /home/aliyasineser/DGM/modules/DGM/TrainNode.h:5:0, from /home/aliyasineser/DGM/modules/DGM/TrainNode.cpp:1: /home/aliyasineser/DGM/modules/DGM/ITrain.h:41:8: note: declared private here word m_nFeatures; ///< The number of features (length of the feature vector) ^~~~~~~~~~~ modules/DGM/CMakeFiles/DGM.dir/build.make:974: recipe for target 'modules/DGM/CMakeFiles/DGM.dir/TrainNode.cpp.o' failed make[2]: *** [modules/DGM/CMakeFiles/DGM.dir/TrainNode.cpp.o] Error 1 CMakeFiles/Makefile2:85: recipe for target 'modules/DGM/CMakeFiles/DGM.dir/all' failed make[1]: *** [modules/DGM/CMakeFiles/DGM.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: *** [all] Error 2
I solved the problem, changed m_nFeatures from private to public. It can be protected maybe, but since it is a design issue I want to report so you can probably find a better solution for the library. The variable in ITrain.h .
And after successful build, I could manage to use and import DGM.h so it means the main problem solved. Thank you. Issue still open due to second problem, it is possible to open second issue if necessary. Thanks
from dgm.
@aliyasineser That's a new bug from yesterday.
I have just fixed that: I used the accessor getNumFeatures() instead of m_nFeatures.
from dgm.
Then we can close the issue, DGM is working. Thank you @ereator 👍
from dgm.
Related Issues (17)
- DGM lib for Ubuntu HOT 2
- I modified everything to work with upcoming OpenCV 4. changes HOT 3
- Initialization error in make: Cause: 3rdparty/densecrf/edgePotentialPotts.cpp HOT 4
- Error in make: ‘isnan’ was not declared in this scope HOT 3
- Index exceeds the Mat dimensions
- Build error HOT 4
- can't use class CEdgeModelPotts explicitly HOT 2
- Train dense models (CRF) on multiple images HOT 3
- Please port to OSX HOT 3
- missing symbol visibility HOT 3
- 2D PDF not used in CTrainNodeBayes HOT 2
- terminate called after throwing an instance of 'cv::Exception' HOT 4
- Training of pairwise potentials of a dense CRF HOT 2
- CNDGauss: Compound Plus Operator possible error HOT 1
- CTrainNodeCvRF: serialization problem HOT 2
- Compiling on MacOS HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dgm.