Visual Image Feature Information Extraction (1)

1. Image edge and image smoothing Image edge is particularly important for analyzing visual images, and is an important basis for image analysis such as image segmentation, texture feature extraction, and shape feature extraction. 1. Image edge a. The most basic feature of an image is the edge. The so-called edge refers to the set of pixels in the image that have a step change or roof-like change in pixel grayscale. It exists in the target and the background, the target and the target, the area and the between regions, and is related to discontinuities in image brightness or the first derivative of image brightness, thus manifesting as step edges and line edges. b. Step edge: There is a significant difference in the pixel gray value of the image brightness on both sides of the discontinuity. This difference is visually manifested as the image transitions from a bright scene to a dark background, or vice versa. Therefore, the magnitude of the first derivative of the image brightness varies greatly at step edges. c. Line edge: The image brightness suddenly changes from one grayscale to another, and then quickly returns to the original or close to the original grayscale. Visually, the line edges are at the inflection points of gray value changes. Therefore, the first derivative of the image brightness at the edge is 0, and the second derivative has the largest magnitude. (A line edge actually contains two step edges, but the distance between them is shorter.
  

  
  
  


2. Image smoothing filtering g(x, y) Image filtering is realized by convolution    of the original input function f(x, y) and the impulse response h(x, y).

g(x,y) = f(x,y) h(x,y) g(x,y) is the filtered output image.

·Convolution becomes a weighted calculation of pixels, and the impulse response h[i,j] is a convolution template.

·Currently commonly used image smoothing filtering templates include mean convolution template, median convolution template and Gaussian convolution template. (The Gaussian convolution template is a linear template that calculates template weights directly from a two-dimensional zero-mean discrete Gaussian function)

Two-dimensional zero-mean discrete Gaussian function expression: h[i,j] = e(- )( is the mean square error of the Gaussian function, which controls the smoothing effect. The larger the value, the better the smoothness, but it also causes image features Too vague, generally take 1-10. )

 

2. First - order differential edge detection operator

Edge detection is very important in image processing and machine vision. For step edges, edge detection is actually a method of segmentation based on amplitude discontinuity, that is, detecting local features of changing types, such as sudden changes in gray values. , the sudden change of color, the sudden change of texture structure.

·Edge has two properties, direction and magnitude. For two-dimensional images, significant changes in their local properties can be detected using gradients.

Edge operator:

1.  Roberts edge operator: Using the local difference operator to find the edge operator, it provides a simple approximation method for calculating the gradient magnitude.

, where the convolution template | | , | is as follows:

     The position of the G difference value is at the interpolation point [i+1/2 , j+1/2] . The operator is [i+1/2 , j+1/2] . An approximation of the continuous gradient, not the approximation at the predicted point [i,j] .   

2.  Sobel edge operator: an approximate method for calculating gradient values, which calculates gradient values ​​in a 3*3 field, which avoids calculating gradients on interpolated points between pixels.

   The partial derivative at point [i,j] uses the following formula:

Where c=2 , , can be realized by convolution template Gx , Gy .

Gx =                 Gy = Each point in the image is convolved with these two templates. G responds most to vertical edges and G responds most to horizontal edges. This operator focuses on pixels close to the center of the template.

 

3.  Prewitt edge operator: The partial derivative form of the previous operator is exactly the same, except that C=1 .

4.  Kirsch edge operator: Each point in the image is convolved with eight templates, each of which responds maximally to a specific edge direction. The maximum value in all 8 directions is output as the edge magnitude image.

                  

 

                   

To solve the false edge points caused by noise (caused by high-frequency signals), first smooth the noise and then use the edge operator.

5.  Canny edge operator: The convolution operation of the original image and the first-order differential of the smoothed impulse response is directly used. The commonly used smoothing filter is the Gaussian function, and the Canny edge operator is the first derivative of the Gaussian function. Summarized as follows:

(1)  Smooth the image with a Gaussian filter.

(2)  Use the finite difference of the first-order partial derivatives to calculate the magnitude and direction of the gradient.

(3) 对梯度幅值进行非极大值抑制。

(4) 用双阈值算法检测和连接边缘。

6. 图像经过高斯平滑后边缘变得模糊,有计算梯度得到的边缘就具有一定的宽度,这种宽边缘变细的方法,叫做非极大点的抑制。

 

三.二阶微分边缘检测算子

·对于计算一阶导数的边缘检测,如果所求的一阶导数高于某一阈值,就确定该点为边缘点,这样有时就会导致检测的边缘点不唯一。对于阶跃边缘,其二阶导数在边缘点出现零交叉,及边缘点两旁二阶导数取异号。通过寻找图像灰度的二阶导数的零交叉点就能找到精确边缘点。

1. 拉普拉斯算子:在数字图像中,拉普拉斯算子可借助各种模板来实现。这里对模板的基本要求是对应中心像素的系数应该是负的,而对应中心像素邻近像素的系数应该是正,且他们的和应该为零,常用模板:

(1)      2

(2) 在采用拉普拉斯算子的边缘检测中,把二阶微分值的大小作为像素的灰度,对各个像素赋予位置的微分值,并以零值为中间灰度、正值为高灰度、负值为低灰度来表示。

(3) 特点:各向同性,线性和位移不变;对细线和孤立点检测效果好;但边缘方向信息丢失,常产生双像素的边缘,对噪声有双倍加强作用。用它检测边缘前一定要先对图像进行平滑。

2. LoG算子:马尔算子,,其中利用二阶导数算子过零点的性质,可确定图像中阶跃边缘的位置。利用LOG算子检测边缘实际就是寻找满足:的点。LOG算子是一个轴对称函数,该算子中,的选择很重要,过小时位置精度高但边缘细节变化多。LOG算子用于噪声较大的区域会产生高密度的过零点。

(1) 平滑滤波器是高斯滤波器

(2) 二维拉普拉斯函数

(3) 边缘检测判据是二阶导数零交叉点并对应一阶导数的较大峰值。

(4) 使用线性内插方法在子像素分辨率水平上估计边缘的位置。

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325725346&siteId=291194637