|
@@ -47,12 +47,12 @@ enum OperationTypes {
|
|
|
RELATIVEXPOSITION,
|
|
|
RELATIVEYPOSITION,
|
|
|
RELATIVEZPOSITION,
|
|
|
- GLOBALFEATS,
|
|
|
+ LOCALMEAN,
|
|
|
EQUALITY,
|
|
|
- RAYDIFF,
|
|
|
- RAYDIST,
|
|
|
- RAYORIENT,
|
|
|
- RAYNORM,
|
|
|
+ LOCALSTATMOM,
|
|
|
+ UNUSED0,
|
|
|
+ UNUSED1,
|
|
|
+ UNUSED2,
|
|
|
MINUS_C,
|
|
|
MINUSABS_C,
|
|
|
ADDITION_C,
|
|
@@ -69,9 +69,10 @@ enum OperationTypes {
|
|
|
HAAR3HORIZ_C,
|
|
|
HAAR3VERT_C,
|
|
|
HAAR3STACK_C,
|
|
|
- GLOBALFEATS_C,
|
|
|
+ LOCALMEAN_C,
|
|
|
BIINTEGRAL,
|
|
|
BIINTEGRAL_C,
|
|
|
+ LOCALSTATMOM_C,
|
|
|
NBOPERATIONS
|
|
|
};
|
|
|
|
|
@@ -824,9 +825,9 @@ public:
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
- * @brief like a global bag of words to model the current appearance of classes in an image without local context
|
|
|
+ * @brief mean of feature values in neighborhood window
|
|
|
**/
|
|
|
-class GlobalFeats3D: public IntegralOps3D
|
|
|
+class LocalMean3D: public IntegralOps3D
|
|
|
{
|
|
|
|
|
|
public:
|
|
@@ -845,7 +846,7 @@ public:
|
|
|
**/
|
|
|
virtual Operation3D* clone()
|
|
|
{
|
|
|
- Operation3D* o = new GlobalFeats3D();
|
|
|
+ Operation3D* o = new LocalMean3D();
|
|
|
o->setContext(context);
|
|
|
return o;
|
|
|
}
|
|
@@ -856,14 +857,14 @@ public:
|
|
|
**/
|
|
|
virtual std::string writeInfos()
|
|
|
{
|
|
|
- std::string out = "GlobalFeats";
|
|
|
+ std::string out = "LocalMean";
|
|
|
|
|
|
if ( context )
|
|
|
out = "(C)" + out;
|
|
|
else
|
|
|
out = "(R)" + out;
|
|
|
|
|
|
- return out + " " + Operation3D::writeInfos();
|
|
|
+ return out + " " + Operation3D::writeInfos();
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -873,12 +874,69 @@ public:
|
|
|
virtual OperationTypes getOps()
|
|
|
{
|
|
|
if ( context )
|
|
|
- return GLOBALFEATS_C;
|
|
|
+ return LOCALMEAN_C;
|
|
|
else
|
|
|
- return GLOBALFEATS;
|
|
|
+ return LOCALMEAN;
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+/**
|
|
|
+ * @brief variance of feature values in neighborhood window
|
|
|
+ **/
|
|
|
+class LocalStatMom3D: public IntegralOps3D
|
|
|
+{
|
|
|
+
|
|
|
+public:
|
|
|
+ /**
|
|
|
+ * @brief interface for feature computation
|
|
|
+ * @param feats features
|
|
|
+ * @param x current x position
|
|
|
+ * @param y current y position
|
|
|
+ * @param z current z position
|
|
|
+ * @return double distance
|
|
|
+ **/
|
|
|
+ virtual double getVal ( const Features &feats, const int &x, const int &y, const int &z );
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @brief clone operation instead of copy constructor (copy constructor does not work)
|
|
|
+ **/
|
|
|
+ virtual Operation3D* clone()
|
|
|
+ {
|
|
|
+ Operation3D* o = new LocalStatMom3D();
|
|
|
+ o->setContext(context);
|
|
|
+ return o;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @brief print some infos about operation extraction type
|
|
|
+ * @return string feature type
|
|
|
+ **/
|
|
|
+ virtual std::string writeInfos()
|
|
|
+ {
|
|
|
+ std::string out = "LocalStatMom";
|
|
|
+
|
|
|
+ if ( context )
|
|
|
+ out = "(C)" + out;
|
|
|
+ else
|
|
|
+ out = "(R)" + out;
|
|
|
+
|
|
|
+ return out + " " + Operation3D::writeInfos();
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @brief return operation type (for store and restore)
|
|
|
+ * @return OperationTypes
|
|
|
+ **/
|
|
|
+ virtual OperationTypes getOps()
|
|
|
+ {
|
|
|
+ if ( context )
|
|
|
+ return LOCALSTATMOM_C;
|
|
|
+ else
|
|
|
+ return LOCALSTATMOM;
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* @brief uses mean of Integral image given by x1, y1, z1 with current pixel as center
|
|
|
**/
|