|
@@ -411,7 +411,7 @@ void ClassNames::getClassnoFromColor ( int & classno, int r, int g, int b ) cons
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-void ClassNames::labelToRGB ( const NICE::Image & img, NICE::ColorImage & rgb ) const
|
|
|
+void ClassNames::labelToRGB ( const NICE::ImageT<int> & img, NICE::ColorImage & rgb ) const
|
|
|
{
|
|
|
int red, green, blue;
|
|
|
|
|
@@ -429,6 +429,17 @@ void ClassNames::labelToRGB ( const NICE::Image & img, NICE::ColorImage & rgb )
|
|
|
|
|
|
}
|
|
|
|
|
|
+void ClassNames::labelToRGB ( const NICE::Image & img, NICE::ColorImage & rgb ) const
|
|
|
+{
|
|
|
+ NICE::ImageT<int> imgInt ( img.width(), img.height() );
|
|
|
+
|
|
|
+ for ( int y = 0 ; y < img.height(); y++ )
|
|
|
+ for ( int x = 0 ; x < img.width(); x++ )
|
|
|
+ imgInt.setPixelQuick( x, y, img.getPixelQuick(x,y) );
|
|
|
+
|
|
|
+ labelToRGB ( imgInt, rgb );
|
|
|
+}
|
|
|
+
|
|
|
int ClassNames::getBackgroundClass () const
|
|
|
{
|
|
|
if ( existsClassCode ( "various" ) )
|