Particle system three-dimensional image segmentation and tracking method and storage medium
By combining convolution method, watershed segmentation algorithm and Hungarian matching tracking algorithm, the problems of low accuracy and slow segmentation of three-dimensional image of the particle system are solved, efficient particle recognition and tracking are achieved, and accurate three-dimensional internal structure diagram is obtained, suitable for Industrial production.
Patent Information
- Application Number
- CN202411262500.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2044-09-10
AI Technical Summary
The existing three-dimensional image segmentation method of particle system has low segmentation accuracy, slow segmentation speed, poor segmentation effect, and the image tracking method limits the movement speed of particles, resulting in inaccurate three-dimensional internal structure diagrams obtained, affecting industrial production.
A method that combines convolution method, watershed segmentation algorithm and improved Hungarian matching tracking algorithm is adopted to realize the particle size by combining binarization, denoising, hole filling, convolution and marker watershed segmentation, combined with Hungarian tracking algorithm. Identify and track.
It improves image segmentation accuracy and speed, ensures the accuracy of the three-dimensional internal structure diagram of the particle system, and facilitates the optimization and analysis of industrial production processes.
Smart Images

Figure CN119228823A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer image segmentation, and in particular to a particle system three-dimensional image segmentation and tracking method and a storage medium. Background Art
[0002] In the process of industrial production, the internal structure of the product needs to be photographed using X-ray CT imaging technology. Through CT imaging, a three-dimensional internal structure diagram can be obtained, but to further process the image, each part of each image needs to be identified. Especially for a pile composed of multiple granular samples, such as a pile of ore debris, or a solid fuel prepared from a variety of materials (with a large number of spherical particles of other components inside), it is necessary to identify the position and size of different particles in the image. When processing a three-dimensional X-ray CT image sequence of a dynamic system, it is also necessary to track the movement trajectory of particles in different images.
[0003] Particles of the same material in CT images have similar brightness, and it is difficult to directly distinguish different individual particles in dense conditions. In order to separate the particles in the image, we need to label the pixels in the image, and mark the pixels belonging to the same individual particle with the same value, while the values of different particles are different. Commonly used methods for three-dimensional image segmentation and tracking of three-dimensional particle systems are convolution and watershed segmentation algorithms. In the convolution method, we can generate a template ball with the same size as the ball in the image, and then use the template and the image obtained by CT to perform three-dimensional convolution. If a certain position in the image is taken as the center, and the black and white conditions of the surrounding pixels are close to the template ball (that is, close to the center of the real particle), the convolution value obtained is relatively high, otherwise it is low. In this way, the maximum value obtained by convolution in the image is the center of mass position of each particle.
[0004] Another algorithm is the watershed segmentation algorithm, which generally uses the distance transformation algorithm on the black and white image first, that is, calculating the shortest distance between a certain position pixel and the background black pixel in the three-dimensional image. For the pixel points at the edge of the particle, the gray value is low after the distance transformation, while for those pixels located at the center of the particle, the gray value is high after the distance transformation. Using the watershed, the particle edges with low gray values can be used to separate them.
[0005] After obtaining the position and size of the particles through the segmentation algorithm, we still need to track them. Traditional tracking algorithms often follow the principle of considering the particles with the closest spatial distance between the previous and next frames as the same particle, and then match the particles in the image one by one to obtain the previous and next positions of all particles in the two frames, which is their motion trajectory.
[0006] In terms of quality control and testing, material characterization, and ore and resource exploration, the traditional three-dimensional image segmentation method of particle system has low segmentation accuracy, slow segmentation speed, and poor segmentation effect. In addition, the existing image tracking method limits the movement speed of particles when tracking image particles, resulting in inaccurate three-dimensional internal structure diagrams of the photographed samples. When the three-dimensional internal structure diagram is used to analyze and optimize the production processes in terms of quality control and testing, material characterization, and ore and resource exploration, the best solution cannot be obtained, which affects industrial production. Summary of the invention
[0007] The present invention provides a three-dimensional image segmentation and tracking method for a particle system, which is used to solve the problems that the existing three-dimensional image segmentation method for a particle system has low segmentation accuracy, slow segmentation speed and poor segmentation effect, and the existing image tracking method limits the movement speed of particles when tracking image particles and the obtained three-dimensional internal structure diagram of the particle system is inaccurate.
[0008] In order to solve the above technical problems, the present invention discloses the following technical solutions:
[0009] The present invention provides a particle system three-dimensional image segmentation and tracking method, comprising an image acquisition step, a preprocessing step, a binarization step, an image optimization step, a convolution step, a first segmentation step, a second segmentation step and a matching tracking step.
[0010] The image acquisition step is used to acquire at least one set of three-dimensional images; the preprocessing step is to preprocess the three-dimensional images to obtain grayscale images; the binarization step is used to preset a first threshold, perform binarization processing on the grayscale image, mark the target pixel in the grayscale image whose pixel value is greater than the first threshold as 1, that is, the first pixel point, and mark the background pixel in the grayscale image whose pixel value is less than the first threshold as 0, that is, the second pixel point, to obtain a first image, wherein the first image includes at least one connected area, and the connected area includes more than two first pixel points; the image optimization step is used to remove the noise composed of the first pixel points in the background of the first image and the holes composed of the second pixel points in the target object of the first image to obtain a second image; the convolution step is to fill the incomplete target object in the second image by convolution method. , obtaining a third image; the first segmentation step is based on a watershed algorithm and an erosion algorithm to segment the third image to obtain a fourth image including more than two pixel blocks; the second segmentation step is used to calculate the size of the pixel block in the fourth image, the position of the center of mass of the pixel block and the moment of inertia of the pixel block, preset a threshold range, the pixel block whose size and moment of inertia are within the threshold range is the first pixel block, the pixel block whose size and moment of inertia are outside the threshold range is the second pixel block, and the second pixel block is segmented into the first pixel block by the convolution method; the matching pursuit step is based on the Hungarian matching pursuit algorithm, presets a matching weight, matches the two first pixel blocks closest to each other in the neighboring sequence image in the three-dimensional image, and matches the particles of the two first pixel blocks one by one to obtain the final image.
[0011] Furthermore, the preprocessing step includes a brightness equalization step and an image reconstruction step. The brightness equalization step is to obtain a background brightness distribution image of the three-dimensional image through a dilation algorithm when the brightness of the three-dimensional image is uneven, and the three-dimensional image is divided by the background brightness distribution image to complete the overall brightness equalization processing of the image; the image reconstruction step is to reconstruct the three-dimensional image with uniform brightness to obtain a grayscale image.
[0012] Furthermore, the image optimization step includes a first optimization step and a second optimization step. The first optimization step is used to preset a second threshold to remove connected areas whose pixel block volume is lower than the second threshold; the second optimization step is used to preset a third threshold to remove connected areas whose pixel block volume is lower than the third threshold based on a morphological opening and closing algorithm.
[0013] Furthermore, the image filling step includes a template sphere generating step and a filling step. The template sphere generating step is to find the center of mass of the target particle that is incomplete or has artifacts in the target object of the second image through a convolution algorithm, and generate a template particle with the same size as the target particle with the center of mass as the center; the filling step is to take the union of the template particle and the target particle to fill the target particle.
[0014] Furthermore, the first segmentation step includes a gradient field acquisition step, an erosion step, a marking step and a watershed segmentation step.
[0015] The gradient field acquisition step is used to calculate the distance between each first pixel point in the third image and the second pixel point closest to the first pixel point, so as to obtain the distance gradient field of the third image; the erosion step is used to define the pixel block in the third image that only contains a single target particle as the first independent pixel block, and the pixel block that contains more than two target particles as the first connected pixel block, and based on the erosion algorithm, the first independent pixel block and the first connected pixel block are corroded into the second independent pixel block, and the volume of the second independent pixel block is smaller than the volume of the target particle; the marking step is used to preset a fourth threshold value, which is the maximum value of the distance gradient field, assign the fourth threshold value to the second independent pixel block, and superimpose the assigned second independent pixel block into the distance gradient field to complete the marking of the second independent pixel block and obtain a separately marked target object; the watershed segmentation step is to segment the separately marked target object by a watershed segmentation algorithm to obtain a fourth image including more than two second independent pixel blocks.
[0016] Furthermore, the second segmentation step includes, when the particle system constituting the first pixel block is non-spherical, identifying the orientation of the particles in the first pixel block by a convolution method to obtain the accurate direction of the particles in the first pixel block.
[0017] Furthermore, the calculation formula for the size of the pixel block volume is:
[0018] V n =Σδ(in)
[0019] Among them, n represents the nth particle, and the pixel point occupied by the particle is assigned the value n; i represents an arbitrary pixel point, and the pixel point is assigned the value i; δ represents the Dirac delta function, when in = 0, δ is 1, when in ≠ 0, δ is 0; V represents the size of the pixel block.
[0020] Furthermore, the calculation formula for the position of the centroid of the pixel block is:
[0021]
[0022] Among them, r n represents the position of the centroid of the pixel block n, r i Represents the position of any pixel i.
[0023] Furthermore, the calculation formula of the moment of inertia of the pixel block is:
[0024] I n =∑δ(in)|r i -r n | 2
[0025] Among them, I n represents the moment of inertia of the pixel block.
[0026] The present invention also provides a storage medium, comprising a memory and a processor.
[0027] The memory is used to store executable program codes; the processor reads the executable program codes to run a computer program corresponding to the executable program codes to execute at least one step of the particle system three-dimensional image segmentation and tracking method.
[0028] Compared with the prior art, the present invention has at least the following technical effects:
[0029] The present invention provides a three-dimensional image segmentation and tracking method for a particle system, which integrates a convolution method, a watershed segmentation algorithm, and an improved Hungarian matching pursuit algorithm. The method realizes particle recognition segmentation and particle tracking of a three-dimensional image of a granular system composed of multiple individuals through binarization, denoising and hole filling, convolution, a marker-based watershed segmentation algorithm, secondary convolution, and a Hungarian tracking algorithm. In each step, the imaging characteristics of the experimental granular system are improved or optimized, and finally a segmentation result that meets actual needs can be obtained. The reliability of the segmentation results obtained through this series of processes can realize batch processing of a large number of image sequences to realize long-term tracking of a dynamic particle system, improve the image segmentation accuracy, and have a fast segmentation speed and good segmentation effect. The method will not limit the movement speed of particles when tracking image particles, so that the obtained three-dimensional internal structure diagram of the particle system is more accurate, which is convenient for optimization and analysis of the production process. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The technical solution of the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0031] Figure 1 A flowchart of a particle system three-dimensional image segmentation and tracking method according to an embodiment of the present invention;
[0032] Figure 2A flowchart of the preprocessing steps described in an embodiment of the present invention;
[0033] Figure 3 A flowchart of the image optimization steps according to an embodiment of the present invention;
[0034] Figure 4 A flowchart of an image filling step according to an embodiment of the present invention;
[0035] Figure 5 is a flow chart of the first segmentation step according to an embodiment of the present invention;
[0036] Figure 6 This is a structural diagram of the storage medium described in an embodiment of the present invention.
[0037] The components in the figure are marked as follows:
[0038] 100 storage medium, 110 memory, 120 processor. DETAILED DESCRIPTION
[0039] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0040] like Figure 1 As shown, the present invention provides a three-dimensional image segmentation and tracking method for a particle system, comprising step S1) an image acquisition step, step S2) a preprocessing step, step S3) a binarization step, step S4) an image optimization step, step S5) an image filling step, step S6) a first segmentation step, step S7) a second segmentation step and step S8) a matching tracking step.
[0041] The particle system three-dimensional image segmentation and tracking method provided by the present invention can be used in quality control and detection, material characterization, and ore and resource exploration.
[0042] In terms of quality control and testing, materials such as grains, beans and other food raw materials, snacks, candies and other finished products, pharmaceutical particles, industrial catalyst powders, metallurgical metal powders and other materials often exist in granular form. The three-dimensional segmentation algorithm can determine the size, shape and spatial distribution of particles and control the corresponding processing quality. Specifically in the pharmaceutical industry, the appropriate particle size can maximize the solubility or bioavailability of drugs, which directly affects the efficacy and absorption rate of drugs. In the food, chemical and materials industries, uniformly mixed granular materials have a significant impact on the performance and quality of the final product. When it comes to mixing particles of different sizes, the algorithm can identify the spatial position distribution of particles of different sizes, analyze the uniformity of particle mixing, help optimize the mixing process, and ensure the stability of product quality.
[0043] In terms of material characterization, in addition to solid fuels, cement, concrete aggregates, special ceramics, composite materials, etc. that we commonly use are often distributed in the background material through processes such as injection molding. Tiny particles of other materials or pores are closely related to the performance of the material. This method can be used to identify the shape, size and spatial position distribution of internal tiny particles or pores, determine the pros and cons of the corresponding material preparation process, and optimize the design and manufacturing process of the material. For example, in concrete, the uniform distribution of aggregates and the appropriate particle shape help to improve the compressive strength and toughness of concrete. By analyzing these microstructural features, the pros and cons of the material preparation process can be evaluated and guidance can be provided for improving the process. At the same time, the algorithm can be used to track the flow and stacking process of particles and optimize the production process. For example, lithium battery positive electrode materials often use active granular materials. This method can analyze the shape characteristics and flow process of the corresponding active material particles to optimize battery performance.
[0044] In ore and resource exploration, 3D image segmentation algorithms can be used to analyze the particle structure and mineral composition distribution of ore samples in ore processing and resource exploration.
[0045] For example, in copper ore, copper minerals are often mixed with gangue minerals. The more typical ones are fine-grained impregnation and coarse-grained impregnation. Copper minerals are distributed in the gangue in the form of particles. According to this method, copper mineral particles in ore CT images can be accurately identified and segmented, and the spatial distribution, size and shape of minerals inside the ore, such as sphericity, can be quantified to help predict the mineral dissociation under different crushing particle sizes, so as to determine the optimal crushing particle size that balances the full dissociation of minerals and energy consumption. At the same time, in the post-processing of ore, crushing and screening processes are required. This method can be used to evaluate the shape (sphericity, etc.) and size characteristics (particle size distribution curve) of crushed or screened ore fragments to optimize related processes. For example, by comparing the particle characteristics before and after crushing, the efficiency of the corresponding process can be evaluated, or the size distribution of particles can be estimated, and the separation effect of different screens on particles can be predicted.
[0046] In this embodiment, the particle system three-dimensional image segmentation and tracking method provided by the present invention is illustrated by taking ore and resource exploration as an example.
[0047] Step S1) Image acquisition step, acquiring at least one set of three-dimensional images.
[0048] In this embodiment, the image is taken by using X-ray CT imaging technology to take an ore sample, and the ore sample is copper ore. Through CT imaging, a three-dimensional image of the ore sample is obtained.
[0049] Step S2) Preprocessing step, preprocessing the three-dimensional image to obtain a grayscale image.
[0050] like Figure 2 As shown, step S2) the preprocessing step includes step S21) a brightness uniformization step and step S22) an image reconstruction step.
[0051] Step S21) Brightness uniformization step: when the brightness of the three-dimensional image is uneven, a background brightness distribution image of the three-dimensional image is obtained by a dilation algorithm, and the three-dimensional image is divided by the background brightness distribution image to complete the overall brightness uniformization processing of the image.
[0052] Step S22) The image reconstruction step reconstructs the image with uniform brightness to obtain a grayscale image.
[0053] In this embodiment, reconstructing the three-dimensional structure image to obtain its grayscale image is a mature existing technology, which generally includes a maximum value method, an average value method and a weighted average method.
[0054] The maximum value method assigns the maximum value of the three components R, G, and B to V. This method can enhance the contrast of the image, but may introduce some color distortion; the average value method assigns the average value of the three components R, G, and B to V. This method can reduce the contrast of the image, but can reduce color distortion; the weighted average method assigns different weights to the three components R, G, and B according to the different sensitivities of the human eye to different colors, and then calculates the average value. This method can simulate the human eye's perception of color, thereby obtaining a more natural grayscale image. The specific process will not be repeated here.
[0055] In this embodiment, the copper ore photographed is often a mixed distribution of copper minerals and gangue minerals, and the more typical ones are fine-grained impregnation and coarse-grained impregnation. Therefore, after obtaining the three-dimensional image of the copper ore, it is necessary to perform subsequent processing on the three-dimensional image through this method to obtain a three-dimensional structural image of the copper ore to ensure that the particle structure and mineral composition distribution of the ore sample can be accurately analyzed.
[0056] Step S3) A binarization step is performed, in which a first threshold is preset, and the grayscale image is binarized, and target pixels in the grayscale image whose pixel values are greater than the first threshold are marked as 1, i.e., first pixels, and background pixels in the grayscale image whose pixel values are less than the first threshold are marked as 0, i.e., second pixels, to obtain a first image, wherein the first image includes at least one connected area, and the connected area includes more than two first pixels, wherein the first pixels represent the distribution of copper minerals, and the second pixels represent the distribution of gangue minerals.
[0057] In this embodiment, the brightness probability distribution of the entire grayscale image can be statistically analyzed. Generally speaking, the image can be divided into two areas, one is the bright spatial position with the target object, and the other is the black position which is the air. These two areas will make the brightness probability distribution of the entire image form two Gaussian peaks. The brightness corresponding to the lowest value at the connection of the two Gaussian peaks can be directly taken as the first threshold.
[0058] Step S4) an image optimization step, removing noise points composed of first pixel points in the background of the first image and holes composed of second pixel points in the target object of the first image to obtain a second image.
[0059] like Figure 3 As shown, step S4) the image optimization step includes step S41) a first optimization step and step S42) a second optimization step.
[0060] Step S41) A first optimization step is to preset a second threshold value and remove connected areas whose pixel block volume is lower than the second threshold value.
[0061] Step S42) A second optimization step is to preset a third threshold value, and based on a morphological opening and closing algorithm, remove connected areas whose pixel block volume is lower than the third threshold value.
[0062] In this embodiment, some white background noise often appears in the grayscale image after binarization, or some black holes appear in the middle of the target. Since these noise or holes are much smaller than the size of the particles, the diameter of the particles is generally more than 10 pixels, and the size of the noise point is 1 to 2 pixels, we can set a second threshold, the volume of the smallest particle is 100 pixels, so generally the connected area with a volume of less than 50 pixels is directly removed, that is, the second threshold is 50 pixels, or the standard morphological opening and closing algorithm is generally used. The opening and closing process with a pixel value of 2, that is, the third threshold is 2 pixels, and these connected areas with a size less than 50 pixels are removed. The connected areas are the white noise in the background and the black holes in the target. The present invention uses two methods at the same time to improve the effect of image optimization.
[0063] Step S5) a convolution step, filling in the incomplete target object in the second image by a convolution method to obtain a third image.
[0064] like Figure 4 As shown, step S5) the image filling step includes step S51) a template sphere generating step and step S52) a filling step.
[0065] Step S51) an image filling step, in which the centroid of the target particle that is incomplete or has artifacts in the target object of the second image is found through a convolution algorithm, and a template particle having a size consistent with the size of the target particle is generated with the centroid as the center.
[0066] Step S52) A filling step is to take the union of the template particles and the target particles to fill the target particles.
[0067] In this embodiment, for the high-speed 3D image of particulate matter obtained by CT, due to the low definition, there are often some particles with incomplete shapes or obvious artifacts. For such particles, the convolution method is used to fill them. Specifically, after finding the centroid of the particle through convolution, we generate a template particle with the same size as the target particle at the centroid, and then take the union with the real particle to fill the incomplete particles, and then fill the incomplete part of the target image.
[0068] Step S6) A first segmentation step is to segment the third image based on a watershed algorithm and an erosion algorithm to obtain a fourth image including more than two pixel blocks.
[0069] like Figure 5As shown, step S6) the first segmentation step includes step S61) a gradient field acquisition step, step S62) an erosion step, step S63) a marking step and step S64) a watershed segmentation step.
[0070] Step S61) A gradient field acquisition step is to calculate the distance between each first pixel point in the third image and the second pixel point closest to the first pixel point, so as to obtain the distance gradient field of the third image.
[0071] In this embodiment, the calculation of the distance gradient field is a mature existing technology and will not be described in detail here.
[0072] Step S62) An erosion step, defining a pixel block in the third image that contains only a single target particle as a first independent pixel block, and a pixel block that contains more than two target particles as a first connected pixel block, and corroding the first independent pixel block and the first connected pixel block into second independent pixel blocks based on an erosion algorithm, each second independent pixel block includes an equal number of particles, the volume of the second independent pixel block is smaller than the volume of the target particle, but the center of mass position of each second independent pixel block is the same.
[0073] Step S63) A marking step is performed, wherein a fourth threshold is preset, and the fourth threshold is the maximum value of the distance gradient field. The second independent pixel block is assigned the fourth threshold, and the assigned second independent pixel block is superimposed on the distance gradient field to complete the marking of the second independent pixel block, thereby obtaining a separately marked target object.
[0074] Step S64) A watershed segmentation step, in which the individually marked target object is segmented by a watershed segmentation algorithm to obtain a fourth image including more than two pixel blocks.
[0075] In this embodiment, in the distance gradient field, the pixel points close to the edge of the particle are assigned a small value, while the pixel points close to the center of the particle are assigned a larger value. Through the distance gradient field, the pixel blocks existing alone in the target object can be segmented by watershed, and the local peak of each distance gradient field is considered to be the center of the particle, and different particles are separated along the position with a smaller distance field value. However, due to the limitation of shooting accuracy, most of the particles that are in contact with each other will be connected together in the shot image. For such connected pixel blocks, a "false" local peak of the distance field will appear in the connected part of the particle. After being processed by the traditional watershed segmentation method, "false" particles will be newly segmented, causing the problem of over-segmentation.
[0076] In order to deal with this problem, the corrosion algorithm is used to corrode the originally connected pixel blocks into multiple separate pixel blocks that are much smaller than the volume of the particles, namely the second independent pixel blocks. By assigning larger values to these second independent pixel blocks and superimposing them into the distance field, independent individuals in the image, namely the separately marked additional targets, can be additionally marked. The watershed algorithm is then used to segment the separately marked additional targets, which can effectively avoid the over-segmentation problem in segmentation.
[0077] Step S7) a second segmentation step, calculating the size of the pixel block in the fourth image, the position of the center of mass of the pixel block and the moment of inertia of the pixel block, presetting a threshold range, the pixel block whose size and moment of inertia are within the threshold range is the first pixel block, the pixel block whose size and moment of inertia are outside the threshold range is the second pixel block, and the second pixel block is segmented into the first pixel block by a convolution method.
[0078] In this embodiment, in the second segmentation step (step S7), when the particle system constituting the first pixel block is nearly spherical, the orientation of the particles in the first pixel block is identified by the convolution method, the accurate direction of the particles in the first pixel block is obtained, and the segmentation path is determined.
[0079] Furthermore, the calculation formula of the size of the pixel block is:
[0080] V n =∑δ(in)
[0081] Among them, n represents the nth particle, and the pixel point occupied by the particle is assigned the value n; i represents an arbitrary pixel point, and the pixel point is assigned the value i; δ represents the Dirac delta function, when in = 0, δ is 1, when in ≠ 0, δ is 0; V represents the size of the pixel block.
[0082] Furthermore, the calculation formula for the position of the centroid of the pixel block is:
[0083]
[0084] Among them, r n represents the position of the centroid of the pixel block n, r i Represents the position of any pixel i.
[0085] Furthermore, the calculation formula of the moment of inertia of the pixel block is:
[0086] I n =∑δ(in)|r i -r n | 2
[0087] Among them, In represents the moment of inertia of the pixel block.
[0088] In this embodiment, by setting a threshold range for pixel block size and moment of inertia, which is set according to the segmentation requirements, some deformed particles can be identified. In order to avoid segmentation errors, we only retain the segmentation results whose size and moment of inertia are within the threshold range, and for the pixel block that exceeds the threshold range, that is, the second pixel block, we use the convolution algorithm to re-segment it, obtain the first pixel block within the threshold range, and identify its size and center of mass position.
[0089] Finally, we can obtain the centroid positions and total number of pixels of all first pixel blocks, corresponding to the centroid positions and volume sizes of different particles.
[0090] Step S8) A matching pursuit step is performed based on the Hungarian matching pursuit algorithm, a matching weight is preset, and the two first pixel blocks that are closest to each other are matched, and the particles of the two first pixel blocks are matched one by one to obtain a final image.
[0091] In this embodiment, a matching weight is set according to the distance between particles. The matching weight is inversely proportional to the square of the distance between particles. The smaller the distance, the higher the matching weight. When the distance exceeds five times the particle diameter, the matching weight is set to 0. On the one hand, the nearest particles between the previous and next frames can be found, while also avoiding the matching of particles that are too far away.
[0092] Therefore, we can obtain a matching result with the largest final total weight and the largest number of matches, match the particles in the two frames one by one, obtain the motion trajectory of the particles in the two frames, track the particle trajectory, and finally obtain the three-dimensional internal structure diagram of the ore sample. We can analyze the particle structure and mineral composition distribution of the ore sample, optimize the relevant processes used for the ore, and enable the staff to adopt the best mining plan when mining the copper mine. This has great scientific research value and practical application significance.
[0093] like Figure 6 As shown, the present invention also provides a storage medium 100, including a memory 110 and a processor 120. The storage medium in the memory 110 is used to store executable program code. The processor 120 reads the executable program code to run a computer program corresponding to the executable program code to execute at least one step of step S1) to step S8) in the particle system three-dimensional image segmentation and tracking method.
[0094] The advantage of the present application is that a method for three-dimensional image segmentation and tracking of a particle system is provided. The present invention provides a method for three-dimensional image segmentation and tracking of a particle system, which integrates the convolution method, the watershed segmentation algorithm, and the improved Hungarian matching pursuit algorithm. Through binarization, denoising and hole filling, convolution, a marker-based watershed segmentation algorithm, secondary convolution and the Hungarian tracking algorithm, particle recognition segmentation and particle tracking of a three-dimensional image of a granular system composed of multiple individuals are realized. At each step, the imaging characteristics of the experimental granular system are improved or optimized, and finally a segmentation result that meets actual needs can be obtained. The reliability of the segmentation results obtained through this series of processes can realize batch processing of a large number of image sequences to achieve long-term tracking of dynamic particle systems, improve the image segmentation accuracy, fast segmentation speed, good segmentation effect, and will not limit the movement speed of particles when tracking image particles, so that the obtained three-dimensional internal structure diagram of the particle system is more accurate.
[0095] The above is a detailed introduction to the three-dimensional image segmentation and tracking method for a particle system provided in an embodiment of the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the technical scheme and core idea of the present invention. Ordinary technicians in this field should understand that they can still modify the technical schemes recorded in the aforementioned embodiments, or replace some of the technical features therein with equivalents; and these modifications or replacements do not make the essence of the corresponding technical scheme deviate from the scope of the technical schemes of the embodiments of the present invention.
Claims
1. A particle system three-dimensional image segmentation and tracking method, characterized in that: include: An image acquisition step of acquiring at least one set of three-dimensional images; A preprocessing step of preprocessing the three-dimensional image to obtain a grayscale image; A binarization step, presetting a first threshold, performing binarization processing on the grayscale image, marking target pixels in the grayscale image whose pixel values are greater than the first threshold as 1, i.e., first pixel points, and marking background pixels in the grayscale image whose pixel values are less than the first threshold as 0, i.e., second pixel points, to obtain a first image, wherein the first image includes at least one connected area, and the connected area includes more than two first pixel points; an image optimization step of removing noise points composed of first pixel points in the background of the first image and holes composed of second pixel points in the target object of the first image to obtain a second image; A convolution step, filling the incomplete target object in the second image by a convolution method to obtain a third image; A first segmentation step, segmenting the third image based on a watershed algorithm and an erosion algorithm to obtain a fourth image including more than two pixel blocks; a second segmentation step, calculating the size of a pixel block in the fourth image, the position of the centroid of the pixel block, and the moment of inertia of the pixel block, presetting a threshold range, wherein the pixel block whose size and moment of inertia are within the threshold range is a first pixel block, and the pixel block whose size and moment of inertia are outside the threshold range is a second pixel block, and segmenting the second pixel block into the first pixel block by a convolution method; as well as The matching pursuit step is based on the Hungarian matching pursuit algorithm, presets a matching weight, matches the two first pixel blocks that are closest to each other in the neighbor sequence image in the three-dimensional image, and matches the particles of the two first pixel blocks one by one to obtain the final image.
2. The particle system three-dimensional image segmentation and tracking method according to claim 1, characterized in that: The pre-processing step comprises: a brightness uniformization step, when the brightness of the three-dimensional image is uneven, obtaining a background brightness distribution image of the three-dimensional image by a dilation algorithm, and dividing the three-dimensional image by the background brightness distribution image to complete overall brightness uniformization processing of the image; and The image reconstruction step reconstructs the three-dimensional image with uniform brightness to obtain a grayscale image.
3. The particle system three-dimensional image segmentation and tracking method according to claim 1, characterized in that: The image optimization step comprises: In a first optimization step, a second threshold is preset to remove connected areas whose pixel block volume is lower than the second threshold; and In the second optimization step, a third threshold is preset, and connected areas whose pixel block volumes are lower than the third threshold are removed based on a morphological opening and closing algorithm.
4. The particle system three-dimensional image segmentation and tracking method according to claim 1, characterized in that: The image filling step comprises: a template sphere generating step, finding the center of mass of the target particle that is incomplete or has artifacts in the target object of the second image by a convolution algorithm, and generating a template particle with a size consistent with the size of the target particle with the center of mass as the center; and The filling step is to take the union of the template particles and the target particles to fill the target particles.
5. The particle system three-dimensional image segmentation and tracking method according to claim 1, characterized in that: The first segmentation step comprises: a gradient field acquisition step, calculating the distance between each first pixel point in the third image and the second pixel point closest to the first pixel point, to obtain a distance gradient field of the third image; an erosion step, defining a pixel block in the third image that contains only a single target particle as a first independent pixel block, and a pixel block that contains two or more target particles as a first connected pixel block, and corroding the first independent pixel block and the first connected pixel block into a second independent pixel block based on an erosion algorithm, wherein the volume of the second independent pixel block is smaller than the volume of the target particle; a marking step, presetting a fourth threshold value, the fourth threshold value being the maximum value of the distance gradient field, assigning the second independent pixel block a value of the fourth threshold value, superimposing the assigned second independent pixel block into the distance gradient field, completing marking of the second independent pixel block, and obtaining a separately marked target object; and The watershed segmentation step is to segment the individually marked target object by using a watershed segmentation algorithm to obtain a fourth image including more than two second independent pixel blocks.
6. The particle system three-dimensional image segmentation and tracking method according to claim 1, characterized in that: The second segmentation step comprises: When the particle system constituting the first pixel block is non-spherical, the orientation of the particles in the first pixel block is identified by a convolution method to obtain the accurate direction of the particles in the first pixel block.
7. The particle system three-dimensional image segmentation and tracking method according to claim 1, characterized in that: The calculation formula for the size of the pixel block volume is: V n =Σδ(i-n) Among them, n represents the nth particle, and the pixel point occupied by the particle is assigned the value n; i represents an arbitrary pixel point, and the pixel point is assigned the value i; δ represents the Dirac delta function, when in = 0, δ is 1, when in ≠ 0, δ is 0; V represents the size of the pixel block.
8. The particle system three-dimensional image segmentation and tracking method according to claim 1, characterized in that: The calculation formula for the position of the centroid of the pixel block is: Among them, r n represents the position of the centroid of the pixel block n, r i Represents the position of any pixel i.
9. The particle system three-dimensional image segmentation and tracking method according to claim 1, characterized in that: The calculation formula of the moment of inertia of the pixel block is: I n =∑δ(i-n)|r i -r n | 2 Among them, I n represents the moment of inertia of the pixel block.
10. A storage medium, characterized in that: include: A memory for storing executable program codes; as well as A processor reads the executable program code to run a computer program corresponding to the executable program code to execute at least one step of the particle system three-dimensional image segmentation and tracking method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Method for measuring granularity of microscopic image particles segmented on basis of watershed
CN104075965A
Automatic straightening and strengthening method for CT (Computed Tomography) data
CN114240970A
Medical image cell segmentation and tracking method
CN116721414A
Rodlike adhesion particle image segmentation method based on watershed algorithm
CN117152191A
Particle motion feature analysis method and system for CT image
CN117474750A
Cited By
Tracking method for massive moving particles based on image recognition
CN119559214A
