|
@@ -17,6 +17,36 @@ using namespace OBJREC;
|
|
using namespace std;
|
|
using namespace std;
|
|
using namespace NICE;
|
|
using namespace NICE;
|
|
|
|
|
|
|
|
+SemanticSegmentation::SemanticSegmentation ()
|
|
|
|
+{
|
|
|
|
+ this->classNames = NULL;
|
|
|
|
+ this->imagetype = IMAGETYPE_GRAY;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+SemanticSegmentation::SemanticSegmentation ( const Config *conf,
|
|
|
|
+ const ClassNames *classNames )
|
|
|
|
+{
|
|
|
|
+ this->classNames = classNames;
|
|
|
|
+
|
|
|
|
+ Preprocess::Init ( conf );
|
|
|
|
+
|
|
|
|
+ std::string imagetype_s = conf->gS ( "main", "imagetype", "gray" );
|
|
|
|
+ if ( imagetype_s == "rgb" )
|
|
|
|
+ this->imagetype = IMAGETYPE_RGB;
|
|
|
|
+ else if ( imagetype_s == "gray" )
|
|
|
|
+ this->imagetype = IMAGETYPE_GRAY;
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ fprintf ( stderr, "SemanticSegmentation:: unknown image type option\n" );
|
|
|
|
+ exit ( -1 );
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+SemanticSegmentation::~SemanticSegmentation()
|
|
|
|
+{
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
void SemanticSegmentation::convertLSetToSparseExamples ( Examples &examples, LabeledSetVector &lvec )
|
|
void SemanticSegmentation::convertLSetToSparseExamples ( Examples &examples, LabeledSetVector &lvec )
|
|
{
|
|
{
|
|
#ifdef DEBUG_PRINTS
|
|
#ifdef DEBUG_PRINTS
|
|
@@ -140,29 +170,6 @@ void SemanticSegmentation::convertVVectorToExamples ( VVector &feats, Examples &
|
|
#endif
|
|
#endif
|
|
}
|
|
}
|
|
|
|
|
|
-SemanticSegmentation::SemanticSegmentation ( const Config *conf,
|
|
|
|
- const ClassNames *classNames )
|
|
|
|
-{
|
|
|
|
- this->classNames = classNames;
|
|
|
|
-
|
|
|
|
- Preprocess::Init ( conf );
|
|
|
|
-
|
|
|
|
- std::string imagetype_s = conf->gS ( "main", "imagetype", "gray" );
|
|
|
|
- if ( imagetype_s == "rgb" )
|
|
|
|
- imagetype = IMAGETYPE_RGB;
|
|
|
|
- else if ( imagetype_s == "gray" )
|
|
|
|
- imagetype = IMAGETYPE_GRAY;
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- fprintf ( stderr, "SemanticSegmentation:: unknown image type option\n" );
|
|
|
|
- exit ( -1 );
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-SemanticSegmentation::~SemanticSegmentation()
|
|
|
|
-{
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
void SemanticSegmentation::getDepthVector ( const LabeledSet *Files,
|
|
void SemanticSegmentation::getDepthVector ( const LabeledSet *Files,
|
|
vector<int> & depthVec,
|
|
vector<int> & depthVec,
|
|
const bool run3Dseg )
|
|
const bool run3Dseg )
|