Эх сурвалжийг харах

*** empty log message ***

froehlich 15 жил өмнө
parent
commit
2094c4671f
2 өөрчлөгдсөн 50 нэмэгдсэн , 1 устгасан
  1. 0 1
      progs/libdepend.inc
  2. 50 0
      progs/testRF.cpp

+ 0 - 1
progs/libdepend.inc

@@ -1 +0,0 @@
-$(call PKG_DEPEND_INT,objrec)

+ 50 - 0
progs/testRF.cpp

@@ -0,0 +1,50 @@
+/** 
+* @file testRF.cpp
+* @brief test random forest implementation
+* @author Björn Fröhlich
+* @date 06/08/2010
+*/
+#include "objrec/nice.h"
+
+#include "objrec/baselib/Config.h"
+
+#include "objrec/classifier/fpclassifier/randomforest/FPCRandomForests.h"
+#include "objrec/classifier/classifierbase/FeaturePoolClassifier.h"
+
+#include "objrec/baselib/Globals.h"
+
+using namespace OBJREC;
+using namespace NICE;
+using namespace std;
+
+int main (int argc, char **argv)
+{
+	if(argc < 1)
+	{
+		cerr << "Bitte Datei angeben" << endl;
+		return -1;
+	}
+	
+	string filename;
+	filename += argv[1];
+	cout << "file: " << filename << endl;
+	
+	Config *conf = new Config();
+	
+	FeaturePoolClassifier *fpcrfCs = new FPCRandomForests(conf, "CsurkaForest");
+	
+	//Vector *vec = new Vector(384);
+	//Example ex(vec);
+
+	fpcrfCs->setMaxClassNo(8);
+	fpcrfCs->read(filename);
+	/*
+	ClassificationResult r;
+			
+	if(fpcrfCs != NULL)
+	{
+		r = fpcrfCs->classify ( ex );
+	}
+	*/
+	return 0;
+}