Particle size analysis method, device and storage medium based on watershed algorithm

By using a particulate matter size analysis method based on the watershed algorithm and image processing technology to calculate the cross-sectional area of ​​particulate matter, the problem of low timeliness and accuracy in existing technologies is solved, and efficient and accurate particulate matter size analysis is achieved.

CN115294148BActive Publication Date: 2025-11-25JINAN UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211001606.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-19
Publication Date
2025-11-25
Estimated Expiration
2042-08-19

AI Technical Summary

Technical Problem

Existing technologies for particulate matter size analysis have low timeliness and accuracy. Sieving methods are time-consuming and lose particulate matter, sedimentation methods have limited application, and laser particle size analyzers are costly and complex to operate.

Method used

A particulate matter size analysis method based on the watershed algorithm is adopted. By acquiring particulate matter images with preset reference objects, preprocessing and distance transformation are performed, and the image is processed using a label-based watershed segmentation algorithm to calculate the cross-sectional area of ​​the particulate matter to obtain equivalent particle size data.

Benefits of technology

It enables flexible, rapid, and accurate particle size analysis, reducing costs and time while improving the accuracy and flexibility of the analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115294148B_ABST
    Figure CN115294148B_ABST
Patent Text Reader

Abstract

The application relates to a particle size analysis method, device and storage medium based on a watershed algorithm, wherein the particle size analysis method based on the watershed algorithm comprises the following steps: acquiring a particle image with a preset reference object; performing pretreatment and distance transformation on the particle image with the preset reference object to obtain a first marked image; taking a pixel point in the first marked image as an initial mark, processing the particle image based on the initial mark by using a mark-based watershed segmentation algorithm to obtain a first segmentation image corresponding to the particle image; and calculating a cross-sectional area of the particle according to a ratio of an actual area of the preset reference object to a pixel area of the preset reference object in the first segmentation image, and further obtaining equivalent particle size data of the particle. Through the application, the problems of low timeliness and low accuracy in particle size analysis in the related art are solved, and the beneficial effect of flexible, rapid and accurate particle size analysis is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of particle size analysis technology, and in particular to a method, apparatus and storage medium for particle size analysis based on the watershed algorithm. Background Technology

[0002] Particle size analysis has a wide range of applications, including soil particle size distribution analysis, river and marine sediment analysis, and analysis of various particulate materials. For example, sand of different particle sizes has different uses as a building material. Strictly controlling the ratio of cement, sand, and water, as well as the size of sand particles, can improve the quality of concrete.

[0003] Currently, three main techniques are used for particle size analysis. The first is sieving, which is time-consuming, has poor timeliness, and cannot quickly analyze particle size. Sieving also results in particle loss, reducing economic efficiency. Furthermore, some particles may clump together due to moisture or triboelectricity, leading to an overall larger particle size. The second is sedimentation, which can be divided into hydrometer and pipette methods. Sedimentation is mainly used for soil particles smaller than 0.075 mm, limiting its application. Sedimentation is time-consuming and has low timeliness, and the presence of water can interfere with subsequent water-sand ratio analysis. The third is laser particle size analyzer, which, while highly accurate, is expensive and complex to operate. It also requires significant manpower to transport particles to the laser particle size analyzer, resulting in poor flexibility and reduced overall timeliness.

[0004] Currently, no effective solution has been proposed to address the issues of low timeliness and low accuracy in particle size analysis of particulate matter in related technologies. Summary of the Invention

[0005] This application provides a method, apparatus, and storage medium for particulate matter size analysis based on the watershed algorithm, in order to at least solve the problems of low timeliness and low accuracy in particulate matter size analysis in related technologies.

[0006] In a first aspect, embodiments of this application provide a particulate matter size analysis method based on a watershed algorithm, comprising: acquiring a particulate matter image with a preset reference object; preprocessing and performing distance transformation on the particulate matter image with the preset reference object to obtain a first labeled image; using the pixels in the first labeled image as initial labels, processing the particulate matter image based on the initial labels using a label-based watershed segmentation algorithm to obtain a first segmented image corresponding to the particulate matter image; calculating the cross-sectional area of ​​the particulate matter according to the ratio of the actual area of ​​the preset reference object to the pixel area of ​​the preset reference object in the first segmented image, and calculating the equivalent particle size data of the particulate matter based on the cross-sectional area of ​​the particulate matter.

[0007] Secondly, embodiments of this application provide a particulate matter size analysis device based on a watershed algorithm, comprising:

[0008] The acquisition module is used to acquire particulate matter images with preset reference objects.

[0009] The processing module is used to preprocess and perform distance transformation on the particulate matter image with preset reference objects to obtain a first marked image.

[0010] The segmentation module is used to take the pixels in the first labeled image as initial labels, and based on the initial labels, process the particulate image using a label-based watershed segmentation algorithm to obtain a first segmented image corresponding to the particulate image.

[0011] The analysis module is used to calculate the cross-sectional area of ​​the particles based on the ratio of the actual area of ​​the preset reference object to the pixel area of ​​the preset reference object in the first segmented image, and to calculate the equivalent particle size data of the particles based on the cross-sectional area of ​​the particles.

[0012] Thirdly, embodiments of this application provide an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the particulate matter size analysis method based on the watershed algorithm as described in the first aspect.

[0013] Fourthly, embodiments of this application provide a storage medium storing a computer program thereon, which, when executed by a processor, implements the particulate matter size analysis method based on the watershed algorithm as described in the first aspect above.

[0014] Compared to related technologies, the particulate matter size analysis method, apparatus, and storage medium based on the watershed algorithm provided in this application acquire a particulate matter image with a preset reference object; preprocess and perform distance transformation on the particulate matter image with the preset reference object to obtain a first marked image; use the pixels in the first marked image as initial markers, and process the particulate matter image using a marker-based watershed segmentation algorithm based on the initial markers to obtain a first segmented image corresponding to the particulate matter image; calculate the cross-sectional area of ​​the particulate matter according to the ratio of the actual area of ​​the preset reference object to the pixel area of ​​the preset reference object in the first segmented image, and calculate the equivalent particle size data of the particulate matter based on the cross-sectional area of ​​the particulate matter; solve the problems of low timeliness and low accuracy of particulate matter size analysis in related technologies, and achieve the beneficial effects of flexible, fast and accurate particulate matter size analysis.

[0015] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description

[0016] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0017] Figure 1 This is a hardware structure block diagram of a terminal for a particulate matter size analysis method based on the watershed algorithm according to an embodiment of this application;

[0018] Figure 2 This is a flowchart of a particulate matter size analysis method based on the watershed algorithm according to an embodiment of this application;

[0019] Figure 3 This is a flowchart of a particulate matter particle size analysis method based on a watershed algorithm according to a preferred embodiment of this application;

[0020] Figure 4 This is a user interface illustration of a particulate matter size analysis method based on a watershed algorithm according to a preferred embodiment of this application;

[0021] Figure 5 This is a structural block diagram of a particulate matter size analysis device based on the watershed algorithm according to an embodiment of this application. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of this application clearer, the application is described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the application. All other embodiments obtained by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application. Furthermore, it is understood that although the efforts made in such a development process may be complex and lengthy, for those skilled in the art related to the content disclosed in this application, modifications to design, manufacturing, or production based on the technical content disclosed in this application are merely conventional technical means and should not be construed as insufficient disclosure of the content of this application.

[0023] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that is mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.

[0024] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” and similar words used in this application do not indicate quantity limitation and may indicate singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units not listed, or may include other steps or units inherent to these processes, methods, products, or devices. The terms “connected,” “linked,” “coupled,” and similar words used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. “Multiple” used in this application means two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. The terms “first,” “second,” “third,” etc., used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects.

[0025] The method embodiments provided in this example can be executed on a terminal, computer, or similar computing device. Taking running on a terminal as an example, Figure 1 This is a hardware structure block diagram of the terminal for the particulate matter size analysis method based on the watershed algorithm according to an embodiment of this application. Figure 1 As shown, terminal 10 may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. Optionally, the terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the terminal described above. For example, terminal 10 may also include components that are larger than those described above. Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0026] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the particulate matter size analysis method based on the watershed algorithm in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0027] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0028] This embodiment provides a particulate matter size analysis method based on the watershed algorithm that runs on the aforementioned terminal. Figure 2 This is a flowchart of a particulate matter size analysis method based on the watershed algorithm according to an embodiment of this application, as shown below. Figure 2 As shown, the process includes the following steps:

[0029] Step S201: Obtain particulate matter images with preset reference objects.

[0030] In this embodiment, by acquiring particulate matter images with preset reference objects, the actual sampled particulate matter data is converted into image data that can be recognized and processed by a computer. This allows for further processing and calculation of the image data using the watershed algorithm, ultimately improving the timeliness of particulate matter size analysis. By using the acquired images as a dataset, particulate matter size analysis can be performed on-site during particulate matter excavation, eliminating the need to bring the data back to the laboratory for analysis, thus improving timeliness and flexibility. Placing reference objects directly during image acquisition is simple to operate, yet it significantly reduces computation time and workload for subsequent analysis. This not only improves efficiency but also reduces computational errors and error accumulation, thereby enhancing the accuracy of particulate matter size analysis.

[0031] Step S202: Preprocess and perform distance transformation on the particulate matter image with preset reference objects to obtain the first marked image.

[0032] In this embodiment, by preprocessing and distance transforming the particulate matter image with a preset reference, a first labeled image is obtained, which eliminates the influence of noise, reduces the amount of computation, and improves the efficiency and accuracy of particle size analysis.

[0033] Step S203: The pixels in the first labeled image are used as initial labels. Based on the initial labels, the particulate image is processed using a label-based watershed segmentation algorithm to obtain a first segmented image corresponding to the particulate image.

[0034] In this embodiment, the pixels in the first marked image are used as the initial markers in the watershed segmentation algorithm. Combined with these markers, the marker-based watershed segmentation algorithm is used to process particulate matter images. The method is simple, low in complexity, and fast. Moreover, the extracted object edge contours are closed, which can accurately locate the target object and ensure the accuracy of particle size analysis data.

[0035] Step S204: Calculate the cross-sectional area of ​​the particles based on the ratio of the actual area of ​​the preset reference object to the pixel area of ​​the preset reference object in the first segmented image, and calculate the equivalent particle size data of the particles based on the cross-sectional area of ​​the particles.

[0036] Through the above steps S201 to S204, a particulate matter image with a preset reference object is acquired; the particulate matter image with the preset reference object is preprocessed and distance transformed to obtain a first labeled image; the pixels in the first labeled image are used as initial labels, and based on the initial labels, the particulate matter image is processed using a label-based watershed segmentation algorithm to obtain a first segmented image corresponding to the particulate matter image; the cross-sectional area of ​​the particulate matter is calculated according to the ratio of the actual area of ​​the preset reference object to the pixel area of ​​the preset reference object in the first segmented image, and the equivalent particle size data of the particulate matter is calculated based on the cross-sectional area of ​​the particulate matter. This solves the problems of low timeliness and low accuracy of particulate matter size analysis in related technologies, and achieves the beneficial effects of flexible, fast and accurate particulate matter size analysis.

[0037] It should be noted that in this embodiment, by analyzing image data, it is not necessary to bring particulate matter samples back to the laboratory for analysis, which not only provides high flexibility but also reduces the cost and time of particulate matter size analysis. In this embodiment, by directly adding fixed reference objects to the dataset images, the operation is simple, but it can greatly reduce the subsequent computation and improve timeliness. At the same time, the method of this embodiment has good stability and high repeatability, and the results analyzed in different environments and at different times are consistent. The label-based watershed segmentation algorithm is used to process particulate matter images, which is simple, fast, and can accurately locate target objects, ensuring the accuracy of particle size analysis data.

[0038] In some embodiments, the particulate image with a preset reference is preprocessed and subjected to distance transformation to obtain a first labeled image, including the following steps:

[0039] Step 1: Preprocess the particulate matter image with a preset reference object to obtain the first processed image.

[0040] Step 2: Perform a distance transformation on the first processed image to obtain a second processed image, wherein the distance transformation includes Euclidean distance transformation.

[0041] Step 3: Perform erosion processing on the second processed image to obtain the third processed image.

[0042] Step 4: Binarize the third processed image to obtain the first labeled image. The binarization includes triangulation image binarization.

[0043] By preprocessing the particulate matter image with a preset reference in the above steps, performing a distance transformation on the first processed image to obtain a second processed image, wherein the distance transformation includes Euclidean distance transformation; performing erosion processing on the second processed image to obtain a third processed image; and performing binarization processing on the third processed image to obtain a first labeled image, wherein the binarization includes triangulation image binarization, which reduces the influence of noise and quickly obtains the labeled image required in the subsequent watershed algorithm, thereby achieving highly timely particulate matter size analysis and improving the accuracy of particle size analysis.

[0044] In some embodiments, the particulate image with a preset reference is preprocessed to obtain a first processed image, including the following steps:

[0045] Step 1: Sharpen the particulate image with a preset reference to obtain the first particulate image. The sharpening process includes Laplacian sharpening.

[0046] Step 2: Convert the first particulate matter image to grayscale to obtain the second particulate matter image.

[0047] Step 3: Binarize the second particulate matter image to obtain the third particulate matter image. The binarization includes triangulation image binarization.

[0048] Step 4: Perform median filtering noise reduction on the third particulate matter image to obtain the first processed image.

[0049] The first particle image is obtained by sharpening the particulate image with a preset reference object in the above steps, where the sharpening process includes Laplacian sharpening; the first particle image is then converted to grayscale to obtain the second particle image; the second particle image is then binarized to obtain the third particle image, where the binarization uses triangulation to best match the single-peak color histogram of the image, making the outline of the particles more obvious for subsequent recognition. Then, median filtering is used to reduce noise in the third particle image, minimizing the noise generated during the binarization process while ensuring that the imaging quality remains unchanged, thus achieving high-accuracy particulate size analysis.

[0050] In some embodiments, a label-based watershed segmentation algorithm is used to process the particulate image to obtain a first segmented image corresponding to the particulate image, including the following steps:

[0051] Step 1: Smooth the first labeled image based on the minimum coverage algorithm.

[0052] Step 2: Use the pixels in the smoothed first labeled image as initial labels. Based on the initial labels, use the label-based watershed segmentation algorithm to process the particulate image and obtain the second segmented image.

[0053] Step 3: Perform image post-processing on the second segmented image to obtain the first segmented image corresponding to the particle image. The image post-processing includes threshold adjustment and hole filling.

[0054] The first labeled image is smoothed using the minimum coverage algorithm described above. Pixels in the smoothed first labeled image are used as initial labels. Based on these initial labels, a label-based watershed segmentation algorithm is used to process the particulate image, resulting in a second segmented image. Post-processing is performed on the second segmented image to obtain the first segmented image corresponding to the particulate image. This post-processing includes threshold adjustment and hole filling, further improving the accuracy of particulate size analysis. The minimum coverage algorithm improves the gradient image, ensuring that minimum regions only occur at labeled locations. If these local minimum regions need to be moved, other pixel values ​​are pushed up, helping to smooth the labeled image. Simultaneously, post-processing such as threshold adjustment and hole filling ensures that the final segmentation result does not result in oversegmentation, thus achieving high-accuracy particulate size analysis.

[0055] In some embodiments, the cross-sectional area of ​​the particles is calculated based on the ratio of the actual area of ​​a preset reference object to the pixel area of ​​the preset reference object in the first segmented image, including the following steps:

[0056] Step 1: Extract the number of pixels in each connected component of the first segmented image. The connected component is used to represent the image region composed of foreground pixels with the same pixel value and adjacent positions in the corresponding image.

[0057] Step 2: Calculate the ratio of the actual area of ​​the preset reference object to the number of pixels in the connected region corresponding to the preset reference object.

[0058] Step 3: Calculate the cross-sectional area of ​​the particle by multiplying the ratio by the number of pixels in the connected region corresponding to the particle.

[0059] By extracting the number of pixels in each connected region of the first segmented image in the above steps, the pixel area of ​​each connected region can be quickly obtained. Then, by multiplying the ratio of the actual area of ​​the preset reference object to the number of pixels in the connected region corresponding to the preset reference object by the number of pixels in the connected region corresponding to the particle, the cross-sectional area of ​​the particle can be obtained. This method is not only highly interpretable and accurate, but also requires less computation, thus improving the timeliness of particle size analysis. In order to facilitate measurement and portability, the size of the preset reference object is usually much larger than the size of the particle, such as a coin. Therefore, the connected region corresponding to the preset reference object is the largest connected region in the first segmented image.

[0060] In some embodiments, the equivalent particle size data of the particles is calculated based on the cross-sectional area of ​​the particles, including: equating the cross-sectional area of ​​the particles to the area of ​​a target circle, and determining the diameter of the target circle, wherein the equivalent particle size data of the particles includes the diameter of the target circle.

[0061] By equating the cross-sectional area of ​​particles to the area of ​​a circle, the calculation is simplified and the workload is reduced. Since the shape of sand particles is usually close to that of a sphere, and its cross-section is approximately the same as that of a circle, the error obtained by the equivalent is within an acceptable range, but the calculation operation is greatly simplified, and efficient particle size analysis is achieved.

[0062] In some embodiments, after calculating the equivalent particle size data based on the cross-sectional area of ​​the particles, the following steps are also included:

[0063] Step 1: Calculate the mass of the particulate matter based on its equivalent particle size and density.

[0064] Step 2: Obtain the particle size distribution of the particles from the equivalent particle size data and the mass of the particles.

[0065] The mass of particulate matter is calculated based on the equivalent particle size data and density of the particulate matter in the above steps. The particle size distribution of the particulate matter is obtained from the equivalent particle size data and the mass of the particulate matter. The method of this embodiment can be easily extended to use different densities of different materials to analyze different types of particulate matter, thus improving flexibility and practicality.

[0066] The embodiments of this application will be described and illustrated below through preferred embodiments.

[0067] Figure 3 This is a flowchart of a particulate matter size analysis method based on a watershed algorithm according to a preferred embodiment of this application. Figure 3 As shown, the particulate matter size analysis method based on the watershed algorithm includes the following steps:

[0068] Step S301: Deployment of the particulate matter size analysis application based on the watershed algorithm. For real-time analysis and processing, the application of this embodiment can be deployed on a web server. Node.js and Ajax are used to implement the interaction between the front-end and the web server. Continuous requests are made to the web server to obtain processed data, which is then displayed. The back-end places the core code in the Spring Boot framework and deploys the Spring Boot application on the server, exposing a port to the outside world. The front-end can access this port to request data. Simultaneously, to allow users to obtain particulate matter size analysis results more intuitively and conveniently, this embodiment visualizes the particulate matter size data and distribution. In the user interface design, HTML is used to arrange interface elements, and CSS components are used to implement the interface layout. If these are removed, the interface elements are simply listed from top to bottom. JavaScript is used to implement the interaction between the interface and the user, including selecting images and inputting data. The user interface display is as follows: Figure 4 As shown.

[0069] It should be noted that, in Figure 4 In this context, No represents the particle number, Particle size represents the particle size, data represents the data, Proportion represents the proportion, and distribution represents the distribution.

[0070] Step S302: Obtain particulate images with a preset reference object. This embodiment is applied to the particle size analysis of sand, a commonly used industrial particulate matter. Sand is an essential industrial commodity, serving as a primary raw material for adhesive mortar, finishing mortar, and concrete. Sand can be categorized by its source as sea sand, river sand, and mountain sand; and by particle size as fine sand, medium sand, and coarse sand, each with different applications. In the cement industry, sand particles added to cement act as a skeleton, increasing cement strength. Strict control of the proportions of cement, sand, and water, as well as the sand particle size, can improve concrete quality. At the sand collection site, a one-yuan coin is used as a preset reference object, placed on black cardstock. Random sand samples are also randomly collected and placed on the black cardstock for image capture.

[0071] Step S303: Preprocess the particulate image with a preset reference to obtain a first processed image. The preprocessing specifically includes: sequentially performing Laplacian sharpening, grayscale conversion, triangulation image binarization, and median filtering noise reduction on the particulate image.

[0072] Step S304: Perform Euclidean distance transform on the first processed image to obtain the second processed image. In a binary image, 1 represents a foreground point and 0 represents a background point; in a grayscale image, the grayscale value of a pixel represents the distance from that pixel to the nearest foreground point; let the foreground be O, the background be B, and the distance map be D, then the distance transform is defined as:

[0073] D(p)=min(disf(p,q)),p∈O,q∈B

[0074] in, D(p) represents the distance transformation of pixel p, where the coordinates of p are (x1, y1) and the coordinates of q are (x2, y2).

[0075] Step S305: The second processed image is sequentially subjected to erosion processing and binarization processing to obtain the first marked image. Here, triangulation image binarization processing is preferred.

[0076] Step S306: Smooth the first marked image based on the minimum coverage algorithm.

[0077] Step S307: The pixels in the smoothed first labeled image are used as initial labels. Based on the initial labels, the particulate image is processed using a label-based watershed segmentation algorithm to obtain a second segmented image.

[0078] Step S308: Perform image post-processing on the second segmented image, including threshold adjustment and hole filling, to obtain the first segmented image corresponding to the particulate image.

[0079] Step S309: Calculate the cross-sectional area of ​​the particles based on the ratio of the actual area of ​​the preset reference object to the pixel area of ​​the preset reference object in the first segmented image, and calculate the equivalent particle size data of the particles based on the cross-sectional area of ​​the particles.

[0080] First, extract the number of pixels in each connected component obtained from the segmentation of the first segmented image. Then, extract the number of pixels S corresponding to the connected component of the preset reference object (since the size of a coin is much larger than the size of a grain of sand, the largest connected component in the first segmented image is selected here). p Let S be the number of pixels in the i-th sand grain. pi According to the query or measurement, the area S of a one-yuan coin is 4.52 cm². 2 The cross-sectional area S of the i-th sand grain can be calculated. i for

[0081]

[0082] The cross-sectional area of ​​the particulate matter is equivalent to the area of ​​the target circle, and the diameter of the target circle is determined. The diameter of the target circle is the equivalent particle size (equivalent projected diameter of sand grains). The formula for calculating the equivalent particle size d is:

[0083]

[0084] Where π is the ratio of a circle's diameter to its circumference.

[0085] Step S310: Calculate the particle size distribution of the particulate matter. Since the shape of the particulate matter is usually close to that of a sphere, its equivalent volume V is:

[0086]

[0087] Based on the particulate density σ, the equivalent mass M of the particulate matter is obtained. s for:

[0088] M s =σ=V

[0089] The main component of sand is silicon dioxide, so the density of silicon dioxide can be used directly here. If it is other particulate matter, the corresponding mass can be obtained by its material density.

[0090] Combining this with the particulate matter's moisture content parameter, a water addition scheme can be derived. The total mass transmitted back from the gravity sensor is M. g The mass M of water can be calculated. w :

[0091] M w =M g -M s

[0092] This leads to the water-to-stone ratio M. w :M s .

[0093] To verify the representativeness of the sampled particulate matter, this embodiment also performs a normality test on the obtained particle size distribution data to better provide suggestions to staff. This embodiment preferably uses the Shapiro-Wilk test (W test), which is the square of the correlation coefficient between the sequentially ordered sample values ​​y(i) and the coefficient a(i), or the coefficient of determination R0 for linear regression. 2 .

[0094] Finally, the visualized data images, processed images, and a series of parameters are returned to the front end; the front end receives the images and numerical data from the back end and displays them on the user interface.

[0095] It should be noted that the steps shown in the above flowchart or 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 performed in a different order than that shown here. For example, steps S301 and S302.

[0096] This embodiment also provides a particulate matter size analysis device based on the watershed algorithm. This device is used to implement the above embodiments and preferred embodiments, and details already described will not be repeated. As used below, the terms "module," "unit," "subunit," etc., 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.

[0097] Figure 5 This is a structural block diagram of a particulate matter size analysis device based on the watershed algorithm according to an embodiment of this application, as shown below. Figure 5 As shown, the device includes: an acquisition module 51, a processing module 52, a segmentation module 53, and an analysis module 54.

[0098] The acquisition module 51 is used to acquire particulate matter images with preset reference objects.

[0099] The processing module 52, coupled to the acquisition module 51, is used to preprocess and transform the particulate matter image with a preset reference to obtain a first marked image.

[0100] The segmentation module 53, coupled to the processing module 52, is used to take the pixels in the first labeled image as initial labels, and based on the initial labels, process the particulate image using a label-based watershed segmentation algorithm to obtain a first segmented image corresponding to the particulate image.

[0101] The analysis module 54, coupled to the segmentation module 53, is used to calculate the cross-sectional area of ​​the particles based on the ratio of the actual area of ​​the preset reference object to the pixel area of ​​the preset reference object in the first segmentation image, and to calculate the equivalent particle size data of the particles based on the cross-sectional area of ​​the particles.

[0102] The particulate matter size analysis device based on the watershed algorithm provided in this application involves: acquiring a particulate matter image with a preset reference object; preprocessing and performing distance transformation on the particulate matter image with the preset reference object to obtain a first marked image; using the pixels in the first marked image as initial markers; processing the particulate matter image using a marker-based watershed segmentation algorithm based on the initial markers to obtain a first segmented image corresponding to the particulate matter image; calculating the cross-sectional area of ​​the particulate matter based on the ratio of the actual area of ​​the preset reference object to the pixel area of ​​the preset reference object in the first segmented image; and calculating the equivalent particle size data of the particulate matter based on the cross-sectional area of ​​the particulate matter. This solves the problems of low timeliness and low accuracy in particulate matter size analysis in related technologies, and achieves the beneficial effects of flexible, fast, and accurate particulate matter size analysis.

[0103] In some embodiments, the processing module 52 further includes:

[0104] The first processing unit is used to preprocess the particulate matter image with a preset reference to obtain a first processed image.

[0105] The first transformation unit, coupled to the first processing unit, is used to perform a distance transformation on the first processed image to obtain a second processed image, wherein the distance transformation includes Euclidean distance transformation.

[0106] The second processing unit, coupled to the first transformation unit, is used to perform erosion processing on the second processed image to obtain the third processed image.

[0107] The third processing unit, coupled to the second transformation unit, is used to binarize the third processed image to obtain the first labeled image, wherein the binarization includes triangulation image binarization.

[0108] In some embodiments, the first processing unit further includes:

[0109] A sharpening component is used to sharpen a particle image with a preset reference to obtain a first particle image, wherein the sharpening process includes Laplacian sharpening.

[0110] The grayscale component, coupled to the sharpening component, is used to perform grayscale processing on the first particle image to obtain the second particle image.

[0111] The binarization component, coupled to the grayscale component, is used to binarize the second particulate image to obtain the third particulate image. The binarization includes triangulation image binarization.

[0112] The noise reduction component, coupled to the binarization component, performs median filtering noise reduction on the third particulate image to obtain the first processed image.

[0113] In some embodiments, the segmentation module 53 further includes:

[0114] A smoothing unit is used to smooth the first labeled image based on the minimum coverage algorithm;

[0115] The segmentation processing unit, coupled to the smoothing unit, is used to take the pixels in the smoothed first labeled image as initial labels, and based on the initial labels, to process the particulate image using a label-based watershed segmentation algorithm to obtain a second segmented image.

[0116] The post-processing unit, coupled to the segmentation processing unit, is used to perform image post-processing on the second segmented image to obtain a first segmented image corresponding to the particle image. The image post-processing includes threshold adjustment and hole filling.

[0117] In some embodiments, the analysis module 54 is used to extract the number of pixels in each connected region of the first segmented image, wherein a connected region refers to an image region composed of foreground pixels with the same pixel value and adjacent positions; calculate the ratio of the actual area of ​​the preset reference object to the number of pixels in the connected region corresponding to the preset reference object; and obtain the cross-sectional area of ​​the particle by multiplying the ratio by the number of pixels in the connected region corresponding to the particle.

[0118] In some embodiments, the analysis module 54 is used to convert the cross-sectional area of ​​the particulate matter into the area of ​​the target circle and determine the diameter of the target circle, wherein the equivalent particle size data of the particulate matter includes the diameter of the target circle.

[0119] In some embodiments, the analysis module 54 is used to calculate the mass of the particulate matter based on the equivalent particle size data and density of the particulate matter; and to obtain the particle size distribution of the particulate matter from the equivalent particle size data and the mass of the particulate matter.

[0120] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can reside in the same processor; or the above modules can be located in different processors in any combination.

[0121] This embodiment also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0122] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0123] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0124] S1, acquire particulate matter image with preset reference.

[0125] S2, preprocess and perform distance transformation on the particulate matter image with a preset reference object to obtain the first labeled image.

[0126] S3, take the pixels in the first labeled image as the initial labels, and use the label-based watershed segmentation algorithm to process the particulate image based on the initial labels to obtain the first segmented image corresponding to the particulate image.

[0127] S4. Based on the ratio of the actual area of ​​the preset reference object to the pixel area of ​​the preset reference object in the first segmented image, the cross-sectional area of ​​the particles is calculated, and the equivalent particle size data of the particles is calculated based on the cross-sectional area of ​​the particles.

[0128] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0129] Furthermore, in conjunction with the particulate matter size analysis method based on the watershed algorithm in the above embodiments, this application embodiment can provide a storage medium for implementation. This storage medium stores a computer program; when executed by a processor, the computer program implements any of the particulate matter size analysis methods based on the watershed algorithm in the above embodiments.

[0130] Those skilled in the art should understand that the technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0131] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for particle size analysis of particulate matter based on a watershed algorithm, characterized by, include: Acquire particulate matter images with preset reference objects; The particulate matter image with the preset reference object is preprocessed and distance transformed to obtain the first marked image; The pixels in the first labeled image are used as initial labels. Based on the initial labels, the particulate image is processed using a label-based watershed segmentation algorithm to obtain a first segmented image corresponding to the particulate image. Based on the ratio of the actual area of ​​the preset reference object to the pixel area of ​​the preset reference object in the first segmented image, the cross-sectional area of ​​the particle is calculated, and the equivalent particle size data of the particle is calculated based on the cross-sectional area of ​​the particle. The cross-sectional area of ​​the particles is calculated based on the ratio of the actual area of ​​the preset reference object to the pixel area of ​​the preset reference object in the first segmented image, including: Extract the number of pixels in each connected component of the first segmented image, wherein the connected component is used to represent the image region composed of foreground pixels with the same pixel value and adjacent positions in the corresponding image; Calculate the ratio of the actual area of ​​the preset reference object to the number of pixels in the connected region corresponding to the preset reference object; The cross-sectional area of ​​the particle is obtained by multiplying the ratio by the number of pixels in the connected region corresponding to the particle. The calculation of the equivalent particle size data based on the cross-sectional area of ​​the particles includes: equating the cross-sectional area of ​​the particles to the area of ​​a target circle, and determining the diameter of the target circle, wherein the equivalent particle size data includes the diameter of the target circle.

2. The method of claim 1, wherein, The particulate image with a preset reference is preprocessed and subjected to distance transformation to obtain a first labeled image, including: The particulate matter image with the preset reference is preprocessed to obtain a first processed image; The first processed image is subjected to a distance transformation to obtain a second processed image, wherein the distance transformation includes Euclidean distance transformation; The second processed image is subjected to erosion processing to obtain the third processed image; The third processed image is binarized to obtain the first labeled image, wherein the binarization includes triangulation image binarization.

3. The method of claim 2, wherein, The particulate matter image with a preset reference is preprocessed to obtain a first processed image, including: The particle image with the preset reference is sharpened to obtain a first particle image, wherein the sharpening process includes Laplacian sharpening. The first particulate image is converted to grayscale to obtain the second particulate image; The second particulate image is binarized to obtain a third particulate image, wherein the binarization includes triangulation image binarization. The third particulate image is subjected to median filtering for noise reduction to obtain the first processed image.

4. The method of claim 1, wherein, The particulate image is processed using a label-based watershed segmentation algorithm to obtain a first segmented image corresponding to the particulate image, including: The first marked image is smoothed based on the minimum coverage algorithm; The pixels in the smoothed first labeled image are used as initial labels. Based on the initial labels, the particulate image is processed using a label-based watershed segmentation algorithm to obtain a second segmented image. The second segmented image is post-processed to obtain a first segmented image corresponding to the particle image, wherein the image post-processing includes threshold adjustment and hole filling.

5. The method of claim 1, wherein, After calculating the equivalent particle size data of the particles based on their cross-sectional area, the method further includes: The mass of the particulate matter is calculated based on the equivalent particle size data and density of the particulate matter. The particle size distribution of the particles is obtained from the equivalent particle size data and the mass of the particles.

6. A particle size distribution analyzer based on a watershed algorithm, characterized by, include: The acquisition module is used to acquire particulate matter images with preset reference objects; The processing module is used to preprocess and perform distance transformation on the particulate matter image with preset reference objects to obtain a first marked image; The segmentation module is used to take the pixels in the first labeled image as initial labels, and based on the initial labels, process the particulate image using a label-based watershed segmentation algorithm to obtain a first segmented image corresponding to the particulate image. The analysis module is used to calculate the cross-sectional area of ​​the particles based on the ratio of the actual area of ​​the preset reference object to the pixel area of ​​the preset reference object in the first segmented image, and to calculate the equivalent particle size data of the particles based on the cross-sectional area of ​​the particles. The analysis module is also used to extract the number of pixels in each connected component in the first segmented image, wherein the connected component is used to represent the image region composed of foreground pixels with the same pixel value and adjacent positions in the corresponding image; calculate the ratio of the actual area of ​​the preset reference object to the number of pixels in the connected component corresponding to the preset reference object; obtain the cross-sectional area of ​​the particles by multiplying the ratio by the number of pixels in the connected component corresponding to the particles; and convert the cross-sectional area of ​​the particles into the area of ​​a target circle and determine the diameter of the target circle, wherein the equivalent particle size data of the particles includes the diameter of the target circle. 7.An electronic device comprising a memory and a processor, the electronic device characterized by, The memory stores a computer program, and the processor is configured to run the computer program to perform the particulate matter size analysis method based on the watershed algorithm as described in any one of claims 1 to 5.

8. A storage medium having stored thereon a computer program, characterized in that When the computer program is executed by the processor, it implements the particulate matter size analysis method based on the watershed algorithm as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method for measuring granularity of microscopic image particles segmented on basis of watershed

    CN104075965A

  • Quasi-circular particulate matter counting method based on Android platform

    CN107909138A