help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: kolmogorovs maxflow library


From: Kai Torben Ohlhus
Subject: Re: kolmogorovs maxflow library
Date: Fri, 23 Aug 2013 23:01:28 +0200

On 22 August 2013 12:33, Tim Kacprowski <address@hidden> wrote:
hello,

i have a problem getting kolmogorvs maxflow library (http://pub.ist.ac.at/~vnk/software.html) to work with octave on ubuntu 12.04.
i thought the simplest way would be to use the wrapper mex library available at (http://www.mathworks.de/matlabcentral/fileexchange/21310-maxflow).
i compiled it using:
mkoctfile -v --mex maxflowmex.cpp 
g++ -c -fPIC -I/usr/include/octave-3.2.4 -I/usr/include/octave-3.2.4/octave -I/usr/include/mpi -I/usr/include/freetype2 -O2 -g -I. maxflowmex.cpp -o maxflowmex.o
In file included from ../maxflow_purec/graph.h:43:0,
                 from maxflowmex.cpp:20:
../maxflow_purec/block.h: In member function ‘Type* Block<Type>::New(int)’:
../maxflow_purec/block.h:124:76: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
../maxflow_purec/block.h: In member function ‘Type* DBlock<Type>::New()’:
../maxflow_purec/block.h:223:76: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
g++ -shared -Wl,-Bsymbolic -o maxflowmex.mex maxflowmex.o -L/usr/lib/octave-3.2.4 -loctinterp -loctave -lcruft -Wl,-Bsymbolic-functions -Wl,-z,relro -llapack -lblas -lfftw3 -lfftw3f -lreadline -lncurses -ldl -lhdf5 -lz -lm -lgfortranbegin -lgfortran
this seemed to work fine. but when i want to execute the test functions in octave i get:
octave:1> test1()
error: `maxflowmex' undefined near line 35 column 18
error: called from:
error:   [...]/maxflow_mex/maxflow.m at line 35, column 16
error:   [...]/maxflow_mex/test1.m at line 32, column 16
 
i hope someone can point me to what's going wrong here.

thanks
tim
 
_______________________________________________________

 Tim Kacprowski             http://timkacprowski.wordpress.com/
 Interfaculty Institute for Genetics and Functional Genomics
 Department of Functional Genomics
 University Medicine Greifswald
 Friedrich-Ludwig-Jahn-Str. 15a, 17487 Greifswald, Germany
 Office (Room 1.04): +49-(0)3834-86-22631
_______________________________________________________

_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave


Hi Tim,

maybe I had more succes. I downloaded the kolmogorvs maxflow library (http://pub.ist.ac.at/~vnk/software.html) and the wrapper mex library (http://www.mathworks.de/matlabcentral/fileexchange/21310-maxflow). Arranged the extracted folders as mentioned in the ReadMe of the wrapper:

"Build Instructions:
===================
1. Extract the library to some directory (denote <lib_home>)
2. Place the maxflow source code (downloaded from the link above) under <lib_home>/maxflow-v3.0
directory
3. run make.m
5. Optional: run test1.m test2.m"

Finally I modified the makefile.m

mkoctfile -mex -v maxflowmex.cpp maxflow-v3.0/graph.cpp maxflow-v3.0/maxflow.cpp 

And got test1.m to work (my image support doesn't currently work in my development-version of octave, so i cannot run test2.m)

>> test1
flow =  3
labels =

  1
  1

HTH,
Kai

reply via email to

[Prev in Thread] Current Thread [Next in Thread]