Application of improved edge detection algorithm in medical image processing

Publisher:风清扬yxLatest update time:2011-07-20 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
0 Introduction
Edge detection is an important part of image processing. Image edge is a reflection of the discontinuity of local characteristics of an image (grayscale mutation, color mutation, texture structure mutation, etc.), which marks the end of one area and the beginning of another area. In actual image processing problems, the edge of an image, as a basic feature of the image, is often applied to higher-level image applications. At the same time, it has a wide range of applications in image recognition, image segmentation, image enhancement, and image compression. There are many ways to detect image edges. There are two major frameworks: one is the traditional detection method based on edge detection operators; the other is the multi-scale edge detection algorithm based on wavelets. However, wavelet transform is not the best when used to process images, because the edge extracted by the image edge detection method based on wavelet transform has only limited directions, while the direction of the edge of a natural image may be arbitrary, so the edge extracted by the wavelet edge extraction method cannot best approximate the image edge; the traditional Robert, Sobel, Prewitt, Kirach, and Laplacian operators are sensitive to noise and are not ideal in processing actual images. Through research, this paper proposes a method based on the canny edge detection operator and combined with contour tracking. While enhancing the edge of the object, improving the contrast and effectively suppressing the noise, it also solves the problem of edge breakage caused by the traditional edge detection operator in the edge detection process, thereby ensuring that the detected edge is continuous, single and clear. It is a practical image processing method. Finally, the improved algorithm is applied to the edge detection of actual medical images, and the detection effect is compared with that of the traditional edge detection operator, so as to draw a conclusion.

1 Basic principles of Carmy operator
1.1 Smoothing image
The Canny operator selects a suitable one-dimensional Gaussian function to smooth and denoise the image f(x, y) by row and column, which is equivalent to the convolution of the image signal. The selected Gaussian function is:
c.jpg
Where: σ is the standard deviation of the Gaussian curve, which controls the degree of smoothing.
1.2 Calculating the amplitude and direction of the gradient
The Canny operator uses the finite difference of the first-order partial derivative of the 2×2 neighborhood to calculate the gradient amplitude and gradient direction of the smoothed data array I(x, y). The two arrays Px[i,j] and Py[i,j] of partial derivatives in the x and y directions are:
d.jpg
The gradient magnitude and gradient direction of the pixel are:
e.jpg

1.3 Obtaining edges
In order to extract single-pixel wide edges, the gradient amplitude map must be refined. In the gradient amplitude image, ridge bands will be generated near the location of the maximum value of M[i,j]. Only by refining these ridge bands can the location of the edge be accurately determined, and only the points with the largest local amplitude changes are retained. This process is called non-maximum suppression. In the non-maximum suppression process, the Canny operator uses a 3×3 size, 8-directional neighborhood to interpolate the gradient amplitude of all pixels in the gradient amplitude array M[i,j] along the gradient direction. At each point, the center pixel M[i,j] of the neighborhood is compared with the interpolation results of the two gradient amplitudes along the gradient direction. If the amplitude of the neighborhood center point M[i,j] is not greater than the two interpolation results in the gradient direction, the edge flag corresponding to M[i,j] is assigned to 0. This process refines the M[ij] wide ridge band to one pixel wide and retains the gradient amplitude of the ridge.
For the sub-image N[i,j] that has been subjected to non-maximum suppression and gradient histogram classification, two high and low thresholds thrA and thrl are used respectively, and the grayscale of pixels with gradients less than the threshold is set to 0, and two threshold edge images TH[i,j] and TL[i,j] are obtained by segmentation. Since the image TH[i,j] is obtained by a high threshold, there are few pseudo edges, but TL[i,j] retains more comprehensive edge information, but also contains some pseudo edges. Therefore, based on the image TH[i,j], the image TL[i,j] is used as a supplement to obtain a relatively comprehensive edge.
1.4 Contour tracking or contour extraction
After performing canny edge detection on an image, some detected edges may be broken or discontinuous. In order to solve this problem, the edges of the target detection objects can be continuous and the redundant pseudo edges can be removed. After edge detection, the image is then subjected to boundary tracking, which can improve this problem.
For binary images, the basic method of contour extraction is to hollow out internal points, that is, if there is a point in the original image that is black and the other 8 adjacent points are all black, then delete the point. [page]

This paper draws on the binary image contour tracking method, that is, to compare each point with its 8 adjacent points. The specific method is as follows: (1) First find the first boundary pixel. Search from left to right and from bottom to top. The first white point found must be the bottom left boundary point, denoted as A0. At least one of its four adjacent points on the right, upper right, upper, and upper left is a boundary point, denoted as B0. Start from B0 and search in the order of right, upper right, upper, upper left, left, lower left, lower, and lower right to find the boundary point C0 among the 8 adjacent points. If C0 is A0, it means that a
circle has been made and the process ends; otherwise, continue to search from C0 until A0 is found; (2) Determine whether it is a boundary point: if none of its 8 adjacent points are white points, it is a boundary point. For boundary tracking, the contour edge width generated after tracking is only one pixel, which achieves a single and clear edge pixel point and well removes pseudo edge points.

2 Comparison of experimental results
To verify the algorithm in this paper, medical images are taken as an example to compare with traditional edge detection operators. The experiment shows that the method proposed in this paper has a good edge detection effect. The comparison results are shown in Figures 1 to 5.

a.JPG

b.JPG



3 Results Analysis
This paper adopts the processing method of performing Canny edge detection on the image first and then contour tracking. On the one hand, it can solve the edge break problem caused by the traditional edge detection algorithm, and it is easy to understand and implement, and has a good detection effect. On the other hand, the image is processed twice, which reduces the efficiency of image processing. In the application environment with high real-time processing requirements, this algorithm needs to be further improved.

Reference address:Application of improved edge detection algorithm in medical image processing

Previous article:Software Design of a Multi-channel Image Acquisition System
Next article:Design of real-time image test device based on LVDS technology

Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号