Image edge detection method and system based on IIR digital differentiator

By using IIR digital differentializer to differential filtering and processing of images in image edge detection, the shortcomings of traditional methods in noise processing and edge positioning are solved, and higher accuracy and noise immunity are achieved.

CN119540265APending Publication Date: 2025-02-28ZHEJIANG UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411429881.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

Traditional image edge detection algorithms have limitations in dealing with noise and detail edges, especially noise-sensitive and inaccurate edge positioning.

Method used

An image edge detection method based on IIR digital differentiator is adopted to generate edge images by normalizing the original image, differential filtering in four directions, pixel point merging, maximum value normalization and threshold processing.

Benefits of technology

It improves the accuracy and noise immunity of edge detection, is simple to calculate, has a wide range of applications, and can effectively extract image edge information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119540265A_ABST
    Figure CN119540265A_ABST
Patent Text Reader

Abstract

The invention provides an IIR digital differentiator-based image edge detection method and system, and the method comprises the following steps: carrying out the normalization of a pixel value of an original image, and obtaining a normalized image; an IIR digital differentiator is used for filtering the normalized image in the rightward direction, the leftward direction, the downward direction and the upward direction, and four sub-images are obtained; pixel points of the four sub-images in the step S2 are combined into one image according to an operation mode; the pixel values of the images obtained through combination in the step S3 are processed in a maximum value normalization mode; and S4, applying a threshold value to the pixel value of the image obtained in the step S4 to obtain an edge image. According to the method, the IIR digital differentiator is used for carrying out edge detection on the image, image edge information is accurately extracted, noise is effectively suppressed, the defects of a traditional method in the aspects of accuracy and noise resistance are overcome, and the method has the advantages of being excellent in performance, high in accuracy, high in noise resistance and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of image processing, and in particular relates to an image edge detection method and system based on an IIR digital differentiator. Background Art

[0002] Image edge detection is an important technology in image processing, which aims to identify edge information in images and highlight the structural features and important details of images. Traditional edge detection algorithms such as the Sobel algorithm and the Canny algorithm detect edges by calculating the gradient strength and direction of images, but they have certain limitations when dealing with noise and detail edges. The Sobel algorithm uses a simple filter to approximate the first-order derivative of the image, but it is sensitive to noise and the edge location is not accurate enough. The Canny algorithm combines gradient calculation, non-maximum suppression and dual threshold processing, which has high accuracy but complex calculation and difficult parameter selection.

[0003] In recent years, edge detection methods based on digital differentiators have received widespread attention. As an important signal processing tool, digital differentiators can perform differential operations on signals to extract signal change information. In the field of image edge detection, by using digital differentiators to perform differential operations on images, image edge information can be effectively extracted. Summary of the invention

[0004] In view of the above defects, the present invention provides an image edge detection method and system based on IIR digital differentiator, which can effectively improve the accuracy and noise resistance of edge detection. The method is simple in calculation and has a wide range of applications.

[0005] The present invention provides the following technical solution: The present invention provides an image edge detection method based on an IIR digital differentiator, which can effectively improve the accuracy and noise resistance of edge detection. The method is simple in calculation and has a wide range of applications.

[0006] In order to achieve the above-mentioned object of the invention, the present invention adopts the following technical solution: an image edge detection method based on an IIR digital differentiator comprises the following steps:

[0007] S1, normalizing the pixel values ​​of the original image to obtain a normalized image;

[0008] S2, use the IIR digital differentiator to filter the normalized image in four directions: right, left, downward, and upward, respectively, to obtain four sub-images;

[0009] S3, merging the pixels of the four sub-images in step S2 into one image according to a calculation method;

[0010] S4, processing the pixel values ​​of the image obtained by merging in step S3 in a manner of maximum value normalization;

[0011] S5. Apply a threshold to the pixel values ​​of the image obtained in step S4 to obtain an edge image.

[0012] Furthermore, in step S1, the number of rows L1 and the number of columns L2 of the pixels on the original image are obtained by normalizing the pixel value f(i, j) of the original image to obtain the pixel value f(i, j) of the i-th row and j-th column of the original image after normalization. * (i, j):

[0013]

[0014] Among them, 1≤i≤L1,1≤j≤L2,f * (i, j) is the pixel value of the i-th row and j-th column after normalization of the original image, max(f(i, j)) and min(f(i, j)) are the maximum and minimum pixel values ​​in the original image, respectively.

[0015] Furthermore, in step S2, the frequency response of the IIR digital differentiator during normalization filtering is H(e jω , a, b):

[0016]

[0017] Where a=[a1,a2,...,a N ] T and b = [b0, b1, ..., b m ] T They are respectively the two frequency response denominator coefficients and the frequency response numerator coefficient vector of the IIR digital differentiator.

[0018] Furthermore, in step S2, the normalized image in S1 is differentiated using an IIR digital differentiator to extract edge information of the image in different directions along four directions: right, left, downward, and upward, and the pixel values ​​obtained are respectively and The four sub-images represent the edge strength of the image in the corresponding direction.

[0019] Furthermore, the IIR digital differentiator in step S2 is used to calculate the rate of change of the image obtained in step S1 in a certain direction, that is, the degree of change of the image intensity value.

[0020] Furthermore, in step S3, the edge information of the image in the horizontal and vertical directions is considered to obtain a comprehensive edge strength image The calculation method used is:

[0021]

[0022] Among them, 1≤i≤L1,1≤j≤L2, Emphasize the edge strength in the horizontal direction, Emphasizes edge strength in the vertical direction.

[0023] Furthermore, in step S4, the pixel values ​​of the image obtained by merging in step S3 are processed in a maximum value normalized manner to obtain a merged pixel normalized value

[0024]

[0025]

[0026] Among them, 1≤i≤L1, 1≤j≤L2, F m is the maximum pixel value of the image merged in step S3, and {} represents the value selected in the range of 1≤i≤L1 and 1≤j≤L2. The set of values, F m The value is in the collection Maximum value.

[0027] Furthermore, the calculation formula for applying a threshold to the pixel value obtained in step S4 in step S5 is as follows:

[0028]

[0029] Get the pixel value of the edge image Here, λ is a threshold value applied to the pixel value obtained in step S4, and 0<λ<1.

[0030] The present invention also provides an image edge detection system based on an IIR digital differentiator using the method as described above, comprising the following modules: an image normalization module, a sub-image generation module, a sub-image merging module, a maximum normalization module and an edge feature extraction module;

[0031] The image normalization module is used to normalize the pixel values ​​of the original image to obtain a normalized image;

[0032] The sub-image generation module is used to filter the normalized image in four directions, namely, rightward, leftward, downward and upward, using an IIR digital differentiator to obtain four sub-images;

[0033] The sub-image merging module is used to merge the sub-images into one image;

[0034] The maximum normalization module is used to normalize the maximum value of the merged image pixel value;

[0035] The edge feature extraction module is used to apply a threshold to the pixel value of the maximum normalized image to generate an edge image.

[0036] In summary, the present invention has significant improvements and advantages in terms of accuracy, noise resistance, scope of application and performance parameters of image edge detection, and provides an efficient and reliable edge detection technology for the field of image processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The present invention will be described in more detail below based on embodiments and with reference to the accompanying drawings, wherein:

[0038] Figure 1 A flowchart of an image edge detection method provided by an embodiment of the present invention;

[0039] Figure 2 Simulating an image containing diagonal edges for the present invention;

[0040] Figure 3 An ideal edge image corresponding to the simulation graphics implemented in the present invention;

[0041] Figure 4 The result diagram of the simulation image obtained by the present invention based on the IIR digital differentiator;

[0042] Figure 5 The result diagram of the simulation image obtained by the present invention based on the FIR digital differentiator;

[0043] Figure 6 This is a result diagram obtained by implementing the simulation image based on the Sobel mask method of the present invention;

[0044] Figure 7 This is a result diagram obtained by implementing the simulation image based on the Canny mask method of the present invention;

[0045] Figure 8 A system block diagram of an image edge detection method provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0046] In order to more clearly illustrate the embodiments of the present invention, the specific implementation methods of the present invention will be described below with reference to the accompanying drawings. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, other accompanying drawings and other implementation methods can be obtained based on these accompanying drawings without creative work.

[0047] like Figure 1 FIG. 1 is a flow chart of an image edge detection method based on an IIR digital differentiator provided by the present invention. The method provided by the present invention comprises the following steps:

[0048] S1, normalize the pixel values ​​of the original image to obtain a normalized image;

[0049] S2, use IIR digital differentiator to filter the normalized image in four directions (right, left, downward, and upward) to obtain four sub-images;

[0050] S3, merge the pixels of the four sub-images in S2 into one image according to the calculation method;

[0051] S4, processing the image pixel values ​​obtained by merging in S3 in a manner of normalizing the image pixel values ​​according to the maximum value;

[0052] S5, applying a threshold to the pixel values ​​of the image obtained in S4 to obtain an edge image.

[0053] Furthermore, in step S1, the number of rows L1 and the number of columns L2 of the pixels on the original image are obtained, and the pixel value f(i, j) of the original image is normalized to obtain the pixel value f of the i-th row and j-th column of the original image after normalization. * (i, j):

[0054]

[0055] Among them, 1≤i≤L1,1≤j≤L2,f * (i, j) is the pixel value of the i-th row and j-th column after normalization of the original image, max(f(i, j)) and min(f(i, j)) are the maximum and minimum pixel values ​​in the original image, respectively.

[0056] The frequency response of the further IIR digital differentiator filter normalized is H(e jω , a, b):

[0057]

[0058] Where a=[a1,a2,...,a N ] T and b = [b0, b1, ..., b m ] T They are the two terms of the frequency response denominator coefficients and the frequency response numerator coefficient vector of the IIR digital differentiator of the differentiator.

[0059] Further, in step S2, the normalized image in S1 is differentiated using an IIR digital differentiator to extract edge information of the image in different directions along the four directions of right, left, downward and upward, and the pixel values ​​are obtained respectively. and The four sub-images represent the edge strength of the image in the corresponding direction.

[0060] The IIR digital differentiator in step S2 is used to calculate the rate of change of the image obtained in step S1 in a certain direction, that is, the degree of change of the image intensity value.

[0061] Furthermore, in step S3, the edge information of the image in the horizontal and vertical directions is considered to obtain a comprehensive edge strength image, and the calculation method adopted is:

[0062]

[0063] Among them, 1≤i≤L1,1≤j≤L2, Emphasize the edge strength in the horizontal direction, Emphasizes edge strength in the vertical direction.

[0064] Furthermore, by adding the edge strengths in these two directions, a comprehensive edge strength image can be obtained, which reflects the edge information of the image more comprehensively.

[0065] Furthermore, this merging method aims to improve the accuracy and completeness of edge detection and ensure that the algorithm can fully utilize the edge information of the image in different directions.

[0066] Furthermore, in step S4, the pixel values ​​of the image merged in step S3 are processed in a maximum value normalized manner to obtain a merged pixel normalized value

[0067]

[0068] Among them, 1≤i≤L1, 1≤j≤L2, F m is the maximum pixel value of the image merged in step S3, and {} represents the value selected in the range of 1≤i≤L1 and 1≤j≤L2. The set of values, F m The value is in the collection Maximum value.

[0069] The calculation formula for applying a threshold to the pixel value obtained in step S4 in step S5 is as follows:

[0070]

[0071] Get the pixel value of the edge image Here, λ is a threshold value applied to the pixel value obtained in step S4, and 0<λ<1.

[0072] The present invention is simulated and tested. Figure 2 The image shown is 512×512 pixels with known diagonal edges. Figure 2 As the original image. The ideal edge image corresponding to this image is as follows Figure 3 shown.

[0073] In order to clarify the effect of the method provided by the present invention on the image edge detection method compared with the image edge detection method of the prior art, edge detection and extraction of the same image are performed using IIR digital differentiator, FIR digital differentiator, Sobel mask method and Canny mask method, namely Figure 5-Figure 7 The detection method is a comparison chart of the detection results of the comparative example of the present invention. The detection results of the present invention are Figure 4 .

[0074] The edge images based on the IIR digital differentiator and the FIR digital differentiator obtained by the method provided by the present invention are respectively as follows: Figure 4 and Figure 5 shown. Figure 6 and Figure 7 They are image processing toolbox based on MATALAB software, realizing edge images based on Sobelmask and Canny mask methods respectively.

[0075] For example Figure 3 As can be seen from the ideal edge image shown, Figure 4 The edge image obtained based on the IIR digital differentiator is similar to Figure 3 The ideal edge image shown is closest in edge brightness.

[0076] It is measured by the mean square error (MSE) and edge quality factor (FOM) between the edge image and the ideal edge image. Figure 4-Figure 7 The quality of the edge image. MSE is defined as

[0077]

[0078] Wherein, L1 and L2 represent the number of rows and columns of pixels in the original image, respectively, and f1(i, j) and f2(i, j) represent the pixel values ​​of the ideal edge image and the edge image at the pixel point (i, j), respectively.

[0079] FOM is defined as

[0080]

[0081] Where n1 and n2 are the numbers of edge pixels in the ideal edge image and edge image, respectively; d(k) is the Euclidean distance between the kth edge pixel in the edge image and the nearest edge pixel in the ideal edge image; κ represents the pixel shift loss factor, which is taken in the simulation of the present invention as

[0082] The smaller the MSE or the larger the FOM, the closer the edge image is to the ideal edge image. When MSE = 0 or FOM = 1, the edge image is completely consistent with the expected edge image.

[0083] The performance parameters of the simulated edge image are shown in Table 1.

[0084] Table 1 Performance parameters of simulated edge images

[0085]

[0086]

[0087] The error between the edge image based on IIR digital differentiator and the ideal edge image is 0. The edge image based on Canny mask has a small error compared to the ideal edge image. The edge image based on FIR DD and Sobel mask has a large error compared to the ideal edge image.

[0088] Furthermore, this embodiment discloses a system based on the image edge feature detection method described in the above embodiment, which includes the following modules: an image normalization module, a sub-image generation module, a sub-image merging module, a maximum normalization module and an edge feature extraction module;

[0089] An image normalization module is used to normalize the pixel values ​​of the original image to obtain a normalized image;

[0090] The sub-image generation module is used to filter the normalized image in four directions, namely, rightward, leftward, downward and upward, using an IIR digital differentiator to obtain four sub-images;

[0091] The sub-image merging module is used to merge the sub-images into one image;

[0092] The maximum normalization module is used to normalize the maximum value of the merged image pixel value;

[0093] The edge feature extraction module is used to apply a threshold to the pixel value of the maximum normalized image to generate an edge image.

[0094] The present invention utilizes an IIR digital differentiator to perform edge detection on an image, accurately extracts image edge information, and effectively suppresses noise, thereby solving the shortcomings of traditional methods in terms of accuracy and noise resistance, and has the advantages of superior performance, high accuracy, and strong noise resistance.

[0095] The above description is only a detailed description of the preferred embodiments and principles of the present invention. For ordinary technicians in this field, according to the ideas provided by the present invention, there will be changes in the specific implementation methods, and these changes should also be regarded as the protection scope of the present invention.

Claims

1. An image edge detection method based on IIR digital differentiator, characterized in that: The steps include: S1, normalizing the pixel values ​​of the original image to obtain a normalized image; S2, use the IIR digital differentiator to filter the normalized image in four directions: right, left, downward, and upward, respectively, to obtain four sub-images; S3, merging the pixels of the four sub-images in step S2 into one image according to a calculation method; S4, processing the pixel values ​​of the image obtained by merging in step S3 in a manner of maximum value normalization; S5. Apply a threshold to the pixel values ​​of the image obtained in step S4 to obtain an edge image.

2. The image edge detection method based on IIR digital differentiator according to claim 1, characterized in that: In step S1, the number of rows L1 and the number of columns L2 of the pixels on the original image are obtained, and the pixel value f(i, j) of the original image is normalized to obtain the pixel value f of the i-th row and j-th column of the original image after normalization. * (i, j): Among them, 1≤i≤L1,1≤j≤L2,f * (i, j) is the pixel value of the i-th row and j-th column after normalization of the original image, max(f(i, j)) and min(f(i, j)) are the maximum and minimum pixel values ​​in the original image, respectively.

3. The image edge detection method based on IIR digital differentiator according to claim 1, characterized in that: In step S2, the frequency response of the IIR digital differentiator during normalization filtering is H(e jω , a, b): Where a=[a1,a2,...,a N ] T and b = [b0, b1, ..., b m ] T They are respectively the two frequency response denominator coefficients and the frequency response numerator coefficient vector of the IIR digital differentiator.

4. The image edge detection method based on IIR digital differentiator according to claim 1, characterized in that: In step S2, the normalized image in S1 is differentiated using an IIR digital differentiator to extract edge information of the image in different directions along four directions: right, left, downward, and upward. The pixel values ​​obtained are: and The four sub-images represent the edge strength of the image in the corresponding direction.

5. The image edge detection method based on IIR digital differentiator according to claim 3, characterized in that: The IIR digital differentiator in step S2 is used to calculate the rate of change of the image obtained in step S1 in a certain direction, that is, the degree of change of the image intensity value.

6. The image edge detection method based on IIR digital differentiator according to claim 1, characterized in that: In step S3, the edge information of the image in the horizontal and vertical directions is considered to obtain a comprehensive edge strength image. The calculation method used is: Among them, 1≤j≤L1,1≤j≤L2, Emphasize the edge strength in the horizontal direction, Emphasizes edge strength in the vertical direction.

7. The image edge detection method based on IIR digital differentiator according to claim 1, characterized in that: In step S4, the pixel values ​​of the image obtained by merging in step S3 are processed in a maximum value normalized manner to obtain a merged pixel normalized value. Among them, 1≤i≤L1, 1≤j≤L2, F m is the maximum pixel value of the image merged in step S3, and {} represents the value selected in the range of 1≤i≤L1 and 1≤j≤L2. The set of values, F m The value is in the collection Maximum value.

8. The image edge detection method based on IIR digital differentiator according to claim 1, characterized in that: The calculation formula for applying a threshold to the pixel value obtained in step S4 in step S5 is as follows: Get the pixel value of the edge image Here, λ is a threshold value applied to the pixel value obtained in step S4, and 0<λ<1.

9. An image edge detection system based on an IIR digital differentiator using the method according to any one of claims 1 to 8, characterized in that: It includes the following modules: image normalization module, sub-image generation module, sub-image merging module, maximum normalization module and edge feature extraction module; The image normalization module is used to normalize the pixel values ​​of the original image to obtain a normalized image; The sub-image generation module is used to filter the normalized image in four directions, namely, rightward, leftward, downward and upward, using an IIR digital differentiator to obtain four sub-images; The sub-image merging module is used to merge the sub-images into one image; The maximum normalization module is used to normalize the maximum value of the merged image pixel value; The edge feature extraction module is used to apply a threshold to the pixel value of the maximum normalized image to generate an edge image.