code: @Override
  	protected void processImage(ImageBase image) {
  		// The data type of 'image' was specified in onCreate() function
  		// The line below will compute the gradient and store it in two images. One for the
  		// gradient along the x-axis and the other along the y-axis
  		gradient.process((GrayU8)image,derivX,derivY);
  	}
docs: This function is invoked in its own thread and can take as long as you want.