Thank you very much for your answer, Joerg.
I managed to found the source of my problem, which was defining the shape of the functions in a wrong way. However, I would like to explain a bit more, in case it was interesting for someone on the forum.
I am trying to perform a multi-label segmentation on a point cloud, using alpha-expansion. To achieve so, I need to first set up a graphical model based on the given data and smoothness terms of my energy function.
To get familiar with OpenGM, I started by constructing the 1st order functions and factors out of my data term. My first choice was to use the available ExplicitFunctions and compute the data cost of each label (my case: numberofLabels = 4) for every variable.
In general, is using the ExplicitFunction the best way for such case? It is storing all possible combinations, but some may never be used. Shall I implement my own CustomFunction whenever I feel the need?
- The system I'm running my code on has 32 GB of RAM.
- I am using the native C++ code.
- Input data is a uniformly sampled point cloud, which normally has information such as x-y-z coordinates, normal vectors, color information, etc.
- The number of my variables are normally high (order of million).
- Neighborhood information is computed using a radius search on a tree structure.
- Currently, I assume less than 5 labels for the model.