insight3d on Arch Linux

I love to shoot photos and everything which is related to photography. Today I have seen a tweet about insight3d and it’s looking really good. What is insight3d? Maybe you have seen photosynth from Microsoft, a tool to generate a 3D model from lots of  photos from the same object but from different points of view. insight3d is a similar tool, but it’s OpenSource and it runs under Linux. Basically it should run, but before it runs there are some issues to solve.

It runs, but it crashes all the time. Maybe someone with more knowledge about opencv can help me on this. But now the steps to compile it under (Arch) Linux.

  • download the linux package from the website and extract it to a folder you want
  • install all dependencies from the repository:
    • pkg-config
    • opencv
    • sdl
    • gtk+-2.0
    • libxml
    • lapack
    • blas
    • OpenGL library
    • ANN (from AUR)
  • download the latest version of siftfeat from and extract the contents to “<insight_dir>/insight3d/sift”. Overwrite the old version included in the insight3d package.
  • edit the included Makefile located at “<insight_dir>/insight3d/” as follows:
    • change ANN_INCLUDE to ANN_INCLUDE= -I/usr/include/ANN/
    • change g++ line to:   g++ $(DEBUG) -o insight *.o `pkg-config –libs opencv libxml-2.0 sdl gtk+-2.0` ./sift/lib/libfeat.a $(AGARLIB) -llapack -lblas -lGL -lGLU ./sba/libsba.a /usr/lib/libANN.a
  • if you are on x86_64 then you have to change into the directory “<insight_dir>/insight3d/sba/” and run “make clean” and “make”, because the library included there is for the i386 architecture
  • after doing all the steps, go to the “<insight_dir>/insight3d/” directory, and execute “make”
  • if compilation finished then you can run insight3d with “./insight3d” (or “./insight” if you compiled the SVN version

And now the problem about the crash:

Starting the application works and also loading the photos, but doing the second step according to the tutorial (PDF), and try to match the photos it crashes right after the matching with the following error:

$ ./insight
insight3d 0.3.2, 2007-2009
licensed under GNU AGPL 3

testing memory allocation … ok
extracting keypoints
[count = 2311]
[count = 2621]
[count = 2391]
[count = 2423]
matching{}OpenCV Error: Assertion failed (src.depth() == dst.depth() && src.size() == dst.size()) in cvCopy, file /build/src/OpenCV-2.1.0/src/cxcore/cxcopy.cpp, line 466
terminate called after throwing an instance of ‘cv::Exception’
what():  /build/src/OpenCV-2.1.0/src/cxcore/cxcopy.cpp:466: error: (-215) src.depth() == dst.depth() && src.size() == dst.size() in function cvCopy


Is there anybody out there which can give me a hint why insight crashes? I can see that there is an error because an assertion failed, but the photos are from the example directory of insight3d and should work. Any hint on this?


, ,

  1. #1 by lorenzo on 26. November 2010 - 17:13

    i cant find libANN on aur, can somebody help me?

    • #2 by ise on 26. November 2010 - 17:52

      The package is called “ann” in AUR.

  2. #3 by bren on 30. November 2010 - 16:25

    Did you solve this problem? I am experiencing a similar problem with an application.

    • #4 by ise on 30. November 2010 - 16:34

      No, sadly not. Even the developer of insight3d didn’t replied to my mail yet.

      • #5 by bren on 13. January 2011 - 16:04

        Just wanted to let you know that I overcame this error – I was doing something completely different (not using insight3d) with openCV2.1 which resulted in the same exception error – it turned out that I was missing the ffmpeg dll in the executable directory – highgui210 calls ffmpeg210 when handling images.

  3. #6 by brothermechanic on 10. December 2010 - 10:42

    I read your howto and susess compiled insight on my Gentoo (amd64).
    I have same error message. Then i recompile app and depends on opencv-2.0.0 and error was solved!
    I stop when do calibration (with official tutorial) on second error

    Extending calibration by resection.
    List images considered:
    1[439] 0[307]
    Resecting image 1.
    Resection performed.
    Extending calibration by resection.
    List images considered:
    Resecting image 0.
    Resection performed.
    Refining calibration using bundle adjustment.
    Segmentation fault

    May be i help you find the way))))

  4. #7 by Tobias on 22. December 2010 - 15:38


    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


  5. #8 by avanindra on 18. January 2011 - 04:19

    src.depth() == dst.depth() && src.size() == dst.size()

    This error is coming due to incorrect linking of lapack in cvFindFundamentalMat. OpenCV already uses it’s own lapack and sba is using lapack blas etc.

    There are two solutions:

    Either build sba as shared library or use CV_FM_LMEDS flag in cvFindFundamentalMat in matching_extract_tracks method in tools_matching.cpp.

    Because of this linking issues (another I encountered in cvSVD), I reset the whole project in CMake and built sba as shared library.

  6. #9 by MD on 11. March 2011 - 12:47

    Hey avanindra,
    Your solution doesn’t work for me. Using sba as shared library still makes insight3D crash. Same error in cvCopy().: src.depth() == dst.depth() && src.size() == dst.size(). Besides its crashing in an opencv function, what’s that got to do with sba??

    Also bren’s solution that “highgui210 calls ffmpeg210 when handling images” has nothing to do with this problem of crash in insight3d.
    The only thing left for me to try is to use Tobias’s version insight3dng. But Tobias didn’t mention if your version actually works of if he fixed the problem of crash??


  1. bored

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: