|
@@ -289,3 +289,23 @@ void SemanticSegmentation::make3DImage ( const std::vector<std::string> & fileli
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+void SemanticSegmentation::getProbabilityMap ( const NICE::MultiChannelImage3DT<double> & prob )
|
|
|
+{
|
|
|
+ std::string s;
|
|
|
+
|
|
|
+ for ( int cl = 0; cl < prob.channels(); cl++ )
|
|
|
+ for ( int z = 0; z < prob.depth(); z++ )
|
|
|
+ {
|
|
|
+ NICE::ColorImage img( prob.width(),prob.height() );
|
|
|
+ NICE::ImageT<double> m = prob.getChannelT(z, cl);
|
|
|
+ imageToPseudoColor(m, img);
|
|
|
+
|
|
|
+ std::stringstream out;
|
|
|
+ out << "probmap_s" << z << "_c" << cl << ".ppm";
|
|
|
+ s = out.str();
|
|
|
+ img.write( s );
|
|
|
+
|
|
|
+ //showImage(img, "Probability map");
|
|
|
+ //getchar();
|
|
|
+ }
|
|
|
+}
|