Sunday, January 17, 2010

Continuing trying to get insight3d to work.

History: Didn't work well under Ubuntu. Got it to run under Bootcamp Windows XP, but got some crash there too.

Plan: Will try to build on mac, which is my main machine.

Compiled opencv on the mac. Copied the opencv.pc (pkg-config file) manually to /sw/share/pkgconfig.

Compilation on insight3d started.

Stopped in:
g++ -O3 -c `pkg-config --cflags opencv libxml-2.0 sdl gtk+-2.0` -I./ann_1.1.1/include/ cv_extensions.cpp
cv_extensions.cpp: In function ‘void cvComputeRQDecomposition(CvMat*, CvMat*, CvMat*, CvMat*, CvMat*, CvMat*, CvPoint3D64f*)’:
cv_extensions.cpp:18: error: ‘__BEGIN__’ was not declared in this scope
cv_extensions.cpp:197: error: ‘__END__’ was not declared in this scope
cv_extensions.cpp:22: error: label ‘exit’ used but not defined
#include in cv_extensions.cpp.
Changed __BEGIN__ to __CV_BEGIN__ and __END__ to __CV_END__
Lots of warnings about printf formats being wrong, ignoring those.

Next stopped on missing gsl lib.
Trying "sudo fink install gsl"
Added ,0 parameter last in call to cvSaveImage in sift/src/siftfeat.c

Getting errors like this:

Erland-Lewins-Mac-mini:sift erl$ make
make -C ./src siftfeat
ar rc ../lib/libfeat.a imgfeatures.o utils.o sift.o kdtree.o minpq.o xform.o
ranlib ../lib/libfeat.a
ranlib: warning for library: ../lib/libfeat.a the table of contents is empty (no object file members in the library define global symbols)
gcc -O3 -I../include `pkg-config --cflags opencv` `pkg-config --cflags gtk+-2.0` `pkg-config --cflags gsl` siftfeat.c -o ../bin/siftfeat -L../lib -lfeat `pkg-config --libs opencv` `pkg-config --libs gtk+-2.0` `pkg-config --libs gsl`
ld: warning: in ../lib/libfeat.a, file is not of required architecture
ld: warning: in /usr/local/lib/libcxcore.dylib, file is not of required architecture
ld: warning: in /usr/local/lib/libcv.dylib, file is not of required architecture
ld: warning: in /usr/local/lib/libhighgui.dylib, file is not of required architecture
sift/src/imgfeatures.c: 298, change format for line number from %s to %d
sift/src/imgfeatures.c: 369, added -1, -1 to parameters to cvEigenVV

Now getting the "file is not of required architecture problems". Will continue to investigate later



2 comments:

Unknown said...

insight3d seems to come packaged with some prebuilt binaries for the wrong platform. I got it to work under Ubuntu by doing the following. Replace "linux-g++" with "macosx-g++" if using a Mac. Good luck.

sudo apt-get install liblapack-dev libgsl0-dev libsdl1.2-dev libcv-dev
tar -xvzf insight3d_linux.tar.gz
cd insight3d/insight3d
editor sift/include/utils.h # remove line 159: char* basename(const char*)
make -C sift/src clean all
make -C sba clean all
make -C ann_1.1.1 clean
make -C ann_1.1.1 linux-g++
make
./insight3d

tobias said...

Hi,

I've created a new project insight3dng, because the author of insight3d doesn't react on mails and doesn't apply patches. Everyone is welcome to this new project. If you are interested, please contact me.

Changes between insight3dng and insight3d:
- applied patches
- no exe, dll, *.o files in the tgz
- compiles on Ubuntu 10.10
- new git repro, open for every one

https://sourceforge.net/projects/insight3dng/

Regards,
Tobias