Archive

Archive for the ‘Matlab’ Category

Config mex for Matlab on macOS

July 7, 2012 Leave a comment

I have been trying a lot to make the ‘mex’ working on my mac. But a lot of errors such as can’t find the ‘float.h’, although it is there! multiple tries… finally fix this problem today 🙂

I searched a little bit and finally found this link is quite useful. Basically, you have to make some changes of the ‘mexopts.sh’ file. I have Matlab 2012a, and x-code 4 installed. I didn’t try the suggestion of downloading Xcode3, but the following suggestions work. Find the block of ;; maci64, and change MACOSX_DEPLOYMENT_TARGET to ‘10.6’. Also remove -isysroot in CFLAGS and CXXFLAGS (there are two -isysroot).  Here’s my final mexopts.sh file.

    ;;
 maci64)
 #----------------------------------------------------------------------------
 CC=gcc
 SDKROOT='/Developer/SDKs/MacOSX10.6.sdk'
 MACOSX_DEPLOYMENT_TARGET='10.6'
 ARCHS='x86_64'
 CFLAGS="-fno-common -no-cpp-precomp -arch $ARCHS -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET" 
 CFLAGS="$CFLAGS -fexceptions"
 CLIBS="$MLIBS"
 COPTIMFLAGS='-O2 -DNDEBUG'
 CDEBUGFLAGS='-g'
 #
 CLIBS="$CLIBS -lstdc++"
 
 CXX=g++
 CXXFLAGS="-fno-common -no-cpp-precomp -fexceptions -arch $ARCHS -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET" 
 CXXLIBS="$MLIBS -lstdc++"
 CXXOPTIMFLAGS='-O2 -DNDEBUG'
 CXXDEBUGFLAGS='-g'

 

 

Advertisements
Categories: MacOS, Matlab

3D Reconstruction (I)

January 25, 2012 Leave a comment

Today’s my first test on Bundler http://phototour.cs.washington.edu/
I didn’t use the source cause there are many packages needed to be set up first, so I follow the recommendation using the binary package (bundler-v0.3-binary.zip).
There are some error I encountered cause I carelessly NOT copying the libANN_char.so into the the required path. Well this can be easily fixed by changing/adding the dir-path of libANN_char.so to your LD_LIBRARY_PATH. In my case, the LD_LIBRARY_PATH is empty, so I simply create this env-variable.

export LD_LIBRARY_PATH=./bin/

This should be the directory path to the libANN_char.so, otherwise you will get error that ‘error while loading shared libraries: libANN_char.so: cannot open shared object file: No such file or directory’.

So read carefully for the ‘Before you begin’ section. Also, if you are trying older version, e.g. v0.2, you will need to change the BASE_PATH for multiple files, such as the sift.txt. Just check if there is BASE_PATH for your ‘TO-DO’.

Find my gtk version on ubuntu
$ dpkg -s libgtk2.0-0|grep ‘^Version’

For the 3D models in Python
http://wiki.python.org/moin/NumericAndScientific
Blender.org
http://www.vrplumber.com/py3d.py
http://make3d.cs.cornell.edu/

# http://se.cs.ait.ac.th/cvwiki/matlab:tutorial:3d_reconstruction_with_calibrated_image_sequences#section_23d_reconstruction

# http://www.timzaman.nl/?lang=en

# [Vision] Depth estimation from Blur estimation

# http://www.timzaman.nl/?p=495&lang=en
http://www.timzaman.nl/?p=179&lang=en
http://www.timzaman.nl/?p=501&lang=en

#Camera Calibration Toolbox for Matlab
http://www.vision.caltech.edu/bouguetj/calib_doc/htmls/links.html

# FIT3D
http://www.fit3d.info/”>http://www.fit3d.info/

# OpenSceneGraph
Install OpenSceneGraph on Windows: http://dwightdesign.com/2009/05/installing-openscenegraph-280/
Install on Ubuntu:
apt-get build-dep openscenegraph
apt-get install openscenegraph