Using Sobel edge detection algorithm to detect color images and how to generate output images.

asked 2018-04-17 08:08:34 -0500

qdboy gravatar image

updated 2020-10-25 08:37:28 -0500

First of all, I want to point out that my English is very poor, please understand.

After using the edge of the Sobel operator to detect color images, a color image with edge information is often generated. How does the Sobel operator determine the color of each pixel in the color image?

As shown in the picture,image description

The left image is the original image, the right image is generated after the Sobel edge detection, as shown on the right, I want to detect the level of the liquid level after the Sobel edge detection, it is red, and the other edges of the detection are other colors, and this is why?

If I change the background to blue, the detected liquid level will be blue.

Why does the edge of the liquid level change with the color of the background, and what is the color of the image generated by Sobel based on the principle of color?

edit retag flag offensive close merge delete


it does not know anything about colors at all.

if you input a 3 channel input, it will filter each channel seperately, and your output will have 3 channels, too.

berak gravatar imageberak ( 2018-04-17 08:14:49 -0500 )edit

thank you After testing, it is true that the three channels of the original map are processed separately and then synthesized together, and I will continue to study why the color after the synthesis is red.

qdboy gravatar imageqdboy ( 2018-04-18 02:43:27 -0500 )edit

again, there is no "synthesis".

the "white" edges happened to have equally strong edges in all three channels, where it's red, the B and G edges were less strong.

berak gravatar imageberak ( 2018-04-18 02:49:55 -0500 )edit

I know what you mean. Maybe I didn't quite understand the meaning of the word "synthesis". I mean the merge () of channel merging. What I understand is that, for a color image, the channel is first separated (split ()), then the three channels are detected on the edge, and then the channel is merged with (merge ()). The "color edge" image in the graph is generated. Right? Once again, express my thanks

qdboy gravatar imageqdboy ( 2018-04-18 02:57:02 -0500 )edit