code: public static <T extends ImageGray<T>>
  	Planar<T> nv21ToPlanarYuv(byte[] data , int width , int height ,
  							  Planar<T> output , Class<T> outputType ) {
  
  		if( outputType == GrayU8.class ) {
  			return (Planar) nv21ToPlanarYuv_U8(data,width,height,(Planar)output);
  		} else if( outputType == GrayF32.class ) {
  			return (Planar) nv21TPlanarYuv_F32(data,width,height,(Planar)output);
  		} else {
  			throw new IllegalArgumentException("Unsupported BoofCV Image Type "+outputType.getSimpleName());
  		}
  	}
docs: Converts an NV21 image into a {@link Planar} YUV image.
  
  @param data Input: NV21 image data
  @param width Input: NV21 image width
  @param height Input: NV21 image height
  @param output Output: Optional storage for output image.  Can be null.
  @param outputType  Output: Type of output image
  @param <T> Output image type