Added edge detection method for the graphcut color-coherency stuff