[limereg] 13/37: Imported Upstream version 1.4.0

Mattia Rizzolo mattia at debian.org
Wed May 3 16:38:04 UTC 2017


This is an automated email from the git hooks/post-receive script.

mattia pushed a commit to branch master
in repository limereg.

commit 59c00ad4a0d9be91c7baeb32c3fd923b6b6c10df
Author: Roelof Berg <rberg at berg-solutions.de>
Date:   Sun Jun 7 23:49:03 2015 +0200

    Imported Upstream version 1.4.0
---
 Makefile.am                                      |  12 +-
 Makefile.in                                      |  46 +--
 NEWS                                             |  28 +-
 README                                           |  83 ++++-
 config/ltmain.sh                                 |   4 +-
 configure                                        |  34 +-
 configure.ac                                     |  12 +-
 doc/Makefile.am                                  |   8 +-
 doc/Makefile.in                                  |  15 +-
 doc/doxygen-doc/man/man3/liblimereg.3            |   2 +-
 doc/doxygen-doc/man/man3/limereg.h.3             |  22 +-
 exe/CRegistrationController.cpp                  | 197 ++++++------
 exe/CRegistrationController.h                    |   7 +-
 exe/Makefile.am                                  |   3 +-
 exe/Makefile.in                                  |   8 +-
 lib/CMatlabArray.cpp                             |   2 +-
 lib/CRegistrator.cpp                             |  34 +-
 lib/CRegistrator.h                               |   6 +-
 lib/Makefile.am                                  |  11 +-
 lib/Makefile.in                                  | 345 +++++++++++++++-----
 lib/export/limereg.cpp                           |  32 +-
 lib/export/limereg.h                             |   2 +-
 lib/matlab/codegeneration/all.cpp                |  15 +-
 lib/matlab/codegeneration/calcMarginAddition.cpp |  19 +-
 lib/matlab/codegeneration/diffimg.cpp            |  19 +-
 lib/matlab/codegeneration/diffimg.h              |   2 +-
 lib/matlab/codegeneration/gaussnewton.cpp        |  80 +++--
 lib/matlab/codegeneration/gaussnewton.h          |   2 +-
 lib/matlab/codegeneration/gen_example_data.cpp   | 389 -----------------------
 lib/matlab/codegeneration/gen_example_data.h     |  77 -----
 lib/matlab/codegeneration/generatePyramidPC.cpp  |  19 +-
 lib/matlab/codegeneration/jacobian.cpp           |  32 +-
 lib/matlab/codegeneration/jacobian.h             |   3 +-
 lib/matlab/codegeneration/limereg_emxAPI.cpp     |  15 +-
 lib/matlab/codegeneration/limereg_emxutil.cpp    |  15 +-
 lib/matlab/codegeneration/limereg_initialize.cpp |  17 +-
 lib/matlab/codegeneration/limereg_rtwutil.cpp    |  17 +-
 lib/matlab/codegeneration/limereg_terminate.cpp  |  17 +-
 lib/matlab/codegeneration/mldivide.cpp           |  17 +-
 lib/matlab/codegeneration/mod.cpp                |  17 +-
 lib/matlab/codegeneration/mpower.cpp             |  17 +-
 lib/matlab/codegeneration/norm.cpp               |  17 +-
 lib/matlab/codegeneration/rtGetInf.cpp           |   2 +-
 lib/matlab/codegeneration/rtGetNaN.cpp           |   2 +-
 lib/matlab/codegeneration/rt_nonfinite.cpp       |   2 +-
 lib/matlab/codegeneration/shrinkImageDSP.cpp     |  19 +-
 lib/matlab/codegeneration/ssd.cpp                |  32 +-
 lib/matlab/codegeneration/ssd.h                  |   2 +-
 lib/matlab/codegeneration/transform.cpp          |  75 ++---
 lib/matlab/codegeneration/transform.h            |   2 +-
 lib/matlab/matlab_c_ssdRigid2D.cpp               |   2 +-
 tests/Makefile.am                                |   2 +-
 tests/Makefile.in                                |   6 +-
 tests/test_commandLineTool.c                     |  19 +-
 tests/testimg/Makefile.am                        |   2 +-
 tests/testimg/Makefile.in                        |   6 +-
 tests/testimg/image_license.txt                  |  10 +-
 tests/testimg/lime1.png                          | Bin 0 -> 92570 bytes
 tests/testimg/lime2.png                          | Bin 0 -> 94412 bytes
 59 files changed, 775 insertions(+), 1127 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index cd293f8..39e716d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,11 +1,7 @@
 ACLOCAL_AMFLAGS = -I m4
 
-AUX_DIST = $(ac_aux_dir)/compile $(ac_aux_dir)/config.guess	$(ac_aux_dir)/config.sub \
-$(ac_aux_dir)/depcomp $(ac_aux_dir)/install-sh $(ac_aux_dir)/ltmain.sh \
-$(ac_aux_dir)/missing
-
 MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure config.h.in	config.log \
-config.status stamp-h.in $(AUX_DIST)
+config.status stamp-h.in
 
 SUBDIRS = lib exe doc tests
 
@@ -16,9 +12,3 @@ pkgconfig_DATA = liblimereg.pc
 
 beauty:
 	-for dir in lib exe tests; do cd $$dir; $(MAKE) $@; cd ..; done
-
-dist-hook:
-	for file in $(AUX_DIST); do \
-	  cp $$file $(distdir)/$$file; \
-	done
-	cp doc/doxygen.cfg $(distdir)/doc
diff --git a/Makefile.in b/Makefile.in
index 5bfe794..5e02a13 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -233,8 +233,6 @@ am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
 distcleancheck_listfiles = find . -type f -print
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
-AM_CFLAGS = @AM_CFLAGS@
-AM_CXXFLAGS = @AM_CXXFLAGS@
 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
@@ -318,7 +316,9 @@ OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
 OPENCV_CFLAGS = @OPENCV_CFLAGS@
 OPENCV_LIBS = @OPENCV_LIBS@
+OPENMP_CFLAGS = @OPENMP_CFLAGS@
 OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@
+OPENMP_LIBS = @OPENMP_LIBS@
 OTOOL = @OTOOL@
 OTOOL64 = @OTOOL64@
 PACKAGE = @PACKAGE@
@@ -393,12 +393,8 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 ACLOCAL_AMFLAGS = -I m4
-AUX_DIST = $(ac_aux_dir)/compile $(ac_aux_dir)/config.guess	$(ac_aux_dir)/config.sub \
-$(ac_aux_dir)/depcomp $(ac_aux_dir)/install-sh $(ac_aux_dir)/ltmain.sh \
-$(ac_aux_dir)/missing
-
 MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure config.h.in	config.log \
-config.status stamp-h.in $(AUX_DIST)
+config.status stamp-h.in
 
 SUBDIRS = lib exe doc tests
 pkgconfigdir = $(libdir)/pkgconfig
@@ -652,9 +648,6 @@ distdir: $(DISTFILES)
 	      || exit 1; \
 	  fi; \
 	done
-	$(MAKE) $(AM_MAKEFLAGS) \
-	  top_distdir="$(top_distdir)" distdir="$(distdir)" \
-	  dist-hook
 	-test -n "$(am__skip_mode_fix)" \
 	|| find "$(distdir)" -type d ! -perm -755 \
 		-exec chmod u+rwx,go+rx {} \; -o \
@@ -900,20 +893,19 @@ uninstall-am: uninstall-pkgconfigDATA
 .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
 	am--refresh check check-am clean clean-cscope clean-generic \
 	clean-libtool cscope cscopelist-am ctags ctags-am dist \
-	dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \
-	dist-tarZ dist-xz dist-zip distcheck distclean \
-	distclean-generic distclean-hdr distclean-libtool \
-	distclean-tags distcleancheck distdir distuninstallcheck dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-data install-data-am install-dvi install-dvi-am \
-	install-exec install-exec-am install-html install-html-am \
-	install-info install-info-am install-man install-pdf \
-	install-pdf-am install-pkgconfigDATA install-ps install-ps-am \
-	install-strip installcheck installcheck-am installdirs \
-	installdirs-am maintainer-clean maintainer-clean-generic \
-	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
-	ps ps-am tags tags-am uninstall uninstall-am \
-	uninstall-pkgconfigDATA
+	dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
+	dist-xz dist-zip distcheck distclean distclean-generic \
+	distclean-hdr distclean-libtool distclean-tags distcleancheck \
+	distdir distuninstallcheck dvi dvi-am html html-am info \
+	info-am install install-am install-data install-data-am \
+	install-dvi install-dvi-am install-exec install-exec-am \
+	install-html install-html-am install-info install-info-am \
+	install-man install-pdf install-pdf-am install-pkgconfigDATA \
+	install-ps install-ps-am install-strip installcheck \
+	installcheck-am installdirs installdirs-am maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
+	uninstall-am uninstall-pkgconfigDATA
 
 
 .PHONY: beauty dist-hook
@@ -921,12 +913,6 @@ uninstall-am: uninstall-pkgconfigDATA
 beauty:
 	-for dir in lib exe tests; do cd $$dir; $(MAKE) $@; cd ..; done
 
-dist-hook:
-	for file in $(AUX_DIST); do \
-	  cp $$file $(distdir)/$$file; \
-	done
-	cp doc/doxygen.cfg $(distdir)/doc
-
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/NEWS b/NEWS
index 83e8bbe..a8ea9e4 100644
--- a/NEWS
+++ b/NEWS
@@ -1,19 +1,27 @@
-^L
-Version 1.3.2
+

+Version 1.4.0
 
-* Fixed GUI bug, display transformed template image instead of template image twice.
+* Support for arbitrary aspect ratios
+* Support for color images as input image (will be loaded as greyscale)
+* Support for arbitrary image backgrounds 
+* Added parameter --invert (because bright content on a dark background yields better results)
+* Reduced the default value for --maxrot (eliminates the chance that the algorithm gets a stupid start in the first coarse levels)
+* Bugfix: Allow limereg parameters --outfile and --nogui to be coexistent
 
-^L
-Version 1.3.1
+

+Version 1.3.2
 
-* Combined lib and exe in one and the same autotools project (use version of the executable)
+* Fixed GUI bug, display transformed template image instead of template image twice
 
 

-Version 0.9.3
+Version 1.3.1
 
-* Moved lib to autotools
+* Added stencil map to interface
+* Fixed interface package name version suffix
 
 

-Version 0.9.2
+Version 1.3.0
 
-* Initial publication of lib on Launchpad
+* Moved to autotools (first autotools version of the limereg executable)
+* Reunion of liblimereg and limereg in one project
+* Extended API interface (designed for durability over time)
diff --git a/README b/README
index 35a607a..6f3c624 100644
--- a/README
+++ b/README
@@ -8,8 +8,18 @@
 Lightweight IMagE REGistration
 
 Open source and commandline based application and/or software development library, that performs a 2D, rigid
-image registration on two greyscale images and outputs either the transformation parameters or the registered
-image.
+image registration on two images and outputs either the transformation parameters or the registered image.
+
+FOR THE IMPATIENT
+
+On a recent Ubuntu Linux, enter the following into a console window:
+ sudo apt-get install build-essential libcv-dev libhighgui-dev libopencv-dev libboost-dev libboost-program-options-dev doxygen help2man
+ ./configure  CFLAGS="-Ofast" CXXFLAGS="-Ofast"
+ make
+ sudo make install
+ 
+Then test the installed application:
+ limereg --tfile tests/testimg/T_512.bmp --rfile tests/testimg/R_512.bmp
 
 HISTORY
 
@@ -39,7 +49,8 @@ Unix/Linux:
 - Optional: help2man (manpage generation for the command line utility limereg) 
 - Optional: OpenCV (only needed when the limereg command line utility shall be built. Not needed for a lib-only version.)
 - Optional: BoostCmdLineOptions (only needed when the limereg command line utility shall be built. Not needed for a lib-only version.)
-An apt-get commandline for all prerequisites can be found in the file .travis.yml (very last line).
+An apt-get commandline for all prerequisites on Debian/Ubuntu would be:
+sudo apt-get install build-essential libcv-dev libhighgui-dev libopencv-dev libboost-dev libboost-program-options-dev doxygen help2man
 
 Windows:
 Former versions of this library came with a MS Visual Studio project file. If you need MS VSS, just contact me at
@@ -47,6 +58,17 @@ rberg at berg.solutions.de and I will add a vss project file again (only if someone
 is based on the GNU build system (autotools/configure) and this toolchain is also compatible to Windows by using
 compatibility layers like MSYS or Cygwin, just follow the steps below in an MSYS or Cygwin shell.
 
+EXAMPLE RUN BEFORE INSTALLATION
+
+If you want to get an impression of limereg before installing it, do the following (otherwise proceed with the next chapter):
+
+ ./configure  CFLAGS="-Ofast" CXXFLAGS="-Ofast"
+ make
+ cd exe
+ ./limereg --tfile ../tests/testimg/T_512.bmp --rfile ../tests/testimg/R_512.bmp --outfile ../mytest.jpg
+
+You will see that the registered image (../mytest.jpg) has the content of T_512.bmp which has been rigidly aligned to R_512.bmp. 
+
 BUILD AND INSTALLATION
 
 A typical installation is as follows:
@@ -55,10 +77,11 @@ A typical installation is as follows:
  make
  sudo make install
 
-ATTENTION: ON SOME SYSTEMS (DEBIAN, UBUNTU) IT IS CURRENTLY NECESSARY TO CALL AFTER MAKE INSTALL: ldconfig 
+ATTENTION: ON SOME SYSTEMS (DEBIAN, UBUNTU) IT IS CURRENTLY NECESSARY TO CALL AFTER MAKE INSTALL: sudo ldconfig 
 Like in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=684981
 
-For advanced installation options see file INSTALL. 
+For advanced installation options see file INSTALL. You may also want to execute 'make check' after 'make' for
+executing the built-in test automation before installation.
 
 MANUAL
 
@@ -73,6 +96,50 @@ To open the manual of the command line utility:
 The project's web site has additional documentation:
  http://www.berg-solutions.de/limereg.html
 
+EXAMPLES
+
+Example code can be found in the folder named 'tests'. An example for the command line tool
+would be as follows (after 'make install' was executed):
+
+Display registration result on the display screen:
+ cd tests/testimg
+ limereg --tfile T_512.bmp --rfile R_512.bmp
+
+Without GUI (batch mode):
+ cd tests/testimg
+ limereg --tfile T_512.bmp --rfile R_512.bmp --nogui --outfile result.jpg
+
+DEBUGGING
+
+For debugging with gcc use:
+./configure CFLAGS="-ggdb3 -O0" CXXFLAGS="-ggdb3 -O0" LDFLAGS="-ggdb3"
+Then set LD_LIBRARY_PATH to lib/.libs (eclipse: environment tab of the dbg config) and debug the executable exe/.libs/limereg.
+
+TROUBLESHOOTING
+
+Q: What are the current limitations ?
+A: The current version supports only equally sized pictures and internally operates in greyscale color space, it
+also outputs images as greyscale. Furthermore the stencil functions are unsupported today and only rigid transformations
+are possible. This limitations will be eliminated in the future, e.g. allowing also affine transformations (zoom/shear)
+Requesting a feature from the author might change priorities and speed up the development of your desired feature.
+
+Q: What if the registration result is rubbish ?
+A: Image registration isn't trivial, once the optimization algorithm has 'grip' it will give you awesome results. But
+to get this far some work has to be invested. Carefully adjust the max. rotation and max. translation to your particular
+image data, to your use-case. When using the limereg executable (standalone or as a development-tool for figuring out
+the best settings) this would be the parameters --maxrot and --maxtrans. If you expect less rotation, limit --maxrot to
+a few degrees. If you expect much translation, raise --maxtrans, maybe up to 100%.
+For best results use light image data centered on a dark background. You may want to invert the image if your background
+is light. In the limereg executable this can be done by the --invert switch. Get familiar with all parameters of the
+limereg executable and find out what's best for your kind of data.
+Feel free to contact the author if you need help, then the documentation will be extended.
+
+BUG REPORTS / CONTRIBUTION
+
+Please report bugs or send source code contributions via github at:
+https://github.com/roelofberg/limereg
+(This is the base project that is used to create the source code tarball distributions.)
+
 HARDWARE ACCELERATION
 
 Limereg was forked from a software called fimreg that was written for the scientific paper mentioned
@@ -83,12 +150,12 @@ offloaded the CPU by a factor 20 by using such a coprocessor expansion card.
 
 OPEN ISSUES
 
-There are severe limitations in the current version. But, however, the interface is designed for durability.
+There are some limitations in the current version. But, however, the interface is designed for durability.
 This means, the current version can be used for development and an upgrade will lateron remove the following
 open issues without a changed interface (limereg.h).
 
-- Currently only square images are supported
-- Currently the sizes of Reference and Template image must be equal
+- Currently only equally sized images are supported, the sizes of Reference and Template image must be equal.
+- The algorithm internally operates in geyscale only. Also outputted images will be greyscale (this limitation will be removed in V1.5).
 - Stencil images aren't supported yet
 - Currently manual pyramid generation for searching subimages is ignored internally (but the interface can be used allready)
 - One wasting image copy step is made when putting the image data into a matlab array. Elimination will
diff --git a/config/ltmain.sh b/config/ltmain.sh
index c29db36..bffda54 100644
--- a/config/ltmain.sh
+++ b/config/ltmain.sh
@@ -70,7 +70,7 @@
 #         compiler:		$LTCC
 #         compiler flags:		$LTCFLAGS
 #         linker:		$LD (gnu? $with_gnu_ld)
-#         $progname:	(GNU libtool) 2.4.2 Debian-2.4.2-1.10ubuntu1
+#         $progname:	(GNU libtool) 2.4.2 Debian-2.4.2-1.11
 #         automake:	$automake_version
 #         autoconf:	$autoconf_version
 #
@@ -80,7 +80,7 @@
 
 PROGRAM=libtool
 PACKAGE=libtool
-VERSION="2.4.2 Debian-2.4.2-1.10ubuntu1"
+VERSION="2.4.2 Debian-2.4.2-1.11"
 TIMESTAMP=""
 package_revision=1.3337
 
diff --git a/configure b/configure
index 705c208..c4286f1 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for limereg 1.3.2.
+# Generated by GNU Autoconf 2.69 for limereg 1.4.0.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='limereg'
 PACKAGE_TARNAME='limereg'
-PACKAGE_VERSION='1.3.2'
-PACKAGE_STRING='limereg 1.3.2'
+PACKAGE_VERSION='1.4.0'
+PACKAGE_STRING='limereg 1.4.0'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -695,8 +695,8 @@ OPENCV_CFLAGS
 PKG_CONFIG_LIBDIR
 PKG_CONFIG_PATH
 PKG_CONFIG
-AM_CFLAGS
-AM_CXXFLAGS
+OPENMP_LIBS
+OPENMP_CFLAGS
 OPENMP_CXXFLAGS
 HAVE_HELP2MAN_FALSE
 HAVE_HELP2MAN_TRUE
@@ -1408,7 +1408,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures limereg 1.3.2 to adapt to many kinds of systems.
+\`configure' configures limereg 1.4.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1478,7 +1478,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of limereg 1.3.2:";;
+     short | recursive ) echo "Configuration of limereg 1.4.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1612,7 +1612,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-limereg configure 1.3.2
+limereg configure 1.4.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2391,7 +2391,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by limereg $as_me 1.3.2, which was
+It was created by limereg $as_me 1.4.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3256,7 +3256,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='limereg'
- VERSION='1.3.2'
+ VERSION='1.4.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -15790,10 +15790,16 @@ $as_echo "$ac_cv_prog_cxx_openmp" >&6; }
   fi
 
 
-AM_CXXFLAGS="$OPENMP_CXXFLAGS"
+if test -n "${OPENMP_CXXFLAGS}"; then
 
-AM_CFLAGS="$OPENMP_CFLAGS"
 
+  OPENMP_LIBS="-lgomp"
+
+  #non-openmp
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** openmp disabled. The application cannot be executed in parallel on several cpu cores, without openmp it will be single-threaded. This slows down the calculation on multicore systems. ***" >&5
+$as_echo "$as_me: WARNING: *** openmp disabled. The application cannot be executed in parallel on several cpu cores, without openmp it will be single-threaded. This slows down the calculation on multicore systems. ***" >&2;}
+fi
 
 HAVE_OPENCV=false
 
@@ -19705,7 +19711,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by limereg $as_me 1.3.2, which was
+This file was extended by limereg $as_me 1.4.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -19771,7 +19777,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-limereg config.status 1.3.2
+limereg config.status 1.4.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index 9c55c7f..1cdd0cf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,7 +5,7 @@ dnl
 
 dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.68)
-AC_INIT([limereg],[1.3.2])
+AC_INIT([limereg],[1.4.0])
 AC_CONFIG_AUX_DIR([config])
 AC_CONFIG_MACRO_DIR([m4])
 AC_SUBST([ac_aux_dir])
@@ -32,8 +32,14 @@ AC_LANG(C)
 AC_LANG(C++)
 
 AC_OPENMP
-AC_SUBST(AM_CXXFLAGS,"$OPENMP_CXXFLAGS")
-AC_SUBST(AM_CFLAGS,"$OPENMP_CFLAGS")
+if test -n "${OPENMP_CXXFLAGS}"; then
+  AC_SUBST(OPENMP_CFLAGS)
+  AC_SUBST(OPENMP_CXXFLAGS)
+  AC_SUBST(OPENMP_LIBS,"-lgomp")
+  #non-openmp
+else
+  AC_MSG_WARN([*** openmp disabled. The application cannot be executed in parallel on several cpu cores, without openmp it will be single-threaded. This slows down the calculation on multicore systems. ***])
+fi
 
 HAVE_OPENCV=false
 PKG_CHECK_MODULES(OPENCV, opencv >= 2.3.1, [HAVE_OPENCV=true], [true])
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 9bdaee7..66a2511 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,10 +1,16 @@
 MAINTAINERCLEANFILES = Makefile.in
 
 include aminclude.am
-
+	
 #Manpages for the library
 if DX_COND_man
 
+EXTRA_DIST = \
+	doxygen.cfg
+
+clean-local:
+	sudo rm -rf @DX_DOCDIR@
+
 # ToDo: Why does man3_MANS not work ? Better generate the manpages during source-tarball-compilation and don't
 # ship them as part of the tarball. Reason: Parts of the file might be dependent (e.g. unavailable) on the target
 # system. 
diff --git a/doc/Makefile.in b/doc/Makefile.in
index c6abf7b..64c367b 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -176,8 +176,6 @@ am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
-AM_CFLAGS = @AM_CFLAGS@
-AM_CXXFLAGS = @AM_CXXFLAGS@
 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
@@ -261,7 +259,9 @@ OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
 OPENCV_CFLAGS = @OPENCV_CFLAGS@
 OPENCV_LIBS = @OPENCV_LIBS@
+OPENMP_CFLAGS = @OPENMP_CFLAGS@
 OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@
+OPENMP_LIBS = @OPENMP_LIBS@
 OTOOL = @OTOOL@
 OTOOL64 = @OTOOL64@
 PACKAGE = @PACKAGE@
@@ -362,6 +362,9 @@ MAINTAINERCLEANFILES = Makefile.in
 
 
 #Manpages for the library
+ at DX_COND_man_TRUE@EXTRA_DIST = \
+ at DX_COND_man_TRUE@	doxygen.cfg
+
 
 # ToDo: Why does man3_MANS not work ? Better generate the manpages during source-tarball-compilation and don't
 # ship them as part of the tarball. Reason: Parts of the file might be dependent (e.g. unavailable) on the target
@@ -523,9 +526,10 @@ maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
 	@echo "it deletes files that may require special tools to rebuild."
 	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+ at DX_COND_man_FALSE@clean-local:
 clean: clean-am
 
-clean-am: clean-generic clean-libtool mostlyclean-am
+clean-am: clean-generic clean-libtool clean-local mostlyclean-am
 
 distclean: distclean-am
 	-rm -f Makefile
@@ -594,7 +598,7 @@ uninstall-man: uninstall-man3
 .MAKE: install-am install-strip
 
 .PHONY: all all-am check check-am clean clean-generic clean-libtool \
-	cscopelist-am ctags-am distclean distclean-generic \
+	clean-local cscopelist-am ctags-am distclean distclean-generic \
 	distclean-libtool distdir dvi dvi-am html html-am info info-am \
 	install install-am install-data install-data-am install-dvi \
 	install-dvi-am install-exec install-exec-am install-html \
@@ -653,6 +657,9 @@ uninstall-man: uninstall-man3
 @DX_COND_doc_TRUE@	rm -rf @DX_DOCDIR@
 @DX_COND_doc_TRUE@	$(DX_ENV) $(DX_DOXYGEN) $(srcdir)/$(DX_CONFIG)
 
+ at DX_COND_man_TRUE@clean-local:
+ at DX_COND_man_TRUE@	sudo rm -rf @DX_DOCDIR@
+
 @DX_COND_man_TRUE@$(dist_man3_MANS): doxygen-doc
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/doc/doxygen-doc/man/man3/liblimereg.3 b/doc/doxygen-doc/man/man3/liblimereg.3
index 06680b4..4654ea0 100644
--- a/doc/doxygen-doc/man/man3/liblimereg.3
+++ b/doc/doxygen-doc/man/man3/liblimereg.3
@@ -1,4 +1,4 @@
-.TH "liblimereg" 3 "Fri May 1 2015" "liblimereg-1.3.2" \" -*- nroff -*-
+.TH "liblimereg" 3 "Sun Jun 7 2015" "liblimereg-1.4.0" \" -*- nroff -*-
 .ad l
 .nh
 .SH NAME
diff --git a/doc/doxygen-doc/man/man3/limereg.h.3 b/doc/doxygen-doc/man/man3/limereg.h.3
index 918ebf0..867cda4 100644
--- a/doc/doxygen-doc/man/man3/limereg.h.3
+++ b/doc/doxygen-doc/man/man3/limereg.h.3
@@ -1,9 +1,8 @@
-.TH "limereg.h" 3 "Fri May 1 2015" "liblimereg-1.3.2" \" -*- nroff -*-
+.TH "limereg.h" 3 "Sun Jun 7 2015" "liblimereg-1.4.0" \" -*- nroff -*-
 .ad l
 .nh
 .SH NAME
-limereg.h \- 
-Library for lightweight image registration\&.  
+limereg.h \- Library for lightweight image registration\&.  
 
 .SH SYNOPSIS
 .br
@@ -32,7 +31,7 @@ Library for lightweight image registration\&.
 
 .in +1c
 .ti -1c
-.RI "enum \fBLimereg_RetCode\fP { \fBLIMEREG_RET_SUCCESS\fP =0, \fBLIMEREG_RET_INTERNAL_ERROR\fP =1, \fBLIMEREG_RET_RCV_NULLPTR\fP =2, \fBLIMEREG_RET_INVALID_PYRAMID_TYPE\fP =3, \fBLIMEREG_RET_IMAGE_TOO_SMALL\fP =100, \fBLIMEREG_RET_MAX_ROT_INVALID\fP =101, \fBLIMEREG_RET_MAX_TRANS_INVALID\fP =102, \fBLIMEREG_RET_STARTPARAM_INVALID\fP =103, \fBLIMEREG_RET_ABORT_MAXITER_EXCEEDED\fP =200, \fBLIMEREG_RET_STENCIL_NOT_IMPL_YET\fP =9997, \fBLIMEREG_RET_IMAGES_MUST_BE_SQUARE\fP =9998, \fBLIMERE [...]
+.RI "enum \fBLimereg_RetCode\fP { \fBLIMEREG_RET_SUCCESS\fP =0, \fBLIMEREG_RET_INTERNAL_ERROR\fP =1, \fBLIMEREG_RET_RCV_NULLPTR\fP =2, \fBLIMEREG_RET_INVALID_PYRAMID_TYPE\fP =3, \fBLIMEREG_RET_IMAGE_TOO_SMALL\fP =100, \fBLIMEREG_RET_MAX_ROT_INVALID\fP =101, \fBLIMEREG_RET_MAX_TRANS_INVALID\fP =102, \fBLIMEREG_RET_STARTPARAM_INVALID\fP =103, \fBLIMEREG_RET_ABORT_MAXITER_EXCEEDED\fP =200, \fBLIMEREG_RET_STENCIL_NOT_IMPL_YET\fP =9997, \fBLIMEREG_RET_IMAGES_MUST_HAVE_SAME_SIZE\fP =9999 }"
 .br
 .ti -1c
 .RI "enum \fBLimereg_Flags\fP { \fBLimereg_Trafo_Rigid\fP =0 }"
@@ -138,14 +137,11 @@ The registration algorithm took more iterations than allowed by maxIterations an
 \fB\fILIMEREG_RET_STENCIL_NOT_IMPL_YET \fP\fP
 Currently stencil images are unsupported and the pointer named stencilImage has to be set to 0\&. 
 .TP
-\fB\fILIMEREG_RET_IMAGES_MUST_BE_SQUARE \fP\fP
-Currently the image height must be equal to the image width (this limitation will be removed soon) 
-.TP
 \fB\fILIMEREG_RET_IMAGES_MUST_HAVE_SAME_SIZE \fP\fP
 Currently the images to be registered must both have the same size (this limitation will be removed soon) 
 .SH "Function Documentation"
 .PP 
-.SS "enum \fBLimereg_RetCode\fP Limereg_CalculateDiffImage (const struct \fBLimereg_Image\fP *referenceImage, const struct \fBLimereg_Image\fP *templateImage, struct \fBLimereg_Image\fP *differenceImage)"
+.SS "enum \fBLimereg_RetCode\fP Limereg_CalculateDiffImage (const struct \fBLimereg_Image\fP * referenceImage, const struct \fBLimereg_Image\fP * templateImage, struct \fBLimereg_Image\fP * differenceImage)"
 
 .PP
 Generate difference image\&. Calculate the difference image between reference and the template image (sum of squared differences)\&. The images are treated as byte array where one byte matches the luminance (grey-value) of one pixel\&.
@@ -165,7 +161,7 @@ return code
 .RE
 .PP
 
-.SS "enum \fBLimereg_RetCode\fP Limereg_CreatePyramid (const struct \fBLimereg_Image\fP *sourceImage, const struct \fBLimereg_TrafoLimits\fP *registrResultLimits, const unsigned intflags, const struct \fBLimereg_AdvancedRegControl\fP *advancedCtrl, struct \fBLimereg_Image\fP *pyramidImage)"
+.SS "enum \fBLimereg_RetCode\fP Limereg_CreatePyramid (const struct \fBLimereg_Image\fP * sourceImage, const struct \fBLimereg_TrafoLimits\fP * registrResultLimits, const unsigned int flags, const struct \fBLimereg_AdvancedRegControl\fP * advancedCtrl, struct \fBLimereg_Image\fP * pyramidImage)"
 
 .PP
 Create multilevel pyramid (FOR ADVANCED USE ONLY\&. IF NOT USED, THE PYRAMID IS CREATED AUTOMATICALLY)\&. Create a multilevel pyramid\&. For a usual image registration this function should be AVOIDED\&. In usual cases \fBLimereg_RegisterImage()\fP creates the multilevel pyramid internally, automatically\&. The images of each pyramid level will be bigger than the (scaled) source image, because margins will be added that allow Dirichlet boundary conditions to be used without jumps / pipeli [...]
@@ -191,7 +187,7 @@ return code
 .RE
 .PP
 
-.SS "enum \fBLimereg_RetCode\fP Limereg_DeletePyramid (const struct \fBLimereg_Image\fP *pyramidImage)"
+.SS "enum \fBLimereg_RetCode\fP Limereg_DeletePyramid (const struct \fBLimereg_Image\fP * pyramidImage)"
 
 .PP
 Delete multilevel pyramid created by \fBLimereg_CreatePyramid()\fP (FOR ADVANCED USE ONLY\&. IF NOT USED, THE PYRAMID IS CREATED AUTOMATICALLY)\&. Delete a multilevel pyramid that was created by \fBLimereg_CreatePyramid()\fP\&. For a usual image registration this function should be AVOIDED\&. In usual cases \fBLimereg_RegisterImage()\fP creates and deletes the multilevel pyramid internally, automatically\&. The member \fBLimereg_Image\&.PyramidImage\fP of the output buffer is expected to [...]
@@ -213,7 +209,7 @@ Pointer to a null terminated char array containing the version string\&.
 .RE
 .PP
 
-.SS "enum \fBLimereg_RetCode\fP Limereg_RegisterImage (const struct \fBLimereg_Image\fP *referenceImage, const struct \fBLimereg_Image\fP *templateImage, const struct \fBLimereg_TrafoLimits\fP *registrResultLimits, const unsigned intflags, const struct \fBLimereg_AdvancedRegControl\fP *advancedCtrl, struct \fBLimereg_TrafoParams\fP *registrResult, double *distanceMeasure, unsigned int *iterationAmount, unsigned int *iterationsPerLevel)"
+.SS "enum \fBLimereg_RetCode\fP Limereg_RegisterImage (const struct \fBLimereg_Image\fP * referenceImage, const struct \fBLimereg_Image\fP * templateImage, const struct \fBLimereg_TrafoLimits\fP * registrResultLimits, const unsigned int flags, const struct \fBLimereg_AdvancedRegControl\fP * advancedCtrl, struct \fBLimereg_TrafoParams\fP * registrResult, double * distanceMeasure, unsigned int * iterationAmount, unsigned int * iterationsPerLevel)"
 
 .PP
 Register two images\&. Find out the horizontal/vertical shift and the rotation for the best possible overlay of both images\&. The images are treated as byte array where one byte matches the luminance (grey-value) of one pixel\&.
@@ -245,7 +241,7 @@ return code
 .RE
 .PP
 
-.SS "enum \fBLimereg_RetCode\fP Limereg_TransformImage (const struct \fBLimereg_Image\fP *sourceImage, const struct \fBLimereg_TrafoParams\fP *trafoParams, struct \fBLimereg_Image\fP *transformedImage)"
+.SS "enum \fBLimereg_RetCode\fP Limereg_TransformImage (const struct \fBLimereg_Image\fP * sourceImage, const struct \fBLimereg_TrafoParams\fP * trafoParams, struct \fBLimereg_Image\fP * transformedImage)"
 
 .PP
 Rigid image transformation\&. Apply shift and rotation obtained by Limereg_RegisterImage to an image\&. The images are treated as byte array where one byte matches the luminance (grey-value) of one pixel\&.
@@ -267,4 +263,4 @@ return code
 
 .SH "Author"
 .PP 
-Generated automatically by Doxygen for liblimereg-1\&.3\&.2 from the source code\&.
+Generated automatically by Doxygen for liblimereg-1\&.4\&.0 from the source code\&.
diff --git a/exe/CRegistrationController.cpp b/exe/CRegistrationController.cpp
index a8bfcc9..af5847d 100644
--- a/exe/CRegistrationController.cpp
+++ b/exe/CRegistrationController.cpp
@@ -70,6 +70,7 @@ CRegistrationController::CRegistrationController()
   m_fStopSens(REG_REAL_NAN),
   m_fMaxRotation(0),
   m_fMaxTranslation(0),
+  m_bInvert(false),
   m_bNoGui(false)
 {
 }
@@ -96,23 +97,32 @@ void CRegistrationController::RegisterImage()
 	// load template image
 	// ToDo: This class is too big. Refactor out an image class containing all image handling (maybe outlayering OpenCV) (and possibly also the cmdline param stuff at the bottom of this file).
 	IplImage* imgTmp = 0; 
-	imgTmp=cvLoadImage(m_sTFilename.c_str(), 0);
+	imgTmp=cvLoadImage(m_sTFilename.c_str(), CV_LOAD_IMAGE_GRAYSCALE);
 	if(!CheckImage(imgTmp, m_sTFilename))
 		exit(0);
-	uint32_t iDim = imgTmp->height;
+	uint32_t iyDim = imgTmp->height;
+	uint32_t ixDim = imgTmp->width;
 	t_pixel* pixelBytesTmp = (t_pixel *)imgTmp->imageData;
 
 	// load reference image
 	IplImage* imgRef = 0; 
-	imgRef=cvLoadImage(m_sRFilename.c_str(), 0);
-	if(!CheckImage(imgRef, m_sRFilename, iDim))
+	imgRef=cvLoadImage(m_sRFilename.c_str(), CV_LOAD_IMAGE_GRAYSCALE);
+	if(!CheckImage(imgRef, m_sRFilename, ixDim, iyDim))
 		exit(0);
 	t_pixel* pixelBytesRef = (t_pixel *)imgRef->imageData;
 
+	// invert images if requested so by the user
+	if(true == m_bInvert)
+	{
+	    cvXorS(imgTmp, cvScalar(255), imgTmp);
+	    cvXorS(imgRef, cvScalar(255), imgRef);
+	}
+
 //todo: the lib can do this, we can remove it here (verify !)
 	//When levelcount is set to 0: Autodetect of amount of levels (multilevel pyramid)
 	if(0 == m_iLevelCount)
 	{
+		uint32_t iDim = (iyDim<ixDim) ? ixDim : iyDim;
 		m_iLevelCount = uint32_t(ceil(log2(t_reg_real(iDim / gui_LEVELCOUNT_AUTOTETECT_DIVISOR))));
 		printf("Multilevel autodetection suggests %i levels.\n", m_iLevelCount);
 	}
@@ -129,15 +139,15 @@ void CRegistrationController::RegisterImage()
 
 	Limereg_Image refPixels;
 	refPixels.pixelBuffer = pixelBytesRef;
-	refPixels.imageWidth = (uint32_t)iDim;
-	refPixels.imageHeight = (uint32_t)iDim;
+	refPixels.imageWidth = (uint32_t)ixDim;
+	refPixels.imageHeight = (uint32_t)iyDim;
 	refPixels.pixelType = Limereg_Image::Limereg_Grayscale_8;
 	refPixels.pyramidImage = Limereg_Image::Limereg_NotPyramidized;
 
 	Limereg_Image tmpPixels;
 	tmpPixels.pixelBuffer = pixelBytesTmp;
-	tmpPixels.imageWidth = (uint32_t)iDim;
-	tmpPixels.imageHeight = (uint32_t)iDim;
+	tmpPixels.imageWidth = (uint32_t)ixDim;
+	tmpPixels.imageHeight = (uint32_t)iyDim;
 	tmpPixels.pixelType = Limereg_Image::Limereg_Grayscale_8;
 	tmpPixels.pyramidImage = Limereg_Image::Limereg_NotPyramidized;
 
@@ -186,51 +196,56 @@ void CRegistrationController::RegisterImage()
 	string sResult = (boost::format("Iterations = %1%, SSD = %2%, w = [%3% deg, %4% px, %5% px]") % iNumIter % SSD % rotation % xShift % yShift).str();
 	printf("%s\n", sResult.c_str());
 
-	bool bNeedTransImage = false;
-	IplImage* imgTmpTrns;
+    IplImage* imgTmpTrns=NULL;
+    bool bNeedTransImage = (!m_bNoGui) || (0<m_sSaveTransImage.size());
+    Limereg_Image tmpTrnsPixels;
+    if(bNeedTransImage)
+    {
+        // invert images backwards to the originally loaded ones, if it had been reverted before
+        if(true == m_bInvert)
+        {
+            cvXorS(imgTmp, cvScalar(255), imgTmp);
+            cvXorS(imgRef, cvScalar(255), imgRef);
+        }
+
+        // calculate transformed template image
+        imgTmpTrns=cvCloneImage(imgTmp);
+
+        tmpTrnsPixels.pixelBuffer = (t_pixel *)imgTmpTrns->imageData;
+        tmpTrnsPixels.imageWidth = (uint32_t)ixDim;
+        tmpTrnsPixels.imageHeight = (uint32_t)iyDim;
+        refPixels.pixelType = Limereg_Image::Limereg_Grayscale_8;
+        refPixels.pyramidImage = Limereg_Image::Limereg_NotPyramidized;
+
+        //todo: examine retval
+        Limereg_TransformImage(
+                &tmpPixels,
+                &registrResult,
+                &tmpTrnsPixels
+                );
+
+        if(0<m_sSaveTransImage.size())
+        {
+            printf("Saving result to file '%s'.\n", m_sSaveTransImage.c_str());
+            int iRetval = cvSaveImage(m_sSaveTransImage.c_str(), imgTmpTrns);
+            /*if(0!=iRetval)
+            {
+                printf("ERROR, CANNOT SAVE IMAGE, CHECK FILENAME.\n");
+            }*/
+        }
+    }
+
 	if(!m_bNoGui)
 	{
-
-		bNeedTransImage = (!m_bNoGui) || (0<m_sSaveTransImage.size());
-		Limereg_Image tmpTrnsPixels;
-		if(bNeedTransImage)
-		{
-			// calculate transformed template image
-			imgTmpTrns=cvCloneImage(imgTmp);
-
-			tmpTrnsPixels.pixelBuffer = (t_pixel *)imgTmpTrns->imageData;
-			tmpTrnsPixels.imageWidth = (uint32_t)iDim;
-			tmpTrnsPixels.imageHeight = (uint32_t)iDim;
-			refPixels.pixelType = Limereg_Image::Limereg_Grayscale_8;
-			refPixels.pyramidImage = Limereg_Image::Limereg_NotPyramidized;
-
-			//todo: examine retval
-			Limereg_TransformImage(
-					&tmpPixels,
-					&registrResult,
-					&tmpTrnsPixels
-					);
-
-			if(0<m_sSaveTransImage.size())
-			{
-				printf("Saving result to file '%s'.\n", m_sSaveTransImage.c_str());
-				int iRetval = cvSaveImage(m_sSaveTransImage.c_str(), imgTmpTrns);
-				/*if(0!=iRetval)
-				{
-					printf("ERROR, CANNOT SAVE IMAGE, CHECK FILENAME.\n");
-				}*/
-			}
-		}
-
 		// calculate difference image between ORIGINAL template image and reference image
-		IplImage* imgDiffOrig;
+		IplImage* imgDiffOrig=NULL;
 		imgDiffOrig=cvCloneImage(imgTmp);
 
 
 		Limereg_Image imgDiffOrigPixels;
 		imgDiffOrigPixels.pixelBuffer = (t_pixel *)imgDiffOrig->imageData;
-		imgDiffOrigPixels.imageWidth = (uint32_t)iDim;
-		imgDiffOrigPixels.imageHeight = (uint32_t)iDim;
+		imgDiffOrigPixels.imageWidth = (uint32_t)ixDim;
+		imgDiffOrigPixels.imageHeight = (uint32_t)iyDim;
 		refPixels.pixelType = Limereg_Image::Limereg_Grayscale_8;
 		refPixels.pyramidImage = Limereg_Image::Limereg_NotPyramidized;
 
@@ -238,13 +253,13 @@ void CRegistrationController::RegisterImage()
 		Limereg_CalculateDiffImage(&refPixels, &tmpPixels, &imgDiffOrigPixels);
 
 		// calculate difference image between TRANSFORMED template image and reference image
-		IplImage* imgDiffFinal;
+		IplImage* imgDiffFinal=NULL;
 		imgDiffFinal=cvCloneImage(imgTmp);
 
 		Limereg_Image imgDiffFinalPixels;
 		imgDiffFinalPixels.pixelBuffer = (t_pixel *)imgDiffFinal->imageData;
-		imgDiffFinalPixels.imageWidth = (uint32_t)iDim;
-		imgDiffFinalPixels.imageHeight = (uint32_t)iDim;
+		imgDiffFinalPixels.imageWidth = (uint32_t)ixDim;
+		imgDiffFinalPixels.imageHeight = (uint32_t)iyDim;
 		refPixels.pixelType = Limereg_Image::Limereg_Grayscale_8;
 		refPixels.pyramidImage = Limereg_Image::Limereg_NotPyramidized;
 
@@ -253,12 +268,13 @@ void CRegistrationController::RegisterImage()
 
 		// show images
 		//Intelligent image display size (size of image but not more than a maximum)
-		uint32_t iDisplayImgSize = (iDim>APP_MAX_IMG_SIZE) ? APP_MAX_IMG_SIZE : iDim;
-		ShowImage(imgTmp, "Template Image", 0, 0, iDisplayImgSize);
-		ShowImage(imgRef, "Reference Image", 1, 0, iDisplayImgSize);
-		ShowImage(imgTmpTrns, "Registered Image", 2, 0, iDisplayImgSize);
-		ShowImage(imgDiffOrig, "Difference BEFORE", 0, 1, iDisplayImgSize);
-		ShowImage(imgDiffFinal, "Difference AFTER", 1, 1, iDisplayImgSize);
+		uint32_t ixDisplayImgSize = (ixDim>APP_MAX_IMG_SIZE) ? APP_MAX_IMG_SIZE : ixDim;
+		uint32_t iyDisplayImgSize = (iyDim>APP_MAX_IMG_SIZE) ? APP_MAX_IMG_SIZE : iyDim;
+		ShowImage(imgTmp, "Template Image", 0, 0, ixDisplayImgSize, iyDisplayImgSize);
+		ShowImage(imgRef, "Reference Image", 1, 0, ixDisplayImgSize, iyDisplayImgSize);
+		ShowImage(imgTmpTrns, "Registered Image", 2, 0, ixDisplayImgSize, iyDisplayImgSize);
+		ShowImage(imgDiffOrig, "Difference BEFORE", 0, 1, ixDisplayImgSize, iyDisplayImgSize);
+		ShowImage(imgDiffFinal, "Difference AFTER", 1, 1, ixDisplayImgSize, iyDisplayImgSize);
 
 		// Give windows some time to paint the content
 		cvWaitKey(1);
@@ -282,7 +298,7 @@ void CRegistrationController::RegisterImage()
 /**
 * Check wether image file is valid. (Will also check image size)
 */
-bool CRegistrationController::CheckImage(IplImage* Image, const string& sFilename, uint32_t Dim)
+bool CRegistrationController::CheckImage(IplImage* Image, const string& sFilename, uint32_t XDim, uint32_t YDim)
 {
 	//Show all errors at once to the user (e.g. wrong color, height and width)
 	bool bRetVal = CheckImage(Image, sFilename);
@@ -292,10 +308,10 @@ bool CRegistrationController::CheckImage(IplImage* Image, const string& sFilenam
 		return false;
 	}
 
-	//Above checks wether image is square
-	if(Image->height != Dim)
+	//Check for equal size
+	if(Image->width != XDim || Image->height != YDim)
 	{
-		printf("%s Width and height must be %i but are %i.\n", gcsCannotLoadImage.c_str(), Dim, Image->height);
+		printf("%s width must be %i and is %i, the height must be %i and is %i.\n", gcsCannotLoadImage.c_str(), XDim ,Image->width, YDim ,Image->height);
 		bRetVal=false;
 	}
 
@@ -323,27 +339,6 @@ bool CRegistrationController::CheckImage(IplImage* Image, const string& sFilenam
 		bRetVal=false;
 	}
 
-	if(Image->height != Image->width)
-	{
-		printf("%s Image dimensions must be square (width=height) but size is %i x %i.\n", gcsCannotLoadImage.c_str(), Image->width, Image->height);
-		bRetVal=false;
-	}
-
-	/*
-	const int iAllowedWidthStep=iDim;
-	if(Image->widthStep != iDim)
-	{
-	printf("%s Internal image property WidthStep must be %i but is %i.\n", gcsCannotLoadImage.c_str(), iDim, Image->widthStep);
-	bRetVal=false;
-	}
-	*/
-
-	if((Image->height%2)!=0)
-	{
-		printf("%s Image dimensions must be even but width and height are odd (%i).\n", gcsCannotLoadImage.c_str(), Image->height);
-		bRetVal=false;
-	}
-
 	if(Image->height<=0)
 	{
 		printf("%s Image dimensions must be bigger than 0 (but are %i).\n", gcsCannotLoadImage.c_str(), Image->height);
@@ -357,10 +352,10 @@ bool CRegistrationController::CheckImage(IplImage* Image, const string& sFilenam
 * Display image data of 'image' in window named 'WindowName' at the zero based image position xPos, yPos.
 * The position is calculated based on the image dimensions WndSize (e.g. 1,2 an image in the second row and third column)
 */
-void CRegistrationController::ShowImage(IplImage* Image, const string& WindowName, uint32_t xPos, uint32_t yPos, uint32_t WndSize)
+void CRegistrationController::ShowImage(IplImage* Image, const string& WindowName, uint32_t xPos, uint32_t yPos, uint32_t WndSizeX, uint32_t WndSizeY)
 {
 	cvNamedWindow(WindowName.c_str(), 0); 
-	MoveWindow(WindowName, xPos, yPos, WndSize);
+	MoveWindow(WindowName, xPos, yPos, WndSizeX, WndSizeY);
 	cvShowImage(WindowName.c_str(), Image );
 }
 
@@ -368,15 +363,15 @@ void CRegistrationController::ShowImage(IplImage* Image, const string& WindowNam
 * Move a window to the zero based image position xPos, yPos.
 * The position is calculated based on the image dimensions WndSize (e.g. 1,2 an image in the second row and third column)
 */
-void CRegistrationController::MoveWindow(const string& WindowName,  uint32_t xPos, uint32_t yPos, uint32_t WndSize)
+void CRegistrationController::MoveWindow(const string& WindowName,  uint32_t xPos, uint32_t yPos, uint32_t WndSizeX, uint32_t WndSizeY)
 {
 	const uint32_t iXSpacer=20;
 	const uint32_t iYSpacer=40;
 
-	uint32_t xPosPixel = xPos*(iXSpacer+WndSize);
-	uint32_t yPosPixel = yPos*(iYSpacer+WndSize);
+	uint32_t xPosPixel = xPos*(iXSpacer+WndSizeX);
+	uint32_t yPosPixel = yPos*(iYSpacer+WndSizeY);
 	cvMoveWindow(WindowName.c_str(), xPosPixel, yPosPixel);
-	cvResizeWindow(WindowName.c_str(), WndSize, WndSize);
+	cvResizeWindow(WindowName.c_str(), WndSizeX, WndSizeY);
 }
 
 /**
@@ -394,7 +389,7 @@ bool CRegistrationController::ParseParameters(int argc, char ** argv)
 	// DEFAULT CMDLINE PARAMETERS
 	const uint32_t DEF_CMD_PARAM_MAXITER = 150;
 	const uint32_t DEF_CMD_PARAM_LEVELCOUNT = 0;
-	const t_reg_real DEF_CMD_PARAM_MAXROTATION = 45.0f;
+	const t_reg_real DEF_CMD_PARAM_MAXROTATION = 20.0f;
 	const t_reg_real DEF_CMD_PARAM_MAXTRANSLATION = 30.0f;
 	const t_reg_real DEF_CMD_PARAM_STOPSENS = 0.7f;
 	const uint8_t DEF_CMD_PARAM_CDN=10;
@@ -409,6 +404,7 @@ bool CRegistrationController::ParseParameters(int argc, char ** argv)
 	const char csLevelCount[] = "levels";
 	const char csMaxRotation[] = "maxrot";
 	const char csMaxTranslation[] = "maxtrans";
+	const char csInvert[] = "invert";
 	const char csStopSens[] = "stopsens";
 	const char csClipDarkNoise[] = "cdn";
 	const char csNoGui[] = "nogui";
@@ -420,16 +416,18 @@ bool CRegistrationController::ParseParameters(int argc, char ** argv)
 
 	//Define expected cmdline parameters to boost
 	options_description desc("limereg - Lightweight Image Registration\n"
-		                     "Performs a simple rigid image registration. "
-		                     "The image files must be square and grayscale. Supported image formats: *.bmp, *.dib, *.jpeg, "
-							 "*.jpg, *.jpe, *.jp2, *.png, *.pbm, *.pgm, *.ppm, *.sr, *.ras, *.tiff, *.tif.\n\n"
+		                     "Performs a simple rigid image registration. The image files must have equal size.\n"
+	                         "Supported image formats: *.bmp, *.dib, *.jpeg, *.jpg, *.jpe, *.jp2, *.png, *.pbm,\n"
+			                 "*.pgm, *.ppm, *.sr, *.ras, *.tiff, *.tif.\n\n"
 							 "Usage: limereg --rfile <reference image> --tfile <template image> [OPTIONS]"
 							 "\n\nOptions"
 							 );
 
 	options_description exmpl("Examples:\n"
-							 "limereg --tfile t.jpg --rfile r.png\tShifts/Rotates t.jpg for alignment with r.png and displays the result.\n"
-							 "limereg --tfile t.bmp --rfile r.tif --nogui --outfile o.jpg\tOutputs the result to o.jpg, no GUI display.\n"
+							 "limereg --tfile t.jpg --rfile r.png\n"
+							 "Shifts/Rotates t.jpg for alignment with r.png and displays the result.\n\n"
+							 "limereg --tfile t.bmp --rfile r.tif --nogui --outfile o.jpg\n"
+	                         "Outputs the result to o.jpg, no GUI display.\n"
 							 );
 
 	desc.add_options()
@@ -437,11 +435,11 @@ bool CRegistrationController::ParseParameters(int argc, char ** argv)
 
 		(csVersion, "Show application version and copyright information.")
 
-		(csRFilename, value<string>(), "Template image file (will be transformed). The image must be grayscale colored and it must have even and square pixel dimensions.")
+		(csRFilename, value<string>(), "Template image file (will be transformed). The template and reference images must be equal in size.")
 
-		(csTFilename, value<string>(), "Reference image file (will be matched against). The image must be grayscale colored and it must have even and square pixel dimensions.")
+		(csTFilename, value<string>(), "Reference image file (will be matched against). The template and reference images must be equal in size.")
 
-		(csOutFilename, value<string>(), "Output image file (optional). Gives the option to save the registered template image.")
+		(csOutFilename, value<string>(), "Output image file (optional). Gives the option to save the registered template image as grayscale result.")
 
 		(csMaxIter, value<uint32_t>(), (boost::format("Max. amount of iterations.\n"
 									"[Optional parameter, default: %1%]") % DEF_CMD_PARAM_MAXITER).str().c_str())
@@ -459,6 +457,11 @@ bool CRegistrationController::ParseParameters(int argc, char ** argv)
 									"but the calculation speed will slow down).\n"
 									"[Optional parameter, default: %1%]") % DEF_CMD_PARAM_MAXTRANSLATION).str().c_str())
 
+        (csInvert, "Invert the internal grayscale representation. Best registration results are usually obtained with bright content on a dark background, "
+                                    "consider setting this parameter, if you have dark content on a bright background. This setting affects only the internal operation, "
+                                    "it will not be visible on GUI or file output images.\n"
+                                    "[Flag parameter]")
+
 		(csStopSens, value<t_reg_real>(), (boost::format("Sensitivity of the STOP criteria for the gauss-newton algorithm.\n"
 									"[Optional parameter, use ranges between 1 (not sensitive, stops early) to 0.0001 (very sensitive) default: %1%]") % DEF_CMD_PARAM_STOPSENS).str().c_str())
 
@@ -619,6 +622,9 @@ bool CRegistrationController::ParseParameters(int argc, char ** argv)
 			m_fMaxTranslation = DEF_CMD_PARAM_MAXTRANSLATION;
 		}
 
+        //CMDLine parameter --invert .........................................................................................
+		m_bInvert = (0 < vm.count(csInvert));
+
 		//CMDLine parameter --stopsens .......................................................................................
 		if (0 < vm.count(csStopSens))
 		{
@@ -666,7 +672,7 @@ bool CRegistrationController::ParseParameters(int argc, char ** argv)
 	//Reply parsed parameters to user console
 	const char szEnabled[] = "enabled";
 	const char szDisabled[] = "disabled";
-	CLogger::PrintInfo((boost::format("Parameters: %1%=\"%2%\" %3%=\"%4%\" %5%=\"%6%\" %7%=%8%[iter.] %9%=%10%[levels, 0=autom.] %11%=%12%[deg.] %13%=%14%[percent] %15%=%16% %17%=%18% %19%=%20%")
+	CLogger::PrintInfo((boost::format("Parameters: %1%=\"%2%\" %3%=\"%4%\" %5%=\"%6%\" %7%=%8%[iter.] %9%=%10%[levels, 0=autom.] %11%=%12%[deg.] %13%=%14%[percent] %15%=%16% %17%=%18% %19%=%20% %21%=%22%")
 			% csTFilename % m_sTFilename
 			% csRFilename % m_sRFilename
 			% csOutFilename % m_sSaveTransImage
@@ -674,6 +680,7 @@ bool CRegistrationController::ParseParameters(int argc, char ** argv)
 			% csLevelCount % m_iLevelCount
 			% csMaxRotation % m_fMaxRotation
 			% csMaxTranslation % m_fMaxTranslation
+            % csInvert % (m_bInvert ? szEnabled : szDisabled)
 			% csStopSens % m_fStopSens
 			% csClipDarkNoise % guClipDarkNoise
 			% csNoGui % (m_bNoGui ? szEnabled : szDisabled)
diff --git a/exe/CRegistrationController.h b/exe/CRegistrationController.h
index 5f803f4..c170c31 100644
--- a/exe/CRegistrationController.h
+++ b/exe/CRegistrationController.h
@@ -58,10 +58,10 @@ public:
 
 private:
 	bool ParseParameters(int argc, char ** argv);
-	bool CheckImage(IplImage* Image, const string& Filename, uint32_t Dim);
+	bool CheckImage(IplImage* Image, const string& Filename, uint32_t XDim, uint32_t YDim);
 	bool CheckImage(IplImage* Image, const string& Filename);
-	void ShowImage(IplImage* Image, const string& WindowName, uint32_t xPos, uint32_t yPos, uint32_t WndSize);
-	void MoveWindow(const string& WindowName,  uint32_t xPos, uint32_t yPos, uint32_t WndSize);
+	void ShowImage(IplImage* Image, const string& WindowName, uint32_t xPos, uint32_t yPos, uint32_t WndSizeX, uint32_t WndSizeY);
+	void MoveWindow(const string& WindowName,  uint32_t xPos, uint32_t yPos, uint32_t WndSizeX, uint32_t WndSizeY);
 
 	//cmdline params
 	string m_sTFilename;
@@ -73,4 +73,5 @@ private:
 	uint32_t m_uiMaxIter;
 	t_reg_real m_fStopSens;
 	bool m_bNoGui;
+	bool m_bInvert;
 };
diff --git a/exe/Makefile.am b/exe/Makefile.am
index 2edeecf..1326c71 100644
--- a/exe/Makefile.am
+++ b/exe/Makefile.am
@@ -21,7 +21,8 @@ limereg_LDADD += @BOOST_PROGRAM_OPTIONS_LIBS@
 limereg_CFLAGS += @OPENCV_CFLAGS@
 limereg_CPPFLAGS += @OPENCV_CFLAGS@
 #limereg_LDFLAGS += @OPENCV_LDFLAGS@
-limereg_LDADD += @OPENCV_LIBS@
+#limereg_LDADD += @OPENCV_LIBS@
+limereg_LDADD += -lopencv_highgui -lopencv_core
 
 #Manpages for the command-line utility
 if HAVE_HELP2MAN
diff --git a/exe/Makefile.in b/exe/Makefile.in
index 6d4108a..d887266 100644
--- a/exe/Makefile.in
+++ b/exe/Makefile.in
@@ -225,8 +225,6 @@ CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
-AM_CFLAGS = @AM_CFLAGS@
-AM_CXXFLAGS = @AM_CXXFLAGS@
 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
@@ -310,7 +308,9 @@ OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
 OPENCV_CFLAGS = @OPENCV_CFLAGS@
 OPENCV_LIBS = @OPENCV_LIBS@
+OPENMP_CFLAGS = @OPENMP_CFLAGS@
 OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@
+OPENMP_LIBS = @OPENMP_LIBS@
 OTOOL = @OTOOL@
 OTOOL64 = @OTOOL64@
 PACKAGE = @PACKAGE@
@@ -401,9 +401,11 @@ MAINTAINERCLEANFILES = Makefile.in
 @HAVE_BOOST_TRUE@@HAVE_OPENCV_TRUE@	@BOOST_PROGRAM_OPTIONS_LDFLAGS@ \
 @HAVE_BOOST_TRUE@@HAVE_OPENCV_TRUE@	$(am__empty)
 #limereg_LDFLAGS += @OPENCV_LDFLAGS@
+#limereg_LDADD += @OPENCV_LIBS@
 @HAVE_BOOST_TRUE@@HAVE_OPENCV_TRUE at limereg_LDADD = $(top_builddir)/lib/liblimereg.la \
 @HAVE_BOOST_TRUE@@HAVE_OPENCV_TRUE@	@BOOST_PROGRAM_OPTIONS_LIBS@ \
- at HAVE_BOOST_TRUE@@HAVE_OPENCV_TRUE@	@OPENCV_LIBS@ $(am__empty)
+ at HAVE_BOOST_TRUE@@HAVE_OPENCV_TRUE@	-lopencv_highgui \
+ at HAVE_BOOST_TRUE@@HAVE_OPENCV_TRUE@	-lopencv_core
 
 #Manpages for the command-line utility
 @HAVE_BOOST_TRUE@@HAVE_HELP2MAN_TRUE@@HAVE_OPENCV_TRUE at man1_MANS = ../doc/limereg.1
diff --git a/lib/CMatlabArray.cpp b/lib/CMatlabArray.cpp
index 2a06e70..9a8b2cb 100644
--- a/lib/CMatlabArray.cpp
+++ b/lib/CMatlabArray.cpp
@@ -48,7 +48,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #include "stdafx.h"	//Precompiled headerfile, MUST be first entry in .cpp file
 #include "CMatlabArray.h"
-#include "limereg_emxutil.h"
+#include "matlab/codegeneration/limereg_emxutil.h"
 
 namespace Limereg {
 
diff --git a/lib/CRegistrator.cpp b/lib/CRegistrator.cpp
index d6d755b..90d0712 100644
--- a/lib/CRegistrator.cpp
+++ b/lib/CRegistrator.cpp
@@ -46,17 +46,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "limereg_common.h"
 #include "CRegistrator.h"
 
-#include "gaussnewton.h"
-#include "transform.h"
-#include "diffimg.h"
-//#include "gen_example_data.h"
-#include "limereg_initialize.h"
-#include "limereg_terminate.h"
-#include "limereg_emxutil.h"
+#include "matlab/codegeneration/gaussnewton.h"
+#include "matlab/codegeneration/transform.h"
+#include "matlab/codegeneration/diffimg.h"
+#include "matlab/codegeneration/limereg_initialize.h"
+#include "matlab/codegeneration/limereg_terminate.h"
+#include "matlab/codegeneration/limereg_emxutil.h"
 
 #include "CMatlabArray.h"
 
-#include "pseudo_stdafx.h"                    //stdafx not possible because of include position of matlab
+#include "matlab/pseudo_stdafx.h"                    //stdafx not possible because of include position of matlab
 
 //(Global ugliness came originally from the matlab c callbacks, search for g_CHPRPCConnection to understand this)
 
@@ -78,7 +77,7 @@ CRegistrator::~CRegistrator()
 * regParams will contain the final registration parameters
 * \ret SSD distance
 */
-uint32_t CRegistrator::RegisterImages(uint32_t iPicDim, uint32_t iMaxIter, t_reg_real fMaxRotation, t_reg_real fMaxTranslation,
+uint32_t CRegistrator::RegisterImages(uint32_t iPicDimX, uint32_t iPicDimY, uint32_t iMaxIter, t_reg_real fMaxRotation, t_reg_real fMaxTranslation,
 		uint32_t iLevelCount, uint32_t iSkipFineLevels, t_reg_real fStopSensitivity, t_pixel* imgRef, t_pixel* imgTmp,
 		t_reg_real (&aRegStartParams)[3], t_reg_real (&aRegResult)[3], t_reg_real& fSSD, uint32_t *iterationsPerLevel
 		)
@@ -88,7 +87,7 @@ uint32_t CRegistrator::RegisterImages(uint32_t iPicDim, uint32_t iMaxIter, t_reg
 	fSSD=0;
 
 	//Allocate image memory as an array suitable for matlab coder generated code
-	uint32_t iPixelAmount = iPicDim*iPicDim;
+	uint32_t iPixelAmount = iPicDimX*iPicDimY;
 	TMatlabArray_Pixel Tvec(iPixelAmount);
 	uint32_t iRPixelAmount = iPixelAmount;
 
@@ -102,17 +101,18 @@ uint32_t CRegistrator::RegisterImages(uint32_t iPicDim, uint32_t iMaxIter, t_reg
 	memcpy(Tvec.GetCMemoryArrayPtr(), imgTmp, iPixelAmount * sizeof(t_pixel));
 
 	//Start image registration
-	gaussnewton(iPicDim, iMaxIter, fStopSensitivity, fMaxRotation, (t_reg_real)iPicDim*(fMaxTranslation / 100),
+	uint32_t iMaxPicDim = (iPicDimX < iPicDimY) ? iPicDimY : iPicDimX;
+	gaussnewton(iPicDimX, iPicDimY, iMaxIter, fStopSensitivity, fMaxRotation, (t_reg_real)iMaxPicDim*(fMaxTranslation / 100),
 		iLevelCount, iSkipFineLevels, Rvec.GetMatlabArrayPtr(), Tvec.GetMatlabArrayPtr(), &iNoIterations, &fSSD,
 		aRegStartParams, aRegResult, iterationsPerLevel);
 
     return iNoIterations;
 }
 
-void CRegistrator::CalculateDiffImage(uint32_t iPicDim, t_pixel* imgRef, t_pixel* imgTmp, t_pixel* imgDst)
+void CRegistrator::CalculateDiffImage(uint32_t iPicDimX, uint32_t iPicDimY, t_pixel* imgRef, t_pixel* imgTmp, t_pixel* imgDst)
 {
 	//Allocate image memory as an array suitable for matlab coder generated code
-	uint32_t iPixelAmount = iPicDim*iPicDim;
+	uint32_t iPixelAmount = iPicDimX*iPicDimY;
 	TMatlabArray_Pixel Rvec(iPixelAmount);
 	TMatlabArray_Pixel Tvec(iPixelAmount);
 	TMatlabArray_Pixel Dvec(iPixelAmount);
@@ -123,16 +123,16 @@ void CRegistrator::CalculateDiffImage(uint32_t iPicDim, t_pixel* imgRef, t_pixel
 	memcpy(Tvec.GetCMemoryArrayPtr(), imgTmp, iPixelAmount * sizeof(t_pixel));
 
 	//Execute computation
-	diffimg(Rvec.GetMatlabArrayPtr(), Tvec.GetMatlabArrayPtr(), iPicDim, Dvec.GetMatlabArrayPtr());
+	diffimg(Rvec.GetMatlabArrayPtr(), Tvec.GetMatlabArrayPtr(), iPicDimX, iPicDimY, Dvec.GetMatlabArrayPtr());
 
 	//Copy buffer back to application
 	memcpy(imgDst, Dvec.GetCMemoryArrayPtr(), iPixelAmount);
 }
 
-void CRegistrator::TransformImage(uint32_t iPicDim, t_reg_real w[3], t_pixel* imgSrc, t_pixel* imgDst)
+void CRegistrator::TransformImage(uint32_t iPicDimX, uint32_t iPicDimY, t_reg_real w[3], t_pixel* imgSrc, t_pixel* imgDst)
 {
 	//Allocate image memory as an array suitable for matlab coder generated code
-	uint32_t iPixelAmount = iPicDim*iPicDim;
+	uint32_t iPixelAmount = iPicDimX*iPicDimY;
 	TMatlabArray_Pixel Svec(iPixelAmount);
 	TMatlabArray_Pixel Dvec(iPixelAmount);
 
@@ -141,7 +141,7 @@ void CRegistrator::TransformImage(uint32_t iPicDim, t_reg_real w[3], t_pixel* im
 	memcpy(Svec.GetCMemoryArrayPtr(), imgSrc, iPixelAmount * sizeof(t_pixel));
 
 	//Execute computation
-	transform(w, Svec.GetMatlabArrayPtr(), iPicDim, Dvec.GetMatlabArrayPtr());
+	transform(w, Svec.GetMatlabArrayPtr(), iPicDimX, iPicDimY, Dvec.GetMatlabArrayPtr());
 
 	//Copy buffer back to application
 	memcpy(imgDst, Dvec.GetCMemoryArrayPtr(), iPixelAmount);
diff --git a/lib/CRegistrator.h b/lib/CRegistrator.h
index 9682bfd..149010d 100644
--- a/lib/CRegistrator.h
+++ b/lib/CRegistrator.h
@@ -55,12 +55,12 @@ public:
 	CRegistrator();
 	virtual ~CRegistrator();
 
-	uint32_t RegisterImages(uint32_t iPicDim, uint32_t iMaxIter, t_reg_real fMaxRotation, t_reg_real fMaxTranslation,
+	uint32_t RegisterImages(uint32_t iPicDimX, uint32_t iPicDimY, uint32_t iMaxIter, t_reg_real fMaxRotation, t_reg_real fMaxTranslation,
 			uint32_t iLevelCount, uint32_t iSkipFineLevels, t_reg_real fStopSensitivity, t_pixel* imgRef, t_pixel* imgTmp,
 			t_reg_real (&aRegStartParams)[3], t_reg_real (&aRegResult)[3], t_reg_real& fSSD, uint32_t *iterationsPerLevel
 			);
-	void TransformImage(uint32_t iPicDim, t_reg_real w[3], t_pixel* imgSrc, t_pixel* imgDst);
-	void CalculateDiffImage(uint32_t iPicDim, t_pixel* imgRef, t_pixel* imgTmp, t_pixel* imgDst);
+	void TransformImage(uint32_t iPicDimX, uint32_t iPicDimY, t_reg_real w[3], t_pixel* imgSrc, t_pixel* imgDst);
+	void CalculateDiffImage(uint32_t iPicDimX, uint32_t iPicDimY, t_pixel* imgRef, t_pixel* imgTmp, t_pixel* imgDst);
 };
 
 }
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 0fb871c..f562ec3 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -1,7 +1,5 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-AM_CPPFLAGS = -I. -Imatlab -Imatlab/codegeneration
-
 lib_LTLIBRARIES = liblimereg.la
 
 liblimereg_la_SOURCES = CMatlabArray.cpp CMatlabArray.h CMatlabArrayTypedefs.h CRegistrator.cpp CRegistrator.h \
@@ -11,7 +9,6 @@ matlab/codegeneration/all.cpp matlab/codegeneration/all.h\
 matlab/codegeneration/calcMarginAddition.cpp matlab/codegeneration/calcMarginAddition.h\
 matlab/codegeneration/diffimg.cpp matlab/codegeneration/diffimg.h\
 matlab/codegeneration/gaussnewton.cpp matlab/codegeneration/gaussnewton.h\
-matlab/codegeneration/gen_example_data.cpp matlab/codegeneration/gen_example_data.h\
 matlab/codegeneration/generatePyramidPC.cpp matlab/codegeneration/generatePyramidPC.h\
 matlab/codegeneration/jacobian.cpp matlab/codegeneration/jacobian.h\
 matlab/codegeneration/limereg_emxAPI.cpp matlab/codegeneration/limereg_emxAPI.h\
@@ -32,8 +29,16 @@ matlab/codegeneration/shrinkImageDSP.cpp matlab/codegeneration/shrinkImageDSP.h\
 matlab/codegeneration/ssd.cpp matlab/codegeneration/ssd.h\
 matlab/codegeneration/transform.cpp matlab/codegeneration/transform.h
 
+liblimereg_la_CPPFLAGS = @CPPFLAGS@
+liblimereg_la_CFLAGS = @CFLAGS@
 liblimereg_la_LDFLAGS = -version-info 1:0:0 -export-symbols-regex '^Limereg_'
 #liblimereg_la_LIBADD = -lm
+liblimereg_la_LIBADD =
+
+liblimereg_la_CPPFLAGS += @OPENMP_CXXFLAGS@
+liblimereg_la_CFLAGS += @OPENMP_CFLAGS@
+#liblimereg_la_LDFLAGS += @OPENMP_LDFLAGS@
+liblimereg_la_LIBADD += @OPENMP_LIBS@
 
 include_HEADERS = export/limereg.h
 
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 853d3fb..a2bbaec 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -123,30 +123,33 @@ am__uninstall_files_from_dir = { \
   }
 am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
 LTLIBRARIES = $(lib_LTLIBRARIES)
-liblimereg_la_LIBADD =
+liblimereg_la_DEPENDENCIES =
 am__dirstamp = $(am__leading_dot)dirstamp
-am_liblimereg_la_OBJECTS = CMatlabArray.lo CRegistrator.lo \
-	export/limereg.lo matlab/matlab_c_ssdRigid2D.lo stdafx.lo \
-	matlab/codegeneration/all.lo \
-	matlab/codegeneration/calcMarginAddition.lo \
-	matlab/codegeneration/diffimg.lo \
-	matlab/codegeneration/gaussnewton.lo \
-	matlab/codegeneration/gen_example_data.lo \
-	matlab/codegeneration/generatePyramidPC.lo \
-	matlab/codegeneration/jacobian.lo \
-	matlab/codegeneration/limereg_emxAPI.lo \
-	matlab/codegeneration/limereg_emxutil.lo \
-	matlab/codegeneration/limereg_initialize.lo \
-	matlab/codegeneration/limereg_rtwutil.lo \
-	matlab/codegeneration/limereg_terminate.lo \
-	matlab/codegeneration/mldivide.lo matlab/codegeneration/mod.lo \
-	matlab/codegeneration/mpower.lo matlab/codegeneration/norm.lo \
-	matlab/codegeneration/rt_nonfinite.lo \
-	matlab/codegeneration/rtGetInf.lo \
-	matlab/codegeneration/rtGetNaN.lo \
-	matlab/codegeneration/shrinkImageDSP.lo \
-	matlab/codegeneration/ssd.lo \
-	matlab/codegeneration/transform.lo
+am_liblimereg_la_OBJECTS = liblimereg_la-CMatlabArray.lo \
+	liblimereg_la-CRegistrator.lo export/liblimereg_la-limereg.lo \
+	matlab/liblimereg_la-matlab_c_ssdRigid2D.lo \
+	liblimereg_la-stdafx.lo \
+	matlab/codegeneration/liblimereg_la-all.lo \
+	matlab/codegeneration/liblimereg_la-calcMarginAddition.lo \
+	matlab/codegeneration/liblimereg_la-diffimg.lo \
+	matlab/codegeneration/liblimereg_la-gaussnewton.lo \
+	matlab/codegeneration/liblimereg_la-generatePyramidPC.lo \
+	matlab/codegeneration/liblimereg_la-jacobian.lo \
+	matlab/codegeneration/liblimereg_la-limereg_emxAPI.lo \
+	matlab/codegeneration/liblimereg_la-limereg_emxutil.lo \
+	matlab/codegeneration/liblimereg_la-limereg_initialize.lo \
+	matlab/codegeneration/liblimereg_la-limereg_rtwutil.lo \
+	matlab/codegeneration/liblimereg_la-limereg_terminate.lo \
+	matlab/codegeneration/liblimereg_la-mldivide.lo \
+	matlab/codegeneration/liblimereg_la-mod.lo \
+	matlab/codegeneration/liblimereg_la-mpower.lo \
+	matlab/codegeneration/liblimereg_la-norm.lo \
+	matlab/codegeneration/liblimereg_la-rt_nonfinite.lo \
+	matlab/codegeneration/liblimereg_la-rtGetInf.lo \
+	matlab/codegeneration/liblimereg_la-rtGetNaN.lo \
+	matlab/codegeneration/liblimereg_la-shrinkImageDSP.lo \
+	matlab/codegeneration/liblimereg_la-ssd.lo \
+	matlab/codegeneration/liblimereg_la-transform.lo
 liblimereg_la_OBJECTS = $(am_liblimereg_la_OBJECTS)
 AM_V_lt = $(am__v_lt_ at AM_V@)
 am__v_lt_ = $(am__v_lt_ at AM_DEFAULT_V@)
@@ -238,8 +241,6 @@ CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
-AM_CFLAGS = @AM_CFLAGS@
-AM_CXXFLAGS = @AM_CXXFLAGS@
 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
@@ -323,7 +324,9 @@ OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
 OPENCV_CFLAGS = @OPENCV_CFLAGS@
 OPENCV_LIBS = @OPENCV_LIBS@
+OPENMP_CFLAGS = @OPENMP_CFLAGS@
 OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@
+OPENMP_LIBS = @OPENMP_LIBS@
 OTOOL = @OTOOL@
 OTOOL64 = @OTOOL64@
 PACKAGE = @PACKAGE@
@@ -398,7 +401,6 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 MAINTAINERCLEANFILES = Makefile.in
-AM_CPPFLAGS = -I. -Imatlab -Imatlab/codegeneration
 lib_LTLIBRARIES = liblimereg.la
 liblimereg_la_SOURCES = CMatlabArray.cpp CMatlabArray.h CMatlabArrayTypedefs.h CRegistrator.cpp CRegistrator.h \
 export/limereg.cpp matlab/matlab_c_ssdRigid2D.cpp matlab/matlab_c_ssdRigid2D.h matlab/pseudo_stdafx.h \
@@ -407,7 +409,6 @@ matlab/codegeneration/all.cpp matlab/codegeneration/all.h\
 matlab/codegeneration/calcMarginAddition.cpp matlab/codegeneration/calcMarginAddition.h\
 matlab/codegeneration/diffimg.cpp matlab/codegeneration/diffimg.h\
 matlab/codegeneration/gaussnewton.cpp matlab/codegeneration/gaussnewton.h\
-matlab/codegeneration/gen_example_data.cpp matlab/codegeneration/gen_example_data.h\
 matlab/codegeneration/generatePyramidPC.cpp matlab/codegeneration/generatePyramidPC.h\
 matlab/codegeneration/jacobian.cpp matlab/codegeneration/jacobian.h\
 matlab/codegeneration/limereg_emxAPI.cpp matlab/codegeneration/limereg_emxAPI.h\
@@ -428,8 +429,12 @@ matlab/codegeneration/shrinkImageDSP.cpp matlab/codegeneration/shrinkImageDSP.h\
 matlab/codegeneration/ssd.cpp matlab/codegeneration/ssd.h\
 matlab/codegeneration/transform.cpp matlab/codegeneration/transform.h
 
+liblimereg_la_CPPFLAGS = @CPPFLAGS@ @OPENMP_CXXFLAGS@
+liblimereg_la_CFLAGS = @CFLAGS@ @OPENMP_CFLAGS@
 liblimereg_la_LDFLAGS = -version-info 1:0:0 -export-symbols-regex '^Limereg_'
 #liblimereg_la_LIBADD = -lm
+#liblimereg_la_LDFLAGS += @OPENMP_LDFLAGS@
+liblimereg_la_LIBADD = @OPENMP_LIBS@
 include_HEADERS = export/limereg.h
 all: all-am
 
@@ -506,7 +511,7 @@ export/$(am__dirstamp):
 export/$(DEPDIR)/$(am__dirstamp):
 	@$(MKDIR_P) export/$(DEPDIR)
 	@: > export/$(DEPDIR)/$(am__dirstamp)
-export/limereg.lo: export/$(am__dirstamp) \
+export/liblimereg_la-limereg.lo: export/$(am__dirstamp) \
 	export/$(DEPDIR)/$(am__dirstamp)
 matlab/$(am__dirstamp):
 	@$(MKDIR_P) matlab
@@ -514,7 +519,7 @@ matlab/$(am__dirstamp):
 matlab/$(DEPDIR)/$(am__dirstamp):
 	@$(MKDIR_P) matlab/$(DEPDIR)
 	@: > matlab/$(DEPDIR)/$(am__dirstamp)
-matlab/matlab_c_ssdRigid2D.lo: matlab/$(am__dirstamp) \
+matlab/liblimereg_la-matlab_c_ssdRigid2D.lo: matlab/$(am__dirstamp) \
 	matlab/$(DEPDIR)/$(am__dirstamp)
 matlab/codegeneration/$(am__dirstamp):
 	@$(MKDIR_P) matlab/codegeneration
@@ -522,66 +527,67 @@ matlab/codegeneration/$(am__dirstamp):
 matlab/codegeneration/$(DEPDIR)/$(am__dirstamp):
 	@$(MKDIR_P) matlab/codegeneration/$(DEPDIR)
 	@: > matlab/codegeneration/$(DEPDIR)/$(am__dirstamp)
-matlab/codegeneration/all.lo: matlab/codegeneration/$(am__dirstamp) \
-	matlab/codegeneration/$(DEPDIR)/$(am__dirstamp)
-matlab/codegeneration/calcMarginAddition.lo:  \
+matlab/codegeneration/liblimereg_la-all.lo:  \
 	matlab/codegeneration/$(am__dirstamp) \
 	matlab/codegeneration/$(DEPDIR)/$(am__dirstamp)
-matlab/codegeneration/diffimg.lo:  \
+matlab/codegeneration/liblimereg_la-calcMarginAddition.lo:  \
 	matlab/codegeneration/$(am__dirstamp) \
 	matlab/codegeneration/$(DEPDIR)/$(am__dirstamp)
-matlab/codegeneration/gaussnewton.lo:  \
+matlab/codegeneration/liblimereg_la-diffimg.lo:  \
 	matlab/codegeneration/$(am__dirstamp) \
 	matlab/codegeneration/$(DEPDIR)/$(am__dirstamp)
-matlab/codegeneration/gen_example_data.lo:  \
+matlab/codegeneration/liblimereg_la-gaussnewton.lo:  \
 	matlab/codegeneration/$(am__dirstamp) \
 	matlab/codegeneration/$(DEPDIR)/$(am__dirstamp)
-matlab/codegeneration/generatePyramidPC.lo:  \
+matlab/codegeneration/liblimereg_la-generatePyramidPC.lo:  \
 	matlab/codegeneration/$(am__dirstamp) \
 	matlab/codegeneration/$(DEPDIR)/$(am__dirstamp)
-matlab/codegeneration/jacobian.lo:  \
+matlab/codegeneration/liblimereg_la-jacobian.lo:  \
 	matlab/codegeneration/$(am__dirstamp) \
 	matlab/codegeneration/$(DEPDIR)/$(am__dirstamp)
-matlab/codegeneration/limereg_emxAPI.lo:  \
+matlab/codegeneration/liblimereg_la-limereg_emxAPI.lo:  \
 	matlab/codegeneration/$(am__dirstamp) \
 	matlab/codegeneration/$(DEPDIR)/$(am__dirstamp)
-matlab/codegeneration/limereg_emxutil.lo:  \
+matlab/codegeneration/liblimereg_la-limereg_emxutil.lo:  \
 	matlab/codegeneration/$(am__dirstamp) \
 	matlab/codegeneration/$(DEPDIR)/$(am__dirstamp)
-matlab/codegeneration/limereg_initialize.lo:  \
+matlab/codegeneration/liblimereg_la-limereg_initialize.lo:  \
 	matlab/codegeneration/$(am__dirstamp) \
 	matlab/codegeneration/$(DEPDIR)/$(am__dirstamp)
-matlab/codegeneration/limereg_rtwutil.lo:  \
+matlab/codegeneration/liblimereg_la-limereg_rtwutil.lo:  \
 	matlab/codegeneration/$(am__dirstamp) \
 	matlab/codegeneration/$(DEPDIR)/$(am__dirstamp)
-matlab/codegeneration/limereg_terminate.lo:  \
+matlab/codegeneration/liblimereg_la-limereg_terminate.lo:  \
 	matlab/codegeneration/$(am__dirstamp) \
 	matlab/codegeneration/$(DEPDIR)/$(am__dirstamp)
-matlab/codegeneration/mldivide.lo:  \
+matlab/codegeneration/liblimereg_la-mldivide.lo:  \
 	matlab/codegeneration/$(am__dirstamp) \
 	matlab/codegeneration/$(DEPDIR)/$(am__dirstamp)
-matlab/codegeneration/mod.lo: matlab/codegeneration/$(am__dirstamp) \
+matlab/codegeneration/liblimereg_la-mod.lo:  \
+	matlab/codegeneration/$(am__dirstamp) \
 	matlab/codegeneration/$(DEPDIR)/$(am__dirstamp)
-matlab/codegeneration/mpower.lo:  \
+matlab/codegeneration/liblimereg_la-mpower.lo:  \
 	matlab/codegeneration/$(am__dirstamp) \
 	matlab/codegeneration/$(DEPDIR)/$(am__dirstamp)
-matlab/codegeneration/norm.lo: matlab/codegeneration/$(am__dirstamp) \
+matlab/codegeneration/liblimereg_la-norm.lo:  \
+	matlab/codegeneration/$(am__dirstamp) \
 	matlab/codegeneration/$(DEPDIR)/$(am__dirstamp)
-matlab/codegeneration/rt_nonfinite.lo:  \
+matlab/codegeneration/liblimereg_la-rt_nonfinite.lo:  \
 	matlab/codegeneration/$(am__dirstamp) \
 	matlab/codegeneration/$(DEPDIR)/$(am__dirstamp)
-matlab/codegeneration/rtGetInf.lo:  \
+matlab/codegeneration/liblimereg_la-rtGetInf.lo:  \
 	matlab/codegeneration/$(am__dirstamp) \
 	matlab/codegeneration/$(DEPDIR)/$(am__dirstamp)
-matlab/codegeneration/rtGetNaN.lo:  \
+matlab/codegeneration/liblimereg_la-rtGetNaN.lo:  \
 	matlab/codegeneration/$(am__dirstamp) \
 	matlab/codegeneration/$(DEPDIR)/$(am__dirstamp)
-matlab/codegeneration/shrinkImageDSP.lo:  \
+matlab/codegeneration/liblimereg_la-shrinkImageDSP.lo:  \
 	matlab/codegeneration/$(am__dirstamp) \
 	matlab/codegeneration/$(DEPDIR)/$(am__dirstamp)
-matlab/codegeneration/ssd.lo: matlab/codegeneration/$(am__dirstamp) \
+matlab/codegeneration/liblimereg_la-ssd.lo:  \
+	matlab/codegeneration/$(am__dirstamp) \
 	matlab/codegeneration/$(DEPDIR)/$(am__dirstamp)
-matlab/codegeneration/transform.lo:  \
+matlab/codegeneration/liblimereg_la-transform.lo:  \
 	matlab/codegeneration/$(am__dirstamp) \
 	matlab/codegeneration/$(DEPDIR)/$(am__dirstamp)
 
@@ -600,33 +606,32 @@ mostlyclean-compile:
 distclean-compile:
 	-rm -f *.tab.c
 
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/CMatlabArray.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/CRegistrator.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/stdafx.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at export/$(DEPDIR)/limereg.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at matlab/$(DEPDIR)/matlab_c_ssdRigid2D.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/all.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/calcMarginAddition.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/diffimg.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/gaussnewton.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/gen_example_data.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/generatePyramidPC.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/jacobian.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/limereg_emxAPI.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/limereg_emxutil.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/limereg_initialize.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/limereg_rtwutil.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/limereg_terminate.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/mldivide.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/mod.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/mpower.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/norm.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/rtGetInf.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/rtGetNaN.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/rt_nonfinite.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/shrinkImageDSP.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/ssd.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/transform.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/liblimereg_la-CMatlabArray.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/liblimereg_la-CRegistrator.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/liblimereg_la-stdafx.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at export/$(DEPDIR)/liblimereg_la-limereg.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at matlab/$(DEPDIR)/liblimereg_la-matlab_c_ssdRigid2D.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/liblimereg_la-all.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/liblimereg_la-calcMarginAddition.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/liblimereg_la-diffimg.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/liblimereg_la-gaussnewton.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/liblimereg_la-generatePyramidPC.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/liblimereg_la-jacobian.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/liblimereg_la-limereg_emxAPI.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/liblimereg_la-limereg_emxutil.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/liblimereg_la-limereg_initialize.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/liblimereg_la-limereg_rtwutil.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/liblimereg_la-limereg_terminate.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/liblimereg_la-mldivide.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/liblimereg_la-mod.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/liblimereg_la-mpower.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/liblimereg_la-norm.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/liblimereg_la-rtGetInf.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/liblimereg_la-rtGetNaN.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/liblimereg_la-rt_nonfinite.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/liblimereg_la-shrinkImageDSP.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/liblimereg_la-ssd.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at matlab/codegeneration/$(DEPDIR)/liblimereg_la-transform.Plo at am__quote@
 
 .cpp.o:
 @am__fastdepCXX_TRUE@	$(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -652,6 +657,188 @@ distclean-compile:
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
 
+liblimereg_la-CMatlabArray.lo: CMatlabArray.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT liblimereg_la-CMatlabArray.lo -MD -MP -MF $(DEPDIR)/liblimereg_la-CMatlabArray.Tpo -c -o liblimereg_la-CMatlabArray.lo `test -f 'CMatlabArray.cpp' || echo '$(srcdir)/'`CMatlabArray.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/liblimereg_la-CMatlabArray.Tpo $(DEPDIR)/liblimereg_la-CMatlabArray.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='CMatlabArray.cpp' object='liblimereg_la-CMatlabArray.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o liblimereg_la-CMatlabArray.lo `test -f 'CMatlabArray.cpp' || echo '$(srcdir)/'`CMatlabArray.cpp
+
+liblimereg_la-CRegistrator.lo: CRegistrator.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT liblimereg_la-CRegistrator.lo -MD -MP -MF $(DEPDIR)/liblimereg_la-CRegistrator.Tpo -c -o liblimereg_la-CRegistrator.lo `test -f 'CRegistrator.cpp' || echo '$(srcdir)/'`CRegistrator.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/liblimereg_la-CRegistrator.Tpo $(DEPDIR)/liblimereg_la-CRegistrator.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='CRegistrator.cpp' object='liblimereg_la-CRegistrator.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o liblimereg_la-CRegistrator.lo `test -f 'CRegistrator.cpp' || echo '$(srcdir)/'`CRegistrator.cpp
+
+export/liblimereg_la-limereg.lo: export/limereg.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT export/liblimereg_la-limereg.lo -MD -MP -MF export/$(DEPDIR)/liblimereg_la-limereg.Tpo -c -o export/liblimereg_la-limereg.lo `test -f 'export/limereg.cpp' || echo '$(srcdir)/'`export/limereg.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) export/$(DEPDIR)/liblimereg_la-limereg.Tpo export/$(DEPDIR)/liblimereg_la-limereg.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='export/limereg.cpp' object='export/liblimereg_la-limereg.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o export/liblimereg_la-limereg.lo `test -f 'export/limereg.cpp' || echo '$(srcdir)/'`export/limereg.cpp
+
+matlab/liblimereg_la-matlab_c_ssdRigid2D.lo: matlab/matlab_c_ssdRigid2D.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT matlab/liblimereg_la-matlab_c_ssdRigid2D.lo -MD -MP -MF matlab/$(DEPDIR)/liblimereg_la-matlab_c_ssdRigid2D.Tpo -c -o matlab/liblimereg_la-matlab_c_ssdRigid2D.lo `test -f 'matlab/matlab_c_ssdRigid2D.cpp' || echo '$(srcdir)/'`matlab/matlab_c_ssdRigid2D.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) matlab/$(DEPDIR)/liblimereg_la-matlab_c_ssdRigid2D.Tpo matlab/$(DEPDIR)/liblimereg_la-matlab_c_ssdRigid2D.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='matlab/matlab_c_ssdRigid2D.cpp' object='matlab/liblimereg_la-matlab_c_ssdRigid2D.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o matlab/liblimereg_la-matlab_c_ssdRigid2D.lo `test -f 'matlab/matlab_c_ssdRigid2D.cpp' || echo '$(srcdir)/'`matlab/matlab_c_ssdRigid2D.cpp
+
+liblimereg_la-stdafx.lo: stdafx.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT liblimereg_la-stdafx.lo -MD -MP -MF $(DEPDIR)/liblimereg_la-stdafx.Tpo -c -o liblimereg_la-stdafx.lo `test -f 'stdafx.cpp' || echo '$(srcdir)/'`stdafx.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/liblimereg_la-stdafx.Tpo $(DEPDIR)/liblimereg_la-stdafx.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='stdafx.cpp' object='liblimereg_la-stdafx.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o liblimereg_la-stdafx.lo `test -f 'stdafx.cpp' || echo '$(srcdir)/'`stdafx.cpp
+
+matlab/codegeneration/liblimereg_la-all.lo: matlab/codegeneration/all.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT matlab/codegeneration/liblimereg_la-all.lo -MD -MP -MF matlab/codegeneration/$(DEPDIR)/liblimereg_la-all.Tpo -c -o matlab/codegeneration/liblimereg_la-all.lo `test -f 'matlab/codegeneration/all.cpp' || echo '$(srcdir)/'`matlab/codegeneration/all.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) matlab/codegeneration/$(DEPDIR)/liblimereg_la-all.Tpo matlab/codegeneration/$(DEPDIR)/liblimereg_la-all.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='matlab/codegeneration/all.cpp' object='matlab/codegeneration/liblimereg_la-all.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o matlab/codegeneration/liblimereg_la-all.lo `test -f 'matlab/codegeneration/all.cpp' || echo '$(srcdir)/'`matlab/codegeneration/all.cpp
+
+matlab/codegeneration/liblimereg_la-calcMarginAddition.lo: matlab/codegeneration/calcMarginAddition.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT matlab/codegeneration/liblimereg_la-calcMarginAddition.lo -MD -MP -MF matlab/codegeneration/$(DEPDIR)/liblimereg_la-calcMarginAddition.Tpo -c -o matlab/codegeneration/liblimereg_la-calcMarginAddition.lo `test -f 'matlab/codegeneration/calcMarginAddition.cpp' || [...]
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) matlab/codegeneration/$(DEPDIR)/liblimereg_la-calcMarginAddition.Tpo matlab/codegeneration/$(DEPDIR)/liblimereg_la-calcMarginAddition.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='matlab/codegeneration/calcMarginAddition.cpp' object='matlab/codegeneration/liblimereg_la-calcMarginAddition.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o matlab/codegeneration/liblimereg_la-calcMarginAddition.lo `test -f 'matlab/codegeneration/calcMarginAddition.cpp' || echo '$(srcdir)/'`matlab/codegeneration/calcMarginAddition.cpp
+
+matlab/codegeneration/liblimereg_la-diffimg.lo: matlab/codegeneration/diffimg.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT matlab/codegeneration/liblimereg_la-diffimg.lo -MD -MP -MF matlab/codegeneration/$(DEPDIR)/liblimereg_la-diffimg.Tpo -c -o matlab/codegeneration/liblimereg_la-diffimg.lo `test -f 'matlab/codegeneration/diffimg.cpp' || echo '$(srcdir)/'`matlab/codegeneration/dif [...]
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) matlab/codegeneration/$(DEPDIR)/liblimereg_la-diffimg.Tpo matlab/codegeneration/$(DEPDIR)/liblimereg_la-diffimg.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='matlab/codegeneration/diffimg.cpp' object='matlab/codegeneration/liblimereg_la-diffimg.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o matlab/codegeneration/liblimereg_la-diffimg.lo `test -f 'matlab/codegeneration/diffimg.cpp' || echo '$(srcdir)/'`matlab/codegeneration/diffimg.cpp
+
+matlab/codegeneration/liblimereg_la-gaussnewton.lo: matlab/codegeneration/gaussnewton.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT matlab/codegeneration/liblimereg_la-gaussnewton.lo -MD -MP -MF matlab/codegeneration/$(DEPDIR)/liblimereg_la-gaussnewton.Tpo -c -o matlab/codegeneration/liblimereg_la-gaussnewton.lo `test -f 'matlab/codegeneration/gaussnewton.cpp' || echo '$(srcdir)/'`matlab/co [...]
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) matlab/codegeneration/$(DEPDIR)/liblimereg_la-gaussnewton.Tpo matlab/codegeneration/$(DEPDIR)/liblimereg_la-gaussnewton.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='matlab/codegeneration/gaussnewton.cpp' object='matlab/codegeneration/liblimereg_la-gaussnewton.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o matlab/codegeneration/liblimereg_la-gaussnewton.lo `test -f 'matlab/codegeneration/gaussnewton.cpp' || echo '$(srcdir)/'`matlab/codegeneration/gaussnewton.cpp
+
+matlab/codegeneration/liblimereg_la-generatePyramidPC.lo: matlab/codegeneration/generatePyramidPC.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT matlab/codegeneration/liblimereg_la-generatePyramidPC.lo -MD -MP -MF matlab/codegeneration/$(DEPDIR)/liblimereg_la-generatePyramidPC.Tpo -c -o matlab/codegeneration/liblimereg_la-generatePyramidPC.lo `test -f 'matlab/codegeneration/generatePyramidPC.cpp' || ech [...]
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) matlab/codegeneration/$(DEPDIR)/liblimereg_la-generatePyramidPC.Tpo matlab/codegeneration/$(DEPDIR)/liblimereg_la-generatePyramidPC.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='matlab/codegeneration/generatePyramidPC.cpp' object='matlab/codegeneration/liblimereg_la-generatePyramidPC.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o matlab/codegeneration/liblimereg_la-generatePyramidPC.lo `test -f 'matlab/codegeneration/generatePyramidPC.cpp' || echo '$(srcdir)/'`matlab/codegeneration/generatePyramidPC.cpp
+
+matlab/codegeneration/liblimereg_la-jacobian.lo: matlab/codegeneration/jacobian.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT matlab/codegeneration/liblimereg_la-jacobian.lo -MD -MP -MF matlab/codegeneration/$(DEPDIR)/liblimereg_la-jacobian.Tpo -c -o matlab/codegeneration/liblimereg_la-jacobian.lo `test -f 'matlab/codegeneration/jacobian.cpp' || echo '$(srcdir)/'`matlab/codegeneration [...]
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) matlab/codegeneration/$(DEPDIR)/liblimereg_la-jacobian.Tpo matlab/codegeneration/$(DEPDIR)/liblimereg_la-jacobian.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='matlab/codegeneration/jacobian.cpp' object='matlab/codegeneration/liblimereg_la-jacobian.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o matlab/codegeneration/liblimereg_la-jacobian.lo `test -f 'matlab/codegeneration/jacobian.cpp' || echo '$(srcdir)/'`matlab/codegeneration/jacobian.cpp
+
+matlab/codegeneration/liblimereg_la-limereg_emxAPI.lo: matlab/codegeneration/limereg_emxAPI.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT matlab/codegeneration/liblimereg_la-limereg_emxAPI.lo -MD -MP -MF matlab/codegeneration/$(DEPDIR)/liblimereg_la-limereg_emxAPI.Tpo -c -o matlab/codegeneration/liblimereg_la-limereg_emxAPI.lo `test -f 'matlab/codegeneration/limereg_emxAPI.cpp' || echo '$(srcdir) [...]
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) matlab/codegeneration/$(DEPDIR)/liblimereg_la-limereg_emxAPI.Tpo matlab/codegeneration/$(DEPDIR)/liblimereg_la-limereg_emxAPI.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='matlab/codegeneration/limereg_emxAPI.cpp' object='matlab/codegeneration/liblimereg_la-limereg_emxAPI.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o matlab/codegeneration/liblimereg_la-limereg_emxAPI.lo `test -f 'matlab/codegeneration/limereg_emxAPI.cpp' || echo '$(srcdir)/'`matlab/codegeneration/limereg_emxAPI.cpp
+
+matlab/codegeneration/liblimereg_la-limereg_emxutil.lo: matlab/codegeneration/limereg_emxutil.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT matlab/codegeneration/liblimereg_la-limereg_emxutil.lo -MD -MP -MF matlab/codegeneration/$(DEPDIR)/liblimereg_la-limereg_emxutil.Tpo -c -o matlab/codegeneration/liblimereg_la-limereg_emxutil.lo `test -f 'matlab/codegeneration/limereg_emxutil.cpp' || echo '$(src [...]
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) matlab/codegeneration/$(DEPDIR)/liblimereg_la-limereg_emxutil.Tpo matlab/codegeneration/$(DEPDIR)/liblimereg_la-limereg_emxutil.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='matlab/codegeneration/limereg_emxutil.cpp' object='matlab/codegeneration/liblimereg_la-limereg_emxutil.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o matlab/codegeneration/liblimereg_la-limereg_emxutil.lo `test -f 'matlab/codegeneration/limereg_emxutil.cpp' || echo '$(srcdir)/'`matlab/codegeneration/limereg_emxutil.cpp
+
+matlab/codegeneration/liblimereg_la-limereg_initialize.lo: matlab/codegeneration/limereg_initialize.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT matlab/codegeneration/liblimereg_la-limereg_initialize.lo -MD -MP -MF matlab/codegeneration/$(DEPDIR)/liblimereg_la-limereg_initialize.Tpo -c -o matlab/codegeneration/liblimereg_la-limereg_initialize.lo `test -f 'matlab/codegeneration/limereg_initialize.cpp' || [...]
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) matlab/codegeneration/$(DEPDIR)/liblimereg_la-limereg_initialize.Tpo matlab/codegeneration/$(DEPDIR)/liblimereg_la-limereg_initialize.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='matlab/codegeneration/limereg_initialize.cpp' object='matlab/codegeneration/liblimereg_la-limereg_initialize.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o matlab/codegeneration/liblimereg_la-limereg_initialize.lo `test -f 'matlab/codegeneration/limereg_initialize.cpp' || echo '$(srcdir)/'`matlab/codegeneration/limereg_initialize.cpp
+
+matlab/codegeneration/liblimereg_la-limereg_rtwutil.lo: matlab/codegeneration/limereg_rtwutil.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT matlab/codegeneration/liblimereg_la-limereg_rtwutil.lo -MD -MP -MF matlab/codegeneration/$(DEPDIR)/liblimereg_la-limereg_rtwutil.Tpo -c -o matlab/codegeneration/liblimereg_la-limereg_rtwutil.lo `test -f 'matlab/codegeneration/limereg_rtwutil.cpp' || echo '$(src [...]
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) matlab/codegeneration/$(DEPDIR)/liblimereg_la-limereg_rtwutil.Tpo matlab/codegeneration/$(DEPDIR)/liblimereg_la-limereg_rtwutil.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='matlab/codegeneration/limereg_rtwutil.cpp' object='matlab/codegeneration/liblimereg_la-limereg_rtwutil.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o matlab/codegeneration/liblimereg_la-limereg_rtwutil.lo `test -f 'matlab/codegeneration/limereg_rtwutil.cpp' || echo '$(srcdir)/'`matlab/codegeneration/limereg_rtwutil.cpp
+
+matlab/codegeneration/liblimereg_la-limereg_terminate.lo: matlab/codegeneration/limereg_terminate.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT matlab/codegeneration/liblimereg_la-limereg_terminate.lo -MD -MP -MF matlab/codegeneration/$(DEPDIR)/liblimereg_la-limereg_terminate.Tpo -c -o matlab/codegeneration/liblimereg_la-limereg_terminate.lo `test -f 'matlab/codegeneration/limereg_terminate.cpp' || ech [...]
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) matlab/codegeneration/$(DEPDIR)/liblimereg_la-limereg_terminate.Tpo matlab/codegeneration/$(DEPDIR)/liblimereg_la-limereg_terminate.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='matlab/codegeneration/limereg_terminate.cpp' object='matlab/codegeneration/liblimereg_la-limereg_terminate.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o matlab/codegeneration/liblimereg_la-limereg_terminate.lo `test -f 'matlab/codegeneration/limereg_terminate.cpp' || echo '$(srcdir)/'`matlab/codegeneration/limereg_terminate.cpp
+
+matlab/codegeneration/liblimereg_la-mldivide.lo: matlab/codegeneration/mldivide.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT matlab/codegeneration/liblimereg_la-mldivide.lo -MD -MP -MF matlab/codegeneration/$(DEPDIR)/liblimereg_la-mldivide.Tpo -c -o matlab/codegeneration/liblimereg_la-mldivide.lo `test -f 'matlab/codegeneration/mldivide.cpp' || echo '$(srcdir)/'`matlab/codegeneration [...]
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) matlab/codegeneration/$(DEPDIR)/liblimereg_la-mldivide.Tpo matlab/codegeneration/$(DEPDIR)/liblimereg_la-mldivide.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='matlab/codegeneration/mldivide.cpp' object='matlab/codegeneration/liblimereg_la-mldivide.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o matlab/codegeneration/liblimereg_la-mldivide.lo `test -f 'matlab/codegeneration/mldivide.cpp' || echo '$(srcdir)/'`matlab/codegeneration/mldivide.cpp
+
+matlab/codegeneration/liblimereg_la-mod.lo: matlab/codegeneration/mod.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT matlab/codegeneration/liblimereg_la-mod.lo -MD -MP -MF matlab/codegeneration/$(DEPDIR)/liblimereg_la-mod.Tpo -c -o matlab/codegeneration/liblimereg_la-mod.lo `test -f 'matlab/codegeneration/mod.cpp' || echo '$(srcdir)/'`matlab/codegeneration/mod.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) matlab/codegeneration/$(DEPDIR)/liblimereg_la-mod.Tpo matlab/codegeneration/$(DEPDIR)/liblimereg_la-mod.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='matlab/codegeneration/mod.cpp' object='matlab/codegeneration/liblimereg_la-mod.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o matlab/codegeneration/liblimereg_la-mod.lo `test -f 'matlab/codegeneration/mod.cpp' || echo '$(srcdir)/'`matlab/codegeneration/mod.cpp
+
+matlab/codegeneration/liblimereg_la-mpower.lo: matlab/codegeneration/mpower.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT matlab/codegeneration/liblimereg_la-mpower.lo -MD -MP -MF matlab/codegeneration/$(DEPDIR)/liblimereg_la-mpower.Tpo -c -o matlab/codegeneration/liblimereg_la-mpower.lo `test -f 'matlab/codegeneration/mpower.cpp' || echo '$(srcdir)/'`matlab/codegeneration/mpower.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) matlab/codegeneration/$(DEPDIR)/liblimereg_la-mpower.Tpo matlab/codegeneration/$(DEPDIR)/liblimereg_la-mpower.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='matlab/codegeneration/mpower.cpp' object='matlab/codegeneration/liblimereg_la-mpower.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o matlab/codegeneration/liblimereg_la-mpower.lo `test -f 'matlab/codegeneration/mpower.cpp' || echo '$(srcdir)/'`matlab/codegeneration/mpower.cpp
+
+matlab/codegeneration/liblimereg_la-norm.lo: matlab/codegeneration/norm.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT matlab/codegeneration/liblimereg_la-norm.lo -MD -MP -MF matlab/codegeneration/$(DEPDIR)/liblimereg_la-norm.Tpo -c -o matlab/codegeneration/liblimereg_la-norm.lo `test -f 'matlab/codegeneration/norm.cpp' || echo '$(srcdir)/'`matlab/codegeneration/norm.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) matlab/codegeneration/$(DEPDIR)/liblimereg_la-norm.Tpo matlab/codegeneration/$(DEPDIR)/liblimereg_la-norm.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='matlab/codegeneration/norm.cpp' object='matlab/codegeneration/liblimereg_la-norm.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o matlab/codegeneration/liblimereg_la-norm.lo `test -f 'matlab/codegeneration/norm.cpp' || echo '$(srcdir)/'`matlab/codegeneration/norm.cpp
+
+matlab/codegeneration/liblimereg_la-rt_nonfinite.lo: matlab/codegeneration/rt_nonfinite.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT matlab/codegeneration/liblimereg_la-rt_nonfinite.lo -MD -MP -MF matlab/codegeneration/$(DEPDIR)/liblimereg_la-rt_nonfinite.Tpo -c -o matlab/codegeneration/liblimereg_la-rt_nonfinite.lo `test -f 'matlab/codegeneration/rt_nonfinite.cpp' || echo '$(srcdir)/'`matla [...]
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) matlab/codegeneration/$(DEPDIR)/liblimereg_la-rt_nonfinite.Tpo matlab/codegeneration/$(DEPDIR)/liblimereg_la-rt_nonfinite.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='matlab/codegeneration/rt_nonfinite.cpp' object='matlab/codegeneration/liblimereg_la-rt_nonfinite.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o matlab/codegeneration/liblimereg_la-rt_nonfinite.lo `test -f 'matlab/codegeneration/rt_nonfinite.cpp' || echo '$(srcdir)/'`matlab/codegeneration/rt_nonfinite.cpp
+
+matlab/codegeneration/liblimereg_la-rtGetInf.lo: matlab/codegeneration/rtGetInf.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT matlab/codegeneration/liblimereg_la-rtGetInf.lo -MD -MP -MF matlab/codegeneration/$(DEPDIR)/liblimereg_la-rtGetInf.Tpo -c -o matlab/codegeneration/liblimereg_la-rtGetInf.lo `test -f 'matlab/codegeneration/rtGetInf.cpp' || echo '$(srcdir)/'`matlab/codegeneration [...]
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) matlab/codegeneration/$(DEPDIR)/liblimereg_la-rtGetInf.Tpo matlab/codegeneration/$(DEPDIR)/liblimereg_la-rtGetInf.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='matlab/codegeneration/rtGetInf.cpp' object='matlab/codegeneration/liblimereg_la-rtGetInf.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o matlab/codegeneration/liblimereg_la-rtGetInf.lo `test -f 'matlab/codegeneration/rtGetInf.cpp' || echo '$(srcdir)/'`matlab/codegeneration/rtGetInf.cpp
+
+matlab/codegeneration/liblimereg_la-rtGetNaN.lo: matlab/codegeneration/rtGetNaN.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT matlab/codegeneration/liblimereg_la-rtGetNaN.lo -MD -MP -MF matlab/codegeneration/$(DEPDIR)/liblimereg_la-rtGetNaN.Tpo -c -o matlab/codegeneration/liblimereg_la-rtGetNaN.lo `test -f 'matlab/codegeneration/rtGetNaN.cpp' || echo '$(srcdir)/'`matlab/codegeneration [...]
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) matlab/codegeneration/$(DEPDIR)/liblimereg_la-rtGetNaN.Tpo matlab/codegeneration/$(DEPDIR)/liblimereg_la-rtGetNaN.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='matlab/codegeneration/rtGetNaN.cpp' object='matlab/codegeneration/liblimereg_la-rtGetNaN.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o matlab/codegeneration/liblimereg_la-rtGetNaN.lo `test -f 'matlab/codegeneration/rtGetNaN.cpp' || echo '$(srcdir)/'`matlab/codegeneration/rtGetNaN.cpp
+
+matlab/codegeneration/liblimereg_la-shrinkImageDSP.lo: matlab/codegeneration/shrinkImageDSP.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT matlab/codegeneration/liblimereg_la-shrinkImageDSP.lo -MD -MP -MF matlab/codegeneration/$(DEPDIR)/liblimereg_la-shrinkImageDSP.Tpo -c -o matlab/codegeneration/liblimereg_la-shrinkImageDSP.lo `test -f 'matlab/codegeneration/shrinkImageDSP.cpp' || echo '$(srcdir) [...]
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) matlab/codegeneration/$(DEPDIR)/liblimereg_la-shrinkImageDSP.Tpo matlab/codegeneration/$(DEPDIR)/liblimereg_la-shrinkImageDSP.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='matlab/codegeneration/shrinkImageDSP.cpp' object='matlab/codegeneration/liblimereg_la-shrinkImageDSP.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o matlab/codegeneration/liblimereg_la-shrinkImageDSP.lo `test -f 'matlab/codegeneration/shrinkImageDSP.cpp' || echo '$(srcdir)/'`matlab/codegeneration/shrinkImageDSP.cpp
+
+matlab/codegeneration/liblimereg_la-ssd.lo: matlab/codegeneration/ssd.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT matlab/codegeneration/liblimereg_la-ssd.lo -MD -MP -MF matlab/codegeneration/$(DEPDIR)/liblimereg_la-ssd.Tpo -c -o matlab/codegeneration/liblimereg_la-ssd.lo `test -f 'matlab/codegeneration/ssd.cpp' || echo '$(srcdir)/'`matlab/codegeneration/ssd.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) matlab/codegeneration/$(DEPDIR)/liblimereg_la-ssd.Tpo matlab/codegeneration/$(DEPDIR)/liblimereg_la-ssd.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='matlab/codegeneration/ssd.cpp' object='matlab/codegeneration/liblimereg_la-ssd.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o matlab/codegeneration/liblimereg_la-ssd.lo `test -f 'matlab/codegeneration/ssd.cpp' || echo '$(srcdir)/'`matlab/codegeneration/ssd.cpp
+
+matlab/codegeneration/liblimereg_la-transform.lo: matlab/codegeneration/transform.cpp
+ at am__fastdepCXX_TRUE@	$(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT matlab/codegeneration/liblimereg_la-transform.lo -MD -MP -MF matlab/codegeneration/$(DEPDIR)/liblimereg_la-transform.Tpo -c -o matlab/codegeneration/liblimereg_la-transform.lo `test -f 'matlab/codegeneration/transform.cpp' || echo '$(srcdir)/'`matlab/codegenera [...]
+ at am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) matlab/codegeneration/$(DEPDIR)/liblimereg_la-transform.Tpo matlab/codegeneration/$(DEPDIR)/liblimereg_la-transform.Plo
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='matlab/codegeneration/transform.cpp' object='matlab/codegeneration/liblimereg_la-transform.lo' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@	$(AM_V_CXX at am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(liblimereg_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o matlab/codegeneration/liblimereg_la-transform.lo `test -f 'matlab/codegeneration/transform.cpp' || echo '$(srcdir)/'`matlab/codegeneration/transform.cpp
+
 mostlyclean-libtool:
 	-rm -f *.lo
 
diff --git a/lib/export/limereg.cpp b/lib/export/limereg.cpp
index ee562e2..65ef751 100644
--- a/lib/export/limereg.cpp
+++ b/lib/export/limereg.cpp
@@ -43,10 +43,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 //precompiled header (MUST BE THE FIRST ENTRY IN EVERY CPP FILE)
 #include "stdafx.h"
 
-#include "limereg_common.h"
+#include "../limereg_common.h"
 #include "limereg.h"
 
-#include "CRegistrator.h"
+#include "../CRegistrator.h"
 
 using namespace Limereg;
 
@@ -66,10 +66,6 @@ Limereg_RetCode CheckImageSize(const Limereg_Image* Image)
 		return LIMEREG_RET_IMAGE_TOO_SMALL;
 	}
 
-	if(Image->imageWidth != Image->imageHeight)
-	{
-		return LIMEREG_RET_IMAGES_MUST_BE_SQUARE;
-	}
 	return LIMEREG_RET_SUCCESS;
 }
 
@@ -173,7 +169,8 @@ Limereg_RetCode Limereg_RegisterImage(
 	//todo: avoid redundancy to CRegistrationController
 	if(0 == pyramidLevelCount)
 	{
-		pyramidLevelCount = uint32_t(ceil(log2(t_reg_real(xyDimension / gui_LEVELCOUNT_AUTOTETECT_DIVISOR))));
+		uint32_t iDim = (referenceImage->imageHeight < referenceImage->imageWidth) ? referenceImage->imageWidth : referenceImage->imageHeight;
+		pyramidLevelCount = uint32_t(ceil(log2(t_reg_real(iDim / gui_LEVELCOUNT_AUTOTETECT_DIVISOR))));
 	}
 
 	if(0 == stopSensitivity)
@@ -193,7 +190,8 @@ Limereg_RetCode Limereg_RegisterImage(
 	double distanceMeasureResult=0;
 	CRegistrator oRegistrator;
 	unsigned int iterationAmountResult = oRegistrator.RegisterImages(
-			xyDimension,
+			referenceImage->imageWidth,
+			referenceImage->imageHeight,
 			maxIterations,
 			maxRotationRad,
 			maxTranslationPercent,
@@ -285,9 +283,6 @@ Limereg_RetCode Limereg_TransformImage(
 		return LIMEREG_RET_RCV_NULLPTR;
 	}
 
-	//Avoid errors when we add x and y dimensions, make clear where it is used in a shared way.
-	unsigned int xyDimension = sourceImage->imageWidth;
-
 	//Perform the image processing operation
 	t_reg_real aRegParams[3] = {
 			(t_reg_real)trafoParams->rotationDeg * M_PI / 180.0f,
@@ -296,7 +291,13 @@ Limereg_RetCode Limereg_TransformImage(
 			};
 
 	CRegistrator oRegistrator;
-	oRegistrator.TransformImage(xyDimension, aRegParams, sourceImage->pixelBuffer, transformedImage->pixelBuffer);
+	oRegistrator.TransformImage(
+			sourceImage->imageWidth,
+			sourceImage->imageHeight,
+			aRegParams,
+			sourceImage->pixelBuffer,
+			transformedImage->pixelBuffer
+			);
 
 	return LIMEREG_RET_SUCCESS;
 }
@@ -318,13 +319,10 @@ Limereg_RetCode Limereg_CalculateDiffImage(
 		return ret;
 	}
 
-	//Avoid errors when we add x and y dimensions, make clear where it is used in a shared way.
-	int xyDimension = referenceImage->imageWidth;
-
 	//Perform the image processing operation
 	CRegistrator oRegistrator;
-	oRegistrator.CalculateDiffImage(xyDimension, referenceImage->pixelBuffer,
-			templateImage->pixelBuffer, differenceImage->pixelBuffer);
+	oRegistrator.CalculateDiffImage(referenceImage->imageWidth, referenceImage->imageHeight,
+			referenceImage->pixelBuffer, templateImage->pixelBuffer, differenceImage->pixelBuffer);
 
 	return LIMEREG_RET_SUCCESS;
 }
diff --git a/lib/export/limereg.h b/lib/export/limereg.h
index 2e4098a..505b18a 100644
--- a/lib/export/limereg.h
+++ b/lib/export/limereg.h
@@ -101,7 +101,7 @@ enum Limereg_RetCode
 	LIMEREG_RET_ABORT_MAXITER_EXCEEDED=200,	//!< The registration algorithm took more iterations than allowed by maxIterations and was aborted
 	//Temporary codes
 	LIMEREG_RET_STENCIL_NOT_IMPL_YET=9997, //!< Currently stencil images are unsupported and the pointer named stencilImage has to be set to 0
-	LIMEREG_RET_IMAGES_MUST_BE_SQUARE=9998,	//!< Currently the image height must be equal to the image width (this limitation will be removed soon)
+	/*deprecated: 9998*/
 	LIMEREG_RET_IMAGES_MUST_HAVE_SAME_SIZE=9999	//!< Currently the images to be registered must both have the same size (this limitation will be removed soon)
 };
 
diff --git a/lib/matlab/codegeneration/all.cpp b/lib/matlab/codegeneration/all.cpp
index f5d6faa..5818acd 100644
--- a/lib/matlab/codegeneration/all.cpp
+++ b/lib/matlab/codegeneration/all.cpp
@@ -46,31 +46,20 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  * CODE GENERATED BY MATLAB CODER (THE HUMAN READABILITY IS THEREFORE LIMITED)
  */
 
-#include "stdafx.h"
+#include "../../stdafx.h"
 
 /* Include files */
 #include "rt_nonfinite.h"
- 
 #include "diffimg.h"
- 
 #include "gaussnewton.h"
-#include "gen_example_data.h"
 #include "generatePyramidPC.h"
- 
 #include "jacobian.h"
- 
- 
 #include "ssd.h"
- 
- 
- 
 #include "transform.h"
- 
- 
 #include "all.h"
 
 /* Custom Source Code */
-#include "pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
+#include "../pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
 
 namespace Limereg {
 
diff --git a/lib/matlab/codegeneration/calcMarginAddition.cpp b/lib/matlab/codegeneration/calcMarginAddition.cpp
index a05e496..ba93119 100644
--- a/lib/matlab/codegeneration/calcMarginAddition.cpp
+++ b/lib/matlab/codegeneration/calcMarginAddition.cpp
@@ -47,32 +47,21 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
 
-#include "stdafx.h"
+#include "../../stdafx.h"
 
 /* Include files */
 #include "rt_nonfinite.h"
- 
 #include "diffimg.h"
- 
 #include "gaussnewton.h"
-#include "gen_example_data.h"
 #include "generatePyramidPC.h"
- 
 #include "jacobian.h"
- 
- 
 #include "ssd.h"
- 
- 
- 
 #include "transform.h"
- 
- 
 #include "calcMarginAddition.h"
 #include "limereg_rtwutil.h"
 
 /* Custom Source Code */
-#include "pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
+#include "../pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
 
 namespace Limereg {
 
@@ -345,8 +334,8 @@ void calcMarginAddition(real64_T da, real64_T dtr, uint32_T d, uint32_T
 
   /* We add 1 to the upper margin because of the reusal of the right and */
   /* left margin. It would be sufficient to add marginL padding bytes to */
-  /* the top, however adding a whole row is more convenient as the */
-  /* resulting data buffer remains a square picture and the loss of a few */
+  /* the top, however adding a whole row is convenient and the */
+  /* loss of a few */
   /* KB ram (in a cache-uninteresting area) is neglectible. */
 }
 
diff --git a/lib/matlab/codegeneration/diffimg.cpp b/lib/matlab/codegeneration/diffimg.cpp
index 7ed860d..ba85556 100644
--- a/lib/matlab/codegeneration/diffimg.cpp
+++ b/lib/matlab/codegeneration/diffimg.cpp
@@ -47,32 +47,21 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
 
-#include "stdafx.h"
+#include "../../stdafx.h"
 
 /* Include files */
 #include "rt_nonfinite.h"
- 
 #include "diffimg.h"
- 
 #include "gaussnewton.h"
-#include "gen_example_data.h"
 #include "generatePyramidPC.h"
- 
 #include "jacobian.h"
- 
- 
 #include "ssd.h"
- 
- 
- 
 #include "transform.h"
- 
- 
 #include "limereg_emxutil.h"
 #include "limereg_rtwutil.h"
 
 /* Custom Source Code */
-#include "pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
+#include "../pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
 namespace Limereg {
 
 /* Type Definitions */
@@ -87,7 +76,7 @@ namespace Limereg {
 
 /* Function Definitions */
 void diffimg(const emxArray_uint8_T *Rvec, const emxArray_uint8_T *Tvec,
-             uint32_T d, emxArray_uint8_T *Dvec)
+             uint32_T dx, uint32_T dy, emxArray_uint8_T *Dvec)
 {
   uint32_T mn;
   int32_T i0;
@@ -95,7 +84,7 @@ void diffimg(const emxArray_uint8_T *Rvec, const emxArray_uint8_T *Tvec,
   uint32_T i;
   real64_T pixeldiff;
 
-  mn = d * d;
+  mn = dx * dy;
   i0 = Dvec->size[0];
   Dvec->size[0] = (int32_T)mn;
   emxEnsureCapacity((emxArray__common *)Dvec, i0, (int32_T)sizeof(uint8_T));
diff --git a/lib/matlab/codegeneration/diffimg.h b/lib/matlab/codegeneration/diffimg.h
index ad05a19..5d7adc1 100644
--- a/lib/matlab/codegeneration/diffimg.h
+++ b/lib/matlab/codegeneration/diffimg.h
@@ -70,7 +70,7 @@ namespace Limereg {
 /* Variable Definitions */
 
 /* Function Declarations */
-extern void diffimg(const emxArray_uint8_T *Rvec, const emxArray_uint8_T *Tvec, uint32_T d, emxArray_uint8_T *Dvec);
+extern void diffimg(const emxArray_uint8_T *Rvec, const emxArray_uint8_T *Tvec, uint32_T dx, uint32_T dy, emxArray_uint8_T *Dvec);
 
 }
 
diff --git a/lib/matlab/codegeneration/gaussnewton.cpp b/lib/matlab/codegeneration/gaussnewton.cpp
index 7ac0a9c..f8a515f 100644
--- a/lib/matlab/codegeneration/gaussnewton.cpp
+++ b/lib/matlab/codegeneration/gaussnewton.cpp
@@ -47,40 +47,28 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
 
-#include "stdafx.h"
+#include "../../stdafx.h"
 #include <float.h>
 
 /* Include files */
 #include "rt_nonfinite.h"
- 
 #include "diffimg.h"
- 
 #include "gaussnewton.h"
-#include "gen_example_data.h"
 #include "generatePyramidPC.h"
- 
 #include "jacobian.h"
- 
- 
 #include "ssd.h"
- 
- 
- 
 #include "transform.h"
- 
- 
 #include "limereg_emxutil.h"
 #include "mpower.h"
 #include "all.h"
 #include "norm.h"
 #include "mldivide.h"
- 
 #include "calcMarginAddition.h"
 #include "mod.h"
 #include "limereg_rtwutil.h"
 
 /* Custom Source Code */
-#include "pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
+#include "../pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
 
 namespace Limereg {
 
@@ -144,7 +132,7 @@ static real64_T rt_powf_snf(real64_T u0, real64_T u1)
 
 //todo: Fix SSD output (look into git diff for afssddecay which was removed ... and pass that back in the SSD parameter)
 
-void gaussnewton(uint32_T ImgDimension, uint32_T MaxIter,
+void gaussnewton(uint32_T ImgDimX, uint32_T ImgDimY, uint32_T MaxIter,
                  real64_T StopSensitivity,
                  real64_T maxRotation, real64_T maxTranslation, uint32_T
                  LevelCount, uint32_T SkipFineLevels, const emxArray_uint8_T *Rvec,
@@ -169,12 +157,14 @@ void gaussnewton(uint32_T ImgDimension, uint32_T MaxIter,
   real64_T relAngle;
   real64_T angleDiff;
   real64_T transDiff;
-  real64_T dmax;
+  real64_T dmaxX;
+  real64_T dmaxY;
   real64_T maxTranslationInThisLevel;
   uint32_T b_MarginAddition[3];
   real64_T FirstSSD;
   uint32_T B;
-  uint32_T d_in_this_level;
+  uint32_T dx_in_this_level;
+  uint32_T dy_in_this_level;
   uint32_T x;
   uint32_T Ts;
   uint32_T Te;
@@ -263,7 +253,8 @@ void gaussnewton(uint32_T ImgDimension, uint32_T MaxIter,
 
   /* Matlab beschwert sich sonst (aus meiner Sicht zu Unrecht, kann ggf. alles raus, wenn man die Simulationsschicht wegnimmet) */
   /* START TO DELETE */
-  TSizeWoPyramid = ImgDimension * ImgDimension;
+
+  TSizeWoPyramid = ImgDimX * ImgDimY;
   TSizeWoPyramid = (TSizeWoPyramid + (uint32_T)rt_roundf_snf((real64_T)TSizeWoPyramid / 3.0F)) + 1U;
 
   /* +1 because the target will floor (matlab ceils) */
@@ -277,7 +268,7 @@ void gaussnewton(uint32_T ImgDimension, uint32_T MaxIter,
   }
 
   emxInit_uint32_T(&RLvlPtrs, 2);
-  TSizeWoPyramid = ImgDimension * ImgDimension;
+  TSizeWoPyramid = ImgDimX * ImgDimY;
   TSizeWoPyramid = (TSizeWoPyramid + (uint32_T)rt_roundf_snf((real64_T) TSizeWoPyramid / 3.0F)) + 1U;
 
   /* +1 because the target will floor (matlab ceils) */
@@ -300,21 +291,26 @@ void gaussnewton(uint32_T ImgDimension, uint32_T MaxIter,
   for (i1 = 0; i1 <= b_i; i1++) {
     MarginAddition->data[i1] = 0U;
   }
-
   /* END TO DELETE */
+
+/* RBE MOVE ON HERE FOR X, Y SPLIT UP !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! */
+uint32_T ImgDimension = ImgDimX;
+
   /* Calculate bounding boxes (and extract its image-parts if algorithm is distributed to several DSPs) */
     /* local registration on PC */
     /* precalculate some frequent used matrices */
-    relAngle = (real64_T)ImgDimension / 2.0F;
-    dmax = (real64_T)ImgDimension / 2.0F - 0.5F;
+    dmaxX = (real64_T)ImgDimX / 2.0F - 0.5F;
+    dmaxY = (real64_T)ImgDimY / 2.0F - 0.5F;
     BoundBox->data[0] = 1U;
-    BoundBox->data[BoundBox->size[0]] = ImgDimension;
+//RBE Split ToDo: X and Y order ok ?
+    BoundBox->data[BoundBox->size[0]] = ImgDimX;
     BoundBox->data[BoundBox->size[0] << 1] = 1U;
-    BoundBox->data[BoundBox->size[0] * 3] = ImgDimension;
-    DSPRange->data[0] = -dmax;
-    DSPRange->data[DSPRange->size[0]] = relAngle - 0.5F;
-    DSPRange->data[DSPRange->size[0] << 1] = -dmax;
-    DSPRange->data[DSPRange->size[0] * 3] = relAngle - 0.5F;
+    BoundBox->data[BoundBox->size[0] * 3] = ImgDimY;
+//RBE Split ToDo: X and Y order ok ?
+    DSPRange->data[0] = -dmaxX;
+    DSPRange->data[DSPRange->size[0]] = dmaxX;
+    DSPRange->data[DSPRange->size[0] << 1] = -dmaxY;
+    DSPRange->data[DSPRange->size[0] * 3] = dmaxY;
 
     calcMarginAddition(maxRotation, maxTranslation, ImgDimension,
                        b_MarginAddition);
@@ -334,6 +330,19 @@ void gaussnewton(uint32_T ImgDimension, uint32_T MaxIter,
 	Tvec->size[0] = (Tvec->size[0] + (uint32_T)rt_roundf_snf((real64_T)Tvec->size[0] / 3.0F)) + 1U;
     emxEnsureCapacity((emxArray__common *)Tvec, 0, (int32_T)sizeof(uint8_T));
 
+    //Initialize Dirichlet boundaries
+    //Use the mean color of the four outermost image corners as the boundary background color
+    //I have several more sophisticated ideas for the boundary conditions, mail to the author if you need some improvement.
+    uint8_T backgroundColor = (uint8_T)(
+    						  ( (uint32_T)(TvecWoMargins->data[0])
+                              + (uint32_T)(TvecWoMargins->data[ImgDimX - 1])
+                              + (uint32_T)(TvecWoMargins->data[(ImgDimY - 1) * ImgDimX])
+                              + (uint32_T)(TvecWoMargins->data[ImgDimY * ImgDimX - 1])
+                              )/4);
+    memset(Tvec->data, backgroundColor, Tvec->size[0]);
+//rbe todo: pass the backcolor to generatePyramid, then on to shrinkimage, then use it for the split pixels
+//on the right, lower corner
+
     /* Calculate multilevel pyramid */
 	//Generate multilevel pyramid
 	generatePyramidPC(Tvec, BoundBox, MarginAddition, Rvec, DSPRange,
@@ -344,15 +353,19 @@ void gaussnewton(uint32_T ImgDimension, uint32_T MaxIter,
   /* Gauss-Newton Algorithmus */
   TSizeWoPyramid = LevelCount;
 
+
   /* Multilevel registration (pyramid of pixtures in diffetent scales) */
   *i = 0U;
   FirstSSD = 0.0F;
   B = mpower(LevelCount - 1U);
-  d_in_this_level = ImgDimension / B;
+  dx_in_this_level = ImgDimX / B;
+  dy_in_this_level = ImgDimY / B;
+  /*RBE xy splitup: Was this necessary ?)
   x = ImgDimension - d_in_this_level * B;
   if ((x > 0U) && (x >= (B >> 1U) + (B & 1U))) {
     d_in_this_level++;
   }
+  */
 
   Ts = 0U;
   Te = 0U;
@@ -411,7 +424,7 @@ void gaussnewton(uint32_T ImgDimension, uint32_T MaxIter,
         }
 
         jacobian(w, b_BoundBox, b_MarginAddition, b_DSPRange, &Tvec->data[i1], 0,
-                 &Rvec->data[i3], 0, d_in_this_level, SSD, JD, JD2);
+                 &Rvec->data[i3], 0, dx_in_this_level, dy_in_this_level, SSD, JD, JD2);
 
 
       /* search direction */
@@ -509,7 +522,7 @@ void gaussnewton(uint32_T ImgDimension, uint32_T MaxIter,
 			  }
 
 			  relAngle = ssd(wNext, b_BoundBox, b_MarginAddition, b_DSPRange,
-							 &Tvec->data[i1], 0, &Rvec->data[i3], 0, d_in_this_level);
+							 &Tvec->data[i1], 0, &Rvec->data[i3], 0, dx_in_this_level, dy_in_this_level);
 
 			  /* Nur SSD berechnen, nicht JD,JD2 */
 		}
@@ -618,11 +631,14 @@ void gaussnewton(uint32_T ImgDimension, uint32_T MaxIter,
       IterationenImLevel->data[(int32_T)TSizeWoPyramid] = *i - iLast;
       iLast = *i;
       B = mpower(TSizeWoPyramid - 1U);
-      d_in_this_level = ImgDimension / B;
+      dx_in_this_level = ImgDimX / B;
+      dy_in_this_level = ImgDimY / B;
+      /*RBE xy splitup: Was this necessary ?
       x = ImgDimension - d_in_this_level * B;
       if ((x > 0U) && (x >= (B >> 1U) + (B & 1U))) {
         d_in_this_level++;
       }
+      */
 
         Ts = TLvlPtrs->data[(int32_T)TSizeWoPyramid - 1];
         Te = TLvlPtrs->data[((int32_T)TSizeWoPyramid + TLvlPtrs->size[0]) - 1];
diff --git a/lib/matlab/codegeneration/gaussnewton.h b/lib/matlab/codegeneration/gaussnewton.h
index d1a0d95..f852e5b 100644
--- a/lib/matlab/codegeneration/gaussnewton.h
+++ b/lib/matlab/codegeneration/gaussnewton.h
@@ -71,7 +71,7 @@ namespace Limereg {
 /* Variable Definitions */
 
 /* Function Declarations */
-extern void gaussnewton(uint32_T ImgDimension, uint32_T MaxIter, real64_T StopSensitivity,
+extern void gaussnewton(uint32_T ImgDimX, uint32_T ImgDimY, uint32_T MaxIter, real64_T StopSensitivity,
 		real64_T maxRotation, real64_T maxTranslation, uint32_T LevelCount, uint32_T SkipFineLevels,
 		const emxArray_uint8_T *Rvec, emxArray_uint8_T *Tvec, uint32_T *i, real64_T *SSD,
 		real64_T wStart[3], real64_T w[3], uint32_T *iterationsPerLevel);
diff --git a/lib/matlab/codegeneration/gen_example_data.cpp b/lib/matlab/codegeneration/gen_example_data.cpp
deleted file mode 100644
index 75c4d20..0000000
--- a/lib/matlab/codegeneration/gen_example_data.cpp
+++ /dev/null
@@ -1,389 +0,0 @@
-/* =====================================
-=== LIMEREG - Lightweight Image Registration ===
-========================================
-
-Forked from the project FIMREG, which was written for a distributed calculation on the PCIe card DSPC-8681 of Advantech. LIMEREG does not use DSPs and can
-be run on an ordinary PC without special hardware. FIMREG was originally developed by by Roelof Berg, Berg Solutions (rberg at berg-solutions.de) with support
-from Lars Koenig, Fraunhofer MEVIS (lars.koenig at mevis.fraunhofer.de) and Jan Ruehaak, Fraunhofer MEVIS (jan.ruehaak at mevis.fraunhofer.de).
-
-THIS IS A LIMITED RESEARCH PROTOTYPE. Documentation: www.berg-solutions.de/limereg.html
-
-------------------------------------------------------------------------------
-
-Copyright (c) 2014, Roelof Berg
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-
-* Neither the name of the owner nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-----------------------------------------------------------------------------*/
-
-/*
- * gen_example_data.cpp
- *
- * CODE GENERATED BY MATLAB CODER (THE HUMAN READABILITY IS THEREFORE LIMITED)
- *
- */
-
-#include "stdafx.h"
-
-/* Include files */
-#include "rt_nonfinite.h"
- 
-#include "diffimg.h"
- 
-#include "gaussnewton.h"
-#include "gen_example_data.h"
-#include "generatePyramidPC.h"
- 
-#include "jacobian.h"
- 
- 
-#include "ssd.h"
- 
- 
- 
-#include "transform.h"
- 
- 
-#include "limereg_emxutil.h"
-#include "limereg_rtwutil.h"
-
-/* Custom Source Code */
-#include "pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
-namespace Limereg {
-
-/* Type Definitions */
-
-/* Named Constants */
-
-/* Variable Declarations */
-
-/* Variable Definitions */
-
-/* Function Declarations */
-
-/* Function Definitions */
-void gen_example_data(const real64_T wi[3], uint32_T d, emxArray_uint8_T *Rvec,
-                      emxArray_uint8_T *Tvec)
-{
-  emxArray_uint8_T *R;
-  int32_T i35;
-  int32_T nx;
-  uint32_T mn;
-  real64_T r_mitte;
-  uint32_T r_links;
-  uint32_T r_rechts;
-  int32_T i36;
-  int32_T k21;
-  int32_T k11;
-  emxArray_int32_T *r1;
-  emxArray_int32_T *r2;
-  int32_T k12;
-  int32_T unnamed_idx_1;
-  uint32_T Ax;
-  emxArray_int32_T *r3;
-  emxArray_int32_T *r4;
-  emxArray_int32_T *r5;
-  emxArray_int32_T *r6;
-  emxArray_uint8_T *x;
-  int32_T sz[2];
-  emxArray_uint8_T *y;
-  emxArray_uint8_T *b_Rvec;
-  real64_T b_y;
-  real64_T dmax;
-  real64_T c_y;
-  real64_T X_mni;
-  real64_T FA_i;
-  int32_T k22;
-  b_emxInit_uint8_T(&R, 2);
-
-  /* Referenzbild */
-  i35 = R->size[0] * R->size[1];
-  R->size[0] = (int32_T)d;
-  R->size[1] = (int32_T)d;
-  emxEnsureCapacity((emxArray__common *)R, i35, (int32_T)sizeof(uint8_T));
-  nx = (int32_T)d * (int32_T)d - 1;
-  for (i35 = 0; i35 <= nx; i35++) {
-    R->data[i35] = 0;
-  }
-
-  mn = (uint32_T)rt_roundf_snf((real64_T)d / 2.0F);
-  r_mitte = (real64_T)rt_roundf_snf((real64_T)d / 2.0F);
-  r_links = (uint32_T)rt_roundf_snf((real64_T)floor((real64_T)mn - r_mitte /
-    2.0F) + 1.0F);
-  r_rechts = (uint32_T)(real64_T)ceil((real64_T)mn + r_mitte / 2.0F);
-  if (r_links > r_rechts) {
-    i35 = 1;
-    i36 = 0;
-  } else {
-    i35 = (int32_T)r_links;
-    i36 = (int32_T)r_rechts;
-  }
-
-  if (r_links > r_rechts) {
-    k21 = 1;
-    k11 = 0;
-  } else {
-    k21 = (int32_T)r_links;
-    k11 = (int32_T)r_rechts;
-  }
-
-  emxInit_int32_T(&r1, 1);
-  nx = r1->size[0];
-  r1->size[0] = (i36 - i35) + 1;
-  emxEnsureCapacity((emxArray__common *)r1, nx, (int32_T)sizeof(int32_T));
-  nx = i36 - i35;
-  for (i36 = 0; i36 <= nx; i36++) {
-    r1->data[i36] = i35 + i36;
-  }
-
-  emxInit_int32_T(&r2, 1);
-  i36 = r2->size[0];
-  r2->size[0] = (k11 - k21) + 1;
-  emxEnsureCapacity((emxArray__common *)r2, i36, (int32_T)sizeof(int32_T));
-  nx = k11 - k21;
-  for (i36 = 0; i36 <= nx; i36++) {
-    r2->data[i36] = k21 + i36;
-  }
-
-  k12 = r1->size[0];
-  unnamed_idx_1 = r2->size[0];
-  emxFree_int32_T(&r2);
-  emxFree_int32_T(&r1);
-  nx = unnamed_idx_1 - 1;
-  for (i36 = 0; i36 <= nx; i36++) {
-    unnamed_idx_1 = k12 - 1;
-    for (k11 = 0; k11 <= unnamed_idx_1; k11++) {
-      R->data[((i35 + k11) + R->size[0] * ((k21 + i36) - 1)) - 1] = MAX_uint8_T;
-    }
-  }
-
-  r_links = (uint32_T)rt_roundf_snf((real64_T)floor((real64_T)mn - r_mitte /
-    4.0F) + 1.0F);
-  r_rechts = (uint32_T)(real64_T)ceil((real64_T)mn + r_mitte / 4.0F);
-  mn = (r_links - r_rechts) + r_links;
-  if (mn > r_links) {
-    i35 = 1;
-    i36 = 0;
-  } else {
-    i35 = (int32_T)mn;
-    i36 = (int32_T)r_links;
-  }
-
-  mn = r_links - (uint32_T)(real64_T)floor((real64_T)d * 0.05F);
-  Ax = r_rechts - (uint32_T)(real64_T)floor((real64_T)d * 0.05F);
-  if (mn > Ax) {
-    k21 = 1;
-    k11 = 0;
-  } else {
-    k21 = (int32_T)mn;
-    k11 = (int32_T)Ax;
-  }
-
-  emxInit_int32_T(&r3, 1);
-  nx = r3->size[0];
-  r3->size[0] = (i36 - i35) + 1;
-  emxEnsureCapacity((emxArray__common *)r3, nx, (int32_T)sizeof(int32_T));
-  nx = i36 - i35;
-  for (i36 = 0; i36 <= nx; i36++) {
-    r3->data[i36] = i35 + i36;
-  }
-
-  emxInit_int32_T(&r4, 1);
-  i36 = r4->size[0];
-  r4->size[0] = (k11 - k21) + 1;
-  emxEnsureCapacity((emxArray__common *)r4, i36, (int32_T)sizeof(int32_T));
-  nx = k11 - k21;
-  for (i36 = 0; i36 <= nx; i36++) {
-    r4->data[i36] = k21 + i36;
-  }
-
-  k12 = r3->size[0];
-  unnamed_idx_1 = r4->size[0];
-  emxFree_int32_T(&r4);
-  emxFree_int32_T(&r3);
-  nx = unnamed_idx_1 - 1;
-  for (i36 = 0; i36 <= nx; i36++) {
-    unnamed_idx_1 = k12 - 1;
-    for (k11 = 0; k11 <= unnamed_idx_1; k11++) {
-      R->data[((i35 + k11) + R->size[0] * ((k21 + i36) - 1)) - 1] = 20;
-    }
-  }
-
-  mn = r_links + (uint32_T)(real64_T)floor((real64_T)d * 0.1F);
-  Ax = r_rechts + (uint32_T)(real64_T)floor((real64_T)d * 0.1F);
-  if (mn > Ax) {
-    i35 = 1;
-    i36 = 0;
-  } else {
-    i35 = (int32_T)mn;
-    i36 = (int32_T)Ax;
-  }
-
-  emxInit_int32_T(&r5, 1);
-  mn = r_rechts - r_links;
-  k21 = r5->size[0];
-  r5->size[0] = (int32_T)mn + 1;
-  emxEnsureCapacity((emxArray__common *)r5, k21, (int32_T)sizeof(int32_T));
-  for (k21 = 0; k21 <= (int32_T)mn; k21++) {
-    r5->data[k21] = (int32_T)((uint32_T)k21 + r_rechts);
-  }
-
-  emxInit_int32_T(&r6, 1);
-  k21 = r6->size[0];
-  r6->size[0] = (i36 - i35) + 1;
-  emxEnsureCapacity((emxArray__common *)r6, k21, (int32_T)sizeof(int32_T));
-  nx = i36 - i35;
-  for (i36 = 0; i36 <= nx; i36++) {
-    r6->data[i36] = i35 + i36;
-  }
-
-  k12 = r5->size[0];
-  unnamed_idx_1 = r6->size[0];
-  emxFree_int32_T(&r6);
-  nx = unnamed_idx_1 - 1;
-  for (i36 = 0; i36 <= nx; i36++) {
-    unnamed_idx_1 = k12 - 1;
-    for (k21 = 0; k21 <= unnamed_idx_1; k21++) {
-      R->data[(r5->data[k21] + R->size[0] * ((i35 + i36) - 1)) - 1] = 130;
-    }
-  }
-
-  emxFree_int32_T(&r5);
-  b_emxInit_uint8_T(&x, 2);
-  i35 = x->size[0] * x->size[1];
-  x->size[0] = R->size[1];
-  x->size[1] = R->size[0];
-  emxEnsureCapacity((emxArray__common *)x, i35, (int32_T)sizeof(uint8_T));
-  nx = R->size[0] - 1;
-  for (i35 = 0; i35 <= nx; i35++) {
-    unnamed_idx_1 = R->size[1] - 1;
-    for (i36 = 0; i36 <= unnamed_idx_1; i36++) {
-      x->data[i36 + x->size[0] * i35] = R->data[i35 + R->size[0] * i36];
-    }
-  }
-
-  emxFree_uint8_T(&R);
-  nx = x->size[0] * x->size[1];
-  for (i35 = 0; i35 < 2; i35++) {
-    sz[i35] = 0;
-  }
-
-  b_emxInit_uint8_T(&y, 2);
-  sz[0] = 1;
-  sz[1] = 1;
-  sz[1] = nx;
-  i35 = y->size[0] * y->size[1];
-  y->size[0] = 1;
-  y->size[1] = sz[1];
-  emxEnsureCapacity((emxArray__common *)y, i35, (int32_T)sizeof(uint8_T));
-  for (unnamed_idx_1 = 0; unnamed_idx_1 + 1 <= nx; unnamed_idx_1++) {
-    y->data[unnamed_idx_1] = x->data[unnamed_idx_1];
-  }
-
-  emxFree_uint8_T(&x);
-  b_emxInit_uint8_T(&b_Rvec, 2);
-  i35 = b_Rvec->size[0] * b_Rvec->size[1];
-  b_Rvec->size[0] = y->size[1];
-  b_Rvec->size[1] = 1;
-  emxEnsureCapacity((emxArray__common *)b_Rvec, i35, (int32_T)sizeof(uint8_T));
-  nx = y->size[1] - 1;
-  for (i35 = 0; i35 <= nx; i35++) {
-    b_Rvec->data[i35] = y->data[y->size[0] * i35];
-  }
-
-  emxFree_uint8_T(&y);
-
-  /* Vektorisierte Darstellung */
-  mn = d * d;
-  b_y = (real64_T)d / 2.0F;
-  dmax = (real64_T)d / 2.0F - 0.5F;
-  c_y = (real64_T)d / 2.0F;
-
-  /* Shifting, um negative Koordinaten in Matrixbereich zu bringen */
-  /* ======================================================================== */
-  /* = Registerweise statt matrizenbasiert */
-  /* ======================================================================== */
-  i35 = Rvec->size[0];
-  Rvec->size[0] = (int32_T)mn;
-  emxEnsureCapacity((emxArray__common *)Rvec, i35, (int32_T)sizeof(uint8_T));
-  nx = (int32_T)mn - 1;
-  for (i35 = 0; i35 <= nx; i35++) {
-    Rvec->data[i35] = 0;
-  }
-
-  mn = 1U;
-
-  /* Folgende beiden For-Loops laufen 1..mn mal durch das pixelmittige Koordinatengitter */
-  /* Dabei zeigt i auf die Position von 1..mn */
-  i35 = (int32_T)((b_y - 0.5F) + (1.0F - (-dmax)));
-  for (nx = 0; nx <= i35 - 1; nx++) {
-    X_mni = -dmax + (real64_T)nx;
-    i36 = (int32_T)((b_y - 0.5F) + (1.0F - (-dmax)));
-    for (unnamed_idx_1 = 0; unnamed_idx_1 <= i36 - 1; unnamed_idx_1++) {
-      r_mitte = -dmax + (real64_T)unnamed_idx_1;
-
-      /* Die Zeilenvektoren FP(1)*X_i und FP(4)*X_i k�nnten vorberechnet */
-      /* werden (mit FP(3) und FP(6), sowie +s schon mit drin ... */
-      FA_i = (0.707106769F * r_mitte + -0.707106769F * X_mni) + (c_y + 0.5F);
-      r_mitte = (0.707106769F * r_mitte + 0.707106769F * X_mni) + (c_y + 0.5F);
-
-      /* +s weil Drehpunkt in Bildmitte */
-      Ax = (uint32_T)rt_roundf_snf((real64_T)floor(FA_i));
-      r_links = (uint32_T)rt_roundf_snf((real64_T)floor(r_mitte));
-
-      /* Fetch picture values (how can we cache-optimize this ? Intelligent routing ?) */
-      k11 = 0;
-      k12 = 0;
-      k21 = 0;
-      k22 = 0;
-      if ((Ax >= 1U) && (Ax < d) && (r_links >= 1U) && (r_links < d)) {
-        k11 = b_Rvec->data[(int32_T)((r_links - 1U) * d + Ax) - 1];
-        k12 = b_Rvec->data[(int32_T)((r_links - 1U) * d + Ax)];
-        k21 = b_Rvec->data[(int32_T)(r_links * d + Ax) - 1];
-        k22 = b_Rvec->data[(int32_T)(r_links * d + Ax)];
-      }
-
-      /* Interpolation */
-      FA_i -= (real64_T)floor(FA_i);
-      r_mitte -= (real64_T)floor(r_mitte);
-      Rvec->data[(int32_T)mn - 1] = (uint8_T)rt_roundf_snf((((real64_T)k11 *
-        (1.0F - FA_i) * (1.0F - r_mitte) + (real64_T)k12 * FA_i * (1.0F -
-        r_mitte)) + (real64_T)k21 * (1.0F - FA_i) * r_mitte) + (real64_T)k22 *
-        FA_i * r_mitte);
-      mn++;
-    }
-  }
-
-  emxFree_uint8_T(&b_Rvec);
-
-  /* Templatebild */
-  transform(wi, Rvec, d, Tvec);
-}
-
-}
-
-/* End of code generation (gen_example_data.cpp) */
diff --git a/lib/matlab/codegeneration/gen_example_data.h b/lib/matlab/codegeneration/gen_example_data.h
deleted file mode 100644
index 919ca5f..0000000
--- a/lib/matlab/codegeneration/gen_example_data.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* =====================================
-=== LIMEREG - Lightweight Image Registration ===
-========================================
-
-Forked from the project FIMREG, which was written for a distributed calculation on the PCIe card DSPC-8681 of Advantech. LIMEREG does not use DSPs and can
-be run on an ordinary PC without special hardware. FIMREG was originally developed by by Roelof Berg, Berg Solutions (rberg at berg-solutions.de) with support
-from Lars Koenig, Fraunhofer MEVIS (lars.koenig at mevis.fraunhofer.de) and Jan Ruehaak, Fraunhofer MEVIS (jan.ruehaak at mevis.fraunhofer.de).
-
-THIS IS A LIMITED RESEARCH PROTOTYPE. Documentation: www.berg-solutions.de/limereg.html
-
-------------------------------------------------------------------------------
-
-Copyright (c) 2014, Roelof Berg
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
-list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice,
-this list of conditions and the following disclaimer in the documentation
-and/or other materials provided with the distribution.
-
-* Neither the name of the owner nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-----------------------------------------------------------------------------*/
-
-/*
- * gen_example_data.h
- *
- * CODE GENERATED BY MATLAB CODER (THE HUMAN READABILITY IS THEREFORE LIMITED)
- *
- */
-
-#ifndef __GEN_EXAMPLE_DATA_H__
-#define __GEN_EXAMPLE_DATA_H__
-/* Include files */
-#include <math.h>
-#include <stddef.h>
-#include <stdlib.h>
-#include <string.h>
-#include "rt_nonfinite.h"
-
-#include "rtwtypes.h"
-#include "limereg_types.h"
-
-namespace Limereg {
-
-/* Type Definitions */
-
-/* Named Constants */
-
-/* Variable Declarations */
-
-/* Variable Definitions */
-
-/* Function Declarations */
-extern void gen_example_data(const real64_T wi[3], uint32_T d, emxArray_uint8_T *Rvec, emxArray_uint8_T *Tvec);
-
-}
-#endif
-/* End of code generation (gen_example_data.h) */
diff --git a/lib/matlab/codegeneration/generatePyramidPC.cpp b/lib/matlab/codegeneration/generatePyramidPC.cpp
index 879be4d..db3a67e 100644
--- a/lib/matlab/codegeneration/generatePyramidPC.cpp
+++ b/lib/matlab/codegeneration/generatePyramidPC.cpp
@@ -49,32 +49,21 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 /* Include files */
 
-#include "stdafx.h"
+#include "../../stdafx.h"
 
 #include "rt_nonfinite.h"
- 
 #include "diffimg.h"
- 
 #include "gaussnewton.h"
-#include "gen_example_data.h"
 #include "generatePyramidPC.h"
- 
 #include "jacobian.h"
- 
- 
 #include "ssd.h"
- 
- 
- 
 #include "transform.h"
- 
- 
 #include "shrinkImageDSP.h"
 #include "limereg_emxutil.h"
 #include "limereg_rtwutil.h"
 
 /* Custom Source Code */
-#include "pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
+#include "../pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
 namespace Limereg {
 
 /* Type Definitions */
@@ -317,8 +306,8 @@ void generatePyramidPC(const emxArray_uint8_T *Tvec, emxArray_uint32_T *BoundBox
 		  MarginAddition->data[((int32_T)(Level-1) + MarginAddition->size[0]) - 1] / 2;
 
       MarginAddition->data[((int32_T)Level + (MarginAddition->size[0] << 1)) - 1]
-        = (((THeight - BoundBox->data[((int32_T)Level + BoundBox->size[0]) - 1])
-            + BoundBox->data[(int32_T)Level - 1]) - MarginAddition->data
+        = (((THeight - BoundBox->data[((int32_T)Level + BoundBox->size[0] * 3) - 1])
+            + BoundBox->data[(int32_T)Level + (BoundBox->size[0] << 1) - 1]) - MarginAddition->data
            [((int32_T)Level + MarginAddition->size[0]) - 1]) - 1U;
 
 	  //debugging:
diff --git a/lib/matlab/codegeneration/jacobian.cpp b/lib/matlab/codegeneration/jacobian.cpp
index 77f4ad0..988239e 100644
--- a/lib/matlab/codegeneration/jacobian.cpp
+++ b/lib/matlab/codegeneration/jacobian.cpp
@@ -47,34 +47,23 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
 
-#include "stdafx.h"
+#include "../../stdafx.h"
 
 #ifndef USE_ROELOF_CODE
 
 /* Include files */
 #include "rt_nonfinite.h"
- 
 #include "diffimg.h"
- 
 #include "gaussnewton.h"
-#include "gen_example_data.h"
 #include "generatePyramidPC.h"
- 
 #include "jacobian.h"
- 
- 
 #include "ssd.h"
- 
- 
- 
 #include "transform.h"
- 
- 
 #include "limereg_emxutil.h"
 #include "limereg_rtwutil.h"
 
 /* Custom Source Code */
-#include "pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
+#include "../pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
 #if WIN32
 #include "omp.h"
 #endif
@@ -83,8 +72,8 @@ namespace Limereg {
 
 void jacobian(const real64_T w[3], const uint32_T BoundBox[4], const uint32_T
               MarginAddon[3], const real64_T DSPRange[4], uint8_T
-              *Tvec, const uint32_T TOffset, uint8_T *Rvec, const uint32_T ROffset, uint32_T d, real64_T *SSD,
-              real64_T JD[3], real64_T JD2[9])
+              *Tvec, const uint32_T TOffset, uint8_T *Rvec, const uint32_T ROffset, uint32_T dX, uint32_T dY,
+              real64_T *SSD, real64_T JD[3], real64_T JD2[9])
 {
   int32_T i;
   real64_T omegaR[4];
@@ -109,11 +98,12 @@ void jacobian(const real64_T w[3], const uint32_T BoundBox[4], const uint32_T
   mR[0] = (int)(omegaR[1]-omegaR[0]);
   mR[1] = (int)(omegaR[3]-omegaR[2]);
 
-  const real64_T shift = (d/2)+0.5f;
-  omegaT[0] = BoundBox[0] - shift-0.5f;
-  omegaT[1] = BoundBox[1] - shift+0.5f;
-  omegaT[2] = BoundBox[2] - shift-0.5f;
-  omegaT[3] = BoundBox[3] - shift+0.5f;
+  const real64_T shiftX = (dX/2)+0.5f;
+  const real64_T shiftY = (dY/2)+0.5f;
+  omegaT[0] = BoundBox[0] - shiftX-0.5f;
+  omegaT[1] = BoundBox[1] - shiftX+0.5f;
+  omegaT[2] = BoundBox[2] - shiftY-0.5f;
+  omegaT[3] = BoundBox[3] - shiftY+0.5f;
   mT[0] = (int)(BoundBox[1]-BoundBox[0])+1;
   mT[1] = (int)(BoundBox[3]-BoundBox[2])+1;
 
@@ -123,7 +113,7 @@ void jacobian(const real64_T w[3], const uint32_T BoundBox[4], const uint32_T
 
   //debug
   #ifdef _TRACE_OUTPUT_
-  	printf("d=%u, shift=%f\n", d, shift);   
+  	printf("d=%uX%u, shift=%f\n", dX, xY, shift);
 
 	const uint8_T* p=&Tvec[TOffset];
 	uint32_T iWidth = (BoundBox[1]+1)-BoundBox[0];
diff --git a/lib/matlab/codegeneration/jacobian.h b/lib/matlab/codegeneration/jacobian.h
index 2ca879f..acbf785 100644
--- a/lib/matlab/codegeneration/jacobian.h
+++ b/lib/matlab/codegeneration/jacobian.h
@@ -71,7 +71,8 @@ namespace Limereg {
 
 /* Function Declarations */
 extern void jacobian(const real64_T w[3], const uint32_T BoundBox[4], const uint32_T MarginAddon[3], const real64_T DSPRange[4],
-					 uint8_T *Tvec, const uint32_T TOffset, uint8_T *Rvec, const uint32_T ROffset, uint32_T d, real64_T *SSD, real64_T JD[3], real64_T JD2[9]);
+					 uint8_T *Tvec, const uint32_T TOffset, uint8_T *Rvec, const uint32_T ROffset, uint32_T dX, uint32_T dY,
+					 real64_T *SSD, real64_T JD[3], real64_T JD2[9]);
 
 }
 #endif
diff --git a/lib/matlab/codegeneration/limereg_emxAPI.cpp b/lib/matlab/codegeneration/limereg_emxAPI.cpp
index eb4382b..2fb176d 100644
--- a/lib/matlab/codegeneration/limereg_emxAPI.cpp
+++ b/lib/matlab/codegeneration/limereg_emxAPI.cpp
@@ -47,32 +47,21 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
 
-#include "stdafx.h"
+#include "../../stdafx.h"
 
 /* Include files */
 #include "rt_nonfinite.h"
- 
 #include "diffimg.h"
- 
 #include "gaussnewton.h"
-#include "gen_example_data.h"
 #include "generatePyramidPC.h"
- 
 #include "jacobian.h"
- 
- 
 #include "ssd.h"
- 
- 
- 
 #include "transform.h"
- 
- 
 #include "limereg_emxAPI.h"
 #include "limereg_emxutil.h"
 
 /* Custom Source Code */
-#include "pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
+#include "../pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
 
 namespace Limereg {
 
diff --git a/lib/matlab/codegeneration/limereg_emxutil.cpp b/lib/matlab/codegeneration/limereg_emxutil.cpp
index 8d6062e..286ed64 100644
--- a/lib/matlab/codegeneration/limereg_emxutil.cpp
+++ b/lib/matlab/codegeneration/limereg_emxutil.cpp
@@ -47,31 +47,20 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
 
-#include "stdafx.h"
+#include "../../stdafx.h"
 
 /* Include files */
 #include "rt_nonfinite.h"
- 
 #include "diffimg.h"
- 
 #include "gaussnewton.h"
-#include "gen_example_data.h"
 #include "generatePyramidPC.h"
- 
 #include "jacobian.h"
- 
- 
 #include "ssd.h"
- 
- 
- 
 #include "transform.h"
- 
- 
 #include "limereg_emxutil.h"
 
 /* Custom Source Code */
-#include "pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
+#include "../pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
 namespace Limereg {
 
 /* Type Definitions */
diff --git a/lib/matlab/codegeneration/limereg_initialize.cpp b/lib/matlab/codegeneration/limereg_initialize.cpp
index 803acd0..0ec5083 100644
--- a/lib/matlab/codegeneration/limereg_initialize.cpp
+++ b/lib/matlab/codegeneration/limereg_initialize.cpp
@@ -47,33 +47,20 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
 
-#include "stdafx.h"
+#include "../../stdafx.h"
 
 /* Include files */
 #include "rt_nonfinite.h"
- 
 #include "diffimg.h"
- 
 #include "gaussnewton.h"
-#include "gen_example_data.h"
 #include "generatePyramidPC.h"
- 
 #include "jacobian.h"
- 
-
- 
- 
 #include "ssd.h"
- 
- 
- 
 #include "transform.h"
- 
- 
 #include "limereg_initialize.h"
 
 /* Custom Source Code */
-#include "pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
+#include "../pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
 namespace Limereg {
 
 
diff --git a/lib/matlab/codegeneration/limereg_rtwutil.cpp b/lib/matlab/codegeneration/limereg_rtwutil.cpp
index 2485d5b..163a3a1 100644
--- a/lib/matlab/codegeneration/limereg_rtwutil.cpp
+++ b/lib/matlab/codegeneration/limereg_rtwutil.cpp
@@ -47,33 +47,20 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
 
-#include "stdafx.h"
+#include "../../stdafx.h"
 
 /* Include files */
 #include "rt_nonfinite.h"
- 
 #include "diffimg.h"
- 
 #include "gaussnewton.h"
-#include "gen_example_data.h"
 #include "generatePyramidPC.h"
- 
 #include "jacobian.h"
- 
-
- 
- 
 #include "ssd.h"
- 
- 
- 
 #include "transform.h"
- 
- 
 #include "limereg_rtwutil.h"
 
 /* Custom Source Code */
-#include "pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
+#include "../pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
 namespace Limereg {
 
 /* Type Definitions */
diff --git a/lib/matlab/codegeneration/limereg_terminate.cpp b/lib/matlab/codegeneration/limereg_terminate.cpp
index afd9b86..a1ca1a3 100644
--- a/lib/matlab/codegeneration/limereg_terminate.cpp
+++ b/lib/matlab/codegeneration/limereg_terminate.cpp
@@ -47,33 +47,20 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
 
-#include "stdafx.h"
+#include "../../stdafx.h"
 
 /* Include files */
 #include "rt_nonfinite.h"
- 
 #include "diffimg.h"
- 
 #include "gaussnewton.h"
-#include "gen_example_data.h"
 #include "generatePyramidPC.h"
- 
 #include "jacobian.h"
- 
-
- 
- 
 #include "ssd.h"
- 
- 
- 
 #include "transform.h"
- 
- 
 #include "limereg_terminate.h"
 
 /* Custom Source Code */
-#include "pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
+#include "../pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
 namespace Limereg {
 
 /* Type Definitions */
diff --git a/lib/matlab/codegeneration/mldivide.cpp b/lib/matlab/codegeneration/mldivide.cpp
index 5b797b4..5cd9be2 100644
--- a/lib/matlab/codegeneration/mldivide.cpp
+++ b/lib/matlab/codegeneration/mldivide.cpp
@@ -47,33 +47,20 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
 
-#include "stdafx.h"
+#include "../../stdafx.h"
 
 /* Include files */
 #include "rt_nonfinite.h"
- 
 #include "diffimg.h"
- 
 #include "gaussnewton.h"
-#include "gen_example_data.h"
 #include "generatePyramidPC.h"
- 
 #include "jacobian.h"
- 
-
- 
- 
 #include "ssd.h"
- 
- 
- 
 #include "transform.h"
- 
- 
 #include "mldivide.h"
 
 /* Custom Source Code */
-#include "pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
+#include "../pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
 namespace Limereg {
 
 
diff --git a/lib/matlab/codegeneration/mod.cpp b/lib/matlab/codegeneration/mod.cpp
index d9fee73..f48d4b4 100644
--- a/lib/matlab/codegeneration/mod.cpp
+++ b/lib/matlab/codegeneration/mod.cpp
@@ -47,33 +47,20 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
 
-#include "stdafx.h"
+#include "../../stdafx.h"
 
 /* Include files */
 #include "rt_nonfinite.h"
- 
 #include "diffimg.h"
- 
 #include "gaussnewton.h"
-#include "gen_example_data.h"
 #include "generatePyramidPC.h"
- 
 #include "jacobian.h"
- 
-
- 
- 
 #include "ssd.h"
- 
- 
- 
 #include "transform.h"
- 
- 
 #include "mod.h"
 
 /* Custom Source Code */
-#include "pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
+#include "../pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
 namespace Limereg {
 
 /* Type Definitions */
diff --git a/lib/matlab/codegeneration/mpower.cpp b/lib/matlab/codegeneration/mpower.cpp
index 5269a7f..8581af8 100644
--- a/lib/matlab/codegeneration/mpower.cpp
+++ b/lib/matlab/codegeneration/mpower.cpp
@@ -47,33 +47,20 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
 
-#include "stdafx.h"
+#include "../../stdafx.h"
 
 /* Include files */
 #include "rt_nonfinite.h"
- 
 #include "diffimg.h"
- 
 #include "gaussnewton.h"
-#include "gen_example_data.h"
 #include "generatePyramidPC.h"
- 
 #include "jacobian.h"
- 
-
- 
- 
 #include "ssd.h"
- 
- 
- 
 #include "transform.h"
- 
- 
 #include "mpower.h"
 
 /* Custom Source Code */
-#include "pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
+#include "../pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
 namespace Limereg {
 
 
diff --git a/lib/matlab/codegeneration/norm.cpp b/lib/matlab/codegeneration/norm.cpp
index 85f80fc..bf25ea8 100644
--- a/lib/matlab/codegeneration/norm.cpp
+++ b/lib/matlab/codegeneration/norm.cpp
@@ -47,33 +47,20 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
 
-#include "stdafx.h"
+#include "../../stdafx.h"
 
 /* Include files */
 #include "rt_nonfinite.h"
- 
 #include "diffimg.h"
- 
 #include "gaussnewton.h"
-#include "gen_example_data.h"
 #include "generatePyramidPC.h"
- 
 #include "jacobian.h"
- 
-
- 
- 
 #include "ssd.h"
- 
- 
- 
 #include "transform.h"
- 
- 
 #include "norm.h"
 
 /* Custom Source Code */
-#include "pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
+#include "../pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
 namespace Limereg {
 
 
diff --git a/lib/matlab/codegeneration/rtGetInf.cpp b/lib/matlab/codegeneration/rtGetInf.cpp
index 9c68080..3ee8fd6 100644
--- a/lib/matlab/codegeneration/rtGetInf.cpp
+++ b/lib/matlab/codegeneration/rtGetInf.cpp
@@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
 
-#include "stdafx.h"
+#include "../../stdafx.h"
 
 /*
  * Abstract:
diff --git a/lib/matlab/codegeneration/rtGetNaN.cpp b/lib/matlab/codegeneration/rtGetNaN.cpp
index b95e886..7a57dd3 100644
--- a/lib/matlab/codegeneration/rtGetNaN.cpp
+++ b/lib/matlab/codegeneration/rtGetNaN.cpp
@@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
 
-#include "stdafx.h"
+#include "../../stdafx.h"
 
 /*
  * Abstract:
diff --git a/lib/matlab/codegeneration/rt_nonfinite.cpp b/lib/matlab/codegeneration/rt_nonfinite.cpp
index 083478f..68e8441 100644
--- a/lib/matlab/codegeneration/rt_nonfinite.cpp
+++ b/lib/matlab/codegeneration/rt_nonfinite.cpp
@@ -47,7 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
 
-#include "stdafx.h"
+#include "../../stdafx.h"
 
 /*
  * Abstract:
diff --git a/lib/matlab/codegeneration/shrinkImageDSP.cpp b/lib/matlab/codegeneration/shrinkImageDSP.cpp
index ff9a7d2..121c153 100644
--- a/lib/matlab/codegeneration/shrinkImageDSP.cpp
+++ b/lib/matlab/codegeneration/shrinkImageDSP.cpp
@@ -47,37 +47,23 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
 
-#include "stdafx.h"
+#include "../../stdafx.h"
 
 /* Include files */
 #include "rt_nonfinite.h"
- 
 #include "diffimg.h"
- 
 #include "gaussnewton.h"
-#include "gen_example_data.h"
 #include "generatePyramidPC.h"
- 
 #include "jacobian.h"
- 
-
- 
- 
-
 #include "ssd.h"
- 
- 
- 
 #include "transform.h"
- 
- 
 #include "mpower.h"
 #include "shrinkImageDSP.h"
 #include "limereg_emxutil.h"
 #include "limereg_rtwutil.h"
 
 /* Custom Source Code */
-#include "pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
+#include "../pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
 
 #include "omp.h"					  //OpenMP multiprocessor (if you don't like OpenMP and compile for a single core just remove this header definition and the #pragma omp instructions)
 
@@ -105,6 +91,7 @@ void shrinkImageDSP(const uint8_T *Img, const uint32_T ImgDim[4], uint32_T SubAr
   uint32_T xWidthSmall = (uint32_T)(real64_T)ceil((real64_T)xWidth / 2.0F);
   uint32_T yHeight = ImgDim[3] - ImgDim[2] + 1;
 
+//todo: where are the pragma openmp instructions gone ?
   int32_T loopStop = int32_T((SubArea[3]-1)>>1)+1;
   const uint32_T yEvenOdd = ((SubArea[2]-1) & 0x1);	//todo: Maybe unnecessary on the dsp when y+=2 loops are equally fast as y++
   for (int32_T y = ((SubArea[2]-1)>>1); y < loopStop; y++) {
diff --git a/lib/matlab/codegeneration/ssd.cpp b/lib/matlab/codegeneration/ssd.cpp
index 3f9985b..3d14c8f 100644
--- a/lib/matlab/codegeneration/ssd.cpp
+++ b/lib/matlab/codegeneration/ssd.cpp
@@ -47,36 +47,23 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
 
-#include "stdafx.h"
+#include "../../stdafx.h"
 
 #ifndef USE_ROELOF_CODE
 
 /* Include files */
 #include "rt_nonfinite.h"
- 
 #include "diffimg.h"
- 
 #include "gaussnewton.h"
-#include "gen_example_data.h"
 #include "generatePyramidPC.h"
- 
 #include "jacobian.h"
- 
-
- 
- 
 #include "ssd.h"
- 
- 
- 
 #include "transform.h"
- 
- 
 #include "limereg_emxutil.h"
 #include "limereg_rtwutil.h"
 
 /* Custom Source Code */
-#include "pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
+#include "../pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
 #if WIN32
 #include "omp.h"
 #endif
@@ -85,7 +72,7 @@ namespace Limereg {
 
 real64_T ssd(const real64_T w[3], const uint32_T BoundBox[4], const uint32_T
              MarginAddon[3], const real64_T DSPRange[4], uint8_T *
-             Tvec, const uint32_T TOffset, uint8_T *Rvec, const uint32_T ROffset, uint32_T d)
+             Tvec, const uint32_T TOffset, uint8_T *Rvec, const uint32_T ROffset, uint32_T dX, uint32_T dY)
 {
   real64_T SSD;
   int32_T i;
@@ -104,11 +91,12 @@ real64_T ssd(const real64_T w[3], const uint32_T BoundBox[4], const uint32_T
   mR[0] = (int)(omegaR[1]-omegaR[0]);
   mR[1] = (int)(omegaR[3]-omegaR[2]);
 
-  const real64_T shift = (d/2)+0.5f;
-  omegaT[0] = BoundBox[0] - shift-0.5f;
-  omegaT[1] = BoundBox[1] - shift+0.5f;
-  omegaT[2] = BoundBox[2] - shift-0.5f;
-  omegaT[3] = BoundBox[3] - shift+0.5f;
+  const real64_T shiftX = (dX/2)+0.5f;
+  const real64_T shiftY = (dY/2)+0.5f;
+  omegaT[0] = BoundBox[0] - shiftX-0.5f;
+  omegaT[1] = BoundBox[1] - shiftX+0.5f;
+  omegaT[2] = BoundBox[2] - shiftY-0.5f;
+  omegaT[3] = BoundBox[3] - shiftY+0.5f;
   mT[0] = (int)(BoundBox[1]-BoundBox[0])+1;
   mT[1] = (int)(BoundBox[3]-BoundBox[2])+1;
 
@@ -118,7 +106,7 @@ real64_T ssd(const real64_T w[3], const uint32_T BoundBox[4], const uint32_T
 
   //debug
   #ifdef _TRACE_OUTPUT_
-    printf("d=%u, shift=%f\n", d, shift);   
+    printf("d=%uX%u, shift=%f\n", dX, dY, shift);
 
 	const uint8_T* p=&Tvec[TOffset];
 	uint32_T iWidth = (BoundBox[1]+1)-BoundBox[0];
diff --git a/lib/matlab/codegeneration/ssd.h b/lib/matlab/codegeneration/ssd.h
index c05882e..7fa88fe 100644
--- a/lib/matlab/codegeneration/ssd.h
+++ b/lib/matlab/codegeneration/ssd.h
@@ -70,7 +70,7 @@ namespace Limereg {
 
 /* Function Declarations */
 extern real64_T ssd(const real64_T w[3], const uint32_T BoundBox[4], const uint32_T MarginAddon[3], const real64_T DSPRange[4],
-					uint8_T *Tvec, const uint32_T TOffset, uint8_T *Rvec, const uint32_T ROffset, uint32_T d);
+					uint8_T *Tvec, const uint32_T TOffset, uint8_T *Rvec, const uint32_T ROffset, uint32_T dX, uint32_T dY);
 
 }
 #endif
diff --git a/lib/matlab/codegeneration/transform.cpp b/lib/matlab/codegeneration/transform.cpp
index c2111b3..731677b 100644
--- a/lib/matlab/codegeneration/transform.cpp
+++ b/lib/matlab/codegeneration/transform.cpp
@@ -47,34 +47,21 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  */
 
-#include "stdafx.h"
+#include "../../stdafx.h"
 
 /* Include files */
 #include "rt_nonfinite.h"
- 
 #include "diffimg.h"
- 
 #include "gaussnewton.h"
-#include "gen_example_data.h"
 #include "generatePyramidPC.h"
- 
 #include "jacobian.h"
- 
-
- 
- 
 #include "ssd.h"
- 
- 
- 
 #include "transform.h"
- 
- 
 #include "limereg_emxutil.h"
 #include "limereg_rtwutil.h"
 
 /* Custom Source Code */
-#include "pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
+#include "../pseudo_stdafx.h"             //precompiled header not possible because of include position of matlab
 namespace Limereg {
 
 
@@ -89,13 +76,13 @@ namespace Limereg {
 /* Function Declarations */
 
 /* Function Definitions */
-void transform(const real64_T w[3], const emxArray_uint8_T *Tvec, uint32_T d,
+void transform(const real64_T w[3], const emxArray_uint8_T *Tvec, uint32_T dx, uint32_T dy,
                emxArray_uint8_T *FTvec)
 {
   uint32_T mn;
   real64_T y;
-  real64_T dmax;
-  real64_T b_y;
+  real64_T dmaxX;
+  real64_T dmaxY;
   real64_T FP_idx_0;
   real64_T FP_idx_1;
   real64_T FP_idx_3;
@@ -114,10 +101,23 @@ void transform(const real64_T w[3], const emxArray_uint8_T *Tvec, uint32_T d,
   int32_T k21;
   int32_T k22;
 
-  mn = d * d;
-  y = (real64_T)d / 2.0F;
-  dmax = (real64_T)d / 2.0F - 0.5F;
-  b_y = (real64_T)d / 2.0F;
+  //Initialize Dirichlet boundaries
+  //Use the mean color of the four outermost image corners as the boundary background color
+  //I have several more sophisticated ideas for the boundary conditions, mail to the author if you need some improvement.
+  //todo: refactor: Either avoid code being duplicate to gaussnewton.cpp or change the inforface for i/o of background color.
+  //                Keep comment above in mind, things might get more complicated than a single color over time.
+  //                Furthermore: It would be cleaner when R and T would have dedicated background color detection.
+  //                When a more complicated scheme will be used one has to calc this seperately anyway ...
+  uint8_T backgroundColor = (uint8_T)(
+  						  ( (uint32_T)(Tvec->data[0])
+                            + (uint32_T)(Tvec->data[dx - 1])
+                            + (uint32_T)(Tvec->data[(dy - 1) * dx])
+                            + (uint32_T)(Tvec->data[dy * dx - 1])
+                            )/4);
+
+  mn = dx * dy;
+  dmaxX = (real64_T)dx / 2.0F - 0.5F;
+  dmaxY = (real64_T)dy / 2.0F - 0.5F;
 
   /* Shifting, um negative Koordinaten in Matrixbereich zu bringen */
   /* ======================================================================== */
@@ -139,32 +139,33 @@ void transform(const real64_T w[3], const emxArray_uint8_T *Tvec, uint32_T d,
 
   /* Folgende beiden For-Loops laufen 1..mn mal durch das pixelmittige Koordinatengitter */
   /* Dabei zeigt i auf die Position von 1..mn */
-  i33 = (int32_T)((y - 0.5F) + (1.0F - (-dmax)));
+  i33 = (int32_T)(dmaxY + (1.0F - (-dmaxY)));
   for (loop_ub = 0; loop_ub <= i33 - 1; loop_ub++) {
-    X_mni = -dmax + (real64_T)loop_ub;
-    i34 = (int32_T)((y - 0.5F) + (1.0F - (-dmax)));
+    X_mni = -dmaxY + (real64_T)loop_ub;
+    i34 = (int32_T)(dmaxX + (1.0F - (-dmaxX)));
     for (X_i = 0; X_i <= i34 - 1; X_i++) {
-      FA_mni = -dmax + (real64_T)X_i;
+      FA_mni = -dmaxX + (real64_T)X_i;
 
       /* Die Zeilenvektoren FP(1)*X_i und FP(4)*X_i k�nnten vorberechnet */
       /* werden (mit FP(3) und FP(6), sowie +s schon mit drin ... */
-      FA_i = ((FP_idx_0 * FA_mni + FP_idx_1 * X_mni) + w[1]) + (b_y + 0.5F);
-      FA_mni = ((FP_idx_3 * FA_mni + FP_idx_4 * X_mni) + w[2]) + (b_y + 0.5F);
+      FA_i = ((FP_idx_0 * FA_mni + FP_idx_1 * X_mni) + w[1]) + (dmaxX + 1.0F);
+      FA_mni = ((FP_idx_3 * FA_mni + FP_idx_4 * X_mni) + w[2]) + (dmaxY + 1.0F);
 
       /* +s weil Drehpunkt in Bildmitte */
       Ax = (uint32_T)rt_roundf_snf((real64_T)floor(FA_i));
       Ay = (uint32_T)rt_roundf_snf((real64_T)floor(FA_mni));
 
       /* Fetch picture values (how can we cache-optimize this ? Intelligent routing ?) */
-      k11 = 0;
-      k12 = 0;
-      k21 = 0;
-      k22 = 0;
-      if ((Ax >= 1U) && (Ax < d) && (Ay >= 1U) && (Ay < d)) {
-        k11 = Tvec->data[(int32_T)((Ay - 1U) * d + Ax) - 1];
-        k12 = Tvec->data[(int32_T)((Ay - 1U) * d + Ax)];
-        k21 = Tvec->data[(int32_T)(Ay * d + Ax) - 1];
-        k22 = Tvec->data[(int32_T)(Ay * d + Ax)];
+      k11 = backgroundColor;
+      k12 = backgroundColor;
+      k21 = backgroundColor;
+      k22 = backgroundColor;
+      //todo: we need for if-statements, instead of only one ...
+      if ((Ax >= 1U) && (Ax < dx) && (Ay >= 1U) && (Ay < dy)) {
+        k11 = Tvec->data[(int32_T)((Ay - 1U) * dx + Ax) - 1];
+        k12 = Tvec->data[(int32_T)((Ay - 1U) * dx + Ax)];
+        k21 = Tvec->data[(int32_T)(Ay * dx + Ax) - 1];
+        k22 = Tvec->data[(int32_T)(Ay * dx + Ax)];
       }
 
       /* Interpolation */
diff --git a/lib/matlab/codegeneration/transform.h b/lib/matlab/codegeneration/transform.h
index 51c5b31..f669c8b 100644
--- a/lib/matlab/codegeneration/transform.h
+++ b/lib/matlab/codegeneration/transform.h
@@ -70,7 +70,7 @@ namespace Limereg {
 /* Variable Definitions */
 
 /* Function Declarations */
-extern void transform(const real64_T w[3], const emxArray_uint8_T *Tvec, uint32_T d, emxArray_uint8_T *FTvec);
+extern void transform(const real64_T w[3], const emxArray_uint8_T *Tvec, uint32_T dx, uint32_T dy, emxArray_uint8_T *FTvec);
 
 }
 #endif
diff --git a/lib/matlab/matlab_c_ssdRigid2D.cpp b/lib/matlab/matlab_c_ssdRigid2D.cpp
index 910947c..6830c20 100644
--- a/lib/matlab/matlab_c_ssdRigid2D.cpp
+++ b/lib/matlab/matlab_c_ssdRigid2D.cpp
@@ -40,7 +40,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 ----------------------------------------------------------------------------*/
 
-#include "stdafx.h"
+#include "../stdafx.h"
 
 #include "matlab_c_ssdRigid2D.h"
 #include "omp.h"							//OpenMP multiprocessor (if you don't like OpenMP and compile for a single core just remove this header definition and the #pragma omp instructions)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 91ae865..0cf5ec5 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -2,7 +2,7 @@
 
 MAINTAINERCLEANFILES = Makefile.in
 
-AM_CPPFLAGS = -I$(top_srcdir)/lib/export
+AM_CPPFLAGS = -I$(top_srcdir)/lib/export -DIMGDIR=\"$(top_srcdir)/tests/testimg/\"
 
 SUBDIRS = testimg
 
diff --git a/tests/Makefile.in b/tests/Makefile.in
index cebc9b9..8b2e969 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -443,8 +443,6 @@ am__relativize = \
   reldir="$$dir2"
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
-AM_CFLAGS = @AM_CFLAGS@
-AM_CXXFLAGS = @AM_CXXFLAGS@
 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
@@ -528,7 +526,9 @@ OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
 OPENCV_CFLAGS = @OPENCV_CFLAGS@
 OPENCV_LIBS = @OPENCV_LIBS@
+OPENMP_CFLAGS = @OPENMP_CFLAGS@
 OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@
+OPENMP_LIBS = @OPENMP_LIBS@
 OTOOL = @OTOOL@
 OTOOL64 = @OTOOL64@
 PACKAGE = @PACKAGE@
@@ -603,7 +603,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 MAINTAINERCLEANFILES = Makefile.in
-AM_CPPFLAGS = -I$(top_srcdir)/lib/export
+AM_CPPFLAGS = -I$(top_srcdir)/lib/export -DIMGDIR=\"$(top_srcdir)/tests/testimg/\"
 SUBDIRS = testimg
 include_HEADERS = test_common.h
 test_getVersion_LDFLAGS = @LDFLAGS@
diff --git a/tests/test_commandLineTool.c b/tests/test_commandLineTool.c
index 1d0af31..ecd86a4 100644
--- a/tests/test_commandLineTool.c
+++ b/tests/test_commandLineTool.c
@@ -5,6 +5,11 @@
 
 #if HAVE_BOOST==1 && HAVE_BOOST_PROGRAM_OPTIONS_HPP==1 && HAVE_OPENCV==1
 
+int executeShellCommand(const char* command)
+{
+    printf("%s\n", command);
+    return system(command);
+}
 
 int main(void)
 {
@@ -12,8 +17,18 @@ int main(void)
 
 	//Execute limereg executable and analyze console output
 	printf("Test: Command line tool 'limereg'\n");
-	retcode = system("../exe/limereg --tfile testimg/T_512.bmp --rfile testimg/R_512.bmp --nogui "
-	                 "| tee /dev/tty | grep -G 'w = \\[5.* deg, 0.5.*, 14.6.*\\]'");
+	retcode = executeShellCommand(
+	        "../exe/limereg --tfile " IMGDIR "T_512.bmp --rfile " IMGDIR "R_512.bmp --nogui "
+            "| tee /dev/tty | grep -G 'w = \\[5.* deg, 0.5.*, 14.6.*\\]'"
+	        );
+
+	if(0 == retcode) //continue upon success
+	{
+	    retcode = executeShellCommand(
+	            "../exe/limereg --tfile " IMGDIR "lime1.png --rfile " IMGDIR "lime2.png --nogui --invert"
+	            "| tee /dev/tty | grep -G 'w = \\[-4.* deg, 36.*, -55.*\\]'"
+	            );
+	}
 
 	//Output and return test result
 	outputTestResult((0 == retcode) ? true : false);
diff --git a/tests/testimg/Makefile.am b/tests/testimg/Makefile.am
index 0b074fc..4a78cf3 100644
--- a/tests/testimg/Makefile.am
+++ b/tests/testimg/Makefile.am
@@ -2,4 +2,4 @@
 
 MAINTAINERCLEANFILES = Makefile.in
 
-dist_data_DATA = image_license.txt R_512.bmp T_512.bmp
+dist_data_DATA = image_license.txt R_512.bmp T_512.bmp lime1.png lime2.png
diff --git a/tests/testimg/Makefile.in b/tests/testimg/Makefile.in
index 0f68960..2dac17a 100644
--- a/tests/testimg/Makefile.in
+++ b/tests/testimg/Makefile.in
@@ -145,8 +145,6 @@ am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
-AM_CFLAGS = @AM_CFLAGS@
-AM_CXXFLAGS = @AM_CXXFLAGS@
 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
@@ -230,7 +228,9 @@ OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
 OPENCV_CFLAGS = @OPENCV_CFLAGS@
 OPENCV_LIBS = @OPENCV_LIBS@
+OPENMP_CFLAGS = @OPENMP_CFLAGS@
 OPENMP_CXXFLAGS = @OPENMP_CXXFLAGS@
+OPENMP_LIBS = @OPENMP_LIBS@
 OTOOL = @OTOOL@
 OTOOL64 = @OTOOL64@
 PACKAGE = @PACKAGE@
@@ -305,7 +305,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 MAINTAINERCLEANFILES = Makefile.in
-dist_data_DATA = image_license.txt R_512.bmp T_512.bmp
+dist_data_DATA = image_license.txt R_512.bmp T_512.bmp lime1.png lime2.png
 all: all-am
 
 .SUFFIXES:
diff --git a/tests/testimg/image_license.txt b/tests/testimg/image_license.txt
index 11b80e7..11324ac 100644
--- a/tests/testimg/image_license.txt
+++ b/tests/testimg/image_license.txt
@@ -1,5 +1,5 @@
-Images courtesy of:
-
-Kai Breuhahn, Benedikt M�ller
-Universit�tsklinikum Heidelberg
-Heidelberg, Germany
+R_512.bmp and T_512.bmp:
+ Images courtesy of:
+ Kai Breuhahn, Benedikt Mueller
+ Universitaetsklinikum Heidelberg
+ Heidelberg, Germany
diff --git a/tests/testimg/lime1.png b/tests/testimg/lime1.png
new file mode 100644
index 0000000..250904f
Binary files /dev/null and b/tests/testimg/lime1.png differ
diff --git a/tests/testimg/lime2.png b/tests/testimg/lime2.png
new file mode 100644
index 0000000..d8e590a
Binary files /dev/null and b/tests/testimg/lime2.png differ

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/limereg.git



More information about the debian-science-commits mailing list