Image optimization method for edge image algorithm

Through multi-step image processing and convolutional neural network optimization, combined with multi-scale feature fusion and self-supervised learning, the existing edge detection methods are solved for the inaccurate edge detection in noise-sensitive and complex scenarios, and the edge detection effect is achieved with high accuracy and robustness.

CN120107129APending Publication Date: 2025-06-06YANGZHOU UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510027558.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-08
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

Existing edge detection methods are noise-sensitive, difficult to accurately capture edges in complex scenes, and pseudo-edge or edge fracture is prone to occur in images with large illumination changes or low contrast.

Method used

Through multi-step image processing, including noise reduction, grayscale, contrast enhancement, Canny edge detection and convolutional neural network optimization, edge features are extracted and optimized through multi-scale feature fusion technology and self-supervised learning mechanism.

Benefits of technology

Effectively remove image noise interference, extract more significant and accurate edge features, improve the accuracy and robustness of edge detection, and can stably obtain high-quality edge detection effects in complex scenes and high-noise environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120107129A_ABST
    Figure CN120107129A_ABST
Patent Text Reader

Abstract

The invention discloses an image optimization method for an edge image algorithm. The method comprises the following steps: preprocessing a pre-acquired image; performing contrast enhancement and preliminary edge detection on the preprocessed image to obtain an edge-enhanced image; using a Canny algorithm and morphological operation to extract a significant edge in the image after edge enhancement, remove a pseudo edge and connect a fractured part, and obtaining an image after edge extraction; and optimizing the image after edge extraction by using the trained convolutional neural network model and a multi-scale feature fusion technology to obtain an image after edge optimization. Through image processing including noise reduction, graying, contrast enhancement, Canny edge detection and convolutional neural network optimization, noise interference in the image can be effectively removed, more significant and accurate edge features are extracted, and a high-quality edge detection effect can still be stably obtained even in a complex scene or a high-noise environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to an image optimization method and system for an edge image algorithm, and belongs to the technical field of image optimization methods for an edge image algorithm. Background Art

[0002] In the field of image processing and computer vision, edge detection is one of the important steps in image understanding. Edge detection plays a key role in tasks such as image segmentation, object recognition, and feature extraction, because the edge contains a lot of information about the shape and structure of the object. However, in practical applications, images are often disturbed by various factors, such as noise, blur, and illumination changes, which will greatly reduce the effect of edge detection. Therefore, how to improve the accuracy and robustness of edge detection has always been the focus of researchers. Traditional edge detection methods, such as Sobel operator, Laplacian operator, and Canny edge detection, can extract edge information to a certain extent, but they are sensitive to noise and often have difficulty in accurately capturing the real edge in complex scenes. In addition, these methods are prone to pseudo-edge or edge break problems when processing images with large illumination changes or low contrast, which affects the final effect of tasks such as image segmentation and object detection. Summary of the invention

[0003] The technical problem to be solved by the present invention is to overcome the defects of the prior art and provide an image optimization method and system for edge image algorithm. The present invention uses multi-step image processing, and the image processing includes noise reduction, graying, contrast enhancement, Canny edge detection, convolutional neural network optimization, etc. The method can effectively remove noise interference in the image and extract more significant and accurate edge features. Even in complex scenes or high-noise environments, high-quality edge detection effects can still be stably obtained. The present invention utilizes multi-scale feature fusion technology. The method can effectively extract and fuse edge information of different scales, which can not only capture fine edge details, but also maintain the coherence and integrity of the overall edge. Therefore, in the face of image scenes containing various sizes and complex structures, the system can better adapt to different edge features, significantly improving the comprehensiveness and stability of detection.

[0004] Preferably, the present invention provides an image optimization method for edge image algorithm, comprising: Preprocessing the pre-acquired images; Performing contrast enhancement and preliminary edge detection on the preprocessed image to obtain an edge-enhanced image; The Canny algorithm and morphological operations are used to extract the significant edges in the edge-enhanced image, remove the pseudo edges, and connect the broken parts to obtain the edge-extracted image. The trained convolutional neural network model and multi-scale feature fusion technology are used to optimize the image after edge extraction to obtain an edge-optimized image.

[0005] Preferably, performing contrast enhancement and preliminary edge detection on the preprocessed image to obtain an edge-enhanced image includes: Adaptive contrast enhancement technology is used to perform local contrast enhancement on the image, and Sobel operator and Laplacian operator are used to perform preliminary edge detection on the image to obtain an edge-enhanced image.

[0006] Preferably, the Canny algorithm and morphological operation are used to extract significant edges in the edge-enhanced image, remove pseudo edges, and connect broken parts to obtain an edge-extracted image, including: Use Gaussian filtering to smooth the image and remove noise; Calculate the image gradient to obtain the direction and strength of the image edge; Use non-maximum suppression to remove non-edge responses; Adaptively adjust the high and low thresholds of the dual threshold detection in the Canny algorithm, and use the dual threshold detection to determine the edge of the image; Use the dilation and erosion operations in morphology to process the edges of the image; Expansion can connect the edges of broken parts and fill the gaps at the edges; Erosion is used to remove isolated pseudo edges, reduce noise interference at the edges, and obtain an image after edge extraction.

[0007] Prioritize training a convolutional neural network, including: Add residual connection to the convolutional neural network to construct a convolutional neural network model; Generate edge labels using pseudo-label generation mechanism; Based on the self-supervised learning mechanism, the convolutional neural network model is trained using edge labels, unlabeled image data and optimized edge images, and a mapping relationship between edge labels as output, unlabeled image data as input and optimized edge images as output is constructed to obtain a trained convolutional neural network model.

[0008] Preferably, the pre-acquired images are pre-processed, including: Perform noise reduction and grayscale processing on the pre-acquired image.

[0009] Preferably, an image optimization system for edge image algorithm comprises: A preprocessing module, used for preprocessing the pre-acquired image; An edge enhancement module is used to perform contrast enhancement and preliminary edge detection on the preprocessed image to obtain an edge-enhanced image; The edge extraction module is used to extract the significant edges in the edge-enhanced image and remove the pseudo edges and connect the broken parts by using the Canny algorithm and morphological operations to obtain the edge-extracted image; The edge optimization module is used to optimize the image after edge extraction by using the trained convolutional neural network model and multi-scale feature fusion technology to obtain an edge-optimized image.

[0010] Preferably, the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the methods described in the first aspect when executing the program.

[0011] Preferably, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any one of the methods described in the first aspect.

[0012] The beneficial effects achieved by the present invention are: 1. The present invention uses multi-step image processing, which includes noise reduction, grayscale, contrast enhancement, Canny edge detection, convolutional neural network optimization, etc. This method can effectively remove noise interference in the image and extract more significant and accurate edge features. Even in complex scenes or high-noise environments, high-quality edge detection effects can still be stably obtained.

[0013] 2. The present invention introduces a self-supervised learning mechanism. This method can use unlabeled data for edge optimization training and generate pseudo labels to guide the network to learn edge features, thereby reducing dependence on a large amount of labeled data. This is especially important in scenarios where labeled data is scarce, and significantly reduces the cost of model training.

[0014] 3. The present invention utilizes multi-scale feature fusion technology, which can effectively extract and fuse edge information of different scales. It can not only capture small edge details, but also maintain the coherence and integrity of the overall edge. Therefore, in the face of image scenes containing various sizes and complex structures, the system can better adapt to different edge features and significantly improve the comprehensiveness and stability of detection.

[0015] 4. The present invention introduces a residual connection structure into the convolutional neural network to ensure that the deep network will not cause the loss or weakening of edge information, and ensure that the edge features can be effectively maintained from the low layer to the high layer, so that the network can capture more delicate edge details during optimization, and the edge image finally generated is more refined and realistic. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0017] Figure 1 is a flow chart of some embodiments of the present application; DETAILED DESCRIPTION

[0018] Reference Figure 1 In a first embodiment of the present invention, the present invention provides an image optimization method for an edge image algorithm, comprising the following steps: S1. Preprocessing: Reduce noise interference in the image and simplify calculation through noise reduction and grayscale processing; S2, edge enhancement: perform local contrast enhancement and preliminary edge detection on the image to highlight edge features and obtain an edge-enhanced image; S3, edge extraction: use the Canny algorithm combined with morphological operations to extract significant edges in the image, remove pseudo edges and connect broken parts to obtain the edge-extracted image; S4, edge optimization: through convolutional neural network, self-supervised learning, and multi-scale feature fusion technology, the initially extracted edges are further optimized to remove redundant details and noise to obtain an edge-optimized image; S5. Output processing: Generate an optimized edge image and convert it into a format suitable for actual application scenarios.

[0019] Specifically, through multi-step image processing, including noise reduction, grayscale, contrast enhancement, Canny edge detection, convolutional neural network optimization, etc., this method can effectively remove noise interference in the image and extract more significant and accurate edge features. Even in complex scenes or high-noise environments, it can still stably obtain high-quality edge detection effects.

[0020] Preprocessing reduces random noise in the image by performing Gaussian filtering or median filtering on the input image, and then converts the color image into a grayscale image to simplify the calculation amount in the subsequent edge detection process.

[0021] Specifically, Gaussian filtering or median filtering is used to reduce noise on the input image. Gaussian filtering removes high-frequency noise while maintaining smoothness by weighted averaging the surrounding pixels of each pixel, and is suitable for general noise processing. Median filtering uses the median of the pixel values ​​in the window to replace the central pixel value, which is particularly effective for salt and pepper noise.

[0022] Grayscale processing: Convert color images to grayscale images. By taking a weighted average of the three RGB channels, the brightness information is retained and unnecessary color information is removed, thereby simplifying subsequent calculations and reducing complexity.

[0023] Edge enhancement uses adaptive contrast enhancement technology to enhance the local contrast of the image, highlight the edge features in the image, and combines the Sobel operator and Laplacian operator to perform preliminary edge detection on the image.

[0024] Specifically, contrast enhancement (adaptive contrast histogram equalization, CLAHE): The adaptive histogram equalization (CLAHE) technique is used to enhance the local contrast of the image. CLAHE divides the image into several small areas, performs histogram equalization on each area, and limits the maximum increment of contrast to avoid noise amplification caused by over-enhancement and ensure that edge features can be highlighted in different brightness areas.

[0025] Preliminary edge detection: The Sobel operator and Laplacian operator are combined to perform preliminary edge detection on the image.

[0026] The Sobel operator calculates the gradient of the image in the horizontal and vertical directions to obtain the edge amplitude map, highlighting the significant edge features.

[0027] The Laplacian operator responds to changes in all directions by calculating the second-order derivative of the image, and is suitable for detecting more subtle edges.

[0028] Edge extraction uses the Canny edge detection algorithm to extract significant edges in the image, combines morphological operations to remove pseudo edges, and connects broken edge parts. For different image scenes, the high and low thresholds in the Canny algorithm are adaptively adjusted.

[0029] Specifically, Canny edge detection: Canny edge detection includes multiple steps, including Gaussian smoothing, gradient calculation, non-maximum suppression, and dual threshold detection. Gaussian filtering is used to smooth the image and remove noise; image gradients are calculated to detect the direction and strength of the edge; non-maximum suppression is used to remove non-edge responses; and then dual threshold detection is used to determine the edge, using a high threshold to identify strong edges and a low threshold combined with a high threshold to connect weak edges.

[0030] Morphological operations: Combine the dilation and erosion operations in morphology to process edges.

[0031] Dilation can connect the edges of broken parts, fill in the gaps at the edges, and make the edges more continuous.

[0032] Erosion is used to remove isolated pseudo edges and reduce noise interference at the edges.

[0033] Adaptive Threshold Adjustment: Adaptively adjust the high and low thresholds in the Canny algorithm for different image scenes. Dynamically set the threshold by analyzing the histogram characteristics of the image to adapt to scenes with different brightness and contrast, and improve the effect and stability of edge extraction.

[0034] Edge optimization builds an optimization model based on the convolutional neural network (CNN) to optimize the initially extracted edges to remove redundant details and noise, and introduces a self-supervised learning mechanism to use unlabeled data for edge optimization training, reducing dependence on a large amount of labeled data.

[0035] Edge optimization is combined with multi-scale feature fusion technology to enhance edge capture through feature extraction networks of different scales, enhance the ability to retain edge information through residual connection structures, and enhance the network's capture of details.

[0036] Specifically, CNN optimization model: The initially extracted edges are optimized using a convolutional neural network (CNN). CNN can automatically learn edge features in images through multiple convolutional layers, has strong edge feature extraction and optimization capabilities, and improves edge accuracy.

[0037] Self-supervised learning mechanism: A self-supervised learning mechanism is introduced to use unlabeled data for edge optimization training. By designing a pseudo-label generation mechanism, edge labels are generated as training data for convolutional neural networks without manual labeling, reducing the dependence on a large amount of labeled data, and training can be performed on large-scale unlabeled data, thereby improving the generalization ability of the model.

[0038] Multi-scale feature fusion technology: The multi-scale feature fusion technology is used to extract features of different scales through a pyramid structure convolutional network. Convolution operations are performed on the features of each scale to enhance the ability to capture edges of different sizes. By fusing these features, it ensures a good response to both the overall and detailed information of the edge when processing complex scenes.

[0039] Residual connection structure: The residual connection structure is used to enhance the ability to retain edge information. Adding residual connections to CNN can effectively avoid the gradient vanishing problem and ensure that edge information is not weakened during the deep propagation process of the network, thereby improving the ability to capture edge details.

[0040] Output processing generates optimized edge images and performs corresponding format conversion and output based on image segmentation and object recognition.

[0041] Specifically, image format conversion and output: Generate optimized edge images and convert them to different formats according to actual application requirements, such as standardized processing for image segmentation or object recognition tasks. Support multiple output formats (such as JPEG, PNG) and provide them to downstream systems through standard interfaces (such as API) for further analysis and processing.

[0042] In an embodiment of the present application, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above methods when executing the program.

[0043] In an embodiment of the present application, the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0044] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0045] Those skilled in the art will readily appreciate other embodiments of the invention after considering the specification and practicing the invention invented herein. This application is intended to cover any variations, uses or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art that are not invented by the present invention. The specification and examples are intended to be exemplary only, and the true scope and spirit of the invention are indicated by the claims.

[0046] The above specific implementation methods further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above are only specific implementation methods of the present application and are not used to limit the protection scope of the present application. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solutions of the present application should be included in the protection scope of the present application.

Claims

1. An image optimization method for edge image algorithm, characterized in that: include: Preprocessing the pre-acquired images; Performing contrast enhancement and preliminary edge detection on the preprocessed image to obtain an edge-enhanced image; The Canny algorithm and morphological operations are used to extract the significant edges in the edge-enhanced image, remove the pseudo edges, and connect the broken parts to obtain the edge-extracted image. The trained convolutional neural network model and multi-scale feature fusion technology are used to optimize the image after edge extraction to obtain an edge-optimized image.

2. The image optimization method for edge image algorithm according to claim 1, characterized in that: Perform contrast enhancement and preliminary edge detection on the preprocessed image to obtain an edge-enhanced image, including: Adaptive contrast enhancement technology is used to perform local contrast enhancement on the image, and Sobel operator and Laplacian operator are used to perform preliminary edge detection on the image to obtain an edge-enhanced image.

3. The image optimization method for edge image algorithm according to claim 1, characterized in that: The Canny algorithm and morphological operations are used to extract the significant edges in the edge-enhanced image, remove the pseudo edges, and connect the broken parts to obtain the edge-extracted image, including: Use Gaussian filtering to smooth the image and remove noise; Calculate the image gradient to obtain the direction and strength of the image edge; Use non-maximum suppression to remove non-edge responses; Adaptively adjust the high and low thresholds of the dual threshold detection in the Canny algorithm, and use the dual threshold detection to determine the edge of the image; Use the dilation and erosion operations in morphology to process the edges of the image; Expansion can connect the edges of broken parts and fill the gaps at the edges; Erosion is used to remove isolated pseudo edges, reduce noise interference at the edges, and obtain an image after edge extraction.

4. The image optimization method for edge image algorithm according to claim 1, characterized in that: The convolutional neural network is trained, including: Add residual connection to the convolutional neural network to construct a convolutional neural network model; Generate edge labels using pseudo-label generation mechanism; Based on the self-supervised learning mechanism, the convolutional neural network model is trained using edge labels, unlabeled image data and optimized edge images, and a mapping relationship between edge labels as output, unlabeled image data as input and optimized edge images as output is constructed to obtain a trained convolutional neural network model.

5. The image optimization method for edge image algorithm according to claim 1, characterized in that: Preprocess the pre-acquired images, including: Perform noise reduction and grayscale processing on the pre-acquired image.

6. An image optimization system for edge image algorithm, characterized in that: include: A preprocessing module, used for preprocessing the pre-acquired image; An edge enhancement module is used to perform contrast enhancement and preliminary edge detection on the preprocessed image to obtain an edge-enhanced image; The edge extraction module is used to extract the significant edges in the edge-enhanced image and remove the pseudo edges and connect the broken parts by using the Canny algorithm and morphological operations to obtain the edge-extracted image; The edge optimization module is used to optimize the image after edge extraction by using the trained convolutional neural network model and multi-scale feature fusion technology to obtain an edge-optimized image.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method according to any one of claims 1 to 6 are implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • Crack detection method based on automatic pseudo label filling

    CN115880224A

  • A crack detection method based on automatic filling pseudo-labels

    CN115880224B