[pktools] 15/375: before changes at home
Bas Couwenberg
sebastic at xs4all.nl
Wed Dec 3 21:53:53 UTC 2014
This is an automated email from the git hooks/post-receive script.
sebastic-guest pushed a commit to branch upstream-master
in repository pktools.
commit 21adc697b17894f000f3ebd062aa46648ccdbe25
Author: Pieter Kempeneers <kempenep at gmail.com>
Date: Fri Oct 19 09:30:27 2012 +0200
before changes at home
---
configure | 29 +++++++++++++++
configure.ac | 8 +++++
src/apps/Makefile.am | 5 +++
src/apps/Makefile.in | 90 ++++++++++++++++++++++++++++++++++++++++-------
src/apps/pkclassify_nn.cc | 36 +++++++++++--------
5 files changed, 140 insertions(+), 28 deletions(-)
diff --git a/configure b/configure
index 85a799f..64c9f8d 100755
--- a/configure
+++ b/configure
@@ -612,6 +612,8 @@ NLOPT_CFLAGS
FILECLASSES_OPT
USE_LAS_FALSE
USE_LAS_TRUE
+USE_SVM_FALSE
+USE_SVM_TRUE
USE_FANN_FALSE
USE_FANN_TRUE
FANN_LIBS
@@ -718,6 +720,7 @@ enable_option_checking
with_gdal
enable_dependency_tracking
enable_fann
+enable_svm
enable_las
enable_nlopt
'
@@ -1362,6 +1365,7 @@ Optional Features:
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
--enable-fann Enable feature fann
+ --enable-svm Enable feature svm
--enable-las Enable feature las
--enable-nlopt Enable feature nlopt
@@ -5134,6 +5138,27 @@ $as_echo "$as_me: WARNING: \"USE_FANN=false\"" >&2;}
fi
+# Check whether --enable-svm was given.
+if test "${enable_svm+set}" = set; then :
+ enableval=$enable_svm;
+fi
+
+
+if test "x$enable_svm" = "xyes"; then :
+
+ if true; then
+ USE_SVM_TRUE=
+ USE_SVM_FALSE='#'
+else
+ USE_SVM_TRUE='#'
+ USE_SVM_FALSE=
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \"USE_SVM=true\"" >&5
+$as_echo "$as_me: WARNING: \"USE_SVM=true\"" >&2;}
+
+fi
+
# Check whether --enable-las was given.
if test "${enable_las+set}" = set; then :
enableval=$enable_las;
@@ -5785,6 +5810,10 @@ if test -z "${USE_FANN_TRUE}" && test -z "${USE_FANN_FALSE}"; then
as_fn_error $? "conditional \"USE_FANN\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${USE_SVM_TRUE}" && test -z "${USE_SVM_FALSE}"; then
+ as_fn_error $? "conditional \"USE_SVM\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${USE_LAS_TRUE}" && test -z "${USE_LAS_FALSE}"; then
as_fn_error $? "conditional \"USE_LAS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
diff --git a/configure.ac b/configure.ac
index 11b981a..a241c7f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,6 +35,14 @@ AS_IF([test "x$enable_fann" = "xyes"], [
AC_MSG_WARN("USE_FANN=false")
])
+AC_ARG_ENABLE([svm],
+ AS_HELP_STRING([--enable-svm], [Enable feature svm]))
+
+AS_IF([test "x$enable_svm" = "xyes"], [
+ AM_CONDITIONAL(USE_SVM, true)
+ AC_MSG_WARN("USE_SVM=true")
+ ])
+
AC_ARG_ENABLE([las],
AS_HELP_STRING([--enable-las], [Enable feature las]))
diff --git a/src/apps/Makefile.am b/src/apps/Makefile.am
index 823577b..994c6c6 100644
--- a/src/apps/Makefile.am
+++ b/src/apps/Makefile.am
@@ -13,6 +13,11 @@ pkclassify_nn_SOURCES = $(top_srcdir)/src/algorithms/myfann_cpp.h pkclassify_nn.
pkclassify_nn_CXXFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/base $(FANN_CFLAGS) -I$(top_srcdir)/src/algorithms $(AM_CXXFLAGS)
pkclassify_nn_LDADD = $(FANN_LIBS) $(FANN_CFLAGS) $(AM_LDFLAGS)
endif
+if USE_SVM
+bin_PROGRAMS += pkclassify_svm
+pkclassify_svm_SOURCES = $(top_srcdir)/src/algorithms/svm.h $(top_srcdir)/src/algorithms/svm.cpp pkclassify_svm.cc
+pkclassify_svm_CXXFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/base $(FANN_CFLAGS) -I$(top_srcdir)/src/algorithms $(AM_CXXFLAGS)
+endif
if USE_LAS
bin_PROGRAMS += pklas2img
pklas2img_SOURCES = pklas2img.cc
diff --git a/src/apps/Makefile.in b/src/apps/Makefile.in
index 7ae36e3..bbbe416 100644
--- a/src/apps/Makefile.in
+++ b/src/apps/Makefile.in
@@ -39,9 +39,10 @@ bin_PROGRAMS = pkinfo$(EXEEXT) pkcrop$(EXEEXT) pkreclass$(EXEEXT) \
pkextract$(EXEEXT) pkfillnodata$(EXEEXT) pkfilter$(EXEEXT) \
pkveg2shadow$(EXEEXT) pkmosaic$(EXEEXT) pkndvi$(EXEEXT) \
pkpolygonize$(EXEEXT) pkascii2img$(EXEEXT) pkdiff$(EXEEXT) \
- $(am__EXEEXT_1) $(am__EXEEXT_2)
+ $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3)
@USE_FANN_TRUE at am__append_1 = pkclassify_nn
- at USE_LAS_TRUE@am__append_2 = pklas2img
+ at USE_SVM_TRUE@am__append_2 = pkclassify_svm
+ at USE_LAS_TRUE@am__append_3 = pklas2img
subdir = src/apps
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -54,7 +55,8 @@ CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
@USE_FANN_TRUE at am__EXEEXT_1 = pkclassify_nn$(EXEEXT)
- at USE_LAS_TRUE@am__EXEEXT_2 = pklas2img$(EXEEXT)
+ at USE_SVM_TRUE@am__EXEEXT_2 = pkclassify_svm$(EXEEXT)
+ at USE_LAS_TRUE@am__EXEEXT_3 = pklas2img$(EXEEXT)
am__installdirs = "$(DESTDIR)$(bindir)"
PROGRAMS = $(bin_PROGRAMS)
am_pkascii2img_OBJECTS = pkascii2img.$(OBJEXT)
@@ -77,6 +79,18 @@ am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) \
@USE_FANN_TRUE@ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2)
pkclassify_nn_LINK = $(CXXLD) $(pkclassify_nn_CXXFLAGS) $(CXXFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
+am__pkclassify_svm_SOURCES_DIST = $(top_srcdir)/src/algorithms/svm.h \
+ $(top_srcdir)/src/algorithms/svm.cpp pkclassify_svm.cc
+ at USE_SVM_TRUE@am_pkclassify_svm_OBJECTS = \
+ at USE_SVM_TRUE@ pkclassify_svm-svm.$(OBJEXT) \
+ at USE_SVM_TRUE@ pkclassify_svm-pkclassify_svm.$(OBJEXT)
+pkclassify_svm_OBJECTS = $(am_pkclassify_svm_OBJECTS)
+pkclassify_svm_LDADD = $(LDADD)
+pkclassify_svm_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+ $(top_builddir)/src/algorithms/libalgorithms.a \
+ $(top_builddir)/src/imageclasses/libimageClasses.a
+pkclassify_svm_LINK = $(CXXLD) $(pkclassify_svm_CXXFLAGS) $(CXXFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
am_pkcreatect_OBJECTS = pkcreatect.$(OBJEXT)
pkcreatect_OBJECTS = $(am_pkcreatect_OBJECTS)
pkcreatect_LDADD = $(LDADD)
@@ -212,16 +226,17 @@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(pkascii2img_SOURCES) $(pkclassify_nn_SOURCES) \
- $(pkcreatect_SOURCES) $(pkcrop_SOURCES) $(pkdiff_SOURCES) \
- $(pkdumpimg_SOURCES) $(pkdumpogr_SOURCES) $(pkegcs_SOURCES) \
- $(pkextract_SOURCES) $(pkfillnodata_SOURCES) \
- $(pkfilter_SOURCES) $(pkgetmask_SOURCES) $(pkinfo_SOURCES) \
- $(pklas2img_SOURCES) $(pkmosaic_SOURCES) $(pkndvi_SOURCES) \
- $(pkpolygonize_SOURCES) $(pkreclass_SOURCES) \
- $(pksetmask_SOURCES) $(pksieve_SOURCES) $(pkstat_SOURCES) \
- $(pkstatogr_SOURCES) $(pkveg2shadow_SOURCES)
+ $(pkclassify_svm_SOURCES) $(pkcreatect_SOURCES) \
+ $(pkcrop_SOURCES) $(pkdiff_SOURCES) $(pkdumpimg_SOURCES) \
+ $(pkdumpogr_SOURCES) $(pkegcs_SOURCES) $(pkextract_SOURCES) \
+ $(pkfillnodata_SOURCES) $(pkfilter_SOURCES) \
+ $(pkgetmask_SOURCES) $(pkinfo_SOURCES) $(pklas2img_SOURCES) \
+ $(pkmosaic_SOURCES) $(pkndvi_SOURCES) $(pkpolygonize_SOURCES) \
+ $(pkreclass_SOURCES) $(pksetmask_SOURCES) $(pksieve_SOURCES) \
+ $(pkstat_SOURCES) $(pkstatogr_SOURCES) $(pkveg2shadow_SOURCES)
DIST_SOURCES = $(pkascii2img_SOURCES) \
- $(am__pkclassify_nn_SOURCES_DIST) $(pkcreatect_SOURCES) \
+ $(am__pkclassify_nn_SOURCES_DIST) \
+ $(am__pkclassify_svm_SOURCES_DIST) $(pkcreatect_SOURCES) \
$(pkcrop_SOURCES) $(pkdiff_SOURCES) $(pkdumpimg_SOURCES) \
$(pkdumpogr_SOURCES) $(pkegcs_SOURCES) $(pkextract_SOURCES) \
$(pkfillnodata_SOURCES) $(pkfilter_SOURCES) \
@@ -347,6 +362,8 @@ LDADD = $(GDAL_LDFLAGS) $(top_builddir)/src/algorithms/libalgorithms.a $(top_bui
@USE_FANN_TRUE at pkclassify_nn_SOURCES = $(top_srcdir)/src/algorithms/myfann_cpp.h pkclassify_nn.h pkclassify_nn.cc
@USE_FANN_TRUE at pkclassify_nn_CXXFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/base $(FANN_CFLAGS) -I$(top_srcdir)/src/algorithms $(AM_CXXFLAGS)
@USE_FANN_TRUE at pkclassify_nn_LDADD = $(FANN_LIBS) $(FANN_CFLAGS) $(AM_LDFLAGS)
+ at USE_SVM_TRUE@pkclassify_svm_SOURCES = $(top_srcdir)/src/algorithms/svm.h $(top_srcdir)/src/algorithms/svm.cpp pkclassify_svm.cc
+ at USE_SVM_TRUE@pkclassify_svm_CXXFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/base $(FANN_CFLAGS) -I$(top_srcdir)/src/algorithms $(AM_CXXFLAGS)
@USE_LAS_TRUE at pklas2img_SOURCES = pklas2img.cc
@USE_LAS_TRUE at pklas2img_LDADD = -L$(top_builddir)/src/fileclasses -lfileClasses -llas $(AM_LDFLAGS)
# list of sources for the binaries
@@ -377,7 +394,7 @@ pkdiff_SOURCES = pkdiff.cc
all: all-am
.SUFFIXES:
-.SUFFIXES: .cc .o .obj
+.SUFFIXES: .cc .cpp .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@@ -451,6 +468,9 @@ pkascii2img$(EXEEXT): $(pkascii2img_OBJECTS) $(pkascii2img_DEPENDENCIES)
pkclassify_nn$(EXEEXT): $(pkclassify_nn_OBJECTS) $(pkclassify_nn_DEPENDENCIES)
@rm -f pkclassify_nn$(EXEEXT)
$(pkclassify_nn_LINK) $(pkclassify_nn_OBJECTS) $(pkclassify_nn_LDADD) $(LIBS)
+pkclassify_svm$(EXEEXT): $(pkclassify_svm_OBJECTS) $(pkclassify_svm_DEPENDENCIES)
+ @rm -f pkclassify_svm$(EXEEXT)
+ $(pkclassify_svm_LINK) $(pkclassify_svm_OBJECTS) $(pkclassify_svm_LDADD) $(LIBS)
pkcreatect$(EXEEXT): $(pkcreatect_OBJECTS) $(pkcreatect_DEPENDENCIES)
@rm -f pkcreatect$(EXEEXT)
$(CXXLINK) $(pkcreatect_OBJECTS) $(pkcreatect_LDADD) $(LIBS)
@@ -523,6 +543,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pkascii2img.Po at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pkclassify_nn-pkclassify_nn.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pkclassify_svm-pkclassify_svm.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pkclassify_svm-svm.Po at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pkcreatect.Po at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pkcrop.Po at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pkdiff.Po at am__quote@
@@ -573,6 +595,48 @@ pkclassify_nn-pkclassify_nn.obj: pkclassify_nn.cc
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pkclassify_nn_CXXFLAGS) $(CXXFLAGS) -c -o pkclassify_nn-pkclassify_nn.obj `if test -f 'pkclassify_nn.cc'; then $(CYGPATH_W) 'pkclassify_nn.cc'; else $(CYGPATH_W) '$(srcdir)/pkclassify_nn.cc'; fi`
+pkclassify_svm-svm.o: $(top_srcdir)/src/algorithms/svm.cpp
+ at am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pkclassify_svm_CXXFLAGS) $(CXXFLAGS) -MT pkclassify_svm-svm.o -MD -MP -MF $(DEPDIR)/pkclassify_svm-svm.Tpo -c -o pkclassify_svm-svm.o `test -f '$(top_srcdir)/src/algorithms/svm.cpp' || echo '$(srcdir)/'`$(top_srcdir)/src/algorithms/svm.cpp
+ at am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/pkclassify_svm-svm.Tpo $(DEPDIR)/pkclassify_svm-svm.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(top_srcdir)/src/algorithms/svm.cpp' object='pkclassify_svm-svm.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pkclassify_svm_CXXFLAGS) $(CXXFLAGS) -c -o pkclassify_svm-svm.o `test -f '$(top_srcdir)/src/algorithms/svm.cpp' || echo '$(srcdir)/'`$(top_srcdir)/src/algorithms/svm.cpp
+
+pkclassify_svm-svm.obj: $(top_srcdir)/src/algorithms/svm.cpp
+ at am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pkclassify_svm_CXXFLAGS) $(CXXFLAGS) -MT pkclassify_svm-svm.obj -MD -MP -MF $(DEPDIR)/pkclassify_svm-svm.Tpo -c -o pkclassify_svm-svm.obj `if test -f '$(top_srcdir)/src/algorithms/svm.cpp'; then $(CYGPATH_W) '$(top_srcdir)/src/algorithms/svm.cpp'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/algorithms/svm.cpp'; fi`
+ at am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/pkclassify_svm-svm.Tpo $(DEPDIR)/pkclassify_svm-svm.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(top_srcdir)/src/algorithms/svm.cpp' object='pkclassify_svm-svm.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pkclassify_svm_CXXFLAGS) $(CXXFLAGS) -c -o pkclassify_svm-svm.obj `if test -f '$(top_srcdir)/src/algorithms/svm.cpp'; then $(CYGPATH_W) '$(top_srcdir)/src/algorithms/svm.cpp'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/algorithms/svm.cpp'; fi`
+
+pkclassify_svm-pkclassify_svm.o: pkclassify_svm.cc
+ at am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pkclassify_svm_CXXFLAGS) $(CXXFLAGS) -MT pkclassify_svm-pkclassify_svm.o -MD -MP -MF $(DEPDIR)/pkclassify_svm-pkclassify_svm.Tpo -c -o pkclassify_svm-pkclassify_svm.o `test -f 'pkclassify_svm.cc' || echo '$(srcdir)/'`pkclassify_svm.cc
+ at am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/pkclassify_svm-pkclassify_svm.Tpo $(DEPDIR)/pkclassify_svm-pkclassify_svm.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pkclassify_svm.cc' object='pkclassify_svm-pkclassify_svm.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pkclassify_svm_CXXFLAGS) $(CXXFLAGS) -c -o pkclassify_svm-pkclassify_svm.o `test -f 'pkclassify_svm.cc' || echo '$(srcdir)/'`pkclassify_svm.cc
+
+pkclassify_svm-pkclassify_svm.obj: pkclassify_svm.cc
+ at am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pkclassify_svm_CXXFLAGS) $(CXXFLAGS) -MT pkclassify_svm-pkclassify_svm.obj -MD -MP -MF $(DEPDIR)/pkclassify_svm-pkclassify_svm.Tpo -c -o pkclassify_svm-pkclassify_svm.obj `if test -f 'pkclassify_svm.cc'; then $(CYGPATH_W) 'pkclassify_svm.cc'; else $(CYGPATH_W) '$(srcdir)/pkclassify_svm.cc'; fi`
+ at am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/pkclassify_svm-pkclassify_svm.Tpo $(DEPDIR)/pkclassify_svm-pkclassify_svm.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pkclassify_svm.cc' object='pkclassify_svm-pkclassify_svm.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pkclassify_svm_CXXFLAGS) $(CXXFLAGS) -c -o pkclassify_svm-pkclassify_svm.obj `if test -f 'pkclassify_svm.cc'; then $(CYGPATH_W) 'pkclassify_svm.cc'; else $(CYGPATH_W) '$(srcdir)/pkclassify_svm.cc'; fi`
+
+.cpp.o:
+ at am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+ at am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
diff --git a/src/apps/pkclassify_nn.cc b/src/apps/pkclassify_nn.cc
index da4a53a..35c887c 100644
--- a/src/apps/pkclassify_nn.cc
+++ b/src/apps/pkclassify_nn.cc
@@ -29,6 +29,10 @@ along with pktools. If not, see <http://www.gnu.org/licenses/>.
#include "floatfann.h"
#include "myfann_cpp.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
int main(int argc, char *argv[])
{
map<short,int> reclassMap;
@@ -37,12 +41,16 @@ int main(int argc, char *argv[])
//--------------------------- command line options ------------------------------------
- Optionpk<bool> version_opt("\0","version","version 20120625, Copyright (C) 2008-2012 Pieter Kempeneers.\n\
+ std::string versionString="version ";
+ versionString+=VERSION;
+ versionString+=", Copyright (C) 2008-2012 Pieter Kempeneers.\n\
This program comes with ABSOLUTELY NO WARRANTY; for details type use option -h.\n\
This is free software, and you are welcome to redistribute it\n\
- under certain conditions; use option --license for details.",false);
+ under certain conditions; use option --license for details.";
+ Optionpk<bool> version_opt("\0","version",versionString,false);
Optionpk<bool> license_opt("lic","license","show license information",false);
Optionpk<bool> help_opt("h","help","shows this help info",false);
+ Optionpk<bool> todo_opt("\0","todo","",false);
Optionpk<string> input_opt("i", "input", "input image","");
Optionpk<string> training_opt("t", "training", "training shape file. A single shape file contains all training features (must be set as: B0, B1, B2,...) for all classes (class numbers identified by label option). Use multiple training files for bootstrap aggregation (alternative to the bag and bsize options, where a random subset is taken from a single training file)","");
Optionpk<string> label_opt("\0", "label", "identifier for class label in training shape file. (default is label)","label");
@@ -60,7 +68,6 @@ int main(int argc, char *argv[])
Optionpk<float> weights_opt("w", "weights", "weights for neural network. Apply to fully connected network only, starting from first input neuron to last output neuron, including the bias neurons (last neuron in each but last layer)", 0.0);
Optionpk<float> learning_opt("l", "learning", "learning rate (default: 0.7)", 0.7);
Optionpk<unsigned int> maxit_opt("\0", "maxit", "number of maximum iterations (epoch) (default: 500)", 500);
- Optionpk<bool> random_opt("r", "random", "random seed for selecting balanced sample: set to 1 for random (default), set to 0 for reproducable accuracy result for each new run", true);
Optionpk<unsigned short> comb_opt("c", "comb", "how to combine bootstrap aggregation classifiers (0: sum rule, 1: product rule, 2: max rule). Also used to aggregate classes with rc option. Default is sum rule (0)",0);
Optionpk<unsigned short> bag_opt("\0", "bag", "Number of bootstrap aggregations (default is no bagging: 1)", 1);
Optionpk<int> bagSize_opt("\0", "bsize", "Percentage of features used from available training features for each bootstrap aggregation (default for no bagging: 100)", 100);
@@ -79,18 +86,9 @@ int main(int argc, char *argv[])
version_opt.retrieveOption(argc,argv);
license_opt.retrieveOption(argc,argv);
help_opt.retrieveOption(argc,argv);
-
- if(version_opt[0]){
- cout << version_opt.getHelp() << endl;
- exit(0);
- }
- if(license_opt[0]){
- cout << Optionpk<bool>::getGPLv3License() << endl;
- exit(0);
- }
+ todo_opt.retrieveOption(argc,argv);
input_opt.retrieveOption(argc,argv);
- input_opt.retrieveOption(argc,argv);
training_opt.retrieveOption(argc,argv);
label_opt.retrieveOption(argc,argv);
reclass_opt.retrieveOption(argc,argv);
@@ -107,7 +105,6 @@ int main(int argc, char *argv[])
weights_opt.retrieveOption(argc,argv);
learning_opt.retrieveOption(argc,argv);
maxit_opt.retrieveOption(argc,argv);
- random_opt.retrieveOption(argc,argv);
comb_opt.retrieveOption(argc,argv);
bag_opt.retrieveOption(argc,argv);
bagSize_opt.retrieveOption(argc,argv);
@@ -123,8 +120,17 @@ int main(int argc, char *argv[])
prob_opt.retrieveOption(argc,argv);
verbose_opt.retrieveOption(argc,argv);
- if(help_opt[0]){
+ if(version_opt[0]||todo_opt[0]){
cout << version_opt.getHelp() << endl;
+ cout << "todo: " << todo_opt.getHelp() << endl;
+ exit(0);
+ }
+ if(license_opt[0]){
+ cout << Optionpk<bool>::getGPLv3License() << endl;
+ exit(0);
+ }
+ if(help_opt[0]){
+ cout << "usage: pkclassify_nn -i testimage -o outputimage -t training [OPTIONS]" << endl;
exit(0);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/pktools.git
More information about the Pkg-grass-devel
mailing list