A method, system and device for edge detection of multi-phase material images

By performing color saturation enhancement, morphological erosion and convolution filtering on multi-phase material images, combined with the edge detection method of different weight operators and three thresholds, the existing technology solves the problem of unclear edge information extraction of multi-phase material images. problem, achieving higher edge detection accuracy and robustness.

CN118710671BActive Publication Date: 2025-01-21WUHAN INST OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410767557.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-14
Publication Date
2025-01-21
Estimated Expiration
2044-06-14

AI Technical Summary

Technical Problem

The prior art is difficult to accurately extract edge information when facing complex multiphase material images, especially under conditions of high noise, small chromatic aberration and weak gradient changes, and problems of error detection and unclear edge information are prone to occur.

Method used

By performing color saturation enhancement, morphological erosion, convolution filtering, and an edge detection method using two different weight operators combined with three thresholds on multiphase material images, edge information is gradually extracted and enhanced.

Benefits of technology

It improves the accuracy and robustness of edge detection, can better handle complex backgrounds and situations with a lot of noise, and provides clearer and more accurate edge information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118710671B_ABST
    Figure CN118710671B_ABST
Patent Text Reader

Abstract

The present invention relates to a method, system and device for edge detection of multiphase material images, the method comprising: obtaining an original image of the multiphase material; performing color saturation enhancement processing on the original image to obtain a first image; performing morphological corrosion processing on the first image to obtain a second image; performing convolution filtering processing on the second image to obtain a third image; performing edge detection on the third image using an edge detection method with two different weight operators combined with a three-threshold value to obtain a fourth image; and performing edge information enhancement processing on the fourth image to obtain a fifth image. The present invention effectively solves the problem that the existing edge detection methods are not ideal for extracting edge information from multiphase material images with complex features, obvious noise, weak edge information due to small color difference, and partial misdetection. It can usually maintain better stability and accuracy when processing complex backgrounds and more noise, and has lower cost and better universality than other methods.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing, and in particular to a method, system and device for detecting edges of multi-phase material images. Background Art

[0002] Asphalt concrete belongs to multiphase materials. At present, the research and application of asphalt concrete in China are gradually increasing, and the analysis of its mesostructure strength formation mechanism is imperative. The edge extraction effect in asphalt concrete is affected by multiple edges, blurred and discontinuous edges, illumination and noise, scale and perspective changes, and objects intersecting and overlapping. There are a lot of textures and structures interweaving and superposition, which makes it difficult to clearly define and extract the edges. Complex textures, structures and small color differences can easily interfere with the accuracy of edge extraction algorithms. When facing multiple and blurred edges and a lot of texture noise, the commonly used filtering algorithms often cannot filter out small noises when using convolution filters with too small filter kernels, while using too large filter kernels will blur the weak edge information. Traditional edge extraction algorithms can often only extract the main edges, and have difficulties with edges with small color differences and weak gradient changes. When facing the complex noise interference of multiphase materials of asphalt concrete, false detection often occurs, making the extracted edge information unclear and inaccurate. Summary of the invention

[0003] The present invention provides a method, system and device for detecting edge of a multi-phase material image to solve at least one of the above technical problems.

[0004] The technical solution of the present invention to solve the above technical problem is as follows: a method for edge detection of multi-phase material images, comprising:

[0005] S1, obtain the original image of multiphase materials;

[0006] S2, performing color saturation enhancement processing on the original image to obtain a first image;

[0007] S3, performing morphological corrosion processing on the first image to obtain a second image;

[0008] S4, performing convolution filtering on the second image to obtain a third image;

[0009] S5, performing edge detection on the third image using two different weight operators combined with a three-threshold edge detection method to obtain a fourth image;

[0010] S6, performing edge information enhancement processing on the fourth image to obtain a fifth image.

[0011] Based on the above technical solution, the present invention can also be improved as follows.

[0012] Further, the S2 is specifically:

[0013] The original image is converted from the RGB color space to the HSV color space, and then converted back to the RGB color space after increasing the saturation, to obtain the first image.

[0014] Further, the S3 is specifically:

[0015] S31, determining any pixel point in the first image as a pixel point to be corroded, selecting a structural element from the neighborhood of the pixel point to be corroded; comparing all elements in the structural element with the pixel value of the pixel point to be corroded; if all elements in the structural element match the pixel value of the pixel point to be corroded, retaining the pixel point to be corroded; otherwise, setting the pixel value of the pixel point to be corroded to 0;

[0016] S32, traverse all pixel points in the first image, and use the method of S31 to corrode each pixel point in the first image.

[0017] Further, in S4, a Gaussian function is used to perform convolution filtering on the second image.

[0018] Further, in S5, the two different weight operators include a first operator and a second operator, and the weight of the first operator is lower than the weight of the second operator; the three thresholds include a first threshold, a second threshold and a third threshold, and the first threshold is lower than the second threshold, and the second threshold is lower than the third threshold; S5 is specifically:

[0019] S51, using the first operator to perform gradient calculation on each pixel in the third image to obtain a first gradient value of each pixel in the third image;

[0020] S52, comparing the first gradient value of each pixel in the third image with the first threshold and the third threshold respectively, marking the pixel in the third image whose first gradient value is higher than the third threshold as a strong edge pixel and retaining it, marking the pixel in the third image whose first gradient value is lower than the first threshold as a non-edge pixel and removing it, marking the pixel in the third image whose first gradient value is between the first threshold and the third threshold as a secondary detection pixel and retaining it;

[0021] S53, using the second operator to perform gradient calculation on each secondary detection pixel point in the third image to obtain a second gradient value of each secondary detection pixel point in the third image;

[0022] S54, comparing the second gradient value of each secondary detection pixel in the third image with the second threshold, marking the secondary detection pixel in the third image whose second gradient value is higher than the second threshold as weak edge pixel and retaining it, marking the secondary detection pixel in the third image whose second gradient value is lower than the second threshold as non-edge pixel and removing it;

[0023] S55, gradually edge-connecting all the strong edge pixels and weak edge pixels in the third image to obtain a fourth image.

[0024] Furthermore, before S55, the method further includes:

[0025] Non-maximum suppression processing is performed on all strong edge pixels and weak edge pixels in the third image.

[0026] Further, both the strong edge pixels and the weak edge pixels in the third image are taken as edge pixels; and non-maximum suppression processing is performed on all the strong edge pixels and the weak edge pixels in the third image, specifically:

[0027] Step 1: Take any edge pixel point in the third image as a pixel point to be suppressed, and compare the gradient value of the pixel point to be suppressed with the gradient values ​​of the adjacent edge pixel points on both sides of the gradient direction of the pixel point to be suppressed; if the gradient value of the pixel point to be suppressed is not the maximum value among the gradient values ​​of the adjacent edge pixel points on both sides of the gradient direction of the pixel point to be suppressed, then set the edge strength of the pixel point to be suppressed to 0; otherwise, retain the edge strength of the pixel point to be suppressed;

[0028] Step 2, traversing all edge pixels in the third image, and performing non-maximum suppression processing on each edge pixel in the third image using the method of step 1;

[0029] Among them, if the edge pixel point is a strong edge pixel point, the gradient value of the edge pixel point is the first gradient value calculated using the first operator; if the edge pixel point is a weak edge pixel point, the gradient value of the edge pixel point is the second gradient value calculated using the second operator.

[0030] Further, the S6 is specifically:

[0031] Performing Gaussian filtering on the fourth image to obtain a Gaussian filtered image;

[0032] The pixel value of each pixel in the Gaussian filtered image is compared with a preset pixel threshold, and the pixel in the Gaussian filtered image whose pixel value is less than the preset pixel threshold is set to black.

[0033] Based on the above-mentioned multi-phase material image edge detection method, the present invention also provides a multi-phase material image edge detection system.

[0034] A multi-phase material image edge detection system, comprising:

[0035] An image acquisition module, which is used to acquire an original image of a multiphase material;

[0036] A color enhancement module, used for performing color saturation enhancement processing on the original image to obtain a first image;

[0037] An image erosion module, configured to perform morphologically based erosion processing on the first image to obtain a second image;

[0038] A convolution filtering module, used for performing convolution filtering on the second image to obtain a third image;

[0039] An edge detection module, which is used to perform edge detection on the third image by using two different weight operators combined with a three-threshold edge detection method to obtain a fourth image;

[0040] An information enhancement module is used to perform edge information enhancement processing on the fourth image to obtain a fifth image.

[0041] Based on the above-mentioned method for detecting edge of a multi-phase material image, the present invention further provides a device for detecting edge of a multi-phase material image.

[0042] A device for detecting edge of a multi-phase material image comprises a processor, a memory and a computer program stored in the memory. When the computer program is executed by the processor, the method for detecting edge of a multi-phase material image as described above is implemented.

[0043] The beneficial effects of the present invention are as follows: a method, system and device for edge detection of multiphase material images of the present invention sequentially perform color saturation enhancement processing, corrosion processing, convolution filtering processing, edge detection and edge information enhancement processing on the original image of the multiphase material; wherein, the color saturation enhancement processing can make the color contrast of different areas of the image more obvious; the corrosion processing can fill small holes and gaps in the image, realize image smoothing and boundary extraction to a certain extent, remove isolated pixels and noise, and separate connected objects; the convolution filtering processing can effectively remove high-frequency noise superimposed on the image, blur details, and thus achieve the effect of smoothing the image; the edge detection method using two different weight operators combined with three thresholds can capture edge information in the image at different scales and directions, thereby improving the accuracy and robustness of edge detection; the present invention effectively solves the problem that the existing edge detection method has unsatisfactory effect of extracting edge information from multiphase material images with complex features, obvious noise, weak edge information due to small color difference, and partial misdetection, and can usually better maintain stability and accuracy when processing complex backgrounds and more noise, and has lower cost and better universality than other methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 A flow chart of a method for edge detection of a multi-phase material image according to the present invention;

[0045] Figure 2 This is a diagram showing the image changes during the edge detection process of the original image of the poured asphalt concrete section using the method of the present invention;

[0046] Figure 3 This is a result diagram of edge detection of an original image using the Canny edge detection algorithm, the HED deep learning algorithm and the method of the present invention;

[0047] Figure 4 This is a graph showing the relationship between edge detection accuracy and the number of iterations in the HED deep learning algorithm;

[0048] Figure 5 The structure diagram of a multi-phase material image edge detection system of the present invention is shown in FIG. DETAILED DESCRIPTION

[0049] The principles and features of the present invention are described below in conjunction with the accompanying drawings. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention.

[0050] like Figure 1 As shown, a method for edge detection of a multi-phase material image comprises:

[0051] S1, obtain the original image of multiphase materials;

[0052] S2, performing color saturation enhancement processing on the original image to obtain a first image;

[0053] S3, performing morphological corrosion processing on the first image to obtain a second image;

[0054] S4, performing convolution filtering on the second image to obtain a third image;

[0055] S5, performing edge detection on the third image using two different weight operators combined with a three-threshold edge detection method to obtain a fourth image;

[0056] S6, performing edge information enhancement processing on the fourth image to obtain a fifth image.

[0057] The invention discloses a method for edge detection of multiphase material images, specifically, the original image of the multiphase material is subjected to color saturation enhancement processing, corrosion processing, convolution filtering processing, edge detection and edge information enhancement processing in sequence; wherein, the color saturation enhancement processing can make the color contrast of different areas of the image more obvious; the corrosion processing can fill small holes and gaps in the image, realize image smoothing and boundary extraction to a certain extent, remove isolated pixels and noise, and separate connected objects; the convolution filtering processing can effectively remove high-frequency noise superimposed on the image, blur details, and thus achieve the effect of smoothing the image; and the edge detection method using two different weight operators combined with three thresholds can capture edge information in the image at different scales and directions, thereby improving the accuracy and robustness of edge detection.

[0058] Each step of the method of the present invention is described in detail below.

[0059] In S1, the method for obtaining the original image of the multi-phase material is:

[0060] Under the supplementary lighting of the light source equipment, the multiphase material is photographed by a camera to obtain the original image.

[0061] Among them, the light source equipment can provide relatively evenly distributed D65 lighting with a color temperature of about 6500K, and provide a white balanced light source.

[0062] Taking the multiphase material of poured asphalt concrete as an example, when acquiring the original image, a stable D65 light source is used to illuminate the prepared multiphase material of poured asphalt concrete, and a camera device is used to photograph the cross section of the poured asphalt concrete to obtain the original image of the multiphase material.

[0063] In S2, the color saturation enhancement processing is performed on the original image in order to improve the saturation of the image and make the color contrast of different areas of the image more obvious. Specifically, S2 is:

[0064] The original image is converted from the RGB color space to the HSV color space, and then converted back to the RGB color space after increasing the saturation, to obtain the first image.

[0065] Specifically, the conversion process of converting the original image from the RGB color space to the HSV color space is as follows:

[0066] V = max(R, G, B);

[0067] S = (V - min (R, G, B)) / V (if V ≠ 0, otherwise S = 0);

[0068] H={0(if S=0)

[0069] 60*(GB) / (V-min(R,G,B))+60(if R=V)

[0070] 60*(BR) / (V-min(R,G,B))+180(if G=V)

[0071] 60*(RG) / (V-min(R,G,B))+300(if B=V)};

[0072] In the RGB color space, the value of each color represents the intensity level of red (R), green (G), and blue (B), and usually ranges from 0 to 255.

[0073] In the HSV color space, hue indicates the type or category of color, which can be regarded as the position of the color on the color wheel, and its value range is usually 0 to 360 degrees; saturation indicates the purity or brightness of the color, which describes the relative proportion of color to gray. When it is 0, it means grayscale color, and when it is 100%, it means completely bright color; value indicates the brightness or lightness of the color, which controls the brightness of the color. When it is 0, it means black, and when it is 100%, it means white.

[0074] In the HSV color space, the conversion process to RGB color space after increasing the saturation is as follows:

[0075] C = V * S;

[0076] X = C*(1-|(H / 60)%2-1|);

[0077] m=VC;

[0078] (R, G, B) = {(C + m, X + m, m) (if 0 ≤ H < 60)

[0079] (X+m,C+m,m)(if 60≤H<120)

[0080] (m,C+m,X+m)(if 120≤H<180)

[0081] (m,X+m,C+m)(if 180≤H<240)

[0082] (X+m,m,C+m)(if 240≤H<300)

[0083] (C+m,m,X+m)(if 300≤H<360)};

[0084] In S3, the corrosion process can fill small holes and gaps in the image, achieve image smoothing and boundary extraction to a certain extent, remove isolated pixels and noise, and separate connected objects. S3 is specifically:

[0085] S31, determining any pixel point in the first image as a pixel point to be corroded, selecting a structural element from the neighborhood of the pixel point to be corroded; comparing all elements in the structural element with the pixel value of the pixel point to be corroded; if all elements in the structural element match the pixel value of the pixel point to be corroded, retaining the pixel point to be corroded; otherwise, setting the pixel value of the pixel point to be corroded to 0;

[0086] S32, traverse all pixel points in the first image, and use the method of S31 to corrode each pixel point in the first image.

[0087] Specifically, the first image is processed using a morphological algorithm, a square structural element is selected from the neighborhood of each pixel of the first image for erosion operation, and all elements in the structural element are compared with the pixel value at the corresponding position of the first image. If all elements in the structural element match the pixel value at the corresponding position (that is, the result of the logical AND operation is true), the pixel is retained and the next pixel is processed. Otherwise, the value of the pixel is set to 0. This is a process of eroding the image step by step, pixel by pixel. Morphological erosion processing will shrink or remove the boundaries of objects in the image, remove some noise in the image, separate connected objects, and thus separate continuous overlapping edges.

[0088] In S4, a Gaussian function is used to perform convolution filtering on the second image.

[0089] Specifically, a Gaussian kernel is used to perform convolution filtering on the second image. The core idea of ​​the Gaussian filter is based on the weight distribution of a two-dimensional Gaussian function. A two-dimensional Gaussian function is a bell-shaped curve with a maximum value (i.e., the center point) and a gradually decreasing amplitude, and its expression is:

[0090]

[0091] For each pixel (x, y) of the second image, the Gaussian filter performs a weighted average of the grayscale values ​​of the pixels in its domain, where the weight is provided by a two-dimensional Gaussian function. The filtering operation can effectively remove high-frequency noise superimposed on the image and blur details, thereby achieving the effect of smoothing the image.

[0092] Edges are usually characterized by pixel positions that change dramatically, so it is necessary to calculate the gradient information of each pixel in the image. Gradient is the speed at which a quantity changes. In mathematics, derivatives and partial derivatives are usually used to obtain gradients or gradients in a certain direction. In digital images, gradients can be seen as the speed at which pixel values ​​change in the X and Y directions, respectively. Due to the discreteness of digital images and the characteristic that pixels are the smallest processing units, when calculating the gradient of digital images, there is no need to take derivatives, only addition and subtraction operations are required. This can be achieved using edge detection operators to calculate the gradient intensity (i.e., gradient value) and gradient direction of the image in the horizontal and vertical directions. Operators with smaller weights have lower precision but stronger anti-interference ability. Operators with larger weights are more complex to calculate and can detect edges with smaller changes, but they are sensitive to details and are also very sensitive to noise.

[0093] In order to better grasp the complexity of edge information of multi-phase material images, S5 of the present invention uses a method combining two edge detection operators with different weights to calculate edge information. First, an operator with a smaller weight is used for calculation to effectively avoid false detection caused by noise; for problems with weak edge information caused by small color differences, an operator with a larger weight is used for accurate calculation.

[0094] In the S5, the two operators with different weights include a first operator and a second operator, and the weight of the first operator is lower than the weight of the second operator; the three thresholds include a first threshold, a second threshold and a third threshold, and the first threshold is lower than the second threshold, and the second threshold is lower than the third threshold; the S5 is specifically:

[0095] S51, using the first operator to perform gradient calculation on each pixel in the third image to obtain a first gradient value of each pixel in the third image;

[0096] by and Taking the first operator as an example, the calculation process of the first gradient value G1 is as follows:

[0097] First, calculate the gradient value G of each pixel in the third image in the x and y directions 1x and G 1y , and its calculation formula is:

[0098]

[0099] A represents the third image;

[0100] Then according to the gradient value G of each pixel in the x and y directions 1x and G 1y , the first gradient value G1 of each pixel can be obtained. The calculation formula of the gradient value G1 of the pixel is:

[0101]

[0102] According to the gradient value G of each pixel in the x and y directions 1x and G 1y , we can also calculate the first gradient direction of the pixel point. The calculation formula of the first gradient direction θ1 of the pixel point is:

[0103]

[0104] S52, compare the first gradient value of each pixel in the third image with the first threshold and the third threshold respectively, mark the pixel points in the third image whose first gradient value is higher than the third threshold as strong edge pixels and retain them, mark the pixel points in the third image whose first gradient value is lower than the first threshold as non-edge pixels and remove them, and mark the pixel points in the third image whose first gradient value is between the first threshold and the third threshold as secondary detection pixels and retain them.

[0105] S53, using the second operator to perform gradient calculation on each secondary detection pixel point in the third image to obtain a second gradient value of each secondary detection pixel point in the third image;

[0106] by and Taking the second operator as an example, the calculation process of the second gradient value is as follows:

[0107] First, calculate the gradient value G of each secondary detection pixel in the third image in the x and y directions 2x and G 2y , and its calculation formula is:

[0108]

[0109] A represents the third image;

[0110] Then according to the gradient value G of each secondary detection pixel in the x and y directions 2x and G 2y , the gradient value of each secondary detection pixel can be obtained. The calculation formula of the gradient value of the secondary detection pixel is:

[0111]

[0112] According to the secondary detection pixel point in the x and y directions of the gradient value G x and G y , the second gradient direction of the secondary detection pixel can also be calculated. The calculation formula of the second gradient direction θ2 of the secondary detection pixel is:

[0113]

[0114] S54, comparing the second gradient value of each secondary detection pixel in the third image with the second threshold, marking the secondary detection pixel in the third image whose second gradient value is higher than the second threshold as weak edge pixel and retaining it, marking the secondary detection pixel in the third image whose second gradient value is lower than the second threshold as non-edge pixel and removing it;

[0115] The operator with a larger weight can better approximate the derivative and has a higher accuracy. Using a large weight operator instead of a small weight operator can improve accuracy. Because the weight in the X or Y direction is increased, the gradient direction will not be too far from the X or Y direction, so the error will not be too large.

[0116] S55, gradually edge-connecting all the strong edge pixels and weak edge pixels in the third image to obtain a fourth image.

[0117] Preferably, before S55, the method further includes:

[0118] Non-maximum suppression processing is performed on all strong edge pixels and weak edge pixels in the third image.

[0119] The strong edge pixels and the weak edge pixels in the third image are all taken as edge pixels; and non-maximum suppression processing is performed on all the strong edge pixels and the weak edge pixels in the third image, specifically:

[0120] Step 1: Take any edge pixel point in the third image as a pixel point to be suppressed, and compare the gradient value of the pixel point to be suppressed with the gradient values ​​of the adjacent edge pixel points on both sides of the gradient direction of the pixel point to be suppressed; if the gradient value of the pixel point to be suppressed is not the maximum value among the gradient values ​​of the adjacent edge pixel points on both sides of the gradient direction of the pixel point to be suppressed, then set the edge strength of the pixel point to be suppressed to 0; otherwise, retain the edge strength of the pixel point to be suppressed;

[0121] Step 2, traversing all edge pixels in the third image, and performing non-maximum suppression processing on each edge pixel in the third image using the method of step 1;

[0122] Among them, if the edge pixel point is a strong edge pixel point, the gradient value of the edge pixel point is the first gradient value calculated using the first operator, and the gradient direction of the edge pixel point is the first gradient direction calculated using the first operator; if the edge pixel point is a weak edge pixel point, the gradient value of the edge pixel point is the second gradient value calculated using the second operator, and the gradient direction of the edge pixel point is the second gradient direction calculated using the second operator.

[0123] The purpose of performing non-maximum suppression on all strong edge pixels and weak edge pixels in the third image is to retain only local maximum points in the gradient direction of the pixels to refine the edges. Through non-maximum suppression, the edges can be made more refined and accurate, and the situation of overlapping edges is reduced, thereby improving the accuracy of edge detection.

[0124] After performing non-maximum suppression processing on all strong edge pixels and weak edge pixels in the third image, the weak edge pixels are connected with the strong edge pixels by gradually performing edge connection to form a continuous edge line, thereby obtaining a fourth image, i.e., a preliminary edge detection result.

[0125] In S6, the edge information enhancement process can obtain smooth and clear edge information.

[0126] The S6 is specifically:

[0127] Performing Gaussian filtering on the fourth image to obtain a Gaussian filtered image;

[0128] The pixel value of each pixel in the Gaussian filtered image is compared with a preset pixel threshold, and the pixel in the Gaussian filtered image whose pixel value is less than the preset pixel threshold is set to black.

[0129] Specifically, the fourth image is smoothed by using Gaussian filtering, which can reduce the noise in the line segment and make the line segment smoother. The pixel value of each pixel in the Gaussian filtered image is compared with the preset pixel threshold, and the pixel points in the Gaussian filtered image whose pixel value is less than the preset pixel threshold are set to black, and then the processed image is saved to obtain the fifth image, that is, the final edge detection image, so that smooth and clear edge information can be obtained.

[0130] The method of the present invention is described below with a specific example, wherein the multiphase material is cast-in-place asphalt concrete.

[0131] Place the prepared poured asphalt concrete cross-section sample into the light box device, turn on the D65 light with a color temperature of about 6500K, and provide a white-balanced light source. Then use a digital camera device with the focal length set to 35mm, the aperture set to f1.88, the ISO set to 200, and the exposure time set to 1 / 100s to collect images and obtain the original image of the poured asphalt concrete cross-section.

[0132] The collected original image is converted from the RGB color space to the HSV color space, the saturation value is increased by 50, and then converted back to the HSV color space.

[0133] Afterwards, the image is processed using a morphological algorithm, and a 7×7 square structure element is selected to gradually erode the image.

[0134] Then, the image is convolution filtered using a 15×15 Gaussian kernel.

[0135] For the image after convolution filtering, an edge detection algorithm with two different weight operators combined with three thresholds is used. In the edge detection algorithm, the low threshold is set to 70, the middle threshold is set to 80, and the high threshold is set to 90. The S5 method is used to successively use the small weight operator and the large weight operator for calculation, and finally the detection is completed by connecting the edges.

[0136] After that, the edge detection result image is smoothed using a 9×9 Gaussian kernel. Finally, the pixels whose pixel values ​​are less than the preset pixel threshold 220 are set to black, and then the processed image is saved to obtain the fifth image, that is, the final edge detection image.

[0137] The image change process of the original image of the poured asphalt concrete section during edge detection using the method of the present invention is as follows: Figure 2 The figure shows the image change process of the original image of the poured asphalt concrete section in the steps of color saturation enhancement, corrosion, convolution filtering, edge detection and edge information enhancement.

[0138] In order to better illustrate the technical advantages of the present invention, this embodiment selects commonly used image edge information detection methods, namely, X-Ray CT method, HED deep learning algorithm, an open source edge detection model commonly used in machine learning algorithms, and traditional Canny edge detection algorithm, and compares them with a multi-phase material image edge detection method proposed in the present invention from various aspects:

[0139] CT scanning technology is relatively mature. The principle is based on the relationship between the attenuation intensity of X-Ray and the composition of the object. Different materials have different absorption capabilities for X-rays due to their different densities. Therefore, the attenuation coefficients of X-Ray after the object are different. The X-Ray signal is converted into an electrical signal through the detection system. After a series of processing by the computer system, the image is reconstructed and output, so that the edge information of the image obtained is more accurate. However, in order to perform CT image recognition of asphalt concrete, the sample needs to be prepared, processed and fixed. CT scanning takes a long time, especially for large and complex samples. This may lead to failure to meet the requirements in real-time or high-efficiency applications, and the quality of sample preparation may affect the recognition results. In addition, the CT equipment itself is expensive, and the cost of equipment operation and maintenance is also high. This makes the CT method less economical and practical in many practical applications.

[0140] Therefore, this embodiment uses the Canny edge detection algorithm, the HED deep learning algorithm and the method of the present invention to process a sample image, and the obtained results are as follows: Figure 3 shown.

[0141] from Figure 3 It is not difficult to see that when faced with images of poured asphalt concrete multiphase materials with complex textures and edge features and large areas of noise, the Canny edge detection algorithm will be disturbed, resulting in a large number of false detections, and the effect is not ideal.

[0142] This embodiment uses an open source deep model to compare the edge detection data obtained by using the HED deep learning method with the data obtained by the edge detection method for multiphase material images of poured asphalt concrete proposed in the present invention:

[0143] The specific evaluation indexes for judging whether the edge detection result is accurate in this embodiment are as follows:

[0144] Accuracy is an indicator used to evaluate classification models, indicating the proportion of the total number of correct predictions by the model. The calculation formula is as follows:

[0145]

[0146] In computer vision, we use TP, TN, FP, and FN to calculate Accuracy. This indicator represents the model's ability to identify correct examples. In the computer field, it is an important indicator for evaluating the performance of a classification algorithm or model. The specific meanings of these four indicators are as follows:

[0147] True positive: The algorithm or model predicts that the example is positive and it is actually a positive example.

[0148] False positive: An example that the algorithm or model predicts is a positive example, but is actually a negative example.

[0149] True negative: The algorithm or model predicts a negative example, which is actually a negative example.

[0150] True negative: An example that the algorithm or model predicts is a negative example, but is actually a positive example.

[0151] This embodiment uses a self-compiled Python algorithm to count the number of TP and TN pixels of the results of the HED deep learning algorithm and the method proposed in the present invention, and the results are shown in the following table:

[0152] algorithm TP TN Accuracy Method of the present invention 105347 2645164 83.9% HED Deep Learning Algorithm 130515 2439804 78.4% Canny edge detection algorithm 129464 1361817 45.5%

[0153] It can be seen from the above table that the method proposed in the present invention has a higher accuracy than the commonly used HED deep learning algorithm and Canny edge detection algorithm when facing the multi-phase material image of poured asphalt concrete.

[0154] In complex tasks, deep learning algorithms require a large amount of labeled data to train the model to achieve good performance. In the process of deep learning network training and reasoning, a large amount of computing resources are also required, which will lead to long training time and high computing cost. Among them, the relationship between edge detection accuracy and the number of iterations in deep learning algorithms is as follows: Figure 4 shown.

[0155] In comparison, the multi-phase material image edge detection method proposed in the present invention has relatively low requirements for computing resources and is easy to perform large-scale and efficient analysis in actual engineering.

[0156] This example compares a multi-phase material image edge detection method proposed in the present invention with an X-Ray CT method, a deep learning method, and a Canny edge detection algorithm in terms of accuracy, efficiency, and cost. The results are shown in the following table:

[0157] algorithm Accuracy efficiency cost Method of the present invention high high Low HED Deep Learning Algorithm middle middle middle X-Ray CT method high Low high Canny edge detection algorithm Low high Low

[0158] In summary, from the comprehensive consideration of cost, efficiency and accuracy, the multi-phase material image edge detection method of the present invention is superior to the X-Ray CT method, the deep learning method and the Canny edge detection algorithm.

[0159] Based on the above-mentioned multi-phase material image edge detection method, the present invention also provides a multi-phase material image edge detection system.

[0160] like Figure 5 As shown, a multi-phase material image edge detection system comprises:

[0161] An image acquisition module, which is used to acquire an original image of a multiphase material;

[0162] A color enhancement module, used for performing color saturation enhancement processing on the original image to obtain a first image;

[0163] An image erosion module, configured to perform morphologically based erosion processing on the first image to obtain a second image;

[0164] A convolution filtering module, used for performing convolution filtering on the second image to obtain a third image;

[0165] An edge detection module, which is used to perform edge detection on the third image by using two different weight operators combined with a three-threshold edge detection method to obtain a fourth image;

[0166] An information enhancement module is used to perform edge information enhancement processing on the fourth image to obtain a fifth image.

[0167] The specific functions of each module in the system of the present invention refer to the steps in the method of the present invention, which will not be repeated here.

[0168] Based on the above-mentioned method for detecting edge of a multi-phase material image, the present invention further provides a device for detecting edge of a multi-phase material image.

[0169] A device for detecting edge of a multi-phase material image comprises a processor, a memory and a computer program stored in the memory. When the computer program is executed by the processor, the method for detecting edge of a multi-phase material image as described above is implemented.

[0170] The invention discloses a method, system and device for edge detection of multiphase material images, which sequentially perform color saturation enhancement processing, corrosion processing, convolution filtering processing, edge detection and edge information enhancement processing on the original image of the multiphase material; wherein the color saturation enhancement processing can make the color contrast of different areas of the image more obvious; the corrosion processing can fill small holes and gaps in the image, realize image smoothing and boundary extraction to a certain extent, remove isolated pixel points and noise, and separate connected objects; the convolution filtering processing can effectively remove high-frequency noise superimposed on the image, blur details, and thus achieve the effect of smoothing the image; the edge detection method using two different weight operators combined with three thresholds can capture edge information in the image at different scales and directions, thereby improving the accuracy and robustness of edge detection; the invention effectively solves the problem that the existing edge detection method has unsatisfactory effect of extracting edge information from multiphase material images with complex features, obvious noise, weak edge information due to small color difference, and partial misdetection, and can usually better maintain stability and accuracy when processing complex backgrounds and more noise, and has lower cost and better universality than other methods.

[0171] The present invention provides a method, system and device for edge detection of multiphase material images, which can more conveniently, quickly and accurately identify the edge information of multiphase material images with complex features and obvious noise, and is particularly suitable for edge detection of multiphase material images of poured asphalt concrete, and is mainly used to extract edge information of multiphase materials of poured asphalt concrete. The present invention proposes to use morphological corrosion operations to fill in small noises in the image and to use two different weight operators combined with a three-threshold edge detection algorithm, focusing on achieving high universality and accuracy at the same time, providing reliable data support for the control and optimization of the construction process, and for establishing an asphalt concrete microscopic model based on the real aggregate shape, as well as for subsequent research, with significant economic and environmental benefits.

[0172] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for edge detection of multiphase material images, characterized in that: include: S1, obtain the original image of multiphase materials; S2, performing color saturation enhancement processing on the original image to obtain a first image; S3, performing morphological corrosion processing on the first image to obtain a second image; S4, performing convolution filtering on the second image to obtain a third image; S5, performing edge detection on the third image using two different weight operators combined with a three-threshold edge detection method to obtain a fourth image; S6, performing edge information enhancement processing on the fourth image to obtain a fifth image; In the S5, the two operators with different weights include a first operator and a second operator, and the weight of the first operator is lower than the weight of the second operator; the three thresholds include a first threshold, a second threshold and a third threshold, and the first threshold is lower than the second threshold, and the second threshold is lower than the third threshold; the S5 is specifically: S51, using the first operator to perform gradient calculation on each pixel in the third image to obtain a first gradient value of each pixel in the third image; S52, comparing the first gradient value of each pixel in the third image with the first threshold and the third threshold respectively, marking the pixel in the third image whose first gradient value is higher than the third threshold as a strong edge pixel and retaining it, marking the pixel in the third image whose first gradient value is lower than the first threshold as a non-edge pixel and removing it, marking the pixel in the third image whose first gradient value is between the first threshold and the third threshold as a secondary detection pixel and retaining it; S53, using the second operator to perform gradient calculation on each secondary detection pixel point in the third image to obtain a second gradient value of each secondary detection pixel point in the third image; S54, comparing the second gradient value of each secondary detection pixel in the third image with the second threshold, marking the secondary detection pixel in the third image whose second gradient value is higher than the second threshold as weak edge pixel and retaining it, marking the secondary detection pixel in the third image whose second gradient value is lower than the second threshold as non-edge pixel and removing it; S55, gradually edge-connecting all the strong edge pixels and the weak edge pixels in the third image to obtain a fourth image; Before the S55, it also includes: Performing non-maximum suppression processing on all strong edge pixels and weak edge pixels in the third image; The strong edge pixels and the weak edge pixels in the third image are all taken as edge pixels; and non-maximum suppression processing is performed on all the strong edge pixels and the weak edge pixels in the third image, specifically: Step 1: take any edge pixel point in the third image as a pixel point to be suppressed, and compare the gradient value of the pixel point to be suppressed with the gradient values ​​of the adjacent edge pixel points on both sides of the gradient direction of the pixel point to be suppressed; if the gradient value of the pixel point to be suppressed is not the maximum value among the gradient values ​​of the adjacent edge pixel points on both sides of the gradient direction of the pixel point to be suppressed, then set the edge strength of the pixel point to be suppressed to 0; otherwise, retain the edge strength of the pixel point to be suppressed; Step 2, traversing all edge pixels in the third image, and performing non-maximum suppression processing on each edge pixel in the third image using the method in step 1; Wherein, if the edge pixel point is a strong edge pixel point, the gradient value of the edge pixel point is the first gradient value calculated by using the first operator; if the edge pixel point is a weak edge pixel point, the gradient value of the edge pixel point is the second gradient value calculated by using the second operator; The S6 is specifically: Performing Gaussian filtering on the fourth image to obtain a Gaussian filtered image; The pixel value of each pixel in the Gaussian filtered image is compared with a preset pixel threshold, and the pixel in the Gaussian filtered image whose pixel value is less than the preset pixel threshold is set to black.

2. The multi-phase material image edge detection method according to claim 1, characterized in that: The S2 is specifically: The original image is converted from the RGB color space to the HSV color space, and then converted back to the RGB color space after increasing the saturation, to obtain the first image.

3. The multi-phase material image edge detection method according to claim 1, characterized in that: The S3 is specifically: S31, determining any pixel point in the first image as a pixel point to be corroded, selecting a structural element from the neighborhood of the pixel point to be corroded; comparing all elements in the structural element with the pixel value of the pixel point to be corroded; if all elements in the structural element match the pixel value of the pixel point to be corroded, retaining the pixel point to be corroded; otherwise, setting the pixel value of the pixel point to be corroded to 0; S32, traverse all pixel points in the first image, and use the method of S31 to corrode each pixel point in the first image.

4. The multi-phase material image edge detection method according to claim 1, characterized in that: In S4, a Gaussian function is used to perform convolution filtering on the second image.

5. A multi-phase material image edge detection system, characterized in that: include: An image acquisition module, which is used to acquire an original image of a multiphase material; A color enhancement module, used for performing color saturation enhancement processing on the original image to obtain a first image; An image erosion module, configured to perform morphologically based erosion processing on the first image to obtain a second image; A convolution filtering module, used for performing convolution filtering on the second image to obtain a third image; an edge detection module, which is used to perform edge detection on the third image by using two different weight operators combined with a three-threshold edge detection method to obtain a fourth image; an information enhancement module, configured to perform edge information enhancement processing on the fourth image to obtain a fifth image; In the convolution filtering module, the two operators with different weights include a first operator and a second operator, and the weight of the first operator is lower than the weight of the second operator; the three thresholds include a first threshold, a second threshold and a third threshold, and the first threshold is lower than the second threshold, and the second threshold is lower than the third threshold; the convolution filtering module is specifically used for: Using the first operator to perform gradient calculation on each pixel in the third image to obtain a first gradient value of each pixel in the third image; Compare the first gradient value of each pixel in the third image with the first threshold and the third threshold respectively, mark the pixel in the third image whose first gradient value is higher than the third threshold as a strong edge pixel and retain it, mark the pixel in the third image whose first gradient value is lower than the first threshold as a non-edge pixel and remove it, and mark the pixel in the third image whose first gradient value is between the first threshold and the third threshold as a secondary detection pixel and retain it; Using the second operator to perform gradient calculation on each secondary detection pixel point in the third image, to obtain a second gradient value of each secondary detection pixel point in the third image; Compare the second gradient value of each secondary detection pixel point in the third image with the second threshold value, mark the secondary detection pixel points in the third image whose second gradient value is higher than the second threshold value as weak edge pixels and retain them, and mark the secondary detection pixel points in the third image whose second gradient value is lower than the second threshold value as non-edge pixels and remove them; gradually edge-connecting all the strong edge pixels and the weak edge pixels in the third image to obtain a fourth image; Before obtaining the fourth image, the method further includes: Performing non-maximum suppression processing on all strong edge pixels and weak edge pixels in the third image; The strong edge pixels and the weak edge pixels in the third image are all taken as edge pixels; and non-maximum suppression processing is performed on all the strong edge pixels and the weak edge pixels in the third image, specifically: Taking any edge pixel point in the third image as a pixel point to be suppressed, comparing the gradient value of the pixel point to be suppressed with the gradient values ​​of the adjacent edge pixel points on both sides of the gradient direction of the pixel point to be suppressed; if the gradient value of the pixel point to be suppressed is not the maximum value among the gradient values ​​of the adjacent edge pixel points on both sides of the gradient direction of the pixel point to be suppressed, setting the edge strength of the pixel point to be suppressed to 0; otherwise, retaining the edge strength of the pixel point to be suppressed; Traversing all edge pixel points in the third image, and performing non-maximum suppression processing on each edge pixel point in the third image; Wherein, if the edge pixel point is a strong edge pixel point, the gradient value of the edge pixel point is the first gradient value calculated by using the first operator; if the edge pixel point is a weak edge pixel point, the gradient value of the edge pixel point is the second gradient value calculated by using the second operator; The information enhancement module is specifically used for: Performing Gaussian filtering on the fourth image to obtain a Gaussian filtered image; The pixel value of each pixel in the Gaussian filtered image is compared with a preset pixel threshold, and the pixel in the Gaussian filtered image whose pixel value is less than the preset pixel threshold is set to black.

6. A device for detecting edge of a multi-phase material image, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory, wherein when the computer program is executed by the processor, the method for edge detection of a multi-phase material image as claimed in any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Edge detection method based on gray-scale image of specific class

    CN102521836A

  • Three-dimensional modeling and measuring device for microscopic multi-phase structure based on section contour sequence

    CN109839077A