public static < T extends ImageGray < T > > void histogram ( T image , double minPixelValue , double maxPixelValue , TupleDesc_F64 histogram ) { if ( image . getClass ( ) == GrayU8 . class ) { HistogramFeatureOps . histogram ( ( GrayU8 ) image , ( int ) maxPixelValue , histogram ) ; } else if ( image . getClass ( ) == GrayU16 . class ) { HistogramFeatureOps . histogram ( ( GrayU16 ) image , ( int ) maxPixelValue , histogram ) ; } else if ( image . getClass ( ) == GrayF32 . class ) { HistogramFeatureOps . histogram ( ( GrayF32 ) image , ( float ) minPixelValue , ( float ) maxPixelValue , histogram ) ; } else { throw new IllegalArgumentException ( "Unsupported band type" ) ; } }
Computes a single - band normalized histogram for any single band image .