Build instructions

Win32/MSVC

Define environment variable matlab to contain path to matlab (e.g. C:\Program Files\MATLAB\R2008a). (System properties-> Advanced->Environment Variables).

Open solution projects/deformmatch-v3.sln
In Build->Config.Manager select “Release-lib” (or “Debug-lib-mex” for debug)
Build the solution

From matlab run mex –setup and choose msvc compiler

Run batch files (you might need to edit mexmkae.bat to check that the path to mex.bat is correct):
projects/trws/alg_trws_mex.bat (alg_trws_mexd.bat for debug version)
if there are errors they will appear in projects/trws/alg_trws_mex.log
projects/deform_match_mex/deform_match_mex.bat
projects/deform_match_mex/matching_cost_q_mex.bat

Verify with matlab/minsum/test_trws.m or
matlab/registration_2008/example1/example1.m
You can compile on Win64 machine too, but the mexes will still be 32bit.

Other platforms/gcc3.3.6

cd to projects\exttype and run make
cd to projects\maxplus and run make

This will create libs in the lib/ directory

cd to projects/exttype in the makefile define your matlab folder (e.g. MATLAB = /usr/local/matlab76) and run make
This should create mex file in matlab/minsum/alg_trws
cd to projects/deform_match_mex and run
make –f makefile1
make –f makefile2
I have not tested on x64 machines.

gcc4.x

The code does not completely conform to the requirements standard realized in gcc4.x – it wants to check templates before instantiation and requires a lot of additional hints to be able to do this. This is doable, but currently I don’t follow it.