CIntImage_to_Featurevec.h
Go to the documentation of this file.
00001 /*
00002  * David Fischinger -TUW
00003  * 18.11.2011
00004  *
00005  * CLASS for calculating Feature Vector from Integral images
00006  *
00007  * OUTDATED!!!!!
00008  *
00009  * USAGE:
00010  *      - generate ListOfIIFilenames.txt in correct folder
00011  *      - change all Parameters
00012  *      - execute
00013  *
00014  *
00015  * input:
00016  *   Filenames (generated with: "ls pcd* -1 > ListOfIIFilenames.txt"
00017  *   executed in IntegralImages folder)
00018  *   with integral images and filename with features
00019  *
00020  * output:
00021  *   One file for each integral images including all feature values (1 value for each feature) is saved in the given output folder.
00022  *
00023  *   PARAMETERS:
00024  *
00025  *    HEIGHTFEATURES 15 (14+1)
00026  *    WIDTHFEATURES 15 (14+1)
00027  *    pathout = "/home/grasp/David/GPDatabase/badgps/twocams/featurevec/";
00028  *    goodgps           indicates if features for good or bad GPs are calculated => label +1/-1 in output .txt
00029  *        path =    "/opt/ros/privat/stacks/toolsdf/CeditFeatures_input.txt";       //file with Haar-Features
00030  */
00031 
00032 
00033 #ifndef CINTIMAGE_TO_FEATUREVEC_H_
00034 #define CINTIMAGE_TO_FEATUREVEC_H_
00035 
00036 //#include <boost/thread/thread.hpp>
00037 #include <iostream>
00038 #include <string.h>
00039 #include <sstream>
00040 #include <fstream>
00041 
00042 //#include "CIntegralImage.cpp"
00043 #include <time.h>
00044 //#include <opencv/cv.h>
00045 #include <CHaarFeature.h>
00046 
00047 #define HEIGHTFEATURES 15
00048 #define WIDTHFEATURES 15
00049 
00050 using namespace std;
00051 //using namespace cv;
00052 
00053 
00054 
00055 class CIntImage_to_Featurevec
00056 {
00057 public:
00058         CHaarFeature * currentfeature;  //number of regions
00059         vector<CHaarFeature> allfeatures;
00060         float intimagemat[HEIGHTFEATURES][WIDTHFEATURES];
00061         //PARAMETERS
00062         string path;
00063         string pathfull_list_of_filenames;
00064         string pathout;
00065         bool goodgps;
00066 
00067 
00068         void print_heights();
00069         void read_features(string featurespath);
00070         void print_features();
00071         void write_featurevector(string outputpath, int nr_features_without_shaf);
00072         float calc_featurevalue(int nr_feat, int nr_features_without_shaf);
00073 
00074 
00075         CIntImage_to_Featurevec();
00076 };
00077 
00078 
00079 #endif /* CINTIMAGE_TO_FEATUREVEC_H_ */


haf_grasping
Author(s): David Fischinger
autogenerated on Wed Jan 11 2017 03:48:49