--- /dev/null
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+# GEOM ShapeRecognition : tools for the shape recognition
+# File : Makefile.am
+# Author : Renaud NEDELEC (OCC)
+# Module : GEOM
+#
+
+# Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+DIST_COMMON = $(salomeinclude_HEADERS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in \
+ $(top_srcdir)/adm_local/unix/make_common_starter.am
+subdir = src/ShapeRecognition
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = \
+ $(top_srcdir)/adm_local/unix/config_files/check_GUI.m4 \
+ $(top_srcdir)/adm_local/unix/config_files/libtool.m4 \
+ $(top_srcdir)/adm_local/unix/config_files/ltoptions.m4 \
+ $(top_srcdir)/adm_local/unix/config_files/ltsugar.m4 \
+ $(top_srcdir)/adm_local/unix/config_files/ltversion.m4 \
+ $(top_srcdir)/adm_local/unix/config_files/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(libdir)" \
+ "$(DESTDIR)$(salomeincludedir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libGEOMShapeRec_la_LIBADD =
+dist_libGEOMShapeRec_la_OBJECTS = \
+ libGEOMShapeRec_la-ShapeRec_FeatureDetector.lo
+libGEOMShapeRec_la_OBJECTS = $(dist_libGEOMShapeRec_la_OBJECTS)
+libGEOMShapeRec_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+ $(CXXFLAGS) $(libGEOMShapeRec_la_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/adm_local/unix/config_files/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(dist_libGEOMShapeRec_la_SOURCES)
+DIST_SOURCES = $(dist_libGEOMShapeRec_la_SOURCES)
+HEADERS = $(salomeinclude_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BOOST_CPPFLAGS = @BOOST_CPPFLAGS@
+BOOST_LIBS = @BOOST_LIBS@
+BOOST_LIBSUFFIX = @BOOST_LIBSUFFIX@
+BOOST_LIB_REGEX = @BOOST_LIB_REGEX@
+BOOST_LIB_SIGNALS = @BOOST_LIB_SIGNALS@
+BOOST_LIB_SYSTEM = @BOOST_LIB_SYSTEM@
+BOOST_LIB_THREAD = @BOOST_LIB_THREAD@
+BOOST_PROGRAM_OPTIONS_LIB = @BOOST_PROGRAM_OPTIONS_LIB@
+CASROOT = @CASROOT@
+CAS_CPPFLAGS = @CAS_CPPFLAGS@
+CAS_CXXFLAGS = @CAS_CXXFLAGS@
+CAS_DATADIR = @CAS_DATADIR@
+CAS_DATAEXCHANGE = @CAS_DATAEXCHANGE@
+CAS_KERNEL = @CAS_KERNEL@
+CAS_LDFLAGS = @CAS_LDFLAGS@
+CAS_LDPATH = @CAS_LDPATH@
+CAS_LIBDIR = @CAS_LIBDIR@
+CAS_MATH = @CAS_MATH@
+CAS_MODELER = @CAS_MODELER@
+CAS_OCAF = @CAS_OCAF@
+CAS_OCAFVIS = @CAS_OCAFVIS@
+CAS_STDPLUGIN = @CAS_STDPLUGIN@
+CAS_TKTopAlgo = @CAS_TKTopAlgo@
+CAS_VIEWER = @CAS_VIEWER@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CORBA_CXXFLAGS = @CORBA_CXXFLAGS@
+CORBA_INCLUDES = @CORBA_INCLUDES@
+CORBA_LIBS = @CORBA_LIBS@
+CORBA_ROOT = @CORBA_ROOT@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CXXTMPDPTHFLAGS = @CXXTMPDPTHFLAGS@
+CXX_DEPEND_FLAG = @CXX_DEPEND_FLAG@
+CYGPATH_W = @CYGPATH_W@
+C_DEPEND_FLAG = @C_DEPEND_FLAG@
+DEFS = @DEFS@
+DEPCC = @DEPCC@
+DEPCXX = @DEPCXX@
+DEPCXXFLAGS = @DEPCXXFLAGS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DOT = @DOT@
+DOXYGEN = @DOXYGEN@
+DOXYGEN_PYTHON_EXTENSION = @DOXYGEN_PYTHON_EXTENSION@
+DOXYGEN_SUPPORT_STL = @DOXYGEN_SUPPORT_STL@
+DOXYGEN_WITH_PYTHON = @DOXYGEN_WITH_PYTHON@
+DOXYGEN_WITH_STL = @DOXYGEN_WITH_STL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+DVIPS = @DVIPS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GLOBAL_INSTALL = @GLOBAL_INSTALL@
+GREP = @GREP@
+GUI_CXXFLAGS = @GUI_CXXFLAGS@
+GUI_LDFLAGS = @GUI_LDFLAGS@
+GUI_ROOT_DIR = @GUI_ROOT_DIR@
+HAVE_SSTREAM = @HAVE_SSTREAM@
+HDF5_INCLUDES = @HDF5_INCLUDES@
+HDF5_LIBS = @HDF5_LIBS@
+HDF5_MT_LIBS = @HDF5_MT_LIBS@
+IDL = @IDL@
+IDLCXXFLAGS = @IDLCXXFLAGS@
+IDLPYFLAGS = @IDLPYFLAGS@
+IDL_CLN_CXX = @IDL_CLN_CXX@
+IDL_CLN_H = @IDL_CLN_H@
+IDL_CLN_OBJ = @IDL_CLN_OBJ@
+IDL_SRV_CXX = @IDL_SRV_CXX@
+IDL_SRV_H = @IDL_SRV_H@
+IDL_SRV_OBJ = @IDL_SRV_OBJ@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+KERNEL_CXXFLAGS = @KERNEL_CXXFLAGS@
+KERNEL_LDFLAGS = @KERNEL_LDFLAGS@
+KERNEL_ROOT_DIR = @KERNEL_ROOT_DIR@
+KERNEL_SITE_DIR = @KERNEL_SITE_DIR@
+LATEX = @LATEX@
+LD = @LD@
+LDEXPDYNFLAGS = @LDEXPDYNFLAGS@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIB_LOCATION_SUFFIX = @LIB_LOCATION_SUFFIX@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LRELEASE = @LRELEASE@
+LTLIBOBJS = @LTLIBOBJS@
+MACHINE = @MACHINE@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MOC = @MOC@
+MODULE_NAME = @MODULE_NAME@
+MPI_INCLUDES = @MPI_INCLUDES@
+MPI_LIBS = @MPI_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OGL_INCLUDES = @OGL_INCLUDES@
+OGL_LIBS = @OGL_LIBS@
+OMNIORB_CXXFLAGS = @OMNIORB_CXXFLAGS@
+OMNIORB_IDL = @OMNIORB_IDL@
+OMNIORB_IDLCXXFLAGS = @OMNIORB_IDLCXXFLAGS@
+OMNIORB_IDLPYFLAGS = @OMNIORB_IDLPYFLAGS@
+OMNIORB_IDL_CLN_CXX = @OMNIORB_IDL_CLN_CXX@
+OMNIORB_IDL_CLN_H = @OMNIORB_IDL_CLN_H@
+OMNIORB_IDL_CLN_OBJ = @OMNIORB_IDL_CLN_OBJ@
+OMNIORB_IDL_SRV_CXX = @OMNIORB_IDL_SRV_CXX@
+OMNIORB_IDL_SRV_H = @OMNIORB_IDL_SRV_H@
+OMNIORB_IDL_SRV_OBJ = @OMNIORB_IDL_SRV_OBJ@
+OMNIORB_IDL_TIE_CXX = @OMNIORB_IDL_TIE_CXX@
+OMNIORB_IDL_TIE_H = @OMNIORB_IDL_TIE_H@
+OMNIORB_INCLUDES = @OMNIORB_INCLUDES@
+OMNIORB_LIBS = @OMNIORB_LIBS@
+OMNIORB_PACOIDLCXXFLAGS = @OMNIORB_PACOIDLCXXFLAGS@
+OMNIORB_ROOT = @OMNIORB_ROOT@
+OPENCV_INCLUDES = @OPENCV_INCLUDES@
+OPENCV_LIBS = @OPENCV_LIBS@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PACOIDLCXXFLAGS = @PACOIDLCXXFLAGS@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PDFLATEX = @PDFLATEX@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
+PYTHON = @PYTHON@
+PYTHONHOME = @PYTHONHOME@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_INCLUDES = @PYTHON_INCLUDES@
+PYTHON_LIBS = @PYTHON_LIBS@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_SITE = @PYTHON_SITE@
+PYTHON_SITE_EXEC = @PYTHON_SITE_EXEC@
+PYTHON_SITE_INSTALL = @PYTHON_SITE_INSTALL@
+PYTHON_SITE_PACKAGE = @PYTHON_SITE_PACKAGE@
+PYTHON_VERSION = @PYTHON_VERSION@
+QRCC = @QRCC@
+QTDIR = @QTDIR@
+QT_ASSISTANT_INCLUDES = @QT_ASSISTANT_INCLUDES@
+QT_ASSISTANT_LIBS = @QT_ASSISTANT_LIBS@
+QT_CORE_LIBS = @QT_CORE_LIBS@
+QT_GUI_LIBS = @QT_GUI_LIBS@
+QT_INCLUDES = @QT_INCLUDES@
+QT_LIBS = @QT_LIBS@
+QT_LIB_DIR = @QT_LIB_DIR@
+QT_MT_INCLUDES = @QT_MT_INCLUDES@
+QT_MT_LIBS = @QT_MT_LIBS@
+QT_OTHER_LIBS = @QT_OTHER_LIBS@
+QT_ROOT = @QT_ROOT@
+QT_VERSION = @QT_VERSION@
+QT_VERSION_ID = @QT_VERSION_ID@
+RANLIB = @RANLIB@
+ROOT_BUILDDIR = @ROOT_BUILDDIR@
+ROOT_SRCDIR = @ROOT_SRCDIR@
+RST2HTML = @RST2HTML@
+SED = @SED@
+SETX = @SETX@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SPHINX = @SPHINX@
+STDLIB = @STDLIB@
+STRIP = @STRIP@
+SWIG = @SWIG@
+SWIG_FLAGS = @SWIG_FLAGS@
+TEMP = @TEMP@
+UIC = @UIC@
+VERSION = @VERSION@
+VTKPY_MODULES = @VTKPY_MODULES@
+VTK_INCLUDES = @VTK_INCLUDES@
+VTK_LIBS = @VTK_LIBS@
+WITHMPI = @WITHMPI@
+XMKMF = @XMKMF@
+XVERSION = @XVERSION@
+YACC = @YACC@
+YFLAGS = @YFLAGS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+acx_pthread_config = @acx_pthread_config@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = $(prefix)/bin/salome
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+
+# Documentation directory
+docdir = $(datadir)/doc/salome
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = $(prefix)/lib@LIB_LOCATION_SUFFIX@/salome
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+mpi2_ok = @mpi2_ok@
+mpi_ok = @mpi_ok@
+oldincludedir = @oldincludedir@
+para_path = @para_path@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+
+# ============================================================
+# The following is to avoid PACKAGE_... env variable
+# redefinition compilation warnings
+# ============================================================
+#
+AM_CXXFLAGS = @KERNEL_CXXFLAGS@ -include SALOMEconfig.h
+AM_CPPFLAGS = @KERNEL_CXXFLAGS@ -include SALOMEconfig.h
+
+# ============================================================
+# This file defines the common definitions used in several
+# Makefile. This file must be included, if needed, by the file
+# Makefile.am.
+# ============================================================
+# Standard directory for installation
+#
+salomeincludedir = $(includedir)/salome
+salomescriptdir = $(bindir)
+salomepythondir = $(pythondir)/salome
+salomepyexecdir = $(pyexecdir)/salome
+
+# Directory for installing idl files
+salomeidldir = $(prefix)/idl/salome
+
+# Directory for installing resource files
+salomeresdir = $(prefix)/share/salome/resources/@MODULE_NAME@
+
+# Directories for installing admin files
+admlocaldir = $(prefix)/adm_local
+admlocalunixdir = $(admlocaldir)/unix
+admlocalm4dir = $(admlocaldir)/unix/config_files
+
+# Shared modules installation directory
+sharedpkgpythondir = $(salomepythondir)/shared_modules
+
+# extra distributed files
+EXTRA_DIST = $(MOC_FILES:%_moc.cxx=%.h) $(QRC_FILES:qrc_%.cxx=%.qrc) \
+ $(UIC_FILES:ui_%.h=%.ui) $(nodist_salomeres_DATA:%.qm=%.ts)
+
+
+# header files
+salomeinclude_HEADERS = \
+ ShapeRec_FeatureDetector.hxx
+
+
+# Libraries targets
+lib_LTLIBRARIES = libGEOMShapeRec.la
+dist_libGEOMShapeRec_la_SOURCES = \
+ ShapeRec_FeatureDetector.cxx
+
+
+# additional information to compile and link file
+libGEOMShapeRec_la_CPPFLAGS = \
+ $(KERNEL_CXXFLAGS)\
+ $(OPENCV_INCLUDES)\
+ $(QT_INCLUDES)
+
+libGEOMShapeRec_la_LDFLAGS = \
+ $(KERNEL_LDFLAGS) -lSALOMELocalTrace \
+ $(STDLIB) \
+ $(OPENCV_LIBS) \
+ $(QT_MT_LIBS)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cxx .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/adm_local/unix/make_common_starter.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/ShapeRecognition/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu src/ShapeRecognition/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+ }
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libGEOMShapeRec.la: $(libGEOMShapeRec_la_OBJECTS) $(libGEOMShapeRec_la_DEPENDENCIES)
+ $(libGEOMShapeRec_la_LINK) -rpath $(libdir) $(libGEOMShapeRec_la_OBJECTS) $(libGEOMShapeRec_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libGEOMShapeRec_la-ShapeRec_FeatureDetector.Plo@am__quote@
+
+.cxx.o:
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cxx.obj:
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cxx.lo:
+@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+libGEOMShapeRec_la-ShapeRec_FeatureDetector.lo: ShapeRec_FeatureDetector.cxx
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libGEOMShapeRec_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libGEOMShapeRec_la-ShapeRec_FeatureDetector.lo -MD -MP -MF $(DEPDIR)/libGEOMShapeRec_la-ShapeRec_FeatureDetector.Tpo -c -o libGEOMShapeRec_la-ShapeRec_FeatureDetector.lo `test -f 'ShapeRec_FeatureDetector.cxx' || echo '$(srcdir)/'`ShapeRec_FeatureDetector.cxx
+@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/libGEOMShapeRec_la-ShapeRec_FeatureDetector.Tpo $(DEPDIR)/libGEOMShapeRec_la-ShapeRec_FeatureDetector.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ShapeRec_FeatureDetector.cxx' object='libGEOMShapeRec_la-ShapeRec_FeatureDetector.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libGEOMShapeRec_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libGEOMShapeRec_la-ShapeRec_FeatureDetector.lo `test -f 'ShapeRec_FeatureDetector.cxx' || echo '$(srcdir)/'`ShapeRec_FeatureDetector.cxx
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-salomeincludeHEADERS: $(salomeinclude_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(salomeincludedir)" || $(MKDIR_P) "$(DESTDIR)$(salomeincludedir)"
+ @list='$(salomeinclude_HEADERS)'; test -n "$(salomeincludedir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(salomeincludedir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(salomeincludedir)" || exit $$?; \
+ done
+
+uninstall-salomeincludeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(salomeinclude_HEADERS)'; test -n "$(salomeincludedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(salomeincludedir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(salomeincludedir)" && rm -f $$files
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(salomeincludedir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-salomeincludeHEADERS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool mostlyclean-local
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES uninstall-salomeincludeHEADERS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libLTLIBRARIES clean-libtool ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags 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 \
+ install-html-am install-info install-info-am \
+ install-libLTLIBRARIES install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-salomeincludeHEADERS \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ mostlyclean-local pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am uninstall-libLTLIBRARIES \
+ uninstall-salomeincludeHEADERS
+
+
+# common rules
+
+# meta object implementation files generation (moc)
+%_moc.cxx: %.h
+ $(MOC) $< -o $@
+
+# translation (*.qm) files generation (lrelease)
+%.qm: %.ts
+ $(LRELEASE) $< -qm $@
+
+# resource files generation (qrcc)
+qrc_%.cxx: %.qrc
+ $(QRCC) $< -o $@ -name $(*F)
+
+# qt forms files generation (uic)
+ui_%.h: %.ui
+ $(UIC) -o $@ $<
+
+# customize clean operation
+mostlyclean-local:
+ rm -f @builddir@/*_moc.cxx
+ rm -f @builddir@/*.qm
+ rm -f @builddir@/ui_*.h
+ rm -f @builddir@/qrc_*.cxx
+
+# tests
+tests: unittest
+
+unittest: $(UNIT_TEST_PROG)
+ @if test "x$(UNIT_TEST_PROG)" != "x"; then \
+ $(UNIT_TEST_PROG); \
+ fi;
+
+# 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:
--- /dev/null
+// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+
+// File : ShapeRec_FeatureDetector.cxx
+// Author : Renaud NEDELEC, Open CASCADE S.A.S.
+
+#include "ShapeRec_FeatureDetector.hxx"
+#include <stdio.h>
+#include "utilities.h"
+
+using namespace cv;
+
+//TODO : All the following methods but ComputeContours use the C API of OpenCV while ComputContours
+// uses the C++ API of the library.
+// This should be homogenized and preferably by using the C++ API (which is more recent for all the methods
+
+// The code has to be "cleaned up" too
+
+/*!
+ Constructor
+ \param theFilename - image to process
+*/
+ShapeRec_FeatureDetector::ShapeRec_FeatureDetector(const QString& theFilename):
+ corners()
+{
+ cornerCount = 2000;
+ rect=cvRect(0,0,0,0);
+ imagePath = theFilename.toStdString();
+ // Store the dimensions of the picture
+ IplImage* bg_img = cvLoadImage (imagePath.c_str(), CV_LOAD_IMAGE_GRAYSCALE);
+ imgHeight = bg_img->height;
+ imgWidth = bg_img->width;
+}
+
+/*!
+ Computes the corners of the image located at imagePath
+*/
+void ShapeRec_FeatureDetector::ComputeCorners(){
+
+ // Parameters for the corner detection
+ double qualityLevel = 0.2;
+ double minDistance = 1;
+
+ // Images to be used for detection
+ IplImage *eig_img, *temp_img, *src_img_gray;
+
+ // Load image
+ src_img_gray = cvLoadImage (imagePath.c_str(), CV_LOAD_IMAGE_GRAYSCALE);
+
+ if ( rect.width > 1 )
+ {
+ // If a ROI as been set use it for detection
+ cvSetImageROI( src_img_gray, rect );
+ }
+
+ eig_img = cvCreateImage (cvGetSize (src_img_gray), IPL_DEPTH_32F, 1);
+ temp_img = cvCreateImage (cvGetSize (src_img_gray), IPL_DEPTH_32F, 1);
+ corners = (CvPoint2D32f *) cvAlloc (cornerCount * sizeof (CvPoint2D32f));
+
+ // image height and width
+ imgHeight = src_img_gray->height;
+ imgWidth = src_img_gray->width;
+
+ // Corner detection using cvCornerMinEigenVal
+ // (one of the methods available inOpenCV, there is also a cvConerHarris method that can be used by setting a flag in cvGoodFeaturesToTrack)
+ cvGoodFeaturesToTrack (src_img_gray, eig_img, temp_img, corners, &cornerCount, /*quality-level=*/qualityLevel, /*min-distance=*/minDistance);
+ cvFindCornerSubPix (src_img_gray, corners, cornerCount,
+ cvSize (3, 3), cvSize (-1, -1), cvTermCriteria (CV_TERMCRIT_ITER | CV_TERMCRIT_EPS, 20, 0.03));
+
+ cvReleaseImage (&eig_img);
+ cvReleaseImage (&temp_img);
+ cvReleaseImage (&src_img_gray);
+
+}
+
+/*!
+ Computes the contours of the image located at imagePath
+*/
+bool ShapeRec_FeatureDetector::ComputeContours( int detection_method ){
+
+ // Initialising images
+ Mat src, src_gray;
+ Mat detected_edges;
+
+ // Read image
+ src = imread( imagePath.c_str() );
+ if( !src.data )
+ return false;
+
+ if ( detection_method == CANNY ) // The problem is that with that filter the detector detects double contours
+ {
+ // Thresholds for Canny detector
+ int lowThreshold = 100;
+ int ratio = 3;
+ int kernel_size = 3; // 3,5 or 7
+
+ // Convert the image to grayscale
+ if (src.channels() == 3)
+ cvtColor( src, src_gray, CV_BGR2GRAY );
+ else if (src.channels() == 1)
+ src_gray = src;
+
+ // Reduce noise with a kernel 3x3
+ blur( src_gray, detected_edges, Size(3,3) );
+ // Canny detector
+ Canny( detected_edges, detected_edges, lowThreshold, lowThreshold*ratio, kernel_size, /*L2gradient =*/true );
+ }
+ else if ( detection_method == COLORFILTER )
+ {
+ if ( !rect.width > 1 )
+ return false;
+ detected_edges = _colorFiltering();
+ }
+ else if ( detection_method == RIDGE_DETECTOR ) // Method adapted for engineering drawings (e.g. watershed functionnality could be used here cf.OpenCV documentation and samples)
+ {
+ // TODO
+ return false;
+ }
+ _detectAndRetrieveContours( detected_edges );
+
+ return true;
+
+}
+
+/*!
+ Computes the lines in the image located at imagePath
+*/
+bool ShapeRec_FeatureDetector::ComputeLines(){
+ MESSAGE("ShapeRec_FeatureDetector::ComputeLines()")
+ // Initialising images
+ Mat src, src_gray, detected_edges, dst;
+
+ src=imread(imagePath.c_str(), 0);
+
+ Canny( src, dst, 50, 200, 3 );
+ HoughLinesP( dst, lines, 1, CV_PI/180, 80, 30, 10 );
+ return true;
+
+}
+
+/*!
+ Stores a region of interest given by user in rect
+ \param theRect - Region Of Interest of the image located at imagePath
+*/
+void ShapeRec_FeatureDetector::SetROI( const QRect& theRect )
+{
+ if (!theRect.isEmpty()){
+ rect = cvRect(theRect.x(),theRect.y(),theRect.width(),theRect.height());
+ }
+}
+
+/*!
+ Performs contours detection and store them in contours
+ \param src - src image to find contours of
+*/
+void ShapeRec_FeatureDetector::_detectAndRetrieveContours( Mat src )
+{
+ src = src > 1;
+ int method = CV_CHAIN_APPROX_NONE;
+ findContours( src, contours, hierarchy,CV_RETR_CCOMP, method);
+ // Other possible approximations CV_CHAIN_APPROX_TC89_KCOS, CV_CHAIN_APPROX_TC89_L1, CV_CHAIN_APPROX_SIMPLE cf. OpenCV documentation
+ // for precise information
+}
+
+/*!
+ Performs color filtering from the image sample contained in the ROI rect of the image
+ located at imagePath
+ Thresholds the result in order ot obtain a binary image
+ \return binary image resulting from filtering and thersholding
+*/
+Mat ShapeRec_FeatureDetector::_colorFiltering()
+{
+ IplImage* find_image = cvLoadImage(imagePath.c_str(),CV_LOAD_IMAGE_COLOR);
+ // Reduce noise with a kernel 3x3
+ cvSmooth( find_image, find_image, CV_GAUSSIAN, 3, 3 );
+
+ if ( !rect.width > 1 )
+ return Mat(find_image);
+
+ // Crop the image to build an histogram from the selected part
+ cvSetImageROI(find_image, rect);
+ IplImage* test_image = cvCreateImage(cvGetSize(find_image),
+ find_image->depth,
+ find_image->nChannels);
+ cvCopy(find_image, test_image, NULL);
+ cvResetImageROI(find_image);
+
+ IplImage* test_hsv = cvCreateImage(cvGetSize(test_image),8,3);
+ IplImage* test_hue = cvCreateImage(cvGetSize(test_image),8,1);
+ CvHistogram* hist;
+
+ cvCvtColor(test_image, test_hsv, CV_BGR2HSV);
+ cvCvtPixToPlane(test_hsv, test_hue, 0, 0, 0);
+
+ //create hist
+ int size_hist = 10;
+ float hranges[] = {0, 180};
+ float* ranges = hranges;
+ hist = cvCreateHist(1, &size_hist, CV_HIST_ARRAY, &ranges, 1);
+
+ //calculate hue` histogram
+ cvCalcHist(&test_hue, hist, 0 ,0);
+
+// // TEST print of the histogram for debugging
+// IplImage* hist_image = cvCreateImage(cvSize(320,300),8,3);
+//
+// //draw hist on hist_test image.
+// cvZero(hist_image);
+// float max_value = 0;
+// cvGetMinMaxHistValue(hist, 0 , &max_value, 0, 0);
+// int bin_w = hist_image->width/size_hist;
+// for(int i = 0; i < size_hist; i++ )
+// {
+// //prevent overflow
+// int val = cvRound( cvGetReal1D(hist->bins,i)*hist_image->
+// height/max_value);
+// CvScalar color = CV_RGB(200,0,0);
+// //hsv2rgb(i*180.f/size_hist);
+// cvRectangle( hist_image, cvPoint(i*bin_w,hist_image->height),
+// cvPoint((i+1)*bin_w,hist_image->height - val),
+// color, -1, 8, 0 );
+// }
+//
+//
+// cvNamedWindow("hist", 1); cvShowImage("hist",hist_image);
+
+
+ //calculate back projection of hue plane of input image
+ IplImage* backproject = cvCreateImage(cvGetSize(find_image), 8, 1);
+ IplImage* binary_backproject = cvCreateImage(cvGetSize(find_image), 8, 1);
+ IplImage* find_hsv = cvCreateImage(cvGetSize(find_image),8,3);
+ IplImage* find_hue = cvCreateImage(cvGetSize(find_image),8,1);
+
+ cvCvtColor(find_image, find_hsv, CV_BGR2HSV);
+ cvCvtPixToPlane(find_hsv, find_hue, 0, 0, 0);
+ cvCalcBackProject(&find_hue, backproject, hist);
+
+ // Threshold in order to obtain binary image
+ cvThreshold(backproject, binary_backproject, 1, 255, CV_THRESH_BINARY); // NOTE it would be good to think about the best threshold to use (it's 1 for now)
+ cvReleaseImage(&test_image);
+ cvReleaseImage(&test_hsv);
+ cvReleaseImage(&test_hue);
+ cvReleaseImage(&backproject);
+
+ return Mat(binary_backproject);
+}