public static < T extends ImageGray < T > > T convert ( ImageGray < ? > src , T dst , Class < T > typeDst ) { if ( dst == null ) { dst = ( T ) GeneralizedImageOps . createSingleBand ( typeDst , src . width , src . height ) ; } else { InputSanityCheck . checkSameShape ( src , dst ) ; } convert ( src , dst ) ; return dst ; }
Converts an image from one type to another type . Creates a new image instance if an output is not provided .