Updated edge detection to use colour channel