This method neatly demonstrates gradient-based direct image alignment: it fits a a target image to a reference image using a homography.
However, it also includes some great software for use in other projects:
Autodiff - fairly comprehensive auto differentiation class, to dramatically simplify and speed up development of gradient-based optimization.
Lie - Lie algebra class supporting various geometric groups, which also supports auto differentiation.
Ojw_interp2 - Fast mex-based image and gradient sampling, which also supports auto differentiation. Mex this function first by calling "mex ojw_interp2.cpp" in the directory you installed the files from this submission in.
Federico: Yes, I believe you should use a more recent compiler. At least VS2015.
HI, thanks for the code, I'm trying to compile ojw_interp2.cpp in Matlab 2016b + vs2013 and I keep getting the following errors:
interp2_methods.hpp(384) : error C2144: syntax error : 'int' should be preceded by ';'
interp2_methods.hpp(397) : see reference to class template instantiation 'lanczos<N>' being compiled
interp2_methods.hpp(384) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
interp2_methods.hpp(406) : error C2144: syntax error : 'int' should be preceded by ';'
interp2_methods.hpp(501) : see reference to class template instantiation 'IM_NTAP<T,U,V,N,filter>' being compiled
interp2_methods.hpp(406) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
looking on line it seems that it may be a missing } or ; somewhere in the code but I'm nor being able to find it. Do you think it may be because of the compiler?
the ojw_interp2.cpp cannot be compiled with Matlab 2016a +vs2015
Fix ojw_interp2 compilation issues. Update autodiff and Lie algebra.