Gray-scale image edge detection method based on adaptive SE and concept norm partial order
By using an adaptive method of structural element and formal concept norm partial order, the edge extraction algorithm of grayscale images is dynamically adjusted, which solves the problems of inaccurate and unsmooth edge extraction caused by fixed structural elements, and achieves high-precision and high-similarity edge detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XIDIAN UNIV
- Filing Date
- 2024-05-06
- Publication Date
- 2026-06-30
AI Technical Summary
In existing technologies, fixed structural elements result in low similarity between the edge extraction results of grayscale images and the original image structure, and the edge extraction results are not smooth enough, with some edge information missing.
An adaptive structuring element and formal concept norm partial order method is adopted. The structuring element is dynamically adjusted according to the pixel characteristics of the grayscale image. The largest and smallest pixels are selected by dilation and erosion operators respectively for morphological operations to construct a formal concept background matrix and a partial order relation, ensuring high similarity and smoothness of edge extraction.
It improves the accuracy and signal-to-noise ratio of grayscale image edge extraction, ensures high structural similarity between the edge results and the original image, and preserves edge information to the greatest extent, resulting in smoother edge extraction results.
Smart Images

Figure CN118365665B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of digital image processing technology, and proposes a grayscale image edge detection method based on adaptive structuring element (SE) and formal concept norm partial order in the field of digital image edge extraction technology. This invention can be used to extract edges in various grayscale images. Background Technology
[0002] Images are closely related to human life, enabling the acquisition and exchange of information. With the development of digitization, digital image processing technology has become increasingly important, and one of its most fundamental characteristics is the edge. Edges serve as a crucial means of expressing information in digital images, particularly in fields like computer vision and graphics processing. Image edges are where pixel values change drastically under ambient lighting, reflecting the contours and topological structures of objects. Extracting edge information from images relies heavily on edge extraction algorithms, the results of which significantly impact subsequent edge analysis. Traditional mathematical morphology edge extraction methods use fixed structural elements, which have little correlation with the corresponding pixel windows during mathematical morphological operations. This results in low structural similarity between the extracted results and the original image, and also leads to edge loss, rendering the edges uneven and failing to meet the current requirements for edge accuracy in digital image processing.
[0003] Zhejiang University disclosed a method for extracting image edges in its patent application, "An Image Edge Detection Method Based on Mathematical Morphology" (Patent Application No. 201010251698.6, Publication No. CN 101930597 A). The method's implementation steps are: 1. Performing morphological processing on the image using structuring elements of different scales to obtain edge information images; 2. Weighting and merging the edge information images to obtain a total edge information image; 3. Refining and thresholding the edge points in the total edge information image to obtain the final binary edge image. The drawback of this method is that it uses traditional mathematical morphology algorithms, employing the same structuring element when determining the morphological operation result for each pixel. This failure to adapt the structuring element to changes in the original image and the type of morphological operator results in low structural similarity between the extracted edge and the original image, failing to obtain the most accurate reconstruction of the actual image edges.
[0004] Kunming University of Science and Technology disclosed a method for extracting defect edges in infrared images in its patent application, "A Method for Defect Edge Detection of Infrared Images Based on Improved Mathematical Morphology" (Patent Application No. 202110239682.1, Publication No. CN 113012116 A). The method's implementation steps are as follows: 1. Acquire an infrared image; 2. Select two different scale structuring elements and perform morphological filtering on the acquired infrared image to obtain a filtered image; 3. Use structuring elements of various directions to perform edge detection on the filtered image, obtaining images with edge detection of structuring elements in different directions; 4. Calculate the information entropy of the images with edge detection of structuring elements in different directions, and calculate the weighting coefficients of the images with edge detection of structuring elements in different directions based on the information entropy; 5. Fuse the images with edge detection of structuring elements in different directions based on the weighting coefficients to obtain the image defect edges. The drawback of this method is that it uses structuring elements in different directions to detect edges and obtain different edge images. Then, it calculates information entropy to obtain weighting coefficients to fuse the edges. This algorithm has high complexity and is prone to losing some edge information during the fusion process, resulting in an unsmooth edge extraction result. Summary of the Invention
[0005] The purpose of this invention is to address the shortcomings of the prior art by proposing a grayscale image edge detection method based on adaptive structuring element SE and formal concept norm partial order. This method aims to solve the problems of low structural similarity between the edge extraction result and the original image due to the failure of the structuring element to change with the original image and the type of morphological operator, and the lack of edge information in the edge extraction result, which leads to insufficient edge smoothness.
[0006] The idea behind this invention is to adaptively extract structural elements from grayscale images using a formal concept background. Pixel windows are extracted centered on pixels undergoing morphological operations in the grayscale image, and a formal concept background matrix is constructed to describe these pixel windows. In the formal concept structural element extraction algorithm of this invention, custom selection methods are used for both dilation and erosion operators. When performing dilation, the structural element is the pixel within the current pixel window that is larger than the center pixel; when performing erosion, the structural element is the pixel within the current pixel window that is smaller than the center pixel. Therefore, the structural element changes with the original image and the type of morphological operator. Different structural element extraction algorithms correspond to the dilation and erosion operators in mathematical morphology. This solves the problem in existing technologies where the structural element fails to change with the original image and the type of morphological operator when extracting grayscale image edges, resulting in low structural similarity between the edge extraction results and the original image. This invention applies the formal concept norm partial order, utilizing the matrix norm of grayscale pixel windows to calculate the matrix norm of each window of the selected structuring element. The matrix norm of each element in the structuring element is mapped to a formal concept attribute partial order concept graph, obtaining the pixel points corresponding to the maximum and minimum values of the matrix norm of the structuring element pixel values in the formal concept attribute partial order. The dilation operation selects the pixel value corresponding to the maximum value in the formal concept attribute partial order and assigns it to the pixel point in the dilated image for morphological operations. Similarly, the erosion operation selects the pixel value corresponding to the minimum value in the formal concept attribute partial order and assigns it to the pixel point in the dilated image for morphological operations. The matrix norm of the structuring element pixel values takes into account the correlation between pixels. The formal concept attribute partial order is used to obtain the pixel points corresponding to the maximum and minimum values of the matrix norm of the structuring element pixel values, solving the problem in existing technologies where edge extraction results in insufficient edge smoothness due to missing edge information.
[0007] The implementation steps of this invention are as follows:
[0008] Step 1: Select an unselected pixel from the grayscale image of the edge to be extracted, and extract a pixel window centered on the selected pixel;
[0009] Step 2: Map the pixel window to the formal concept background;
[0010] Step 3: Determine the set of formal concept structural elements for the selected pixel based on the formal concept background. The set of structural elements for the dilation operation is the set of pixels within the pixel window that are larger than the selected pixel; the set of structural elements for the erosion operation is the set of pixels within the pixel window that are smaller than the selected pixel.
[0011] Step 4: Calculate the matrix norm of each element in the set of formal concept structure elements and map it to the formal concept partial order;
[0012] Step 5: Obtain the result pixel of the morphological operation of the selected pixel according to the formal concept norm partial order. The result of the dilation operation is the pixel corresponding to the maximum value in the formal concept norm partial order, and the result of the erosion operation is the pixel corresponding to the minimum value in the formal concept norm partial order.
[0013] Step 6: Determine whether all pixels in the grayscale image of the edge to be extracted have been selected. If yes, proceed to step 7; otherwise, proceed to step 1.
[0014] Step 7: Obtain the edge image of the grayscale image to be extracted.
[0015] Compared with existing technologies, the present invention has the following advantages:
[0016] First, because this invention applies a formal concept background to adaptively extract structural elements from grayscale images, the structural elements change with the changes in the original image and the type of morphological operator. The dilation and erosion operators of mathematical morphology correspond to different structural element extraction algorithms, overcoming the defect in existing technologies where the structural elements fail to change with the changes in the original image and the type of morphological operator when extracting grayscale image edges, resulting in low structural similarity between the edge extraction results and the original image. This makes the structural elements after dilation and erosion in this invention adaptive, which can better reflect the features of the original image. When the selected pixels undergo dilation and erosion, it can ensure high structural similarity between the extracted image edge results and the original grayscale image, thereby improving the accuracy of grayscale image edge extraction.
[0017] Secondly, because this invention applies the formal concept norm partial order, the matrix norm of the structuring element pixel value takes into account the correlation between pixels. The formal concept attribute partial order obtains the pixel point corresponding to the maximum value and the pixel point corresponding to the minimum value of the matrix norm of the structuring element pixel value. This overcomes the defect of the prior art in image edge extraction, where the edge information of the edge extraction result is missing, resulting in insufficient edge smoothness. This allows the formal concept norm partial order of this invention to retain the edge information of the image edge extraction result to the greatest extent. When the selected pixels undergo dilation and erosion changes, the smoothness of the image edge extraction result is higher, thereby improving the signal-to-noise ratio of grayscale image edge extraction. Attached Figure Description
[0018] Figure 1 This is a flowchart of the present invention;
[0019] Figure 2 The grayscale image of the edge to be extracted used in the simulation experiment of this invention embodiment;
[0020] Figure 3 The images shown are the dilation and erosion results obtained by performing dilation and erosion operations on the grayscale image of the edge to be extracted used in the simulation experiment of this invention.
[0021] Figure 4 This is a grayscale image after edge extraction in the simulation experiment of this invention. Detailed Implementation
[0022] The present invention will now be further described with reference to the accompanying drawings and embodiments.
[0023] Reference Figure 1 The specific implementation steps of the present invention will be further described below.
[0024] Step 1: Select an unselected pixel from the grayscale image of the edge to be extracted, and extract a pixel window centered on the selected pixel.
[0025] Step 2: Map the pixel window to the formal concept background.
[0026] The steps for mapping the pixel window to a formal conceptual background are as follows:
[0027] The first step is to extract pixel values along eight directions—up, down, left, right, upper left, lower left, upper right, and lower right—centered on the selected pixel, resulting in an n×n pixel window centered on the selected pixel, where n represents the window size and is an odd number greater than or equal to 3.
[0028] In an embodiment of the present invention, a grayscale pixel located at position (281, 70) in the grayscale image is selected, and the pixel value of this grayscale pixel is 70. A pixel window of size n×n is selected from the grayscale image centered on the selected pixel: in this embodiment, n=3, and eight pixels surrounding the selected pixel 33 are selected from the grayscale image at the top, bottom, left, right, top-left, bottom-left, top-right, and bottom-right positions. The coordinates of these eight pixels in the grayscale image are (280, 70), (282, 70), (281, 69), (281, 71), (280, 69), (282, 69), (280, 71), and (282, 71). The pixel above the selected pixel has a value of 63, the pixel below the selected pixel has a value of 104, the pixel to the left of the selected pixel has a value of 59, the pixel to the right of the selected pixel has a value of 93, the pixel to the upper left of the selected pixel has a value of 136, the pixel to the lower left of the selected pixel has a value of 71, the pixel to the upper right of the selected pixel has a value of 38, and the pixel to the lower right of the selected pixel has a value of 121. These 8 pixels, together with the selected pixel, form a pixel window of size n. The pixels in the pixel window are numbered: the pixel at the upper left corner of the pixel window is numbered 1, and the numbers of the other pixels increase sequentially to the right and downwards. Therefore, the selected pixel is numbered 5 in the pixel window, and the pixel at the lower right corner of the window is numbered 9.
[0029] In an embodiment of the present invention, the selected pixel is numbered 5, and the numbers of the top left, top, top right, left, right, bottom left, bottom, and bottom right surrounding the selected pixel are 1, 2, 3, 4, 6, 7, 8, and 9, respectively.
[0030] The second step is to construct an N-row N-column formal concept background matrix. The j-th element in the i-th row of this formal concept background matrix represents the grayscale value of the k-th pixel in the m-th row of the pixel window, where 1≤i≤n, 1≤j≤n, 1≤m≤N, 1≤k≤N, and N represents the length of the formal concept background matrix, N=n, m=i, k=j.
[0031] In an embodiment of the present invention, the formal concept background matrix of the grayscale pixel located at position (281, 70) in the grayscale image is a 3×3 matrix. The pixel at the top left corner of the formal concept background matrix is numbered 1, and the numbers of other background matrix elements gradually increase to the right and downwards. Therefore, the selected pixel is numbered 5 in the formal concept background matrix, and the element at the bottom right corner is numbered 9. The element value of the selected pixel in the formal concept background matrix is 70, and the element values of the selected pixel surrounding it in the formal concept background matrix at the top left, top, top right, left, right, bottom left, bottom, and bottom right are 136, 63, 38, 59, 93, 71, 104, and 121, respectively. The resulting formal concept background matrix K is as follows:
[0032]
[0033] Step 3: Determine the set of formal concept structural elements for the selected pixel based on the formal concept background. The set of structural elements for the dilation operation is the set of pixels within the pixel window that are larger than the selected pixel; the set of structural elements for the erosion operation is the set of pixels within the pixel window that are smaller than the selected pixel.
[0034] The steps for determining the set of formal concept structural elements of the selected pixels based on the formal concept background are as follows:
[0035] The first step is to traverse each element in the formal concept background during the expansion operation, and add elements whose element values are greater than or equal to the pixel value of the selected pixel to the formal concept structure element set of the selected pixel.
[0036] In an embodiment of the present invention, each element of the formal concept background is traversed. If the element value is greater than or equal to the element value labeled 5, its element value is assigned to 1; if the element value is less than or equal to the element value labeled 5, its element value is assigned to 0, resulting in the following expansion operation of the formal concept background matrix M. d :
[0037]
[0038] The formal concept background matrix M of the traversal expansion operation d For each element in the matrix, the pixel number in the formal concept background matrix corresponding to the grayscale image with an element value of 1 at the edge to be extracted is added to the dilated formal concept structure element set. In this embodiment of the invention, the dilated formal concept structure element set is {1, 5, 6, 7, 8, 9}.
[0039] The second step is to traverse each element in the formal concept background during the erosion operation, and add elements whose element values are less than or equal to the pixel value of the selected pixel to the formal concept structure element set of the selected pixel.
[0040] In an embodiment of the invention, each element of the formal concept background is traversed. If the element value is less than or equal to the element value labeled 5, its element value is assigned to 1. If the element value is greater than or equal to the element value labeled 5, its element value is assigned to 0, thus obtaining the formal concept background matrix M of the erosion operation. e as follows:
[0041]
[0042] The formal concept background matrix M of the traversal erosion operation e For each element in the set, the pixel number in the formal concept background matrix corresponding to the grayscale image with an element value of 1 at the edge to be extracted is added to the erosion formal concept structural element set. In this embodiment, the erosion formal concept structural element set is {2, 3, 4, 5}.
[0043] The set of structuring elements for the dilation operation, which is the set of pixels within the pixel window that are larger than the selected pixel, means that each element in the formal concept background is traversed, and elements whose element values are greater than or equal to the selected pixel's value are added to the formal concept structuring element set of the selected pixel.
[0044] Step 4: Calculate the matrix norm of each element in the set of formal concept structure elements and map it to the formal concept partial order.
[0045] The steps for calculating the matrix norm of each element in the set of elements of the conceptual structure are as follows:
[0046] The first step is to select an unselected structural element from the set of formal conceptual structural elements.
[0047] The second step is to calculate the matrix norm of the selected structuring element according to the following formula:
[0048]
[0049] Among them, U x,y u represents the matrix norm of the pixel located at coordinates (x,y) in the grayscale image from which the edge to be extracted.x,y u represents the pixel value at coordinate (x,y) in the grayscale image where the edge to be extracted is located. x-1,y u represents the pixel value at coordinate (x-1, y) in the grayscale image where the edge to be extracted is located. x+1,y u represents the pixel value at coordinate (x+1, y) in the grayscale image of the edge to be extracted. x,y-1 u represents the pixel value at coordinate (x, y-1) in the grayscale image where the edge to be extracted is located. x,y+1 u represents the pixel value at coordinate (x, y+1) in the grayscale image where the edge to be extracted is located. x-1,y-1 u represents the pixel value at coordinates (x-1, y-1) in the grayscale image where the edge to be extracted is located. x+1,y-1 u represents the pixel value at coordinates (x+1, y-1) in the grayscale image where the edge to be extracted is located. x-1,y+1 u represents the pixel value at coordinates (x-1, y+1) in the grayscale image of the edge to be extracted. x+1,y+1 This represents the pixel value at coordinates (x+1, y+1) in the grayscale image of the edge to be extracted.
[0050] In an embodiment of the present invention, the matrix norm of the first structural element (number 1) of the expansion form concept structuring element set {1, 5, 6, 7, 8, 9} is 260.05, the matrix norm of the second structural element (number 5) is 383.22, the matrix norm of the third structural element (number 6) is 427.79, the matrix norm of the fourth structural element (number 7) is 407.13, the matrix norm of the fifth structural element (number 8) is 437.24, and the matrix norm of the sixth structural element (number 9) is 452.77. Therefore, the norm set of the expansion operation form concept structuring element set is {260.05, 383.22, 427.79, 407.13, 437.24, 452.77}. The first structuring element (number 2) of the erosion formal concept structuring element set {2, 3, 4, 5} has a matrix norm of 294.72, the second structuring element (number 3) has a matrix norm of 367.30, the third structuring element (number 4) has a matrix norm of 320.49, and the fourth structuring element (number 5) has a matrix norm of 383.22. Therefore, the norm set of the erosion operation's formal concept structuring element set is {294.72, 367.30, 320.49, 383.22}.
[0051] Step 5: Obtain the result pixel of the morphological operation of the selected pixel according to the formal concept norm partial order. The result of the dilation operation is the pixel corresponding to the maximum value in the formal concept norm partial order, and the result of the erosion operation is the pixel corresponding to the minimum value in the formal concept norm partial order.
[0052] The steps for obtaining the result pixel of the morphological operation of the selected pixel based on the formal concept norm partial order are as follows:
[0053] The first step, in the dilation operation formal concept norm partial order, is to take the pixel corresponding to the maximum matrix norm of the structuring element in the original grayscale image as the dilation operation result. In the embodiment of the present invention, the dilation structuring element norm set is {260.05, 383.22, 427.79, 407.13, 437.24, 452.77}, with the maximum norm value being 452.77. This corresponds to the number 9 in the formal concept background, and therefore the corresponding pixel value is 121, which is taken as the dilation operation result for the selected pixel.
[0054] The second step involves using the partial order of the norms of the erosion operation's formal concept norms to select the pixel in the original grayscale image corresponding to the minimum matrix norm of the structuring element as the erosion operation result. In this embodiment, the set of norms for the eroded structuring elements is {294.72, 367.30, 320.49, 383.22}, with a minimum norm value of 294.72. This corresponds to the number 2 in the formal concept background, and therefore the corresponding pixel value is 63, which is used as the erosion operation result for the selected pixel.
[0055] Step 6: Determine whether all pixels in the grayscale image of the edge to be extracted have been selected. If yes, proceed to step 7; otherwise, proceed to step 1.
[0056] Step 7: Obtain the edge image of the grayscale image to be extracted.
[0057] The steps for obtaining the edge image of the grayscale image to be extracted are as follows:
[0058] The first step is to assemble the pixel sets obtained from all dilation operations into a dilation result image, and the pixel sets obtained from all erosion operations into an erosion result image.
[0059] The second step is to calculate the difference between the dilation result image and the erosion result image to obtain the edge image of the grayscale image of the edge to be extracted.
[0060] The effectiveness of this invention can be further demonstrated through the following simulation.
[0061] 1. Simulation experimental conditions.
[0062] The hardware platform for the simulation experiment of this invention is: an Intel Core i7-9700 CPU with a clock speed of [missing information].
[0063] 3.0GHz, 8GB RAM.
[0064] The software platform for the simulation experiment of this invention is: Windows 10 operating system and Matlab R2022b.
[0065] The simulation parameters for this invention are: the pixel window is n=3.
[0066] 2. Simulation content and result analysis.
[0067] The simulation experiments of this invention are three.
[0068] Simulation Experiment 1 is a simulation of performing dilation and erosion operations on an input grayscale image using the present invention, to obtain the dilated and eroded result images after edge extraction of the input image.
[0069] The input image used in simulation experiment 1 of this invention is a grayscale image with a size of 640×640 and an image format of jpg, such as... Figure 2 As shown.
[0070] The dilation and erosion results obtained after edge extraction of the input image using the method of this invention are grayscale images with a size of 640×640 and an image format of jpg. Figure 3 As shown. Figure 3 (a) is the image of the dilation result after the dilation operation. Figure 3 (b) is an image of the corrosion result after the corrosion operation.
[0071] contrast Figure 2 and Figure 3 As can be seen from the simulation experiment results of the present invention, the resulting image after dilation and erosion can better reflect the features of the original image and ensure a high structural similarity between the resulting image after dilation and erosion and the original grayscale image.
[0072] Simulation Experiment 2 simulates the process of obtaining the edge image of the grayscale image to be extracted from the dilation result image and the erosion result image.
[0073] The input images used in simulation experiment 2 of this invention are a dilation result image and an erosion result image with dimensions of 640×640, and the image format is jpg, such as... Figure 3 As shown. Figure 3 (a) is the image of the dilation result after the dilation operation. Figure 3 (b) is an image of the corrosion result after the corrosion operation.
[0074] The method of this invention is used to perform difference calculation on the dilation result image and the erosion result image. The resulting edge image of the grayscale image to be extracted is a grayscale image with a size of 640×640 and an image format of jpg. Figure 4 As shown.
[0075] contrast Figure 2 and Figure 4As can be seen from the simulation experiment 2 of the present invention, the edge image of the grayscale image to be extracted by the present invention can better reflect the features of the original image, and the smoothness of the image edge extraction result is higher.
[0076] Simulation Experiment 3 is a simulation of the structural similarity evaluation between the edge extraction results of this invention and the original grayscale image.
[0077] Simulation Experiment 3 uses the full-reference image quality metric FSIM (feature similarity) to evaluate the structural similarity between the edge extraction results of this invention and the original grayscale image. The full-reference image quality metric FSIM believes that not all pixels in an image have the same importance. Pixels at the edge of an object are more important for defining the structure of the object than pixels in other background areas.
[0078] The edge extraction results of the eight grayscale images were evaluated using FSIM, and all the calculation results are plotted in Table 1:
[0079] Table 1. Evaluation and Comparison of Edge Extraction Results for 8 Grayscale Images
[0080]
[0081] In summary, the simulation results of this invention show that the edge extraction method of this invention can better reflect the features of the original image. When the selected pixels undergo dilation and erosion, it can ensure that the extracted image edge results have a high structural similarity with the original grayscale image, thereby improving the accuracy of grayscale image edge extraction.
Claims
1. A grayscale image edge detection method based on adaptive SE and concept norm partial order, characterized in that, The method applies a formal concept background to adaptively extract structuring elements from grayscale images, and uses a formal concept norm partial order to obtain the pixels corresponding to the maximum and minimum norm values of the structuring element pixel value matrix. The steps of this edge detection method include the following: Step 1: Select an unselected pixel from the grayscale image of the edge to be extracted, and extract a pixel window centered on the selected pixel; Step 2, map the pixel window to the formal concept background: Step 2.1: Using the selected pixel as the center, extract pixel values along eight directions: top, bottom, left, right, upper left, lower left, upper right, and lower right, to obtain the pixel value centered on the selected pixel. The pixel window, where Indicates window size. The value of is an odd number greater than or equal to 3; Step 2.2, construct a OK The formal conceptual background matrix of the column, the first of the formal conceptual background matrix The first line The element value represents the first element in the pixel window. The first line The grayscale values of pixels, where , , , , Representation of the conceptual background matrix length , , ; Step 3: Determine the set of formal concept structural elements for the selected pixel based on the formal concept background. The set of structural elements for the dilation operation is the set of pixels within the pixel window that are larger than the selected pixel; the set of structural elements for the erosion operation is the set of pixels within the pixel window that are smaller than the selected pixel. Step 4: Calculate the matrix norm of each element in the set of formal concept structure elements and map it to the formal concept partial order; Step 5: Obtain the result pixel of the morphological operation of the selected pixel according to the formal concept norm partial order. The result of the dilation operation is the pixel corresponding to the maximum value in the formal concept norm partial order, and the result of the erosion operation is the pixel corresponding to the minimum value in the formal concept norm partial order. Step 6: Determine whether all pixels in the grayscale image of the edge to be extracted have been selected. If yes, proceed to step 7; otherwise, proceed to step 1. Step 7: Obtain the edge image of the grayscale image to be extracted.
2. The grayscale image edge detection method based on adaptive SE and concept norm partial order according to claim 1, characterized in that, The steps in step 3 to determine the set of formal concept structural elements of the selected pixels based on the formal concept background are as follows: The first step is to traverse each element in the formal concept background during the dilation operation and add the elements whose element values are greater than or equal to the pixel value of the selected pixel to the formal concept structure element set of the selected pixel. The second step is to traverse each element in the formal concept background during the erosion operation, and add elements whose element values are less than or equal to the pixel value of the selected pixel to the formal concept structure element set of the selected pixel.
3. The grayscale image edge detection method based on adaptive SE and concept norm partial order according to claim 1, characterized in that, The set of structuring elements for the dilation operation mentioned in step 3, which is the set of pixels within the pixel window that are larger than the selected pixel, means that each element in the formal concept background is traversed, and the elements whose element values are greater than or equal to the selected pixel value are added to the set of structuring elements of the formal concept of the selected pixel.
4. The grayscale image edge detection method based on adaptive SE and concept norm partial order according to claim 1, characterized in that, The steps for calculating the matrix norm of each element in the set of elements of the formal conceptual structure described in step 4 are as follows: The first step is to select an unselected structural element from the set of formal conceptual structural elements; The second step is to calculate the matrix norm of the selected structuring element according to the following formula: ; in, This indicates the grayscale image containing the edge to be extracted. The matrix norm of the pixel coordinates. This indicates the grayscale image containing the edge to be extracted. Pixel value at coordinate position, This indicates the grayscale image containing the edge to be extracted. Pixel value at coordinate position, This indicates the grayscale image containing the edge to be extracted. Pixel value at coordinate position, This indicates the grayscale image containing the edge to be extracted. Pixel value at coordinate position, This indicates the grayscale image containing the edge to be extracted. Pixel value at coordinate position, This indicates the grayscale image containing the edge to be extracted. Pixel value at coordinate position, This indicates the grayscale image containing the edge to be extracted. Pixel value at coordinate position, This indicates the grayscale image containing the edge to be extracted. Pixel value at coordinate position, This indicates the grayscale image containing the edge to be extracted. The pixel value at the coordinate position.
5. The grayscale image edge detection method based on adaptive SE and concept norm partial order according to claim 1, characterized in that, The steps in step 5 to obtain the result pixel of the morphological operation of the selected pixel based on the formal concept norm partial order are as follows: The first step is to take the pixel corresponding to the maximum value of the matrix norm of the structuring element in the original grayscale image as the result of the dilation operation in the form of the concept norm partial order. The second step is to take the pixel corresponding to the minimum matrix norm of the structuring element in the original grayscale image as the result of the erosion operation in the conceptual norm partial order of the erosion operation form.
6. The grayscale image edge detection method based on adaptive SE and concept norm partial order according to claim 1, characterized in that, The steps for obtaining the edge image of the grayscale image to be extracted in step 7 are as follows: The first step is to assemble the pixel sets obtained from all dilation operations into a dilation result image, and the pixel sets obtained from all erosion operations into an erosion result image; The second step is to calculate the difference between the dilation result image and the erosion result image to obtain the edge image of the grayscale image of the edge to be extracted.