public static <I extends ImageGray<I>, O extends ImageGray<O>>
	void gradient(ImagePyramid<I> input, ImageGradient<I, O> gradient, O[] derivX, O[] derivY )
	{
		for( int i = 0; i < input.getNumLayers(); i++ ) {
			I imageIn = input.getLayer(i);
			gradient.process(imageIn,derivX[i],derivY[i]);
		}
	}
public static < I extends ImageGray < I > , O extends ImageGray < O > > void gradient ( ImagePyramid < I > input , ImageGradient < I , O > gradient , O [ ] derivX , O [ ] derivY ) { for ( int i = 0 ; i < input . getNumLayers ( ) ; i ++ ) { I imageIn = input . getLayer ( i ) ; gradient . process ( imageIn , derivX [ i ] , derivY [ i ] ) ; } }
<p>
Computes the gradient for each image the pyramid.
</p>

<p>
It is assumed that the gradient has the same scales as the input.  If not
initialized then it will be initialized.  If already initialized it is
assumed to be setup for the same input image size.
</p>

@param input Input pyramid.
@param gradient Computes image gradient
@param derivX Pyramid where x-derivative is stored.
@param derivY Pyramid where y-derivative is stored.