private Bitmap FilterImage(Bitmap image) { // Create the filters to get our difference from the background and threshold it to enhance ThresholdedEuclideanDifference TEDfilter = new ThresholdedEuclideanDifference(ThresVal); TEDfilter.OverlayImage = background; // Sets the background of the difference filter to the global background image (set elsewhere) return TEDfilter.Apply(Grayscale.CommonAlgorithms.BT709.Apply(image)); }