Image edge definition and understanding of first and second derivatives & gradient

1. Definition

Most of the information of the image exists in the edge of the image, which is mainly manifested as the discontinuity of the local features of the image, that is, the place where the gray level changes drastically in the image. Therefore, we define the edge as the boundary of the region where the gray level changes sharply in the image . According to the intensity of the gray level change, the edges are usually divided into two types : step-shaped and roof-shaped . The gray value changes on both sides of the step edge are obvious, and the roof edge is located at the junction of gray value increase and decrease.

2. Derivative understanding

Then, the first and second derivatives of the step edge and the roof edge can be used to express the change of the edge point. Therefore, for a step edge point, the first derivative of the gray change curve reaches the maximum value at that point, and the second derivative crosses zero at this point; for a roof edge point, the first order of the gray change curve The derivative crosses zero at this point; the second derivative reaches its maximum value at this point.

Move your brain to imagine that usually a picture is gradual, so the pixels on one line are the same, but the pixels on the two lines are indeed different, and each line is stacked to form a 3D surface. In the vertical direction of the line (that is, on the side of the surface, you can see a gray-scale change curve), just like a 3D topographic map, you can see a continuous curve from the side when you lower your body! (Anyway, I understand this way, if there is any mistake, I hope to correct it!)

3. Gradient

The gradient corresponds to the first derivative, and the gradient operator is the first derivative operator. When the edge gray value transition is sharp, and when the image noise is relatively small, the gradient operator works better, and the applied calculation direction is not considered.

 

 

Guess you like

Origin blog.csdn.net/weixin_44593822/article/details/114750238