Mineral scanning electron microscope aperture detection method and device
By performing color filtering processing on mineral scanning electron microscope images and extracting sub-regions with depth-first search algorithms, combined with the heuristic search algorithm to identify the path, the problems of low efficiency and low accuracy of mineral scanning electron microscope crack detection in the existing technology are solved, and the problem of low accuracy of mineral scanning electron microscope crack detection in the existing technology is realized. More efficient and accurate hole-slit detection.
Patent Information
- Application Number
- CN202310994718.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-08
- Publication Date
- 2025-02-18
AI Technical Summary
The existing mineral scanning electron microscope crack detection methods are inefficient, low accuracy, large calculations, and have the influence of manual intervention.
By performing color filtering on mineral scanning electron microscope images, the sub-regions of cracks and pores are extracted using the depth-first search algorithm, the heuristic search algorithm is used to identify the starting point to the end point path in the sub-region, and the size information of the sub-region is calculated based on the path to distinguish Cracks and pores.
It improves the efficiency and accuracy of pore joint detection, reduces the amount of calculation, reduces the impact of manual intervention, and achieves higher recognition accuracy.
Smart Images

Figure CN119477782A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of crack detection under geological and mineral microscopes using scanning electron microscopes, and in particular to a method and device for detecting cracks under mineral scanning electron microscopes. Background Art
[0002] Mineral scanning electron microscope images are commonly used test data in microscopic reservoir fields such as geology, mineralogy, and petrology. They are mainly used to study the microstructure, composition, and properties of rocks, minerals, and other geological materials. In geological and mineral scanning electron microscopes, cracks and pores are important geological features, which are of great significance for studying the genesis, evolution, mechanical properties of rocks, and the reservoir conditions of oil, gas, and mineral resources.
[0003] The traditional geological mineral SEM crack detection method mainly relies on manual observation, which is to observe and analyze the SEM images one by one, and then judge the existence, distribution and size of the cracks based on experience. However, this method has problems such as low efficiency, large error and poor repeatability. In order to solve the above problems, some mineral SEM crack detection methods based on computer image processing technology have emerged in recent years. These methods realize automatic detection of cracks and pores by preprocessing, feature extraction, segmentation and recognition of SEM images. However, the existing computer image processing methods have certain limitations when processing mineral SEM images, such as low accuracy of crack and pore recognition, low efficiency and large amount of calculation. Therefore, there is an urgent need for a SEM pore detection method to solve the current problems of low efficiency and accuracy of pore detection, reduce the impact of manual intervention, and meet the actual needs of geological mineral SEM crack detection. Summary of the invention
[0004] In order to solve the above technical problems, the purpose of this specification is to provide a mineral scanning electron microscope pore detection method to overcome the above problems or at least partially solve the above problems.
[0005] On the one hand, some embodiments of this specification provide a method for detecting pores and cracks in a mineral scanning electron microscope, the method comprising:
[0006] Color filtering was performed on the mineral SEM images to obtain images containing only cracks and pores;
[0007] Extracting a sub-region of a single crack or a single pore from the image containing only cracks and pores using a depth-first search algorithm;
[0008] A heuristic search algorithm is used to identify the path from the starting point to the end point of each sub-region;
[0009] According to the path from the starting point to the end point in the sub-region, the size information of the sub-region is calculated, and the sub-region is distinguished as a crack or a pore according to the size information of the sub-region.
[0010] Furthermore, the mineral SEM images are color filtered to obtain images containing only cracks and pores, including:
[0011] Identify types of mineral SEM images;
[0012] If the mineral scanning electron microscope image is a grayscale image, filtering the mineral scanning electron microscope image to obtain an image containing only cracks and pores;
[0013] If the mineral scanning electron microscope image is a color image, the mineral scanning electron microscope image is subjected to three primary color filtering processing to obtain an image containing only cracks and pores.
[0014] Further, the mineral scanning electron microscope image is subjected to filtering processing, including: extracting the gray value of each pixel in the mineral scanning electron microscope image;
[0015] Compare the gray value of each pixel with the gray threshold; for pixels whose gray value is less than the gray threshold, mark them as cracks or pore areas;
[0016] The grayscale threshold is obtained by testing the collected crack and pore sample images.
[0017] Furthermore, the mineral scanning electron microscope image is subjected to three primary color filtering processing, including:
[0018] For each pixel point in the mineral scanning electron microscope image, extract the pixel value of the pixel point in the RGB three channels;
[0019] Calculate the absolute value of the pixel difference between the pixel value of the pixel point in the RGB three channels and the pixel threshold of the RGB three channels;
[0020] After multiple tests on sample images, the tolerance value is determined;
[0021] If the absolute values of the three channels are all less than the tolerance value, the pixel point is marked as a crack or pore area;
[0022] The pixel thresholds of the RGB three channels are obtained by presetting the target color.
[0023] Furthermore, the extracting of a sub-region of a single crack or a single pore from the image containing only cracks and pores by using a depth-first search algorithm includes:
[0024] Use the depth-first search algorithm to traverse the pixels in the area where the cracks or pores are located;
[0025] Use the adjacency matrix to calculate the connection relationship between every two pixels;
[0026] If the value of the adjacency matrix is the first preset value, it means that the two pixel points are adjacent and belong to the same crack or pore area;
[0027] If the value of the adjacency matrix is the second preset value, it means that there is no connection relationship between the two pixel points and they do not belong to the same crack or pore area.
[0028] Furthermore, the method of using a heuristic search algorithm to identify a path from a starting point to an end point in each sub-region includes:
[0029] Select a pixel point in the crack area as the starting node and add it to the open list;
[0030] Define a heuristic function to represent the distance from the current node to the end point of the crack; define an actual cost function to represent the actual distance from the starting node to the current node; define a total cost function as the sum of the heuristic function and the actual cost function, representing the total cost from the starting node to the end point of the crack through the current node;
[0031] Select the node with the smallest total cost from the open list as the current node, remove it from the open list, and add it to the closed list;
[0032] Check all adjacent nodes of the current node. If the adjacent node is in the closed list, ignore the adjacent node.
[0033] If the adjacent node is not in the open list, add it to the open list, update the heuristic function value, actual cost function value and total cost function value, and set the current node as the parent node of the adjacent node;
[0034] If the adjacent node is in the open list and the actual cost function value of the new path is smaller, then update the total cost function value and the actual cost function value of the adjacent node, and set the current node as the parent node of the adjacent node;
[0035] The search ends when the open list is empty or the crack endpoint has been added to the closed list;
[0036] From the target node, trace back along the parent node until returning to the starting node, record the backtracking path, and obtain the path from the starting point to the end point of the fracture or pore.
[0037] Furthermore, the calculating sub-region size information includes:
[0038] Calculate the path length according to the path from the start point to the end point of the identified sub-area;
[0039] Taking the path length as the length of the crack or pore;
[0040] Dividing the path length into a number of equal parts by combining the length and width of the SEM image and the length of the crack or pore;
[0041] Draw a perpendicular line at each equally divided point and calculate the distance between the perpendicular line and the intersection of the fracture or pore boundary;
[0042] Calculate the average distance of the intersection points and use it as the width of the crack or pore;
[0043] An aspect ratio is calculated based on the length and width.
[0044] Furthermore, the size information of the sub-regions at least includes: a sub-region length ratio, and the distinguishing the sub-regions as cracks or pores according to the size information of the sub-regions includes:
[0045] Compare the aspect ratio of each sub-region with the aspect ratio threshold. If the aspect ratio of the sub-region is greater than the aspect ratio threshold, the sub-region is determined to be a crack, otherwise it is a pore.
[0046] The aspect ratio threshold determination process includes:
[0047] Collect images of fracture and pore samples;
[0048] Calculate the aspect ratio of cracks or pores in each sample image;
[0049] The aspect ratio distribution of all crack or pore samples is statistically analyzed, and the aspect ratio threshold for distinguishing cracks and pores is determined based on the aspect ratio distribution.
[0050] On the other hand, some embodiments of this specification also provide a mineral scanning electron microscope pore detection device, the device comprising:
[0051] A filtering unit is used to perform color filtering on the mineral scanning electron microscope image to obtain an image containing only cracks and pores;
[0052] A separate crack region identification unit, used for extracting a sub-region of a separate crack or a separate pore from the image containing only cracks and pores by using a depth-first search algorithm;
[0053] A path calculation unit, used for identifying a path from a starting point to an end point of a sub-region in each sub-region by using a heuristic search algorithm;
[0054] The crack size and type identification unit is used to calculate the size information of the sub-region according to the path from the starting point to the end point in the sub-region, and distinguish the sub-region as a crack or a pore according to the size information of the sub-region.
[0055] On the other hand, some embodiments of the present specification further provide a computer device, including a memory, a processor, and a computer program stored in the memory, wherein when the computer program is executed by the processor, the instructions of the above method are executed.
[0056] On the other hand, some embodiments of the present specification further provide a computer storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor of a computer device, the instructions of the above method are executed.
[0057] On the other hand, some embodiments of the present specification further provide a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor of a computer device, the instructions of the above method are executed.
[0058] One or more technical solutions provided by some embodiments of this specification have at least the following technical effects:
[0059] The embodiments of this specification perform color filtering on the mineral scanning electron microscope image to obtain an image containing only cracks and pores, and then use a depth-first search algorithm to extract sub-regions of individual cracks or individual pores from the image containing only cracks and pores. Since the cracks and pores have complex morphologies and certain linear connectivity features, the algorithm can accurately search for connected areas of cracks and pores, improve the efficiency of pore detection, and reduce the amount of calculation. Subsequently, a heuristic search algorithm is used to identify the path from the start point to the end point of the detected pores, and the size information of the pores is calculated based on the path, thereby distinguishing between cracks and pores. Compared with the method based on computer image processing technology in the prior art, the heuristic search algorithm can accurately identify the path of the cracks or pores according to their morphology, and the recognition accuracy is higher.
[0060] The above description is only an overview of the technical solutions of some embodiments of this specification. In order to more clearly understand the technical means of some embodiments of this specification, they can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of some embodiments of this specification more obvious and easy to understand, the specific implementation methods of some embodiments of this specification are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the technical solutions in the embodiments of this article or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art description. Obviously, the drawings described below are only some embodiments of this article. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0062] Figure 1A flow chart of a mineral scanning electron microscope pore detection method in an embodiment of this specification is shown;
[0063] Figure 2 The original mineral scanning electron microscope image in the examples of this specification is shown;
[0064] Figure 3 An image containing only cracks and pores regions obtained after grayscale filtering in the embodiment of this specification is shown;
[0065] Figure 4 A schematic diagram of crack and pore units extracted using a depth-first search algorithm in an embodiment of this specification is shown;
[0066] Figure 5 A schematic diagram of cracks and pores identified in the embodiments of this specification is shown;
[0067] Figure 6 A schematic diagram of the structure of a mineral scanning electron microscope pore detection device in an embodiment of this specification is shown;
[0068] Figure 7 A schematic diagram of the structure of a computer device provided in an embodiment of this specification is shown.
[0069] Description of the accompanying symbols:
[0070] 601, filtration unit;
[0071] 602. Individual crack region identification unit;
[0072] 603, path calculation unit;
[0073] 604. Crack size and type identification unit;
[0074] 702. Computer equipment;
[0075] 704, processor;
[0076] 706. Memory;
[0077] 708, driving mechanism;
[0078] 710, input / output module;
[0079] 712. Input devices;
[0080] 714. Output devices;
[0081] 716. Presentation equipment;
[0082] 718. Graphical user interface;
[0083] 720, network interface;
[0084] 722. Communication link;
[0085] 724. Communication bus. DETAILED DESCRIPTION
[0086] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.
[0087] It should be noted that the terms "first", "second", etc. in the specification and claims of this article and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of this article described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0088] Figure 1 This is a flow chart of a mineral scanning electron microscope pore detection method provided in an embodiment of this specification. This specification provides the method operation steps described in the embodiment or flow chart, but more or fewer operation steps may be included based on conventional or non-creative labor. The order of steps listed in the embodiment is only one way of executing the order of many steps and does not represent the only execution order. When the actual system or device product is executed, it can be executed in the order of the method shown in the embodiment or the accompanying drawings or in parallel. The method includes the following steps:
[0089] S101: Perform color filtering on the mineral scanning electron microscope image to obtain an image containing only cracks and pores.
[0090] First, the type of mineral scanning electron microscope image is identified. If it is identified as a gray image, gray value filtering is performed. If it is identified as a color image, RGB primary color filtering is performed.
[0091] For grayscale images, the steps of grayscale filtering include:
[0092] Step a: Extract the gray value g of each pixel in the gray image and set the gray threshold G;
[0093] Step b: Compare the gray value of each pixel with the gray threshold;
[0094] Step c: marking pixels with grayscale values lower than the grayscale threshold as cracks or pores;
[0095] Step d: Traverse all pixels of the grayscale image and identify cracks or pores.
[0096] In step a, the selection of the grayscale threshold G will affect the effect of color filtering. When the G value is small, more potential cracks and pores will be extracted, but it is also easy to introduce noise. When the G value is large, some noise can be filtered out, but some real cracks and pores may be missed. Therefore, the selection of the G value needs to balance between denoising and retaining details. The G value can be obtained by multiple tests on the collected crack and pore sample images. In step c, since the grayscale value of cracks and pores is lower than that of the surrounding normal areas, when the grayscale value of a pixel is lower than the set threshold G, it can be determined that it may belong to a crack or pore and marked. Figure 2 is the original mineral SEM image. In this embodiment, the grayscale threshold is set to 35. After grayscale filtering, the image containing only cracks and pores is obtained. Figure 3 shown.
[0097] For color images, the steps of RGB primary color filtering include:
[0098] Step a: Extract the component values of the target color in the SEM image in the RGB three channels, which are expressed as: R 0 , G 0 , B 0 , set a tolerance value t;
[0099] Step b: extract the component values of each pixel in the SEM image in the RGB three channels, which are represented as: R, G, B;
[0100] Step c: Calculate RR for each pixel 0 , GG 0 BB 0 The absolute value of R d G d B ;
[0101] Step d: If d R d G d B If both are smaller than the tolerance value t, the pixel point is marked as a crack or pore area;
[0102] Step e: Traverse all pixels of the color image and identify cracks or pores.
[0103] In step a, the tolerance value t is used to determine the closeness between the current pixel RGB value and the target color RGB value. The smaller the t value, the more accurate the color matching is required, and some cracks or pores with similar colors may be missed; the larger the t value, the looser the color filtering condition is, and some irrelevant areas may be extracted. The setting of the t value needs to be tested multiple times on the sample image, and then the value with better filtering effect is selected. The empirical value is generally 25-40. 0 represents the pixel value of the target color to be extracted in the red channel, and R represents the component value of the current pixel in the red channel. The difference between the two is that R 0 is the predefined target value, and R is the actual value of the pixel being processed. 0 Indicates the difference between the red channel component value of the current pixel and the target component value, which can measure the proximity of the two colors on the red channel.
[0104] S102: extracting a sub-region of a single crack or a single pore from the image containing only cracks and pores using a depth-first search algorithm;
[0105] After the crack or pore area is identified by color filtering, it can only be shown that the pixel points on the image belong to cracks or pores, so it is necessary to extract individual cracks or pores. Since the cracks and pores are complex in morphology and have certain linear connectivity characteristics, this is consistent with the idea of the depth-first search algorithm. Therefore, this embodiment uses the depth-first search algorithm to extract individual cracks or pores. The depth-first search algorithm is a search strategy that traverses a graph or tree structure. The basic idea is to start from the starting node and continue to go deeper along a certain path until it is unable to move forward, then go back to the previous node, and continue searching along other paths until all nodes are visited. When implementing the depth-first search algorithm, a recursive or non-recursive (using a stack) method can be used. Compared with other algorithms, such as the breadth-first search algorithm, the depth-first search algorithm is better at extracting cracks and pore units. In the specific implementation, this specification makes some optimizations to the depth-first search algorithm, such as determining in advance whether adjacent nodes meet the crack characteristics to speed up the processing speed, etc. These improvements make it more suitable for this scenario. The following are the detailed steps of the algorithm:
[0106] Step a: Start from the starting node s and mark it as visited;
[0107] Step b: Traverse all unvisited adjacent nodes of s, and set one of the adjacent nodes to be v;
[0108] Step c: For node v, if v has not been visited, mark it as visited and recursively perform a depth-first search on v;
[0109] Step d: When all adjacent nodes have been visited, backtrack to the previous node and continue searching for other paths;
[0110] Step e: Repeat steps b to e until all nodes are visited.
[0111] In the application of extracting cracks or pores separately using the depth-first search algorithm, the image can be regarded as a graph structure G, in which each pixel represents a node and there are edges between adjacent pixels. Let the set of pixels in the image be V and the set of edges be E, then the graph G can be represented as G(V,E). At this time, the adjacency matrix A can be used to represent the connection relationship between the nodes in the graph G. Then for any two pixels b and c, let their coordinates in the image be (x1, y1) and (x2, y2) respectively. If they belong to cracks or pores and are adjacent, there is an edge (b, c)∈E, and A[b][c]=1. Conversely, if A[b][c]=0, it means that b and c are not adjacent and do not belong to cracks or pores. Figure 4 The figure shows the fracture and pore units extracted using the depth-first search algorithm, and the grid area in the figure represents an extracted fracture.
[0112] S103: using a heuristic search algorithm to identify a path from a starting point to an end point in each sub-region;
[0113] After extracting the cracks and pores separately, they need to be distinguished according to their characteristics, and the commonly used characteristics for distinguishing cracks and pores are size information, including the length, width and aspect ratio of the cracks. In this embodiment, a heuristic search algorithm is selected to find the starting and ending paths of the cracks, so as to calculate the size of the cracks. The heuristic search algorithm is based on a heuristic search strategy, such as using problem domain knowledge and combining evaluation functions to guide the search direction, so as to solve complex problems more efficiently. Compared with other search algorithms, the heuristic search algorithm has higher efficiency and accuracy. The specific steps of the heuristic search algorithm are as follows:
[0114] Step a: Initialization, select a pixel point in the crack area as the starting node, such as the pixel point of the first crack in the upper left corner of the image, and add the starting node to the open list;
[0115] Step b: Define the heuristic function h(n) to evaluate the estimated distance from the current node n to the end point of the crack. This can be calculated based on the shape, width and other features of the crack. A simple heuristic function can be the Euclidean distance from the current node to the lower right corner of the image; define the actual cost function g(n) to represent the actual distance from the starting node to the current node n. For adjacent pixels, the Manhattan distance can be used as the cost. The Manhattan distance formula is: d(p,q)=|x1-x2|+|y1-y2|, where (p,q) represents two adjacent pixels, (x1,y1) and (x2,y2) represent their coordinates respectively; define the total cost function f(n)=g(n)+h(n), which represents the total cost from the starting node to the target node through the current node n.
[0116] Step c: Select the node with the smallest f(n) value from the open list as the current node, remove it from the open list, and add it to the closed list;
[0117] Step d: Check all adjacent nodes of the current node. If the adjacent node is already in the closed list, ignore the node. If the adjacent node is not in the open list, add it to the open list and calculate the g(n), h(n) and f(n) values. At the same time, set the current node as the parent node of the adjacent node. If the adjacent node is already in the open list, but the g(n) value of the new path is smaller, update the g(n) and f(n) values of the adjacent node and set the current node as the parent node of the adjacent node.
[0118] Step e: When the open list is empty, that is, the target node is not found or the target node is added to the closed list, the search process ends.
[0119] Step f: Starting from the target node, trace back along the parent node until returning to the starting node, record the backtracking path, and obtain the path from the starting point to the end point of the fracture or pore.
[0120] S104: Calculate size information of the sub-region according to the path from the starting point to the end point in the sub-region, and distinguish the sub-region as a crack or a pore according to the size information of the sub-region.
[0121] After obtaining the path from the starting point to the end point of the crack or pore using the heuristic search algorithm, the size information of the crack or pore is calculated, including the following steps:
[0122] Step a: Calculate the length L of the path and use it as the length of the crack or pore;
[0123] Step b: Divide the path into n equal parts, denoted as P 1 , P 2 ,…,P n Draw a perpendicular line at each equally divided point and calculate the distance d between the perpendicular line and the intersection of the fracture or pore boundary.1 , d 2 , …, d n These distances are then averaged and used as the width of the crack or pore;
[0124] Step c: Calculate the aspect ratio of the crack or pore based on its length and width.
[0125] In step b, let the length of the image be H, the width be W, and the length of the crack be L. Then the value of n is:
[0126] n=L*k / ((H+W) / 2)
[0127] The k value is a hyperparameter used to balance the size of the n value. If k is too small, the n value will be too small and the sampling will be insufficient; if k is too large, the n value will be too large, resulting in a large amount of calculation. The setting of the k value depends on the complexity of the crack shape. The more complex the crack shape, the larger the k value. In the embodiment of this specification, the k value range is 30-50.
[0128] The width of a crack or pore is calculated as:
[0129] W=(d1+d2+...+dn) / n
[0130] The formula for calculating the aspect ratio of a crack or pore is:
[0131] R=L / W
[0132] After calculating the aspect ratio of cracks or pores, the threshold value T is set to distinguish cracks from pores. If the R value is greater than T, it is determined to be a crack, otherwise it is determined to be a pore.
[0133] The threshold value T can be determined based on statistical historical samples, and the determination process includes:
[0134] Step a: Collect crack and pore image samples;
[0135] Step b: Calculate the R value of cracks and pores in each sample image;
[0136] Step c: Count the R value distribution of all samples and select a value that can well distinguish cracks and pores as the threshold value T. In the embodiment of this specification, after testing a large number of samples, the threshold value is selected as 3. When the aspect ratio R is greater than 3, it is marked as a crack, otherwise it is marked as a pore.
[0137] Figure 5 The following is a schematic diagram of cracks and pores identified in the SEM image, where the contour lines represent cracks and the gray areas represent pores. Finally, the crack and pore data of the entire SEM are shown in the following table:
[0138] Crack area ratio 11.0433% Pore area ratio 0.4462% Number of cracks 89 Maximum crack length 2.38 microns
[0139] Corresponding to the above-mentioned mineral scanning electron microscope pore detection method, some embodiments of this specification also provide a mineral scanning electron microscope pore detection method device, referring to Figure 6 As shown, in some embodiments, the apparatus may include:
[0140] A filtering unit 601 is used to perform color filtering on the mineral SEM image to obtain an image containing only cracks and pores;
[0141] A separate crack region identification unit 602 is used to extract a separate crack or separate pore sub-region from the image containing only cracks and pores by using a depth-first search algorithm;
[0142] A path calculation unit 603, used to identify a path from a sub-region start point to an end point in each sub-region by using a heuristic search algorithm;
[0143] The crack size and type identification unit 604 is used to calculate the size information of the sub-region according to the path from the starting point to the end point in the sub-region, and distinguish the sub-region as a crack or a pore according to the size information of the sub-region.
[0144] The embodiments of this specification perform color filtering on the mineral scanning electron microscope image to obtain an image containing only cracks and pores, and then use a depth-first search algorithm to extract sub-regions of individual cracks or individual pores from the image containing only cracks and pores. Since the cracks and pores have complex morphologies and certain linear connectivity features, the algorithm can accurately search for connected areas of cracks and pores, improve the efficiency of pore detection, and reduce the amount of calculation. Subsequently, a heuristic search algorithm is used to identify the path from the start point to the end point of the detected pores, and the size information of the pores is calculated based on the path, thereby distinguishing between cracks and pores. Compared with the method based on computer image processing technology in the prior art, the heuristic search algorithm can accurately identify the path of the cracks or pores according to their morphology, and the recognition accuracy is higher.
[0145] like Figure 7The schematic diagram of the structure of the node of the embodiment of this article is shown. In this embodiment, the structure of the node in the side chain network and the node in the main chain network is described, which may include a relay node, a decision maker node or other functional nodes. The node is referred to as a computer device in this embodiment. The computer device 702 may include one or more processors 704, such as one or more central processing units (CPUs), and each processing unit may implement one or more hardware threads. The computer device 702 may also include any memory 706, which is used to store any kind of information such as code, settings, data, etc. Non-limiting, for example, the memory 706 may include any one or more combinations of the following: any type of RAM, any type of ROM, flash memory device, hard disk, optical disk, etc. More generally, any memory can use any technology to store information. Further, any memory can provide volatile or non-volatile retention of information. Further, any memory can represent a fixed or removable component of the computer device 702. In one case, when the processor 704 executes an associated instruction stored in any memory or a combination of memories, the computer device 702 can perform any operation of the associated instruction. The computer device 702 also includes one or more drive mechanisms 708 for interacting with any storage, such as a hard disk drive mechanism, an optical disk drive mechanism, etc.
[0146] The computer device 702 may also include an input / output module 710 (I / O) for receiving various inputs (via input devices 712) and for providing various outputs (via output devices 714). A specific output mechanism may include a presentation device 716 and an associated graphical user interface (GUI) 718. In other embodiments, the input / output module 710 (I / O), the input device 712, and the output device 714 may not be included, and the computer device 702 may be used as a computer device in a network. The computer device 702 may also include one or more network interfaces 720 for exchanging data with other devices via one or more communication links 722. One or more communication buses 724 couple the components described above together.
[0147] The communication link 722 may be implemented in any manner, for example, through a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. The communication link 722 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc. governed by any protocol or combination of protocols.
[0148] Corresponds to Figure 1 The method in this article also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are executed.
[0149] The embodiment of the present invention also provides a computer readable instruction, wherein when the processor executes the instruction, the program therein causes the processor to execute the following Figure 1 The method shown.
[0150] The embodiments of the present specification also provide a computer program product, including at least one instruction or at least one program, wherein the at least one instruction or the at least one program is loaded and executed by a processor to implement the following Figure 1 The method shown.
[0151] It should be understood that in the various embodiments of this document, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this document.
[0152] It should also be understood that in the embodiments of this article, the term "and / or" is only a description of the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0153] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this article.
[0154] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0155] In the several embodiments provided herein, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or can be electrical, mechanical or other forms of connection.
[0156] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of this article.
[0157] In addition, each functional unit in each embodiment of this invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional unit.
[0158] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this article is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of this article. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0159] Specific embodiments are used in this article to illustrate the principles and implementation methods of this article. The description of the above embodiments is only used to help understand the methods and core ideas of this article. At the same time, for general technicians in this field, according to the ideas of this article, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on this article.
Claims
1. A mineral scanning electron microscope pore detection method, characterized in that: The method comprises: Color filtering was performed on the mineral SEM images to obtain images containing only cracks and pores; Extracting a sub-region of a single crack or a single pore from the image containing only cracks and pores using a depth-first search algorithm; A heuristic search algorithm is used to identify the path from the starting point to the end point of each sub-region; According to the path from the starting point to the end point in the sub-region, the size information of the sub-region is calculated, and the sub-region is distinguished as a crack or a pore according to the size information of the sub-region.
2. The method according to claim 1, characterized in that Color filtering is performed on mineral SEM images to obtain images containing only cracks and pores, including: Identify types of mineral SEM images; If the mineral scanning electron microscope image is a grayscale image, filtering the mineral scanning electron microscope image to obtain an image containing only cracks and pores; If the mineral scanning electron microscope image is a color image, the mineral scanning electron microscope image is subjected to three primary color filtering processing to obtain an image containing only cracks and pores.
3. The method according to claim 2, characterized in that The mineral scanning electron microscope image is subjected to filtering processing, including: extracting the gray value of each pixel in the mineral scanning electron microscope image; Compare the gray value of each pixel with the gray threshold; for pixels whose gray value is less than the gray threshold, mark them as cracks or pore areas; The grayscale threshold is obtained by testing the collected crack and pore sample images.
4. The method according to claim 2, characterized in that: The mineral scanning electron microscope image is subjected to three primary color filtering processing, including: For each pixel point in the mineral scanning electron microscope image, extract the pixel value of the pixel point in the RGB three channels; Calculate the absolute value of the pixel difference between the pixel value of the pixel point in the RGB three channels and the pixel threshold of the RGB three channels; After multiple tests on sample images, the tolerance value is determined; If the absolute values of the three channels are all less than the tolerance value, the pixel point is marked as a crack or pore area; The pixel thresholds of the RGB three channels are obtained by presetting the target color.
5. The method according to claim 1, characterized in that: The method of extracting a sub-region of a single crack or a single pore from the image containing only cracks and pores by using a depth-first search algorithm includes: Use the depth-first search algorithm to traverse the pixels in the area where the cracks or pores are located; Use the adjacency matrix to calculate the connection relationship between every two pixels; If the value of the adjacency matrix is the first preset value, it means that the two pixel points are adjacent and belong to the same crack or pore area; If the value of the adjacency matrix is the second preset value, it means that there is no connection relationship between the two pixel points and they do not belong to the same crack or pore area.
6. The method according to claim 1, characterized in that The method of using a heuristic search algorithm to identify a path from a starting point to an end point in each sub-region includes: Select a pixel point in the crack area as the starting node and add it to the open list; Define a heuristic function to represent the distance from the current node to the end point of the crack; define an actual cost function to represent the actual distance from the starting node to the current node; define a total cost function as the sum of the heuristic function and the actual cost function, representing the total cost from the starting node to the end point of the crack through the current node; Select the node with the smallest total cost from the open list as the current node, remove it from the open list, and add it to the closed list; Check all adjacent nodes of the current node. If the adjacent node is in the closed list, ignore the adjacent node. If the adjacent node is not in the open list, add it to the open list, update the heuristic function value, actual cost function value and total cost function value, and set the current node as the parent node of the adjacent node; If the adjacent node is in the open list and the actual cost function value of the new path is smaller, then update the total cost function value and the actual cost function value of the adjacent node, and set the current node as the parent node of the adjacent node; The search ends when the open list is empty or the crack endpoint has been added to the closed list; From the target node, trace back along the parent node until returning to the starting node, record the backtracking path, and obtain the path from the starting point to the end point of the fracture or pore.
7. The method according to claim 1, characterized in that The size information of the calculation sub-area includes: Calculate the path length according to the identified path from the starting point to the end point of the sub-area; Taking the path length as the length of the crack or pore; Dividing the path length into a number of equal parts by combining the length and width of the SEM image and the length of the crack or pore; Draw a perpendicular line at each equally divided point and calculate the distance between the perpendicular line and the intersection of the fracture or pore boundary; Calculating an average distance of the distances of the intersection points and taking it as the width of the crack or pore; An aspect ratio is calculated based on the length and width.
8. The method according to claim 1, characterized in that: The size information of the sub-regions at least includes: a sub-region length ratio, and the distinguishing sub-regions as cracks or pores according to the size information of the sub-regions includes: Compare the aspect ratio of each sub-region with the aspect ratio threshold. If the aspect ratio of the sub-region is greater than the aspect ratio threshold, the sub-region is determined to be a crack, otherwise it is a pore. The aspect ratio threshold determination process includes: Collect images of fracture and pore samples; Calculate the aspect ratio of cracks or pores in each sample image; The aspect ratio distribution of all crack or pore samples is statistically analyzed, and the aspect ratio threshold for distinguishing cracks and pores is determined based on the aspect ratio distribution.
9. A mineral scanning electron microscope pore detection device, characterized in that: include: A filtering unit is used to perform color filtering on the mineral scanning electron microscope image to obtain an image containing only cracks and pores; A separate crack region identification unit, used for extracting a separate crack or separate pore sub-region from the image containing only cracks and pores by using a depth-first search algorithm; A path calculation unit, used for identifying a path from a starting point to an end point of a sub-region in each sub-region by using a heuristic search algorithm; The crack size and type identification unit is used to calculate the size information of the sub-region according to the path from the starting point to the end point in the sub-region, and distinguish the sub-region as a crack or a pore according to the size information of the sub-region.
10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 8 is implemented.
11. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor of a computer device, the method according to any one of claims 1 to 8 is implemented.
12. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor of a computer device, the method according to any one of claims 1 to 8 is implemented.