|
@@ -35,8 +35,11 @@ private:
|
|
/** local features */
|
|
/** local features */
|
|
LFColorWeijer *lfcw;
|
|
LFColorWeijer *lfcw;
|
|
|
|
|
|
- /** number of featuretype -> currently: local and context features = 2 */
|
|
|
|
- int ftypes;
|
|
|
|
|
|
+ /** whether to use a particular feature type or not */
|
|
|
|
+ bool useFeat0, useFeat1, useFeat2, useFeat3, useFeat4, useFeat5;
|
|
|
|
+
|
|
|
|
+ /** array of usable feature types*/
|
|
|
|
+ std::vector<int> featTypes;
|
|
|
|
|
|
/** maximum samples for tree */
|
|
/** maximum samples for tree */
|
|
int maxSamples;
|
|
int maxSamples;
|
|
@@ -104,9 +107,6 @@ private:
|
|
/** use additional input Layer or not */
|
|
/** use additional input Layer or not */
|
|
bool useAdditionalLayer;
|
|
bool useAdditionalLayer;
|
|
|
|
|
|
- /** use Regions as extra feature channel or not */
|
|
|
|
- bool useRegionFeature;
|
|
|
|
-
|
|
|
|
/** use external image categorization to avoid some classes */
|
|
/** use external image categorization to avoid some classes */
|
|
bool useCategorization;
|
|
bool useCategorization;
|
|
|
|
|
|
@@ -150,13 +150,39 @@ private:
|
|
int uniquenumber;
|
|
int uniquenumber;
|
|
|
|
|
|
/**
|
|
/**
|
|
- * the actual training method
|
|
|
|
|
|
+ * @brief initOperations initialize the operation types
|
|
|
|
+ */
|
|
|
|
+ void initOperations();
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * @brief train the actual training method
|
|
* @param trainp pointer to training data
|
|
* @param trainp pointer to training data
|
|
*/
|
|
*/
|
|
void train ( const LabeledSet * trainp );
|
|
void train ( const LabeledSet * trainp );
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @brief compute closest contour point in given direction
|
|
|
|
+ * @param B contour image (canny)
|
|
|
|
+ * @param G gradient image
|
|
|
|
+ * @param D distances
|
|
|
|
+ * @param N norms
|
|
|
|
+ * @param x current x coordinate
|
|
|
|
+ * @param y current y coordinate
|
|
|
|
+ * @param dir direction
|
|
|
|
+ */
|
|
|
|
+ void closestContourPoint ( const NICE::Image &B,
|
|
|
|
+ const NICE::Image &G,
|
|
|
|
+ NICE::Matrix &D,
|
|
|
|
+ NICE::Matrix &N,
|
|
|
|
+ int x,
|
|
|
|
+ int y,
|
|
|
|
+ const int &dir);
|
|
|
|
+
|
|
public:
|
|
public:
|
|
/** simple constructor */
|
|
/** simple constructor */
|
|
|
|
+ SemSegContextTree ();
|
|
|
|
+
|
|
|
|
+ /** constructor */
|
|
SemSegContextTree ( const NICE::Config *conf, const MultiDataset *md );
|
|
SemSegContextTree ( const NICE::Config *conf, const MultiDataset *md );
|
|
|
|
|
|
/** simple destructor */
|
|
/** simple destructor */
|
|
@@ -183,11 +209,19 @@ public:
|
|
* @brief computes integral image of given feats
|
|
* @brief computes integral image of given feats
|
|
*
|
|
*
|
|
* @param nodeIndices matrix with current node for each feature
|
|
* @param nodeIndices matrix with current node for each feature
|
|
- * @param integralImage output image (must be initilized)
|
|
|
|
|
|
+ * @param feats output image (must be initilized)
|
|
* @param firstChannel index of the first channel
|
|
* @param firstChannel index of the first channel
|
|
* @return void
|
|
* @return void
|
|
**/
|
|
**/
|
|
- void computeIntegralImage ( const NICE::MultiChannelImage3DT<unsigned short int> &nodeIndices, NICE::MultiChannelImage3DT<double> &integralImage, int firstChannel );
|
|
|
|
|
|
+ void computeIntegralImage ( const NICE::MultiChannelImage3DT<unsigned short int> &nodeIndices, NICE::MultiChannelImage3DT<double> &feats, int firstChannel );
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * @brief computes ray feature images using canny filter
|
|
|
|
+ * @param feats
|
|
|
|
+ * @param channel
|
|
|
|
+ * @return void
|
|
|
|
+ */
|
|
|
|
+ void computeRayFeatImage ( NICE::MultiChannelImage3DT<double> &feats, int firstChannel );
|
|
|
|
|
|
/**
|
|
/**
|
|
* @brief reads image and does some simple convertions
|
|
* @brief reads image and does some simple convertions
|