An automatic analysis method and system for the particle size of powder coatings
Through the method of automatically identifying and analyzing powder coating particles, the particle size is analyzed from multiple angles using feature extraction and attention mechanisms, which solves the limitations of traditional methods in terms of accuracy and efficiency, and achieves efficient and accurate particle size analysis.
Patent Information
- Application Number
- CN202411776036.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2044-12-05
AI Technical Summary
Traditional particle size analysis methods have limitations in accuracy and efficiency, especially when powder coating particles are complex in shape, wide in the distribution range of particle sizes and possible adhesions between particles, it is difficult to achieve accurate particle size identification and analysis.
The powder coating particles were identified by automated methods, and the particle images captured by electron microscope were extracted to calculate the foreground score of the image block, and the particle size was analyzed from multiple angles using the attention mechanism, and the length and width of the particles were calculated in combination with the rotation axis method.
It improves the accuracy and efficiency of particle size analysis of powder coatings, can adapt to the irregularity of particle shape, reduces manual intervention and error, and realizes automated identification and analysis.
Smart Images

Figure CN119540216B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of coatings, and specifically to an automatic analysis method and system for the particle size of powder coatings. Background Art
[0002] Powder coatings are a type of coating that exists in the form of solid powder. Compared with traditional liquid coatings, powder coatings hardly produce volatile organic compounds (VOCs) during the construction process, meeting the requirements of modern industry for environmental protection. Its main components include resin, curing agent, pigment, filler, and additives, and these components together endow the coating with excellent mechanical strength, chemical corrosion resistance, and beautiful decorative effects. The particle size of powder coatings directly affects the spraying quality and the final coating performance. An overly wide particle size distribution may lead to a reduction in spraying efficiency and uneven coating thickness; too small a particle size may result in excessive waste. Therefore, accurately analyzing and counting the particle size of powder coating particles is of great significance for optimizing the production process and improving product performance. However, due to the complex morphology of powder coating particles, a wide range of particle size distributions, and possible adhesion between particles, traditional particle size analysis methods such as laser particle size analysis have certain limitations in terms of accuracy and efficiency. Electron microscope images have high resolution and clear detail presentation, and can capture the microscopic morphology of powder particles. In the past, analyzing the particle size of powder coatings in electron microscope images mostly used manual measurement methods, such as using tools like Nano Measurer. However, on the one hand, this method requires a large amount of manual work. On the other hand, there is a certain error in pulling out the particle size with a mouse, and it is impossible to accurately determine the boundary. Moreover, since the particles are not perfect circles, the results obtained by pulling the particle size from different angles are also different. Summary of the Invention
[0003] In order to be able to automatically identify powder coating particles and analyze the particle size of the particles from multiple angles, first, the present invention provides an automatic analysis method for the particle size of powder coatings, and the method includes the following steps:
[0004] Obtain the powder coating particle image taken by an electron microscope, perform feature extraction on the particle image to obtain multiple feature maps, divide each feature map into image blocks of the same size, obtain the area of the image block on the particle image, and use the average gray value and contour line length of the area to obtain the foreground score of the image block;
[0005] Select multiple target image blocks from each feature map according to the foreground score and the particle size distribution information in the particle image. First, calculate the attention for the target image block in each layer of the encoder, and then calculate the attention between the target image block and the image block filtered based on the average gray value;
[0006] Obtain the output corresponding to the target image block in the encoder and use it as the input of the decoder. Obtain the particle bounding boxes in the particle image through the decoder, and obtain the particle size information of the powder coating based on the particle bounding boxes.
[0007] Preferably, obtaining the foreground score of the image block by using the average gray value and the contour line length of the region is specifically as follows:
[0008] Divide the average gray value by 255 to obtain the normalized gray value, and calculate the ratio of the contour line length of the region to the perimeter of the region;
[0009] Take the weighted sum of the normalized gray value and the ratio as the foreground score.
[0010] Preferably, selecting multiple target image blocks from each feature map according to the foreground score and the particle size distribution information in the particle image is specifically as follows:
[0011] Adopt the connected component labeling method to calculate the area of each white region in the binary particle image;
[0012] Cluster the white regions according to the area of the white regions. The number of clusters in the clustering is the same as the number of feature maps. Calculate the average area of the white regions in each cluster, and establish the corresponding relationship between the feature map and the cluster. Among them, the larger the size of the feature map, the smaller the average area of the corresponding cluster;
[0013] Calculate the ratio of the number of white regions in the cluster corresponding to the feature map to obtain the particle size distribution information in the particle image;
[0014] According to the particle size distribution information in the particle image and the preset number of target image blocks, obtain the number of target image blocks for each feature map, and select multiple image blocks with the largest foreground score from the image blocks of each feature map as the target image blocks of the feature map. Among them, the number of the multiple image blocks is equal to the number of target image blocks of the feature map.
[0015] Preferably, calculating the attention of the target image block and the image block filtered based on the average gray value is specifically as follows;
[0016] Take the average gray value of the area in the training sample that does not contain powder coating particles as the threshold. If the average gray value of the image block is less than the threshold, filter out the image block;
[0017] Use the target image block to obtain the query, use the filtered image block to obtain the key and value, and calculate the attention.
[0018] Preferably, obtaining the particle size information of the powder coating based on the particle bounding box is specifically as follows:
[0019] Obtain the vertical central axis of the particle frame, rotate the central axis at a preset step length, and count the length of the central axis within the particle frame where the gray value is greater than the average gray value of the particle frame after each rotation;
[0020] After the rotation ends, take the maximum length as the length of the powder coating particle and the minimum length as the width of the powder coating particle;
[0021] Count the lengths and widths of all particles in the particle image to obtain a length distribution histogram and a width distribution histogram.
[0022] Secondly, the present invention also provides an automatic powder coating particle size analysis system, which includes the following modules:
[0023] A feature extraction module, which is used to obtain a powder coating particle image taken by an electron microscope, extract features from the particle image to obtain a plurality of feature maps, divide each feature map into image blocks of the same size, obtain the area of the image block on the particle image, and use the average gray value and contour line length of the area to obtain the foreground score of the image block;
[0024] An encoding module, which is used to select a plurality of target image blocks from each feature map according to the foreground score and the particle size distribution information in the particle image, calculate the attention for the target image blocks first in each layer of the encoder, and then calculate the attention between the target image blocks and the image blocks filtered based on the average gray value;
[0025] A decoding and analysis module, which is used to obtain the output corresponding to the target image block in the encoder and use it as the input of the decoder, obtain the particle frame in the particle image through the decoder, and obtain the particle size information of the powder coating according to the particle frame.
[0026] Preferably, the obtaining the foreground score of the image block by using the average gray value and contour line length of the area is specifically:
[0027] Divide the average gray value by 255 to obtain a normalized gray value, and calculate the ratio of the contour line length of the area to the perimeter of the area;
[0028] Take the weighted sum of the normalized gray value and the ratio as the foreground score.
[0029] Preferably, the selecting a plurality of target image blocks from each feature map according to the foreground score and the particle size distribution information in the particle image is specifically:
[0030] Adopt the connected component labeling method to calculate the area of each white area in the binary particle image;
[0031] Cluster the white regions according to the area of the white regions. The number of clusters in the clustering is the same as the number of feature maps. Calculate the average area of the white regions in each cluster, and establish the corresponding relationship between the feature maps and the clusters according to the average area. Among them, the larger the size of the feature map, the smaller the average area of the corresponding cluster;
[0032] Calculate the ratio of the number of white regions in the cluster corresponding to the feature map to obtain the particle size distribution information in the particle image;
[0033] According to the particle size distribution information in the particle image and the preset number of target image patches, obtain the number of target image patches for each feature map. Select multiple image patches with the largest foreground scores from the image patches of each feature map as the target image patches of the feature map, where the number of the multiple image patches is equal to the number of target image patches of the feature map.
[0034] Preferably, the calculation of the attention of the target image patch and the image patch filtered based on the average gray value is specifically as follows;
[0035] Use the average gray value of the area without powder coating particles in the training samples as the threshold. If the average gray value of the image patch is less than the threshold, filter out the image patch;
[0036] Use the target image patch to obtain the query, use the filtered image patch to obtain the key and value, and calculate the attention.
[0037] Preferably, the obtaining of the particle size information of the powder coating according to the particle box is specifically as follows:
[0038] Obtain the vertical central axis of the particle box, rotate the central axis according to the preset step size, and count the length of the central axis in the particle box where the gray value is greater than the average gray value of the particle box after each rotation;
[0039] After the rotation ends, take the maximum length as the length of the powder coating particle, and take the minimum length as the width of the powder coating particle;
[0040] Count the length and width of all particles in the particle image to obtain the length distribution histogram and the width distribution histogram.
[0041] Finally, the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method described in the first aspect is implemented. Moreover, the present invention also provides a computer program, and the computer program includes the modules of the system described in the second aspect.
[0042] The present invention uses an automated method to identify the particle size of powder coatings. By calculating the foreground score of the image blocks on the feature map based on the average gray value and the contour line length of the area of the image blocks on the particle image, the image blocks containing particles are selected from all the image blocks on all the feature maps. Moreover, by filtering the image blocks with an average gray value less than the threshold, the interference of the image blocks without particles to the image blocks with a larger foreground score is reduced, and the accuracy of identification is improved. In addition, the present invention calculates the length and width of each particle frame by rotating the central axis, which can adapt to the irregularity of the particle shape and improve the accuracy of analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 is a flowchart of the first embodiment;
[0044] Figure 2 is a particle map of powder coatings taken by an electron microscope;
[0045] Figure 3 are the powder coating particles Figure 2 thresholding results;
[0046] Figure 4 is a statistical histogram of the lengths of the particles in the powder particle map. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0047] In order to make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0048] It should be noted that in this article, the term "including", "comprising" or any other variant thereof is intended to cover a non-exclusive inclusion, so that a process, method, article or terminal including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or terminal. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or terminal including that element.
[0049] The first embodiment is as Figure 1 shown and includes the following steps:
[0050] S1. Obtain a powder coating particle image taken by an electron microscope, perform feature extraction on the particle image to obtain a plurality of feature maps, divide each feature map into image blocks of the same size, obtain the area of the image blocks on the particle image, and obtain the foreground score of the image blocks using the average gray value and the contour line length of the area;
[0051] The images of powder coating particles are taken using an electron microscope (EM) to obtain high-resolution particle images. As Figure 2 shown, in the particle image, the particle area is brighter while the background is darker. Feature extraction processing is performed on the particle image to generate multiple feature maps. Among them, the sizes of the feature maps are different, and a backbone network is used for the feature extraction of the particle image. Then the feature maps are divided into image patches of the same size. For example, a 16×16 feature patch can be divided into 16 4×4 image patches. Of course, feature maps of other sizes are also divided into multiple 4×4 image patches.
[0052] Each image patch corresponds to a certain part of the original particle image. Since the receptive fields of different feature maps are different, the original image may contain different numbers and sizes of particles. Calculate the average gray value of each image patch in the original image. The higher the gray value, the higher the brightness of this area and the more likely it is to include particles. However, even the same particle may have different brightnesses due to factors such as position. Based on this, the contour line length of the area is further calculated. For areas with the same average gray value, the longer the contour line, the greater the possibility that this area includes particles.
[0053] In an optional embodiment, the foreground score of the image patch is obtained by using the average gray value and the contour line length of the area, specifically:
[0054] Divide the average gray value by 255 to obtain the normalized gray value, and calculate the ratio of the contour line length of the area to the perimeter of the area;
[0055] Take the weighted sum of the normalized gray value and the ratio as the foreground score.
[0056] Take the average value of all pixel gray values of the image patch in the particle image. Since the gray value is between [0, 255], the normalized gray value is obtained by dividing the average gray value by 255. The contour line length represents the total length of the particle boundary in the image patch, and the perimeter of the area is the boundary perimeter of the image patch. The perimeters of the image patches in the feature maps of different scales are different in the particle image. By calculating the ratio, the influence of the receptive field can be reduced. By calculating the ratio of the two, the proportion of the particle boundary to the area boundary is evaluated. The foreground score is calculated using a weighted sum method, and the sum of the weights of the normalized gray value and the ratio is 1. Since the receptive fields of feature maps of different scales are different, small-scale image patches represent larger areas in the particle image. In one embodiment, the weight of the ratio of small-scale feature map image patches relative to large-scale feature map image patches is greater. For example, in the foreground score calculation of large-scale feature maps, the weight of the ratio is 0.4, while in small-scale feature maps, the weight of the ratio is 0.5 or 0.6. If there are multiple feature maps of different scales, the weight of the ratio increases with the increase of the scale.
[0057] S2. Select multiple target image patches from each feature map according to the foreground score and the particle size distribution information in the particle image. For each layer of the encoder, first calculate the attention for the target image patches, and then calculate the attention between the target image patches and the image patches filtered based on the average gray value;
[0058] The foreground score represents the possibility that a particle is included in the image patch. The larger the foreground score, the more likely the image patch is to include a particle. When using sparse attention calculation, image patches with large foreground scores will be selected. However, since the number of large-particle and small-particle in the particle image is not fixed, if only the foreground score is used to determine the target image patches, it is very likely that some image patches of small particles or large particles will be lost. The present invention further combines the particle size distribution in the particle image to determine the number of target image patches selected from each feature map. In one embodiment, the step of selecting multiple target image patches from each feature map according to the foreground score and the particle size distribution information in the particle image is specifically as follows:
[0059] Use the connected component labeling method to calculate the area of each white region in the binary particle image;
[0060] Cluster the white regions according to the area of the white regions. The number of clusters in the clustering is the same as the number of feature maps. Calculate the average area of the white regions in each cluster, and establish the corresponding relationship between the feature map and the cluster according to the average area, where the larger the size of the feature map, the smaller the average area of the corresponding cluster;
[0061] Calculate the ratio of the number of white regions in the cluster corresponding to the feature map to obtain the particle size distribution information in the particle image;
[0062] According to the particle size distribution information in the particle image and the preset number of target image patches, obtain the number of target image patches for each feature map, and select multiple image patches with the largest foreground score from the image patches of each feature map as the target image patches of the feature map, where the number of the multiple image patches is equal to the number of target image patches of the feature map.
[0063] After binarizing the particle image taken by the electron microscope, such as Figure 3As shown, the connected component labeling method is used to identify each particle (i.e., the white area) in the image, and the area of each particle is calculated, so as to obtain the size information of the particles. In another embodiment, it is not limited to using the connected component labeling method, and other methods can also be used, as long as the approximate area of each particle can be roughly identified. Then, the particles are clustered according to these particle areas, and the number of clusters is equal to the number of feature maps extracted by the backbone network. Large-area particles will be assigned to one cluster, and small-area particles will be assigned to another cluster. By calculating the average area of the particles in each cluster, a correspondence between these clusters and the feature maps is established. Specifically, the small feature map corresponds to the cluster with a larger average area, and the larger-sized feature map corresponds to the cluster with a smaller average area. For example, if the number of feature maps is 3, then the white areas are clustered according to the area, and the number of clusters is 3. The first cluster is the white area with a small area, the second cluster is the white area with a medium area, and the third cluster is the white area with a large area. The first cluster corresponds to the first feature map, the second cluster corresponds to the second feature map, and the third cluster corresponds to the third feature map. Among them, the size of the first feature map is larger than that of the second feature map, and the size of the second feature map is larger than that of the third feature map. Further assume that there are 4 white areas in the first cluster, 6 white areas in the second cluster, and 8 white areas in the third cluster. Then the ratio is 4:6:8, that is, the distribution of small, medium, and large particles in the particle image is approximately 2:3:4. When selecting the target image patches, assume that a total of 18 target patches are to be selected. Then 4 patches will be selected from the patches of the first feature map, 6 patches will be selected from the patches of the second feature map, and 8 patches will be selected from the patches of the third feature map. Specifically, the patches are selected from each feature map according to the foreground score, and at least one patch with the largest foreground score is selected as the target image patch. For example, if 4 patches are to be selected from the first feature map, then the 4 patches with the largest scores among all the patches of the first feature map are selected as the target image patches. Similarly, 6 patches with the largest foreground scores will be selected from the second feature map as the target image patches.
[0064] In the encoder, in each layer of the encoder, the attention of the target image patch is first calculated, and then the attention between the target image patch and the image patch filtered based on the average gray value is calculated. Here, filtering the image patch based on the average gray value is mainly to filter out the image patches that obviously belong to the background, thereby reducing the computational amount and the interference to the foreground image patches. In an alternative embodiment, the calculation of the attention between the target image patch and the image patch filtered based on the average gray value is specifically as follows;
[0065] The average gray value of the area in the training sample that does not contain powder coating particles is used as the threshold. If the average gray value of the image patch is less than the threshold, the image patch is filtered out;
[0066] Obtain a query using the target image patch, obtain keys and values using the filtered image patches, and calculate the attention.
[0067] Use the average gray value of the area in the training sample that does not contain powder coating particles as the filtering threshold to screen the image patches. Specifically, if the average gray value of a certain image patch is lower than this threshold, it means that this image patch may mainly contain the background area, so it is directly filtered out. Process the remaining target image patches, obtain a query (Query) using the target image patches, and obtain keys (Key) and values (Value) using the filtered image patches. Calculate the attention weights between the query and the keys, and combine the corresponding values to complete the calculation of the attention mechanism. Furthermore, focus on the area containing particle information, avoid the interference of the background area on the model's attention distribution, and thus improve the model's recognition and analysis ability for particle images. In one embodiment, the target image patch is unfolded as the query, or the target image patch is multiplied by the query weight and then unfolded as the query; the filtered image patches are unfolded as keys and values. It should be noted that in addition to the above two attention calculations for each layer of the encoder, there will also be other calculations, such as Linear, etc. In addition, after the first attention calculation for each layer, the target image patch is updated, and the second attention is calculated using the updated target image patch and the filtered image patches.
[0068] In one embodiment, the filtered image patches are deleted from the image patch sequence, and when the other layers of the encoder perform calculations, there is no need to perform the operation of filtering the image patches again. It is also possible to place the operation of filtering the image patches after the determination of the target image patches, and input the filtered image patches and the target image patches into the encoder, so that each layer of the encoder does not need to perform the filtering operation again.
[0069] In another embodiment, the filtering operation is performed for each layer of the encoder. In this way, as the encoder executes, more and more image patches will be deleted, and the computational amount will also continue to decrease.
[0070] S3. Obtain the output corresponding to the target image patch in the encoder and use it as the input of the decoder. Obtain the particle box in the particle image through the decoder, and obtain the particle size information of the powder coating according to the particle box.
[0071] After being encoded by the encoder, the output of the encoder is the target image patch, that is, the output that only retains the serial number of the target image patch, and the target image patch is input into the decoder. The decoder and the detection head jointly determine the particle box in the particle image. In order to obtain the particle size information of the powder coating in more detail, in one embodiment, the obtaining the particle size information of the powder coating according to the particle box is specifically:
[0072] Obtain the vertical central axis of the particle frame, rotate the central axis according to a preset step size, and count the length of the central axis within the particle frame where the gray value is greater than the average gray value of the particle frame after each rotation;
[0073] After the rotation is completed, take the maximum length as the length of the powder coating particle and the minimum length as the width of the powder coating particle;
[0074] Count the lengths and widths of all particles in the particle image to obtain a length distribution histogram and a width distribution histogram.
[0075] For each particle frame, first calculate its vertical central axis, and rotate the central axis around the center point of the particle frame in sequence according to a preset angular step size, such as 5 degrees or 10 degrees. After each rotation, measure the length of the part of the central axis within the particle frame where the gray value is higher than the average gray value of the particle frame. In an optional embodiment, measure the continuous and maximum length of the part of the central axis within the particle frame where the gray value is higher than the average gray value of the particle frame, that is, only a continuous and maximum interval will be considered as the length or width. After the rotation is completed, the longest measured length is regarded as the length of the particle, and the shortest measured length is regarded as the width of the particle. This method can capture the main extension direction and the minimum extension direction of the particle through multi-angle rotation and can adapt to the irregularity of the particle shape. Repeat the above steps for all particle frames in the image to obtain the lengths and widths of each particle, summarize the lengths and widths of all particles, draw a length distribution histogram and a width distribution histogram respectively, analyze the distribution law of particle sizes, and thus provide a reference for quality control or material property evaluation. Figure 4 The length distribution histogram is shown.
[0076] Secondly, the present invention also provides an automatic powder coating particle size analysis system, and the system includes the following modules:
[0077] A feature extraction module, which is used to obtain a powder coating particle image taken by an electron microscope, extract features from the particle image to obtain a plurality of feature maps, divide each feature map into image blocks of the same size, obtain the area of the image block on the particle image, and obtain the foreground score of the image block by using the average gray value and the contour line length of the area;
[0078] An encoding module, which is used to select a plurality of target image blocks from each feature map according to the foreground score and the particle size distribution information in the particle image, calculate the attention of the target image block first in each layer of the encoder, and then calculate the attention between the target image block and the image block filtered based on the average gray value;
[0079] A decoding and analysis module, which is used to obtain the output corresponding to the target image block in the encoder and use it as the input of the decoder, obtain the particle frame in the particle image through the decoder, and obtain the particle size information of the powder coating according to the particle frame.
[0080] Preferably, obtaining the foreground score of the image patch based on the average gray value and the contour line length of the utilization area is specifically as follows:
[0081] Divide the average gray value by 255 to obtain the normalized gray value, and calculate the ratio of the contour line length of the area to the perimeter of the area;
[0082] Take the weighted sum of the normalized gray value and the ratio as the foreground score.
[0083] Preferably, selecting multiple target image patches from each feature map according to the foreground score and the particle size distribution information in the particle image is specifically as follows:
[0084] Use the connected component labeling method to calculate the area of each white region in the binary particle image;
[0085] Cluster the white regions according to the area of the white regions. The number of clusters in the clustering is the same as the number of feature maps. Calculate the average area of the white regions in each cluster, and establish the corresponding relationship between the feature map and the cluster. Among them, the larger the size of the feature map, the smaller the average area of the corresponding cluster;
[0086] Calculate the ratio of the number of white regions in the cluster corresponding to the feature map to obtain the particle size distribution information in the particle image;
[0087] According to the particle size distribution information in the particle image and the preset number of target image patches, obtain the number of target image patches for each feature map. Select multiple image patches with the largest foreground score from the image patches of each feature map as the target image patches of the feature map, where the number of the multiple image patches is equal to the number of target image patches of the feature map.
[0088] Preferably, calculating the attention of the target image patch and the image patch filtered based on the average gray value is specifically as follows;
[0089] Take the average gray value of the area in the training sample that does not contain powder coating particles as the threshold. If the average gray value of the image patch is less than the threshold, filter out the image patch;
[0090] Use the target image patch to obtain the query, use the filtered image patch to obtain the key and value, and calculate the attention.
[0091] Preferably, obtaining the particle size information of the powder coating according to the particle box is specifically as follows:
[0092] Obtain the vertical central axis of the particle box, rotate the central axis at a preset step length, and count the length of the central axis in the particle box where the gray value is greater than the average gray value of the particle box after each rotation;
[0093] After the rotation ends, take the maximum length as the length of the powder coating particle and the minimum length as the width of the powder coating particle;
[0094] Statistically obtain the length distribution histogram and width distribution histogram of all particles in the particle image by their lengths and widths.
[0095] Certainly, those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware (such as a processor, a controller, etc.) through a computer program. The program can be stored in a computer-readable storage medium that can be read by a computer. When the program is executed, it can include the processes of the above method embodiments. The computer-readable storage medium can be a memory, a magnetic disk, an optical disc, etc.
[0096] It should be understood that the application of the present invention is not limited to the above examples. For those of ordinary skill in the art, improvements or transformations can be made according to the above description. All such improvements and transformations should fall within the protection scope of the appended claims of the present invention.
Claims
1. A method for automatically analyzing the particle size of powder coatings, characterized in that: The method comprises the following steps: Obtaining a powder coating particle image photographed by an electron microscope, performing feature extraction on the particle image to obtain a plurality of feature maps, dividing each feature map into image blocks of the same size, obtaining an area of the image block on the particle image, and obtaining a foreground score of the image block using an average gray value and a contour line length of the area; Select multiple target image blocks from each feature map according to the foreground score and the particle size distribution information in the particle image. At each layer of the encoder, the attention of the target image block is first calculated, and then the attention of the target image block and the image block filtered based on the average gray value is calculated. The output corresponding to the target image block in the encoder is obtained and used as the input of the decoder, and the particle frame in the particle image is obtained by the decoder, and the particle size information of the powder coating is obtained according to the particle frame; The foreground score of the image block is obtained by using the average gray value and the contour length of the region, specifically: The average grayscale value is divided by 255 to obtain the normalized grayscale value, and the ratio of the contour length of the region to the perimeter of the region is calculated; wherein the contour length represents the total length of the particle boundary in the image block, and the perimeter of the region is the perimeter of the boundary of the image block; The weighted sum of the normalized gray value and the ratio is taken as the foreground score.
2. The method according to claim 1, characterized in that The method of selecting multiple target image blocks from each feature map according to the foreground score and the particle size distribution information in the particle image is specifically as follows: The connected component labeling method is used to calculate the area of each white region in the binary particle image; Cluster the white areas according to their areas. The number of clusters in the cluster is the same as the number of feature maps. Calculate the average area of the white areas in each cluster. Establish the correspondence between the feature maps and clusters based on the average area. The larger the feature map size, the smaller the average area of the corresponding cluster. The particle size distribution information in the particle image is obtained by calculating the ratio of the number of white areas in the cluster corresponding to the feature map; The number of target image blocks of each feature map is obtained according to the particle size distribution information in the particle image and the preset number of target image blocks, and multiple image blocks with the largest foreground scores are selected from the image blocks of each feature map as the target image blocks of the feature map, wherein the number of the multiple image blocks is equal to the number of target image blocks of the feature map.
3. The method according to claim 1, characterized in that The calculation of the attention of the target image block and the image block after filtering based on the average gray value is specifically as follows: The average gray value of the area that does not contain powder coating particles in the training sample is used as the threshold. If the average gray value of the image block is less than the threshold, the image block is filtered out; The target image patch is used to get the query, and the filtered image patch is used to get the key and value, and the attention is calculated.
4. The method according to claim 1, characterized in that The particle size information of the powder coating is obtained according to the particle frame, specifically: Obtaining a vertical central axis of the particle frame, rotating the central axis according to a preset step length, and counting the length of the central axis in the particle frame after each rotation where the grayscale value is greater than the average grayscale value of the particle frame; After the rotation is completed, the maximum length is taken as the length of the powder coating particle, and the minimum length is taken as the width of the powder coating particle; The length and width of all particles in the particle image are counted to obtain the length distribution histogram and width distribution histogram.
5. An automatic analysis system for powder coating particle size, characterized in that: The system includes the following modules: A feature extraction module is used to obtain a powder coating particle image taken by an electron microscope, perform feature extraction on the particle image to obtain a plurality of feature maps, divide each feature map into image blocks of the same size, obtain an area of the image block on the particle image, and obtain a foreground score of the image block using an average gray value and a contour line length of the area; An encoding module is used to select multiple target image blocks from each feature map according to the foreground score and the particle size distribution information in the particle image, and first calculate the attention of the target image block at each layer of the encoder, and then calculate the attention of the target image block and the image block filtered based on the average gray value; A decoding and analysis module is used to obtain the output corresponding to the target image block in the encoder and use it as the input of the decoder, obtain the particle frame in the particle image through the decoder, and obtain the particle size information of the powder coating according to the particle frame; The foreground score of the image block is obtained by using the average gray value and the contour length of the region, specifically: The average grayscale value is divided by 255 to obtain the normalized grayscale value, and the ratio of the contour length of the region to the perimeter of the region is calculated; wherein the contour length represents the total length of the particle boundary in the image block, and the perimeter of the region is the perimeter of the boundary of the image block; The weighted sum of the normalized gray value and the ratio is taken as the foreground score.
6. The system according to claim 5, characterized in that The method of selecting multiple target image blocks from each feature map according to the foreground score and the particle size distribution information in the particle image is specifically as follows: The connected component labeling method is used to calculate the area of each white region in the binary particle image; Cluster the white areas according to their areas. The number of clusters in the cluster is the same as the number of feature maps. Calculate the average area of the white areas in each cluster. Establish the correspondence between the feature maps and clusters based on the average area. The larger the feature map size, the smaller the average area of the corresponding cluster. The particle size distribution information in the particle image is obtained by calculating the ratio of the number of white areas in the cluster corresponding to the feature map; The number of target image blocks of each feature map is obtained according to the particle size distribution information in the particle image and the preset number of target image blocks, and multiple image blocks with the largest foreground scores are selected from the image blocks of each feature map as the target image blocks of the feature map, wherein the number of the multiple image blocks is equal to the number of target image blocks of the feature map.
7. The system according to claim 5, characterized in that The calculation of the attention of the target image block and the image block after filtering based on the average gray value is specifically as follows: The average gray value of the area that does not contain powder coating particles in the training sample is used as the threshold. If the average gray value of the image block is less than the threshold, the image block is filtered out; The target image patch is used to get the query, and the filtered image patch is used to get the key and value, and the attention is calculated.
8. The system according to claim 5, characterized in that The particle size information of the powder coating is obtained according to the particle frame, specifically: Obtaining a vertical central axis of the particle frame, rotating the central axis according to a preset step length, and counting the length of the central axis in the particle frame after each rotation where the grayscale value is greater than the average grayscale value of the particle frame; After the rotation is completed, the maximum length is taken as the length of the powder coating particle, and the minimum length is taken as the width of the powder coating particle; The length and width of all particles in the particle image are counted to obtain the length distribution histogram and width distribution histogram.
Citation Information
Patent Citations
Gravel particle size detection method
CN115294066A
Lithium Metal Composite Oxide Powder
US20160013472A1