It's not so clear what you call an edge in a color image. Maybe you want to convert to hsv with rgb2hsv and use the hue channel. Or maybe posterize the image with rgb2ind(). Anyway, I attach an activecontour demo that I have, though it's not been customized for you, it's just one I have had and posted many times.
Best Answer