public static <I extends ImageGray<I>, D extends ImageGray<D>>
	ImageGradient<I,D> gradientSB( DerivativeType type , Class<I> inputType , Class<D> derivType )
	{
		if( derivType == null )
			derivType = GImageDerivativeOps.getDerivativeType(inputType);

		Class which;

		switch( type ) {
			case PREWITT:
				which = GradientPrewitt.class;
				break;

			case SOBEL:
				which = GradientSobel.class;
				break;

			case THREE:
				which = GradientThree.class;
				break;

			case TWO_0:
				which = GradientTwo0.class;
				break;

			case TWO_1:
				which = GradientTwo1.class;
				break;

			default:
				throw new IllegalArgumentException("Unknown type "+type);
		}

		Method m = findDerivative(which,inputType,derivType);
		return new ImageGradient_Reflection<>(m);
	}
public static < I extends ImageGray < I > , D extends ImageGray < D > > ImageGradient < I , D > gradientSB ( DerivativeType type , Class < I > inputType , Class < D > derivType ) { if ( derivType == null ) derivType = GImageDerivativeOps . getDerivativeType ( inputType ) ; Class which ; switch ( type ) { case PREWITT : which = GradientPrewitt . class ; break ; case SOBEL : which = GradientSobel . class ; break ; case THREE : which = GradientThree . class ; break ; case TWO_0 : which = GradientTwo0 . class ; break ; case TWO_1 : which = GradientTwo1 . class ; break ; default : throw new IllegalArgumentException ( "Unknown type " + type ) ; } Method m = findDerivative ( which , inputType , derivType ) ; return new ImageGradient_Reflection < > ( m ) ; }
Returns the gradient for single band images of the specified type
@param type Type of gradient
@param inputType Type of input image
@param derivType Type of gradient image.  null for default
@param <I> Input image
@param <D> Derivative image
@return gradient filter