combining the result of sobel operator into a color egde detector
1 次查看(过去 30 天)
显示 更早的评论
i am applying sobel operator to each of the RGB color planes comprising the image. now, how can i combine these results into a color edge detector? and if i can then what are the difference between the resulting edges and the grayscale image? can i represent the resulting edges by matlab code?
采纳的回答
Image Analyst
2013-2-23
编辑:Image Analyst
2013-2-23
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
4 个评论
Image Analyst
2013-2-23
When you combine them, the combined image may show edges in one channel that didn't show up in the other channels. For example an edge that shows up in the blue channel may not show up in the red channel so the red channel appears to have less edge pixels. But when you combine them, any channel that had an edge at a location will show up, even if it's only one channel, so the combined image may seem to have more edges. To oversimplify, let's say the red channel had 1000 edge pixels, the green channel had 2000 edge pixels, and the blue channel had 3000 edge pixels. Now let's say that none of those pixels overlapped (were in the same location). So the most any single channel has is 3000 edge pixels but in the combined image you see 1000+2000+3000 = 6000 edge pixels, which is more than any one color channel had.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!