Crystal lattice fringe extraction method and device, computer device, and program product
By automatically extracting lattice fringes of soot particles from transmission electron microscope images based on the minimum angle between the chord direction and the endpoint pairs, the problem of inaccurate extraction in existing technologies is solved, and efficient and accurate lattice fringe extraction is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HARBIN INSTITUTE OF TECHNOLOGY (SHENZHEN) (INSTITUTE OF SCIENCE AND TECHNOLOGY INNOVATION HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN)
- Filing Date
- 2025-08-25
- Publication Date
- 2026-06-23
AI Technical Summary
Existing methods for extracting lattice fringes from transmission electron microscope images have low accuracy, inconsistent manual selection of neighboring lattice fringes, and automatic algorithms that do not consider the overall geometric characteristics of soot particles, leading to calculation errors.
By acquiring the target center and skeleton connected regions of the soot particle image, the lattice fringes are determined based on the chord direction. The target lattice fringes are selected by using the minimum included angle and matching degree of the endpoint pairs, and the nearest lattice fringes are connected to generate the lattice extraction results.
It enables the automatic and accurate extraction of lattice fringes in images with poor contrast or blurriness, reducing manual processing costs and improving the accuracy and completeness of lattice fringe extraction.
Smart Images

Figure CN121259062B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of carbon soot structure analysis technology, specifically to methods, apparatus, computer equipment and program products for extracting lattice fringes. Background Technology
[0002] Identifying the lattice fringes of soot particles from high-magnification images obtained by transmission electron microscopy (TEM) can characterize the microstructure and evolution of soot particles in flames, thus revealing the evolution mechanism of soot particles in flames. Currently, methods for extracting lattice fringes from high-magnification TEM images suffer from inaccurate lattice fringe extraction.
[0003] Furthermore, calculating the fringe spacing for each lattice fringe requires selecting the corresponding nearest neighbor lattice fringe for each lattice fringe. Manually selecting nearest neighbor lattice fringe may result in different selections by different operators. While an automatic algorithm identifies the orientation of each lattice fringe and then selects fringe with a similar tilt angle difference (not exceeding 15°) as its nearest neighbor, this process introduces some physical errors into the calculated fringe spacing. Summary of the Invention
[0004] In view of this, this application provides a method, apparatus, computer equipment, and program product for extracting lattice fringes to solve the problem of low accuracy in lattice fringe extraction.
[0005] In a first aspect, this application provides a method for extracting lattice fringes, comprising: acquiring a first image and a target center corresponding to the first image, the first image including multiple skeleton connected regions located in a region of interest, the target center being the center of the soot particle corresponding to the region of interest; acquiring a first rectangle surrounding each skeleton connected region and a first center corresponding to each first rectangle; determining a first line segment corresponding to each skeleton connected region based on the line connecting the target center and each first center, and determining a target perpendicular line corresponding to each first line segment; for any target skeleton connected region in each skeleton connected region, obtaining multiple first angle values based on the angle value of the minimum angle between the second line segment corresponding to each endpoint pair in the target skeleton connected region and its corresponding target perpendicular line; determining the endpoint pair corresponding to the minimum first angle value as the target endpoint pair, and determining the lattice fringes corresponding to the target endpoint pair as the target lattice fringes corresponding to the target skeleton connected region, thereby generating a fringe extraction result corresponding to the first image.
[0006] The fringe extraction scheme based on the chord direction of this application can automatically, reasonably and accurately determine the target lattice fringes corresponding to each skeleton connected domain. Moreover, since this application is based on the extraction of target lattice fringes based on the chord direction, it is also applicable to the extraction of lattice fringes in original images with poor contrast or blurriness. This not only reduces the cost of manual identification and processing, but also effectively extracts lattice fringes with physical meaning, solving the problem of low accuracy in lattice fring extraction.
[0007] In an optional implementation, the method further includes: obtaining the stripe length of the lattice stripe corresponding to each endpoint pair; determining the matching degree of each endpoint pair based on the fusion result of the first angle value corresponding to each endpoint pair and the stripe length corresponding to it; and determining the lattice stripe corresponding to the endpoint pair whose first angle value is less than or equal to a first preset angle value and whose matching degree is the greatest as the target lattice stripe corresponding to the target skeleton connected region.
[0008] By using the first angle value and matching degree corresponding to each endpoint pair, each endpoint pair in the connected domain of the target skeleton is filtered. That is, the endpoint pair with the first angle value less than or equal to the first preset angle value and the matching degree is the largest, and the corresponding lattice fringes are determined as the target lattice fringes corresponding to the connected domain of the target skeleton. This can more reasonably determine the target lattice fringes corresponding to the connected domain of the target skeleton, and avoid the situation where the first angle value of the determined target lattice fringes is the smallest but the fringe length is short.
[0009] In one optional implementation, the matching degree of each endpoint pair is determined based on the fusion result of the first angle value corresponding to each endpoint pair and the corresponding stripe length, including: determining the maximum stripe length from multiple stripe lengths, and determining the maximum first angle value from multiple first angle values; determining the normalized angle value corresponding to each endpoint pair based on the ratio between the first angle value corresponding to each endpoint pair and the maximum first angle value; determining the first difference corresponding to each endpoint pair based on the difference between the first preset value and each normalized angle value; determining the normalized length value corresponding to each endpoint pair based on the ratio between the stripe length corresponding to each endpoint pair and the maximum stripe length; and performing weighted fusion on the first difference and the normalized length value corresponding to each endpoint pair to obtain the matching degree of each endpoint pair.
[0010] By weighted and fused the first difference and normalized length value corresponding to each endpoint pair, the matching degree of each endpoint pair can be determined. This ensures that the matching degree of each endpoint pair is relatively reasonable. The target lattice fringes subsequently determined based on the matching degree and the first angle value are relatively reasonable and accurate, and have certain physical significance.
[0011] In an optional implementation, the method further includes: for any first target lattice fringe among the target lattice fringes, determining the angle value of the minimum included angle between the first target lattice fringe and its neighboring target lattice fringe, to obtain a second angle value; determining a first target distance based on the distance between the first endpoint of the first target lattice fringe and the second endpoint of its neighboring target lattice fringe, wherein the first endpoint and the second endpoint are adjacent; if the second angle value is less than or equal to a second preset angle value and the first target distance is less than a first preset distance, then connecting the first target lattice fringe and the neighboring target lattice fringe to generate a fringe extraction result corresponding to the first image.
[0012] When the first target lattice stripe and its neighboring target lattice stripes satisfy the condition that the second angle value is less than or equal to the second preset angle value and the first target distance is less than the first preset distance, the first target lattice stripe and its neighboring target lattice stripes are connected to ensure good integrity of the extracted target lattice stripes.
[0013] In an optional implementation, the method further includes: for any second target lattice fringe among the target lattice fringes, determining a second rectangle surrounding the second target lattice fringe and a second center corresponding to the second rectangle; determining a third target lattice fringe adjacent to the second target lattice fringe in the direction from the target center to the second center; if there are local parallel segments between the second target lattice fringe and the third target lattice fringe, determining a second target distance between the two local parallel segments; if the second target distance is greater than or equal to a second preset distance and less than a third preset distance, determining the second target distance as the target fringe spacing; if the fringe length corresponding to the second target lattice fringe is greater than or equal to the second preset fringe length, determining the fringe length corresponding to the second target lattice fringe as the target fringe length; determining the ratio of the fringe length corresponding to the second target lattice fringe to the length of its corresponding line segment as the target fringe curvature; and generating lattice fringe analysis results for each target fringe spacing, each target fringe length, and each target fringe curvature.
[0014] Based on the spacing, length, and curvature of each target fringe, lattice fringe analysis results can be generated relatively accurately and reasonably, facilitating relevant technicians to conduct corresponding analyses based on the lattice fringe analysis results.
[0015] In some optional implementations, acquiring the first image includes: acquiring the original image corresponding to the soot particles; performing image processing on the original image to obtain a binarized image; and performing skeletonization processing on the region of interest in the binarized image to obtain the first image.
[0016] Image processing of the original image can remove interference information, and since the pixel values of the binarized image are relatively simple, computational costs can be reduced. Furthermore, skeletonization of the connected components in the region of interest within the binarized image not only simplifies the shape of the connected components but also preserves the core structural features of the soot particles, reducing errors in subsequent analysis.
[0017] In some optional implementations, image processing is performed on the original image to obtain a binarized image, including: performing a negative conversion on the original image to obtain a negative conversion processed image; performing texture enhancement on the region of interest in the negative conversion processed image to obtain a texture-enhanced image; performing contrast adjustment on the region of interest in the texture-enhanced image to obtain a contrast-adjusted image; performing Gaussian low-pass filtering on the region of interest in the contrast-adjusted image to obtain a first filtered image; performing morphological image processing on the region of interest in the first filtered image to obtain a morphologically processed image; performing frequency bandpass filtering on the region of interest in the morphologically processed image to obtain a second filtered image; and performing binarization processing on the region of interest in the second filtered image to obtain a binarized image.
[0018] By sequentially performing texture enhancement, contrast adjustment, Gaussian low-pass filtering, morphological processing, frequency bandpass filtering, and binarization on the original image, a binarized image with clearer connected components can be obtained, further ensuring that the target lattice fringes can be extracted more accurately based on the binarized image.
[0019] Secondly, this application provides a lattice fringe extraction device, comprising: a first acquisition module for acquiring a first image and a target center corresponding to the first image, the first image including multiple skeleton connected regions located in a region of interest, and the target center being the center of the soot particle corresponding to the region of interest; a second acquisition module for acquiring a first rectangle surrounding each skeleton connected region and a first center corresponding to each first rectangle; a first determination module for determining a first line segment corresponding to each skeleton connected region based on the line connecting the target center and each first center, and determining a target perpendicular line corresponding to each first line segment; a second determination module for obtaining multiple first angle values for any target skeleton connected region in each skeleton connected region based on the angle value of the minimum angle between the second line segment corresponding to each endpoint pair in the target skeleton connected region and its corresponding target perpendicular line; and a generation module for determining the endpoint pair corresponding to the minimum first angle value as a target endpoint pair, and determining the lattice fringe corresponding to the target endpoint pair as the target lattice fringe corresponding to the target skeleton connected region, thereby generating a fringe extraction result corresponding to the first image.
[0020] Thirdly, this application provides a computer device, including: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the lattice fringe extraction method of the first aspect or any corresponding embodiment described above.
[0021] Fourthly, this application provides a computer program product, including computer instructions for causing a computer to execute the lattice fringe extraction method of the first aspect or any corresponding embodiment described above. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in the specific embodiments of this application or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0023] Figure 1 This is a schematic flowchart of a method for extracting lattice fringes according to an embodiment of this application;
[0024] Figure 2 These are schematic diagrams related to the first image provided in the embodiments of this application;
[0025] Figure 3 This is a schematic diagram of the first angle value provided according to an embodiment of this application;
[0026] Figure 4 This is a schematic diagram of another process for extracting target lattice fringes according to an embodiment of this application;
[0027] Figure 5 This is a schematic diagram of a first target lattice fringe and its neighboring target lattice fringe according to an embodiment of this application;
[0028] Figure 6 This is a schematic diagram of another process for extracting target lattice fringes according to an embodiment of this application;
[0029] Figure 7 This is a schematic diagram illustrating the calculation of the target stripe spacing according to an embodiment of this application;
[0030] Figure 8 It is a stripe spacing histogram provided according to an embodiment of this application;
[0031] Figure 9 It is a stripe length histogram provided according to an embodiment of this application;
[0032] Figure 10It is a stripe curvature histogram provided according to an embodiment of this application;
[0033] Figure 11 This is a flowchart illustrating another method for extracting lattice fringes according to an embodiment of this application;
[0034] Figure 12 This is a flowchart illustrating a method for extracting lattice fringes according to an embodiment of this application.
[0035] Figure 13 This is a structural block diagram of a lattice fringe extraction device according to an embodiment of this application;
[0036] Figure 14 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of this application. Detailed Implementation
[0037] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0038] The lattice fringes of soot particles identified from high-magnification images obtained by transmission electron microscopy (TEM) can characterize the microstructure and evolution of soot particles in flames, thus revealing the evolutionary mechanism of soot particles in flames. Currently, methods for extracting lattice fringes from high-magnification TEM images mainly include:
[0039] 1. First, morphological modification is performed on the binarized image to maintain the integrity of the main crystal fringe structure. Then, skeletonization processing is performed on the TEM image to extract the lattice fringes. Morphological modification based on morphological closing and opening operations requires the use of structuring elements (such as 2×2 square elements) to repair broken fringes, fill small gaps, and connect fringes broken due to thresholding. Then, pseudo-branches are eliminated to remove burrs and T / Y-type patterns, thereby reducing the computational cost of pixel-by-pixel repair. However, morphological closing and opening operations cannot completely eliminate complex Y-type branches, and the size of the structuring elements needs to be manually adjusted (too large an element leads to loss of detail). Furthermore, if the lattice fringes of the TEM image have poor contrast and clarity, the calculated crystal layer orientation is prone to errors.
[0040] 2. First, skeletonize the binarized image. Then, use isolated pixels and H-type breakage techniques to clean up noise and detect branch points, deleting short lateral branches (angle > 60°) to preserve the effective lattice fringe topology. Finally, extract the lattice fringes from the skeletonized TEM image. However, if there are multiple connected points (such as connecting three branches) or it is difficult to determine the direction of the main fringe, the method of skeletonizing first and then deleting short branches is prone to accidentally deleting reasonable lattice fringes.
[0041] Furthermore, after extracting the lattice fringes from the soot particles, calculating the fringe spacing for each lattice fringe requires selecting the corresponding nearest neighbor lattice fringes for each lattice fringe. If the nearest neighbor lattice fringes are selected manually (e.g., by clicking or selecting via the GUI), different operators may choose different nearest neighbor lattice fringes, and this method is not suitable for large-scale dataset analysis. If the orientation of each lattice fringe is identified by an automatic algorithm, and then the lattice fringes with a similar tilt angle difference (not exceeding 15°) to each lattice fringe are selected as their nearest neighbor lattice fringes, the calculated fringe spacing will introduce some physical errors because only the tilt angle direction of the lattice fringes themselves is considered, without taking into account the overall geometric characteristics of the soot particles.
[0042] In view of this, this application provides a method, apparatus, computer device, and program product for extracting lattice fringes. The method includes: acquiring a first image and a target center corresponding to the first image, the first image including multiple skeleton connected regions located in a region of interest, and the target center being the center of the soot particle corresponding to the region of interest; acquiring a first rectangle surrounding each skeleton connected region and a first center corresponding to each first rectangle; determining a first line segment corresponding to each skeleton connected region based on the line connecting the target center and each first center, and determining a target perpendicular line corresponding to each first line segment; for any target skeleton connected region in each skeleton connected region, obtaining multiple first angle values based on the angle value of the minimum included angle between the second line segment corresponding to each endpoint pair in the target skeleton connected region and its corresponding target perpendicular line; determining the endpoint pair corresponding to the minimum first angle value as the target endpoint pair, and determining the lattice fringes corresponding to the target endpoint pair as the target lattice fringes corresponding to the target skeleton connected region, and generating a fringe extraction result corresponding to the first image.
[0043] The lattice fringe method of this application, for each skeleton connected region, determines a first line segment based on the line connecting the first center of the first rectangle corresponding to the skeleton connected region and the center of the target circle, and then determines the target perpendicular line corresponding to the first line segment. The direction of the target perpendicular line is the chord direction corresponding to the first line segment, which is also the ideal direction of the target lattice fringe to be extracted. By determining the angle value of the minimum angle between each endpoint in the skeleton connected region and the corresponding second line segment and the target perpendicular line, that is, the matching degree of each second line segment with its chord direction, the target lattice fringe corresponding to each skeleton connected region is determined. The fringe extraction scheme based on the chord direction of this application can automatically, reasonably and accurately determine the target lattice fringe corresponding to each skeleton connected region one by one. Moreover, since this application extracts target lattice fringe based on the chord direction, it is also applicable to the extraction of lattice fringes in original images with poor contrast or blurriness. This not only reduces the cost of manual recognition and processing, but also effectively extracts lattice fringes with physical meaning, solving the problem of low accuracy in lattice fringe extraction.
[0044] According to an embodiment of this application, a method for extracting lattice fringes is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0045] This embodiment provides a method for extracting lattice fringes, which can be used in computer equipment. Figure 1 This is a flowchart of a method for extracting lattice fringes according to an embodiment of this application, as shown below. Figure 1 As shown, the process includes the following steps:
[0046] Step S101: Obtain a first image and the target center corresponding to the first image. The first image includes multiple skeleton connected regions located in the region of interest, and the target center is the center of the soot particle corresponding to the region of interest.
[0047] The first image can be obtained by image processing of an original image, such as a TEM image. The original image can be cropped from a whole image corresponding to several soot particles; that is, the original image can correspond to one soot particle. The region of interest in the first image can be the region where the soot particle corresponding to the first image is located. The number of regions of interest in the first image can be one or more; this application does not limit this. Furthermore, as... Figure 2As shown, the Region of Interest (ROI) in the first image can be manually labeled, and the target center of the first image can be the center of the soot particles corresponding to the ROI. The position of the target center in the first image can be manually labeled, or it can be automatically identified by computer equipment according to pre-set rules.
[0048] A skeletonized connected region can be a new connected region obtained by skeletonizing each connected region in the first image.
[0049] Step S102: Obtain the first rectangle that surrounds each skeleton connected domain and the first center corresponding to each first rectangle.
[0050] like Figure 2 As shown, the first rectangle is obtained by enclosing the corresponding skeleton connected region with a rectangle. The first center of the first rectangle can be the intersection of the two diagonals of the first rectangle. In other words, one skeleton connected region in the first image corresponds to one first rectangle.
[0051] Step S103: Determine the first line segment corresponding to each skeleton connected domain based on the line connecting the target circle center and each first center, and determine the target perpendicular line corresponding to each first line segment.
[0052] like Figure 2 As shown, in the direction from the target center to the first center, a first line segment is determined based on the line connecting the target center and the first center. The line segment perpendicular to the first line segment is then defined as the target perpendicular line corresponding to the first line segment. The direction of the target perpendicular line can be the chord direction corresponding to the corresponding skeleton connected region. This chord direction can also be considered as the ideal direction of the target lattice fringes corresponding to the skeleton connected region. Thus, one skeleton connected region corresponds to one target perpendicular line, that is, one skeleton connected region corresponds to one chord direction.
[0053] Step S104: For any target skeleton connected region in each skeleton connected region, based on the angle value of the minimum angle between each endpoint in the target skeleton connected region and the corresponding second line segment and its corresponding target perpendicular line, obtain multiple first angle values.
[0054] like Figure 3 As shown, a target skeleton connected component can have multiple endpoints, and an endpoint pair is any combination of two endpoints in the target skeleton connected component. The second line segment corresponding to an endpoint pair can be a line segment obtained by directly connecting the two endpoints in the endpoint pair. Thus, we can obtain one endpoint pair corresponding to one second line segment, and one target skeleton connected component corresponding to multiple endpoint pairs, that is, multiple second line segments.
[0055] As a specific example, such as Figure 3As shown, the minimum angle between the endpoint and the corresponding second line segment and the target perpendicular line corresponding to the connected region of the target skeleton can be as follows: Figure 3 The first angle value shown.
[0056] Step S105: Determine the endpoint pair corresponding to the smallest first angle value as the target endpoint pair, and determine the lattice fringes corresponding to the target endpoint pair as the target lattice fringes corresponding to the target skeleton connected domain, and generate the fringe extraction result corresponding to the first image.
[0057] After obtaining the stripe extraction results corresponding to the first image, the stripe spacing, stripe length and stripe curvature can be calculated based on the relevant stripe information of each target lattice stripe in the stripe extraction results. Finally, the microstructure analysis of the particles corresponding to the first image, such as carbon soot particles, can be performed based on the stripe spacing, stripe length and stripe region.
[0058] The fringe extraction scheme based on the chord direction of this application can automatically, reasonably and accurately determine the target lattice fringes corresponding to each skeleton connected domain. Moreover, since this application is based on the extraction of target lattice fringes based on the chord direction, it is also applicable to the extraction of lattice fringes in original images with poor contrast or blurriness. This not only reduces the cost of manual identification and processing, but also effectively extracts lattice fringes with physical meaning, solving the problem of low accuracy in lattice fring extraction.
[0059] In some alternative implementations, such as Figure 4 As shown, the method for extracting lattice fringes in this application further includes:
[0060] Step S401: Obtain the length of the lattice stripe corresponding to each endpoint pair to obtain multiple stripe lengths.
[0061] The connectivity path between a pair of endpoints can be determined by the lattice fringes corresponding to that pair, and the fringe length of that pair can be determined based on the number of pixels corresponding to the lattice fringes. For example, Figure 3 The endpoints shown correspond to lattice fringes, with the number of pixels set to 15, each pixel being 0.1 nanometers (nm), and the length of the pixel at the inflection point set to 0.2 nm. Therefore... Figure 3 The endpoints shown can have a fringe length of 1.7 nm corresponding to the lattice fringes.
[0062] Step S402: Based on the fusion result of the first angle value and the stripe length corresponding to each endpoint pair, determine the matching degree corresponding to each endpoint pair.
[0063] This application does not impose any restrictions on the method of fusing the first angle value and the fringe length of the lattice fringes corresponding to the endpoint pair. For example, the first angle value and fringe length corresponding to the endpoint pair can be normalized first, and then the results of the normalization can be directly added together to obtain the matching degree corresponding to the endpoint pair; of course, the results of the normalization can also be weighted and averaged to obtain the matching degree corresponding to the endpoint pair.
[0064] Step S403: The lattice fringes corresponding to the endpoint pairs whose first angle value is less than or equal to the first preset angle value and whose matching degree is the greatest are determined as the target lattice fringes corresponding to the target skeleton connected domain.
[0065] As a specific example, the first preset angle value can be 30 degrees, but it is not limited to 30 degrees. This application does not specifically limit the first preset angle value.
[0066] By using the first angle value and matching degree corresponding to each endpoint pair, each endpoint pair in the connected domain of the target skeleton is filtered. That is, the endpoint pair with the first angle value less than or equal to the first preset angle value and the matching degree is the largest, and the corresponding lattice fringes are determined as the target lattice fringes corresponding to the connected domain of the target skeleton. This can more reasonably determine the target lattice fringes corresponding to the connected domain of the target skeleton, and avoid the situation where the first angle value of the determined target lattice fringes is the smallest but the fringe length is short.
[0067] In some alternative implementations, step S402 includes:
[0068] Step a1: Determine the maximum stripe length from multiple stripe lengths, and determine the maximum first angle value from multiple first angle values.
[0069] Step a2: Determine the normalized angle value corresponding to each endpoint pair based on the ratio between the first angle value corresponding to each endpoint pair and the maximum first angle value.
[0070] Step a3: Based on the difference between the first preset value and each normalized angle value, determine the first difference corresponding to each endpoint pair.
[0071] Step a4: Determine the normalized length value corresponding to each endpoint pair based on the ratio between the stripe length corresponding to each endpoint pair and the maximum stripe length.
[0072] Step a5: Perform weighted fusion of the first difference and normalized length value corresponding to each endpoint pair to obtain the matching degree corresponding to each endpoint pair.
[0073] As a concrete example, for any pair of endpoints, the first angle value corresponding to the endpoint pair can be normalized by the ratio of the first angle value corresponding to the endpoint pair to the maximum first angle value, resulting in a normalized angle value. The first difference between a first preset value and the normalized angle value represents the directional consistency between the lattice fringes corresponding to the endpoint pair and the target perpendicular line. That is, lattice fringes parallel to the target perpendicular line are selected as much as possible, thereby ensuring that the orientation of the target lattice fringes corresponding to the extracted target skeletons conforms to the expected geometric constraints. For example, the first preset value can be set to 1, but it is not limited to 1 and can be any other suitable value.
[0074] As a specific example, for any pair of endpoints, the normalized length value can be obtained by normalizing the fringe length corresponding to the endpoint pair by the ratio of the fringe length corresponding to the endpoint pair to the maximum fringe length. This allows for the priority retention of longer lattice fringes among endpoint pairs with similar orientations, avoiding the selection of short, burr branches.
[0075] As a specific example, the matching degree can be expressed as: Matching degree = First weight × (1 - First angle value / Maximum first angle value) + Second weight × Stripe length / Maximum stripe length. It should be understood that the specific values of the first and second weights can be flexibly determined, and this application does not impose specific limitations on the first and second weights. For example, the first weight can be 0.7 and the second weight can be 0.3.
[0076] By weighted and fused the first difference and normalized length value corresponding to each endpoint pair, the matching degree of each endpoint pair can be determined. This ensures that the matching degree of each endpoint pair is relatively reasonable. The target lattice fringes subsequently determined based on the matching degree and the first angle value are relatively reasonable and accurate, and have certain physical significance.
[0077] After extracting the target lattice fringes corresponding to each target skeleton connected region using the method described above, each target lattice fringe is unbranched, so the newly generated branches originate from breaks. Therefore, it is necessary to reconnect the broken target lattice fringes. In some optional embodiments, the lattice fringe extraction method of this application further includes:
[0078] Step b1: For any first target lattice fringe among the target lattice fringes, determine the angle value of the minimum included angle between the first target lattice fringe and its nearest neighboring target lattice fringes, and obtain the second angle value.
[0079] Step b2: Determine the first target distance based on the distance between the first endpoint of the first target lattice fringe and the second endpoint of its neighboring target lattice fringe, wherein the first endpoint and the second endpoint are adjacent.
[0080] Step b3: If the second angle value is less than or equal to the second preset angle value and the first target distance is less than the first preset distance, then connect the first target lattice stripes with the neighboring target lattice stripes to generate the stripe extraction result corresponding to the first image.
[0081] like Figure 5 As shown, the second angle value between the first target lattice fringe and its nearest neighbor target lattice fringe can be the angle value of the minimum included angle between the line segment corresponding to the first target lattice fringe and the line segment corresponding to the nearest neighbor target lattice fringe. The line segment corresponding to the first target lattice fringe can be a line segment passing through the two endpoints of the first target lattice fringe, and similarly, the line segment corresponding to the nearest neighbor target lattice fringe can be a line segment passing through the two endpoints of the nearest neighbor target lattice fringe. The second endpoint in the nearest neighbor target lattice fringe is close to the first endpoint in the first target lattice fringe, that is, the second endpoint is adjacent to the first endpoint.
[0082] When the first target lattice stripe and its neighboring target lattice stripes satisfy the condition that the second angle value is less than or equal to the second preset angle value and the first target distance is less than the first preset distance, the first target lattice stripe and its neighboring target lattice stripes are connected to ensure good integrity of the extracted target lattice stripes.
[0083] In one optional implementation, after obtaining the stripe extraction result corresponding to the first image, the pixel stripe length of each target lattice stripe can be determined, and the actual stripe length of each target lattice stripe can be determined according to the pixel-physical size conversion coefficient; then, the target lattice stripes with actual stripe lengths less than a second preset value can be deleted, that is, the meaningless target lattice stripes that are too short in the stripe extraction result are removed.
[0084] As a specific example, the second preset value can be set to 0.483 nm (the length of two polycyclic aromatic hydrocarbons), but the second preset value is not limited to 0.483 nm, and can be any other suitable value. This application does not impose any restrictions on this.
[0085] To facilitate understanding of the lattice fringe extraction process in this application, the following is combined with... Figure 6 The illustrated flowchart further describes the extraction process of the lattice fringes in this application. For example... Figure 6 As shown, the process of extracting lattice fringes may include steps S601 to S617.
[0086] Step S601: Obtain a first image, wherein the first image includes multiple skeleton connected components.
[0087] Step S602: Traverse each skeleton connected component. For example, obtain the coordinates of the i-th skeleton connected component.
[0088] Step S603: Circumscribe the i-th skeleton connected region with a rectangle to obtain the first rectangle, and obtain the coordinates of the first center corresponding to the i-th skeleton connected region.
[0089] Step S604: Obtain the chord direction corresponding to the i-th skeleton connected region, that is, the direction of the target perpendicular line corresponding to the i-th skeleton connected region.
[0090] Step S605: For each endpoint pair in the i-th skeleton connected domain, set the first angle value corresponding to each endpoint pair to the unknown 1 and determine the normalized angle value based on the ratio of the first angle value to the maximum first angle value.
[0091] Step S606: Set the stripe length corresponding to each endpoint pair to an unknown number 2 and determine the normalized length value based on the ratio of the stripe length to the maximum stripe length.
[0092] Step S607: Construct an objective function based on the normalized angle value and the normalized length value. For example, determine the first difference using the difference between 1 and the normalized angle value, and obtain the objective function by summing the product of the first difference and the first weight corresponding to the first difference, and the product of the normalized length value and the second weight corresponding to the normalized length value.
[0093] Step S608: Using the first angle value and stripe length corresponding to each endpoint pair in the i-th skeleton connected domain, the objective function is solved, that is, the objective function is maximized to obtain the target endpoint pair with the highest matching degree.
[0094] Step S609: Determine whether the first angle value corresponding to the target endpoint pair is ≤30°; if the first angle value corresponding to the target endpoint pair is ≤30°, then execute step S610; if the first angle value corresponding to the target endpoint pair is >30°, then execute step S611.
[0095] Step S610: Determine the lattice fringes corresponding to the target endpoints as the target lattice fringes.
[0096] Step S611, i = i + 1.
[0097] Step S612: For each target lattice fringe, search for the nearest neighbor target lattice fringe.
[0098] Step S613: Determine whether the distance to the first target is less than the first preset distance and whether the second angle value is less than 15°; if the distance to the first target is less than the first preset distance and the second angle value is less than 15°, then execute step S614; otherwise, execute step S618.
[0099] Wherein, the first target distance is the distance between the first endpoint of the first target lattice fringe and the second endpoint of its neighboring target lattice fringe; the second angle value is the angle value of the minimum included angle between the first target lattice fringe and its neighboring target lattice fringe.
[0100] Step S614, break and reconnect, that is, connect the first target lattice stripe with its neighboring target lattice stripes.
[0101] Step S615: After connection, calculate the actual stripe length of each target lattice stripe.
[0102] Step S616: Delete the target lattice stripes whose actual stripe length is less than 0.483 nm.
[0103] Step S617: After deletion, perform result analysis based on each target lattice fringe.
[0104] In some optional embodiments, the lattice fringe method provided in this application further includes:
[0105] Step c1: For any second target lattice fringe among the various target lattice fringes, determine the second rectangle surrounding the second target lattice fringe and the second center corresponding to the second rectangle. For details on the second rectangle and the second center, please refer to the first rectangle and the first center shown above.
[0106] Step c2: In the direction from the center of the target circle to the second center, determine the third target lattice fringe adjacent to the second target lattice fringe.
[0107] Step c3: If there are locally parallel segments between the second target lattice fringes and the third target lattice fringes, then determine the second target distance between the two locally parallel segments.
[0108] Step c4: If the second target distance is greater than or equal to the second preset distance and the second target distance is less than the third preset distance, then the second target distance is determined as the target stripe spacing.
[0109] Step c5: If the stripe length corresponding to the second target lattice stripe is greater than or equal to the second preset stripe length, then the stripe length corresponding to the second target lattice stripe is determined as the target stripe length.
[0110] Step c6: The ratio of the stripe length corresponding to the second target lattice stripe to the length of its corresponding line segment is determined as the target stripe curvature.
[0111] Step c7 generates lattice fringe analysis results for each target fringe spacing, each target fringe length, and each target fringe curvature.
[0112] like Figure 7As shown, in the direction from the target circle to the second center, a third target lattice fringe adjacent to the second target lattice fringe is searched; if a third target lattice fringe exists and there is a local parallel segment between the third target lattice fringe and the second target lattice fringe, the second target distance between the local parallel segments is calculated; if the second target distance is greater than or equal to the second preset distance and the second target distance is less than the third preset distance, the second target distance is determined as the target fringe spacing.
[0113] After determining the target fringe spacing, target fringe length, and target fringe curvature, these parameters can be analyzed to generate lattice fringe analysis results. For example, based on the various target fringe spacings, the following can be generated: Figure 8 The histogram of fringe spacing and the generation of each target fringe length are shown. Figure 9 The histogram of stripe lengths shown and the data generated based on the curvature of each target stripe are also presented. Figure 10 The histogram of stripe curvature is shown. Subsequently, the microstructure of particles such as soot particles can be analyzed based on the histogram of stripe spacing, the histogram of stripe length, and the histogram of stripe curvature.
[0114] Based on the spacing, length, and curvature of each target fringe, lattice fringe analysis results can be generated relatively accurately and reasonably, facilitating relevant technicians to conduct corresponding analyses based on the lattice fringe analysis results.
[0115] This embodiment provides a method for extracting lattice fringes, which can be used in computer equipment. Figure 11 This is a flowchart of a method for extracting lattice fringes according to an embodiment of this application, as shown below. Figure 11 As shown, the process includes the following steps:
[0116] Step S701: Obtain the first image and the target circle center corresponding to the region of interest in the first image. The first image includes multiple skeleton connected regions.
[0117] Specifically, step S701 includes:
[0118] Step S7011: Obtain the original image corresponding to the carbon soot particles.
[0119] Here, a high-magnification overall image of the soot particles can be obtained using a transmission electron microscope, and the original image can be obtained by cropping the overall image.
[0120] Step S7012: Perform image processing on the original image to obtain a binarized image.
[0121] Here, the original image can be processed to obtain a second filtered image (see below for details), and the second filtered image can be binarized to obtain a binarized image.
[0122] As a specific example, the maximum pixel value in the second filtered image, such as 255, can be obtained first; then the binarized pixel value can be determined by the maximum pixel value and a pre-set percentage; finally, the pixel values of each pixel in the second filtered image are traversed. If the pixel value of a pixel is greater than or equal to the binarized pixel value, the pixel value of that pixel is adjusted to 1; if the pixel value of a pixel is less than the binarized pixel value, the pixel value of that pixel is adjusted to 0, so as to make the different connected components as disconnected from each other and the boundaries with the background as clear as possible.
[0123] Step S7013: The region of interest in the binarized image is skeletonized to obtain a first image. The first image includes multiple skeletonized connected regions located in the region of interest, and the center of the target circle is the center of the soot particle corresponding to the region of interest. Please refer to the previous text for information about the first image and the region of interest.
[0124] As a concrete example, the `bwmorph(BW,'thin',Inf)` function can be used to skeletonize the region of interest (ROI) in a binarized image to obtain the first image. During the skeletonization process, each connected component within the ROI is first skeletonized to obtain a corresponding skeleton connected component. Then, by detecting the edge contact between each skeleton connected component and the ROI, all skeleton connected components that intersect with the ROI (such as connected components with a contact area < 5 pixels) are removed, leaving only skeleton connected components completely within the ROI.
[0125] In some optional implementations, step S7012 above includes:
[0126] Step d1: Perform negative conversion on the original image to obtain the negative converted image.
[0127] This negative conversion process can reverse the brightness of the original image. For example, it can brighten dark areas and darken bright areas in the original image.
[0128] Step d2 involves enhancing the texture of the region of interest in the negative conversion image to obtain a texture-enhanced image.
[0129] Texture enhancement can highlight the texture features of regions of interest (ROIs) in a negative-transformed image while suppressing irrelevant information, making the texture of connected components within the ROI clearer. As a concrete example, the `adapthisteq` function can be used to enhance the texture of connected components within the ROI.
[0130] Step d3 involves adjusting the contrast of the region of interest in the texture-enhanced image to obtain a contrast-adjusted image.
[0131] As a concrete example, contrast can be adjusted by changing the gamma value corresponding to the region of interest. For instance, contrast enhancement is achieved when gamma < 1; decreasing the gamma value can expand the bright areas and compress the dark areas within the region of interest.
[0132] Step d4: Perform Gaussian low-pass filtering on the region of interest in the contrast-adjusted image to obtain the first filtered image.
[0133] Step d5: Perform morphological image processing on the region of interest in the first filtered image to obtain a morphologically processed image.
[0134] As a concrete example, morphological image processing can be performed on the region of interest in the first filtered image using the Top-Hat transform.
[0135] Step d6: Perform frequency bandpass filtering on the region of interest in the morphologically processed image to obtain the second filtered image;
[0136] Step d7 involves binarizing the region of interest in the second filtered image to obtain a binarized image. For detailed procedures, please refer to the preceding text.
[0137] After obtaining the binarized image, we can determine whether the binarized image meets the requirements by checking whether the connected components are clear to the image background and the boundaries between connected components. If it meets the requirements, we can continue with the subsequent steps for the binarized image. If it does not meet the requirements, we need to return to the steps corresponding to texture enhancement and continue processing the binarized image until we obtain a binarized image that meets the requirements.
[0138] By sequentially performing texture enhancement, contrast adjustment, Gaussian low-pass filtering, morphological processing, frequency bandpass filtering, and binarization on the original image, a binarized image with clearer connected components can be obtained, further ensuring that the target lattice fringes can be extracted more accurately based on the binarized image.
[0139] Step S702: Obtain the first rectangle enclosing each skeleton connected region and the first center corresponding to each first rectangle. See details below. Figure 1 Step S102 of the illustrated embodiment will not be described again here.
[0140] Step S703: Based on the lines connecting the target circle center and each first center, determine the first line segment corresponding to each skeleton connected region, and determine the target perpendicular line corresponding to each first line segment. For details, please refer to [link to details]. Figure 1Step S103 of the illustrated embodiment will not be described again here.
[0141] Step S704: For any target skeleton connected region in each skeleton connected region, based on the angle value of the minimum angle between each endpoint of the target skeleton connected region and its corresponding second line segment and its corresponding target perpendicular line, multiple first angle values are obtained. See details in [link to relevant documentation]. Figure 1 Step S104 of the illustrated embodiment will not be described again here.
[0142] Step S705: The endpoint pair corresponding to the smallest first angle value is determined as the target endpoint pair, and the lattice fringes corresponding to the target endpoint pairs are determined as the target lattice fringes corresponding to the connected regions of the target skeleton, generating the fringe extraction result corresponding to the first image. For details, please refer to [link to details]. Figure 1 Step S105 of the illustrated embodiment will not be described again here.
[0143] The lattice fringe extraction method provided in this embodiment removes interference information from the original image through image processing. Furthermore, since the pixel values of the binarized image are relatively simple, computational costs are reduced. The skeletonization process applied to the connected components in the region of interest within the binarized image not only simplifies the shape of the connected components but also preserves the core structural features of the soot particles, reducing errors in subsequent analysis.
[0144] As a specific application embodiment of this application, such as Figure 12 As shown, the method for extracting lattice fringes in this application includes steps S1201 to S1206.
[0145] Step S1201: Obtain the original image corresponding to the carbon soot particles.
[0146] Step S1202 involves processing the original image to obtain a binarized image. Specifically, the original image is processed sequentially in the following order: negative conversion, ROI region selection, texture enhancement, contrast adjustment, Gaussian low-pass filtering, Top-hat transform, frequency domain bandpass filtering, and image binarization. After selecting the ROI region, it is saved.
[0147] Step S1203 determines whether the binarized image meets the requirements by checking whether the connected components are clearly defined relative to the image background and between connected components. If the requirements are met, steps S1205 and S1206 are executed; otherwise, step S1204 is executed.
[0148] Step S1204 involves adjusting the parameters in texture enhancement, contrast adjustment, Gaussian low-pass filtering, Top-hat transform, frequency domain bandpass filtering, and image binarization, and then sequentially processing the binarized image until a binarized image that meets the requirements is obtained.
[0149] Step S1205: Extract the target lattice fringes from the binarized image. The process of extracting the target lattice fringes includes:
[0150] Step S1: Skeletonize the region of interest in the binarized image to obtain a first image, which includes multiple skeletonized connected regions located in the region of interest.
[0151] Step S2: Determine the center of the target circle corresponding to the first image, that is, the center of the soot particles corresponding to the region of interest in the first image.
[0152] Step S3, scale annotation: Overlay scale marks (such as 5nm scale bars) onto the first image using known pixel-to-physical size conversion coefficients (such as 1px = 0.1nm) to ensure physical meaning, and save the coordinates of the scale and the center of the target circle.
[0153] Step S4: Extract the target lattice fringes.
[0154] Step S5: Break and reconnect the extracted target lattice fringes.
[0155] Step S6: Short stripes are deleted from the extracted target lattice stripes to generate and save the stripe extraction results.
[0156] Step S1206: Analyze the results based on the target lattice fringes. This specifically includes: calculating the fringe spacing, fringe length, and fringe curvature of the target lattice fringes; and generating a fringe spacing histogram, a fringe length histogram, and a fringe curvature histogram based on each target fringe spacing, length, and curvature.
[0157] It should be understood that this application can use parallel processing in the process of extracting target lattice fringes, determining the target fringe spacing of each target lattice fringe, and fringe connection, thereby reducing the computation time and achieving high-precision lattice fringe recognition without incurring high time costs.
[0158] This embodiment also provides a lattice fringe extraction device, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0159] This embodiment provides a device for extracting lattice fringes, such as... Figure 13 As shown, it includes:
[0160] The first acquisition module 1301 is used to acquire a first image and the target center corresponding to the first image. The first image includes multiple skeleton connected regions located in the region of interest, and the target center is the center of the soot particle corresponding to the region of interest.
[0161] The second acquisition module 1302 is used to acquire the first rectangles that surround each skeleton connected domain and the first centers corresponding to each first rectangle.
[0162] The first determining module 1303 is used to determine the first line segment corresponding to each skeleton connected domain based on the line connecting the target circle center and each first center, and to determine the target perpendicular line corresponding to each first line segment.
[0163] The second determining module 1304 is used to obtain multiple first angle values for any target skeleton connected domain in each skeleton connected domain, based on the angle value of the minimum angle between each endpoint in the target skeleton connected domain and the corresponding second line segment and its corresponding target perpendicular line.
[0164] The generation module 1305 is used to determine the endpoint pair corresponding to the smallest first angle value as the target endpoint pair, and to determine the lattice stripe corresponding to the target endpoint pair as the target lattice stripe corresponding to the target skeleton connected region, thereby generating the stripe extraction result corresponding to the first image.
[0165] In some alternative embodiments, the device further includes:
[0166] The third acquisition module is used to acquire the stripe length of the corresponding lattice stripe for each endpoint.
[0167] The third determining module is used to determine the matching degree of each endpoint pair based on the fusion result of the first angle value and the stripe length corresponding to each endpoint pair.
[0168] The fourth determining module is used to determine the lattice fringes corresponding to the endpoint pairs whose first angle value is less than or equal to the first preset angle value and whose matching degree is the greatest as the target lattice fringes corresponding to the target skeleton connected domain.
[0169] In some optional implementations, the third determining module is further configured to: determine the maximum stripe length from a plurality of stripe lengths; and determine the maximum first angle value from a plurality of first angle values; determine the normalized angle value corresponding to each endpoint pair based on the ratio between the first angle value corresponding to each endpoint pair and the maximum first angle value; determine the first difference value corresponding to each endpoint pair based on the difference between the first preset value and each normalized angle value; determine the normalized length value corresponding to each endpoint pair based on the ratio between the stripe length corresponding to each endpoint pair and the maximum stripe length; and perform weighted fusion of the first difference value and the normalized length value corresponding to each endpoint pair to obtain the matching degree corresponding to each endpoint pair.
[0170] In some alternative embodiments, the device further includes:
[0171] The fifth determining module is used to determine the angle value of the minimum included angle between any first target lattice fringe and its nearest neighbor target lattice fringe for any first target lattice fringe among the various target lattice fringes, and obtain the second angle value.
[0172] The sixth determining module is used to determine the first target distance based on the distance between the first endpoint of the first target lattice fringe and the second endpoint of its neighboring target lattice fringe, wherein the first endpoint and the second endpoint are adjacent.
[0173] The connection module is used to connect the first target lattice stripes with the neighboring target lattice stripes if the second angle value is less than or equal to the second preset angle value and the first target distance is less than the first preset distance, thereby generating the stripe extraction result corresponding to the first image.
[0174] In some alternative embodiments, the device further includes:
[0175] The seventh determining module is used to determine, for any second target lattice fringe among the target lattice fringes, the second rectangle surrounding the second target lattice fringe and the second center corresponding to the second rectangle.
[0176] The eighth determining module is used to determine the third target lattice fringe adjacent to the second target lattice fringe in the direction from the center of the target circle to the second center.
[0177] The ninth determining module is used to determine the second target distance between two locally parallel segments if there are locally parallel segments between the second target lattice fringes and the third target lattice fringes.
[0178] The tenth determining module is used to determine the second target distance as the target stripe spacing if the second target distance is greater than or equal to the second preset distance and the second target distance is less than the third preset distance.
[0179] The eleventh determining module is used to determine the stripe length corresponding to the second target lattice stripe as the target stripe length if the stripe length corresponding to the second target lattice stripe is greater than or equal to the second preset stripe length.
[0180] The twelfth determining module is used to determine the ratio of the stripe length corresponding to the second target lattice stripe to the length of its corresponding line segment as the target stripe curvature.
[0181] The thirteenth determination is used to generate lattice fringe analysis results for each target fringe spacing, each target fringe length, and each target fringe curvature.
[0182] In some optional implementations, the first acquisition module is further configured to acquire the original image corresponding to the soot particles; perform image processing on the original image to obtain a binarized image; and perform skeletonization processing on the region of interest in the binarized image to obtain a first image.
[0183] In some optional implementations, the first acquisition module is further configured to perform negative conversion processing on the original image to obtain a negative conversion processed image; perform texture enhancement on the region of interest in the negative conversion processed image to obtain a texture enhanced image; perform contrast adjustment on the region of interest in the texture enhanced image to obtain a contrast adjusted image; perform Gaussian low-pass filtering on the region of interest in the contrast adjusted image to obtain a first filtered image; perform morphological image processing on the region of interest in the first filtered image to obtain a morphologically processed image; perform frequency bandpass filtering on the region of interest in the morphologically processed image to obtain a second filtered image; and perform binarization processing on the region of interest in the second filtered image to obtain a binarized image.
[0184] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0185] In this embodiment, the lattice fringe extraction device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0186] This application also provides a computer device having the above-described features. Figure 13 The apparatus for extracting lattice fringes is shown. Please refer to [link / reference]. Figure 14 , Figure 14 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of this application, such as... Figure 14As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 14 Take the 1410 processor as an example.
[0187] Processor 1410 may be a central processing unit, a network processor, or a combination thereof. Processor 1410 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GPRS), or any combination thereof. The memory 1420 stores instructions executable by at least one processor 1410 to cause the at least one processor 1410 to perform the methods shown in the above embodiments.
[0188] Memory 1420 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, memory 1420 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, memory 1420 may optionally include memory remotely located relative to processor 1410, and this remote memory may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0189] The memory 1420 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 1420 may also include a combination of the above types of memory.
[0190] The computer device also includes an input device 1430 and an output device 1440. The processor 1410, memory 1420, input device 1430, and output device 1440 can be connected via a bus or other means. Figure 14 Taking the example of a connection between China and Israel via a bus.
[0191] Input device 1430 can receive input numerical or character information, and generate key signal inputs related to user settings and function control of the computer device, such as a touchscreen, keypad, mouse, trackpad, touchpad, joystick, one or more mouse buttons, trackball, joystick, etc. Output device 40 may include display devices, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration motors). The aforementioned display devices include, but are not limited to, liquid crystal displays, light-emitting diodes, displays, and plasma displays. In some alternative embodiments, the display device may be a touchscreen.
[0192] This application also provides a computer-readable storage medium. The methods described in this application can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code downloaded over a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and subsequently stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the methods shown in the above embodiments are implemented.
[0193] A portion of this application can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to this application through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0194] Although embodiments of this application have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of this application, and all such modifications and variations fall within the scope defined by the appended claims.
Claims
1. A method for extracting lattice fringes, characterized in that, The method includes: Obtain a first image and the target center corresponding to the first image. The first image includes multiple skeleton connected regions located in the region of interest. The target center is the center of the soot particle corresponding to the region of interest. Obtain the first rectangles that enclose each of the skeleton connected domains and the first centers corresponding to each of the first rectangles; Based on the lines connecting the target circle center and each of the first centers, determine the first line segment corresponding to each skeleton connected domain, and determine the target perpendicular line corresponding to each of the first line segments; For any target skeleton connected domain in each of the skeleton connected domains, based on the angle value of the minimum angle between the second line segment corresponding to each endpoint pair in the target skeleton connected domain and the target perpendicular line corresponding to it, multiple first angle values are obtained. The second line segment corresponding to the endpoint pair is the line segment obtained by directly connecting the two endpoints in the endpoint pair. The endpoint pair corresponding to the smallest first angle value is determined as the target endpoint pair, and the lattice stripe corresponding to the target endpoint pair is determined as the target lattice stripe corresponding to the target skeleton connected region, thereby generating the stripe extraction result corresponding to the first image.
2. The method according to claim 1, characterized in that, The method further includes: Obtain the stripe length of the lattice stripe corresponding to each of the endpoint pairs; Based on the fusion result of the first angle value corresponding to each endpoint pair and the stripe length corresponding to it, the matching degree corresponding to each endpoint pair is determined; The lattice fringes corresponding to the endpoint pairs whose first angle value is less than or equal to the first preset angle value and whose matching degree is the greatest are determined as the target lattice fringes corresponding to the target skeleton connected region.
3. The method according to claim 2, characterized in that, Based on the fusion result of the first angle value corresponding to each endpoint pair and the stripe length corresponding to it, the matching degree corresponding to each endpoint pair is determined, including: The maximum stripe length is determined from the plurality of stripe lengths, and the maximum first angle value is determined from the plurality of first angle values; Based on the ratio between the first angle value corresponding to each endpoint pair and the maximum first angle value, the normalized angle value corresponding to each endpoint pair is determined; Based on the difference between the first preset value and each of the normalized angle values, the first difference corresponding to each of the endpoint pairs is determined; Based on the ratio between the corresponding stripe length and the maximum stripe length for each endpoint pair, the normalized length value corresponding to each endpoint pair is determined; The first difference and the normalized length value corresponding to each endpoint pair are weighted and fused to obtain the matching degree corresponding to each endpoint pair.
4. The method according to claim 1, characterized in that, The method further includes: For any first target lattice fringe among the various target lattice fringes, determine the angle value of the minimum included angle between the first target lattice fringe and its nearest neighboring target lattice fringe, and obtain the second angle value; A first target distance is determined based on the distance between the first endpoint of the first target lattice fringe and the second endpoint of its neighboring target lattice fringe, wherein the first endpoint is adjacent to the second endpoint; If the second angle value is less than or equal to the second preset angle value and the first target distance is less than the first preset distance, then the first target lattice stripe is connected to the neighboring target lattice stripe to generate the stripe extraction result corresponding to the first image.
5. The method according to claim 1, characterized in that, The method further includes: For any second target lattice fringe among the various target lattice fringes, a second rectangle surrounding the second target lattice fringe and a second center corresponding to the second rectangle are determined; In the direction from the center of the target circle to the second center, a third target lattice fringe adjacent to the second target lattice fringe is determined; If there are locally parallel segments between the second target lattice fringe and the third target lattice fringe, then the second target distance between the two locally parallel segments is determined; If the second target distance is greater than or equal to the second preset distance and the second target distance is less than the third preset distance, then the second target distance is determined as the target stripe spacing; If the stripe length corresponding to the second target lattice stripe is greater than or equal to the second preset stripe length, then the stripe length corresponding to the second target lattice stripe is determined as the target stripe length. The ratio of the stripe length corresponding to the second target lattice stripe to the length of its corresponding line segment is determined as the target stripe curvature; Lattice fringe analysis results are generated for each of the target fringe spacings, target fringe lengths, and target fringe curvatures.
6. The method according to claim 1, characterized in that, Acquire the first image, including: Obtain the original image corresponding to the carbon soot particles; The original image is processed to obtain a binarized image; The region of interest in the binarized image is skeletonized to obtain the first image.
7. The method according to claim 6, characterized in that, The original image is processed to obtain a binarized image, including: The original image is subjected to negative conversion processing to obtain a negative converted image; Texture enhancement is performed on the region of interest in the negative conversion image to obtain a texture-enhanced image; The contrast of the region of interest in the texture-enhanced image is adjusted to obtain a contrast-adjusted image. A Gaussian low-pass filter is applied to the region of interest in the contrast-adjusted image to obtain a first filtered image. Morphological image processing is performed on the region of interest in the first filtered image to obtain a morphologically processed image. The region of interest in the morphologically processed image is subjected to frequency bandpass filtering to obtain a second filtered image; The region of interest in the second filtered image is binarized to obtain the binarized image.
8. A device for extracting lattice fringes, characterized in that, The device includes: The first acquisition module is used to acquire a first image and the target center corresponding to the first image. The first image includes multiple skeleton connected regions located in the region of interest, and the target center is the center of the soot particle corresponding to the region of interest. The second acquisition module is used to acquire the first rectangle that surrounds each of the skeleton connected domains and the first center corresponding to each of the first rectangles; The first determining module is used to determine the first line segment corresponding to each skeleton connected domain based on the line connecting the target circle center and each of the first centers, and to determine the target perpendicular line corresponding to each of the first line segments. The second determining module is used to obtain multiple first angle values for any target skeleton connected domain in each of the skeleton connected domains, based on the angle value of the minimum angle between the second line segment corresponding to each endpoint pair in the target skeleton connected domain and the target perpendicular line corresponding to it. The second line segment corresponding to the endpoint pair is the line segment obtained by directly connecting the two endpoints in the endpoint pair. The generation module is used to determine the endpoint pair corresponding to the smallest first angle value as the target endpoint pair, and to determine the lattice stripe corresponding to the target endpoint pair as the target lattice stripe corresponding to the target skeleton connected region, thereby generating the stripe extraction result corresponding to the first image.
9. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory storing computer instructions, and the processor executing the computer instructions to perform the method for extracting lattice fringes according to any one of claims 1 to 7.
10. A computer program product, characterized in that, Includes computer instructions for causing a computer to perform the method for extracting lattice fringes according to any one of claims 1 to 7.