public static Image applyMaskAndZeroCross(Image original, Mask mask,
			int threshold) {
		Image masked = applyMask(original, mask);
		Image image = original.shallowClone();
		if (original.isRgb()) {
			zeroCross(masked, image, threshold, RED);
			zeroCross(masked, image, threshold, GREEN);
			zeroCross(masked, image, threshold, BLUE);
		} else if (original.isHsv()) {
			zeroCross(masked, image, threshold, HUE);
			zeroCross(masked, image, threshold, SATURATION);
			zeroCross(masked, image, threshold, VALUE);
		}
		return image;
	}