I don't think that will do what you think it will, but go ahead and see. Experiment and learn. You can combine the results with cat():
rgbImage = cat(3, redEdgeImage, greenEdgeImage, blueEdgeImage);
imshow(rgbImage);
You might want to convert to hsv color space:
hsv = rgb2hsv(rgbImage);
hImage = hsv(:,:,1);
sImage = hsv(:,:,2);
vImage = hsv(:,:,3);
and do edge detection on either the v channel or the h channel, depending on how you define edge. Again, experiment and see what you can get. There are papers on this in Vision Bib: Search Vision Bib
Best Answer