johannesu / meanfield-matlab Goto Github PK
View Code? Open in Web Editor NEWMATLAB wrapper for Efficient Inference in Fully Connected CRF
License: MIT License
MATLAB wrapper for Efficient Inference in Fully Connected CRF
License: MIT License
Hello!
I would like to call densecrf from Matlab, therefore I need to compile densecrf_mex.cpp. I tried to compile it using command
mex -I"densecrf/include" densecrf_mex.cpp
from include/ directory, however I have encountered multiple errors with undefined references. The full output is displayed below. In project README I didnt find any compilation related information, thus I suppose it should not be difficult, but I was not able to compile it even though with additional included directories (e.g. -I"densecrf/build/src").
Question: What is recommended way of compiling densecrf_mex.cpp?
Thank you!
Martin
Warning: You are using gcc version "4.8.4-2ubuntu1~14.04)". The version
currently supported with MEX is "4.4.6".
For a list of currently supported compilers see:
http://www.mathworks.com/support/compilers/current_release/
densecrf_mex.o: In function `mexFunction':
densecrf_mex.cpp:(.text+0x2f7d): undefined reference to `DenseCRF2D::DenseCRF2D(int, int, int)'
densecrf_mex.cpp:(.text+0x30ad): undefined reference to `DenseCRF::setUnaryEnergy(Eigen::Matrix<float, -1, -1, 0, -1, -1> const&)'
densecrf_mex.cpp:(.text+0x318b): undefined reference to `PottsCompatibility::PottsCompatibility(float)'
densecrf_mex.cpp:(.text+0x31b2): undefined reference to `DenseCRF2D::addPairwiseGaussian(float, float, LabelCompatibility*, KernelType, NormalizationType)'
densecrf_mex.cpp:(.text+0x31cf): undefined reference to `PottsCompatibility::PottsCompatibility(float)'
densecrf_mex.cpp:(.text+0x3215): undefined reference to `DenseCRF2D::addPairwiseBilateral(float, float, float, float, float, unsigned char const*, LabelCompatibility*, KernelType, NormalizationType)'
densecrf_mex.cpp:(.text+0x322e): undefined reference to `DenseCRF::map(int) const'
densecrf_mex.cpp:(.text+0x3302): undefined reference to `DenseCRF::unaryEnergy(Eigen::Matrix<short, -1, 1, 0, -1, 1> const&)'
densecrf_mex.cpp:(.text+0x3321): undefined reference to `DenseCRF::pairwiseEnergy(Eigen::Matrix<short, -1, 1, 0, -1, 1> const&, int)'
densecrf_mex.cpp:(.text+0x33d9): undefined reference to `DenseCRF::pairwiseEnergy(Eigen::Matrix<short, -1, 1, 0, -1, 1> const&, int)'
densecrf_mex.cpp:(.text+0x35d9): undefined reference to `DenseCRF2D::~DenseCRF2D()'
densecrf_mex.cpp:(.text+0x446f): undefined reference to `MRFEnergy<TypePotts>::MRFEnergy(TypePotts::GlobalSize, void (*)(char*))'
densecrf_mex.cpp:(.text+0x4561): undefined reference to `MRFEnergy<TypePotts>::AddNode(TypePotts::LocalSize, TypePotts::NodeData)'
densecrf_mex.cpp:(.text+0x47fc): undefined reference to `MRFEnergy<TypePotts>::AddEdge(MRFEnergy<TypePotts>::Node*, MRFEnergy<TypePotts>::Node*, TypePotts::EdgeData)'
densecrf_mex.cpp:(.text+0x485e): undefined reference to `MRFEnergy<TypePotts>::Minimize_TRW_S(MRFEnergy<TypePotts>::Options&, double&, double&, double*)'
densecrf_mex.cpp:(.text+0x48e5): undefined reference to `MRFEnergy<TypePotts>::~MRFEnergy()'
densecrf_mex.cpp:(.text+0x497a): undefined reference to `Graph<float, float, float>::Graph(int, int, void (*)(char const*))'
densecrf_mex.cpp:(.text+0x49a2): undefined reference to `Graph<float, float, float>::reallocate_nodes(int)'
densecrf_mex.cpp:(.text+0x4cba): undefined reference to `Graph<float, float, float>::reallocate_arcs()'
densecrf_mex.cpp:(.text+0x4d73): undefined reference to `Graph<float, float, float>::maxflow(bool, Block<int>*)'
densecrf_mex.cpp:(.text+0x4e0e): undefined reference to `Graph<float, float, float>::~Graph()'
densecrf_mex.cpp:(.text+0x50f7): undefined reference to `DenseCRF2D::~DenseCRF2D()'
densecrf_mex.cpp:(.text+0x51c2): undefined reference to `Graph<float, float, float>::~Graph()'
densecrf_mex.o: In function `extendedDenseCRF2D::~extendedDenseCRF2D()':
densecrf_mex.cpp:(.text._ZN18extendedDenseCRF2DD2Ev[_ZN18extendedDenseCRF2DD5Ev]+0x13): undefined reference to `DenseCRF2D::~DenseCRF2D()'
densecrf_mex.o: In function `extendedDenseCRF2D::~extendedDenseCRF2D()':
densecrf_mex.cpp:(.text._ZN18extendedDenseCRF2DD0Ev[_ZN18extendedDenseCRF2DD0Ev]+0x1b): undefined reference to `DenseCRF2D::~DenseCRF2D()'
densecrf_mex.o:(.data.rel.ro._ZTI18extendedDenseCRF2D[_ZTI18extendedDenseCRF2D]+0x10): undefined reference to `typeinfo for DenseCRF2D'
collect2: error: ld returned 1 exit status
mex: link of ' "densecrf_mex.mexa64"' failed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.