A granular system three-dimensional image segmentation and tracking method and storage medium
By combining convolution, watershed segmentation, and Hungarian matching pursuit algorithms, a new 3D image segmentation and tracking method for particle systems has been developed. This method addresses the issues of low segmentation accuracy and slow speed in existing technologies, achieving high-precision and fast particle recognition and tracking. It yields more accurate 3D internal structure maps, supporting optimization in industrial production.
Patent Information
- Application Number
- CN202411262500.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2044-09-10
AI Technical Summary
Existing 3D image segmentation methods for particle systems have low segmentation accuracy, slow segmentation speed, and poor segmentation results. Existing image tracking methods limit the movement speed of particles when tracking image particles, resulting in inaccurate 3D internal structure maps and affecting industrial production.
A 3D image segmentation and tracking method for particle systems is proposed, which integrates convolution, watershed segmentation, and improved Hungarian matching pursuit algorithm. The method includes image acquisition, preprocessing, binarization, image optimization, convolution, segmentation, and matching pursuit steps. Particle identification and tracking are performed through binarization, denoising and hole filling, convolution, marker-based watershed segmentation algorithm, and Hungarian tracking algorithm.
It improves the accuracy and speed of image segmentation, and the obtained three-dimensional internal structure map of the particle system is more accurate, which facilitates the optimization and analysis of production processes.
Smart Images

Figure CN119228823B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of computer image segmentation, and particularly relates to a three-dimensional image segmentation and tracking method for a granular system and a storage medium. BACKGROUND
[0002] In the process of industrial production, X-ray CT imaging technology is needed to obtain the internal structure of a product. Through CT imaging, a three-dimensional internal structure diagram of the product can be obtained. However, further processing of the image is needed, and each part in each image needs to be identified. In particular, for a pile composed of multiple granular samples, such as a pile of ore debris or a solid fuel prepared from multiple materials (which contains a large number of spherical other component particles), the positions and sizes of different particles in the image need to be identified, and when processing a three-dimensional X-ray CT image sequence of a dynamic system, the motion trajectories of the particles in different images also need to be tracked.
[0003] Particles with the same material in a CT image have similar brightness, and it is difficult to directly distinguish different particle individuals in a dense case. In order to separate the particles in the image, the pixel points in the image need to be labeled, and the pixel points belonging to the same particle individual are marked with the same value, and the values of different particles are different from each other. Common three-dimensional image segmentation and tracking methods for a three-dimensional granular system include convolution method and watershed segmentation algorithm. In the convolution method, a template sphere with the same size as the sphere in the image can be generated, and then the template is used for three-dimensional convolution with the image obtained by CT imaging. If a certain position in the image is taken as the center, the black and white conditions of the surrounding pixels are close to the template sphere (that is, close to the center position of the real particle), and the convolution value obtained is relatively high, and vice versa. Thus, 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. Generally, a distance transform algorithm is used for a black and white image, that is, the nearest distance of a pixel in a three-dimensional image to a background black pixel is calculated. For a pixel point at the edge of a particle, the gray value is low after distance transformation, and for a pixel point at the center of a particle, the gray value is high after distance transformation. By using the watershed, the particles with low gray values at the edges can be separated.
[0005] After the position and size of the particles are obtained by the segmentation algorithm, the particles also need to be tracked. Traditional tracking algorithms often follow the principle that the particles with the nearest spatial distance between two frames are considered to be the same particle, and then the particles in the image are matched one by one, so as to obtain the positions of all particles in the two frames, which are the motion trajectories of the particles.
[0006] In the aspects of quality control and detection, material characterization and ore and resource exploration, due to the problems of low segmentation accuracy, slow segmentation speed, poor segmentation effect of the traditional three-dimensional image segmentation method of the particle system, and the limitation of the motion speed of the particles when the existing image tracking method tracks the image particles, the three-dimensional internal structure diagram of the photographed sample is not accurate, and when the production process in the aspects of quality control and detection, material characterization and ore and resource exploration is analyzed and optimized through the three-dimensional internal structure diagram, the best scheme cannot be obtained, and the industrial production is affected. SUMMARY
[0007] The present application provides a kind of particle system three-dimensional image segmentation and tracking method, to solve the problems of low segmentation accuracy, slow segmentation speed, poor segmentation effect of the existing particle system three-dimensional image segmentation method, and the limitation of the motion speed of the particles when the existing image tracking method tracks the image particles and the inaccurate three-dimensional internal structure diagram of the acquired particle system.
[0008] To solve the above technical problems, the present application discloses the following technical solutions:
[0009] The present application provides a kind of particle system three-dimensional image segmentation and tracking method, including image acquisition step, pretreatment step, binary step, image optimization step, convolution step, first segmentation step, second segmentation step and 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 a gray-scale image; the binarization step is to preset a first threshold value, to binarize the gray-scale image, to mark the target object pixels in the gray-scale image with a pixel value greater than the first threshold value as 1, i.e., first pixel points, to mark the background pixels in the gray-scale image with a pixel value less than the first threshold value as 0, i.e., second pixel points, to obtain a first image, and to include at least one connected region in the first image, the connected region including two or more first pixel points; the image optimization step is to remove the noise points composed of the first pixel points in the background in the first image and the holes composed of the second pixel points in the target object in the first image to obtain a second image; the convolution step is to fill the incomplete target object in the second image by a convolution method to obtain a third image; the first segmentation step is to segment the third image based on a watershed algorithm and an erosion algorithm to obtain a fourth image including two or more pixel blocks; the second segmentation step is to calculate the size of the pixel blocks, the position of the pixel block centroid, and the rotational inertia of the pixel blocks in the fourth image, to preset a threshold value range, to regard the pixel blocks with the size and the rotational inertia within the threshold value range as first pixel blocks, and to regard the pixel blocks with the size and the rotational inertia outside the threshold value range as second pixel blocks, and to segment the second pixel blocks into first pixel blocks by a convolution method; and the matching and tracking step is to preset a matching weight based on a Hungarian matching and tracking algorithm, to match the two closest first pixel blocks in the adjacent sequence images in the three-dimensional images, and to one-to-one correspond match the two first pixel blocks to obtain a final image.
[0011] Further, the preprocessing step includes a brightness uniformization step and an image reconstruction step. When the brightness of the three-dimensional images is not uniform, the brightness uniformization step obtains a background brightness distribution image of the three-dimensional images by an expansion algorithm, divides the three-dimensional images by the background brightness distribution image to complete the overall brightness uniformization processing of the images. The image reconstruction step reconstructs the three-dimensional images with uniform brightness to obtain a gray-scale image.
[0012] Further, the image optimization step includes a first optimization step and a second optimization step. The first optimization step is to preset a second threshold value to remove the connected regions with a pixel block volume lower than the second threshold value. The second optimization step is to preset a third threshold value, to remove the connected regions with a pixel block volume lower than the third threshold value based on a morphological opening and closing algorithm.
[0013] Further, the image filling step comprises a template sphere generating step and a filling step. The template sphere generating step is to find the center of mass of a target particle with defects or artifacts in the target object of the second image by a convolution algorithm, and generate a template particle with a size consistent with the size of 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] Further, the first segmentation step comprises a gradient field obtaining step, an erosion step, a labeling step and a watershed segmentation step.
[0015] The gradient field obtaining step is to calculate the distance between each first pixel point in the third image and the nearest second pixel point to obtain the distance gradient field of the third image. The erosion step is to define a pixel block containing only a single target particle in the third image as a first independent pixel block, and a pixel block containing more than two target particles as a first connected pixel block, and to erode the first independent pixel block and the first connected pixel block into a second independent pixel block based on an erosion algorithm, the volume of the second independent pixel block being smaller than the volume of the target particle. The labeling step is to preset a fourth threshold value, which is the maximum value of the distance gradient field, and to assign the second independent pixel block with the fourth threshold value, and to superimpose the second independent pixel block after assignment into the distance gradient field to complete the labeling of the second independent pixel block to obtain a separately labeled target object. The watershed segmentation step is to segment the separately labeled target object by a watershed segmentation algorithm to obtain a fourth image comprising more than two second independent pixel blocks.
[0016] Further, the second segmentation step comprises, 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] Further, the calculation formula of the size of the pixel block volume is
[0018] V n =∑δ(i-n)
[0019] wherein n represents the nth particle, the pixel point occupied by the particle being assigned with a value of n; i represents an arbitrary pixel point, the pixel point being assigned with a value of i; δ represents a Dirac delta function, δ being 1 when i-n=0, and δ being 0 when i-n≠0; and V represents the size of the pixel block.
[0020] Further, the calculation formula of the position of the pixel block center of mass is
[0021]
[0022] wherein, r n represents the position of the pixel block n centroid, r i represents the position of any pixel point i.
[0023] Further, the formula for calculating the moment of inertia of the pixel block is
[0024] I n =∑δ(i-n)|r i -r n | 2
[0025] wherein, I n represents the moment of inertia of the pixel block.
[0026] The application also provides a storage medium storing computer readable instructions, which, when read by a processor, enable the processor to execute the particle system three-dimensional image segmentation and tracking method.
[0027] Compared with the prior art, the application has at least the following technical effects:
[0028] The application provides a particle system three-dimensional image segmentation and tracking method, which comprehensively uses convolution method, watershed segmentation algorithm, and improved Hungarian matching tracking algorithm, realizes particle recognition segmentation and particle tracking of a particle system three-dimensional image composed of multiple individuals through binarization, denoising and hole filling, convolution, marker-based watershed segmentation algorithm, secondary convolution, and Hungarian tracking algorithm, and is improved or optimized at each step according to the imaging characteristics of the experimental particle system, so that a segmentation result meeting actual requirements can be finally obtained. BRIEF DESCRIPTION OF DRAWINGS
[0029] The technical solutions of the application will be described in detail below with reference to the drawings and specific embodiments.
[0030] Figure 1 A flowchart of the particle system three-dimensional image segmentation and tracking method according to the embodiment of the application is shown in the figure.
[0031] Figure 2 A flowchart of the preprocessing step according to the embodiment of the application is shown in the figure.
[0032] Figure 3 A flowchart of the image optimization step according to the embodiment of the application is shown in the figure.
[0033] Figure 4 This is a flowchart of the image filling step according to an embodiment of the present invention;
[0034] Figure 5 This is a flowchart of the first segmentation step according to an embodiment of the present invention;
[0035] Figure 6 This is a structural diagram of the storage medium described in an embodiment of the present invention.
[0036] The components in the figure are identified as follows:
[0037] 100 storage medium, 110 processor. DETAILED DESCRIPTION
[0038] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only some of the embodiments of the present invention, not all of them. 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.
[0039] 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.
[0040] 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.
[0041] 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. This 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 particulate 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.
[0042] In terms of material characterization, in addition to solid fuels, we often use cement, concrete aggregate, special ceramics, and composites, which are often distributed with small particles of other materials in the background material through processes such as injection molding. The shape, size, and spatial distribution of these small particles or pores are closely related to the performance of the material. This method can be used to identify the shape, size, and spatial distribution of internal small 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, uniform distribution of aggregate and appropriate particle shape help improve the compressive strength and toughness of concrete. By analyzing these microstructure characteristics, the pros and cons of the material preparation process can be evaluated, and guidance for improving the process can be provided. At the same time, this algorithm can be used to track the flow and accumulation of particles, optimizing the production process. For example, lithium battery anode materials often use active granular materials. This method can be used to analyze the shape characteristics and flow process of the corresponding active material particles, optimizing battery performance.
[0043] In terms of ore and resource exploration, in ore processing and resource exploration, the three-dimensional image segmentation algorithm can be used to analyze the particle structure and mineral composition distribution of ore samples.
[0044] For example, in copper mines, copper minerals are often mixed with gangue minerals in a disseminated distribution, typically in fine-grained and coarse-grained disseminated forms. Copper minerals are distributed in the form of particles in the gangue. According to this method, copper mineral particles in the ore CT image can be accurately identified and segmented, and the spatial distribution, size, shape, and other characteristics of the ore can be quantified, such as sphericity, to help predict mineral dissociation under different crushing particle sizes, determine the optimal crushing particle size that balances mineral dissociation and energy consumption. At the same time, in the post-processing process of the 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 the crushed ore after crushing or screening, to optimize the 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 the particles can be predicted, and the separation effect of different screens on the particles can be predicted.
[0045] In this embodiment, the three-dimensional image segmentation and tracking method for particle systems provided by the present application is illustrated in the context of ore and resource exploration.
[0046] Step S1) image acquisition step, acquiring at least one set of three-dimensional images.
[0047] In this embodiment, the image is taken of an ore sample using X-ray CT imaging technology, and the ore sample is a copper mine. Through CT imaging, a three-dimensional image of the ore sample is obtained.
[0048] Step S2) preprocessing step, preprocessing the three-dimensional image to obtain a gray-scale image.
[0049] AsFigure 2 As shown, step S2) the pre-processing step includes step S21) a brightness uniformization step and step S22) an image reconstruction step.
[0050] Step S21) Brightness uniformity 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 uniformity processing of the image.
[0051] Step S22) The image reconstruction step reconstructs the image with uniform brightness to obtain a grayscale image.
[0052] 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.
[0053] 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 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 is not described here.
[0054] In this embodiment, the copper ore photographed is often a mixed distribution of copper minerals and gangue minerals, typically 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 using this method to obtain a three-dimensional structural image of the copper ore to ensure accurate analysis of the particle structure and mineral composition distribution of the ore sample.
[0055] Step S3) a binarization step, presetting a first threshold, performing binarization processing on the grayscale image, marking 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 marking 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 first pixel point represents the distribution of copper minerals, and the second pixel point represents the distribution of gangue minerals.
[0056] In the embodiment, the brightness probability distribution of the entire gray image can be counted. Generally, the image can be divided into two regions, one is the bright space position with the target object, and the other is the black position of air. The two regions will make the brightness probability distribution of the entire image form two Gaussian peaks. The brightness corresponding to the minimum value at the connection of the two Gaussian peaks is directly taken as the first threshold value.
[0057] Step S4) image optimization step, removing the noise points composed of the first pixel points in the background in the first image and the holes composed of the second pixel points in the target object in the first image, to obtain a second image.
[0058] As shown in Figure 3 Step S4) image optimization step includes step S41) first optimization step and step S42) second optimization step.
[0059] Step S41) first optimization step, a second threshold value is preset, and the connected region with a pixel block volume lower than the second threshold value is removed.
[0060] Step S42) second optimization step, a third threshold value is preset, and the connected region with a pixel block volume lower than the third threshold value is removed based on a morphological opening and closing algorithm.
[0061] In the embodiment, some white background noise points or some black holes in the target object often appear in the binary gray image. Since the size of the noise points or holes is much smaller than that of the particles, the diameter of the particles is generally more than 10 pixels, and the size of the noise points is 1 to 2 pixels. A second threshold value can be set, and the volume of the smallest particle is 100 pixels. Therefore, the connected region with a volume less than 50 pixels is directly removed, that is, the second threshold value is 50 pixels. The connected region is the white noise point in the background and the black hole in the target object. The two methods are used at the same time to improve the effect of image optimization.
[0062] Step S5) convolution step, filling the incomplete target object in the second image by convolution method to obtain a third image.
[0063] As shown in Figure 4 Step S5) image filling step includes step S51) template ball generation step and step S52) filling step.
[0064] Step S51) image filling step, finding the center of mass of the target particle in the target object of the second image by convolution algorithm, generating a template particle with the same size as the target particle at the center of mass.
[0065] Step S52) filling step, taking the union of the template particle and the target particle to fill the target particle.
[0066] In this embodiment, for the high-speed particle three-dimensional image obtained by CT, due to the low definition, there are often some particles with incomplete shape or obvious artifacts. For this kind of particle, convolution method is used to fill it. Specifically, after finding the center of mass of the particle by convolution, a template particle with the same size as the target particle is generated at the center of mass, and then the union of the real particle and the template particle is taken to fill the incomplete particle, and then the incomplete part in the target object image is filled.
[0067] Step S6) first segmentation step, based on the watershed algorithm and the erosion algorithm, the third image is segmented to obtain a fourth image including two or more pixel blocks.
[0068] As shown in Figure 5 Step S6) first segmentation step includes step S61) gradient field acquisition step, step S62) erosion step, step S63) labeling step and step S64) watershed segmentation step.
[0069] Step S61) gradient field acquisition step, calculating the distance between each first pixel point in the third image and the nearest second pixel point to the first pixel point, obtaining the distance gradient field of the third image.
[0070] In this embodiment, the calculation of the distance gradient field is a mature prior art, which will not be described here.
[0071] Step S62) erosion step, defining the pixel block containing only a single target particle in the third image as a first independent pixel block, and the pixel block containing two or more target particles as a first connected pixel block, based on the erosion algorithm, the first independent pixel block and the first connected pixel block are eroded into second independent pixel blocks, 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.
[0072] Step S63) labeling step, a fourth threshold is preset, the fourth threshold is the maximum value of the distance gradient field, the second independent pixel block is assigned to the fourth threshold, and the second independent pixel block after assignment is superimposed into the distance gradient field, the labeling of the second independent pixel block is completed, and the separately labeled target object is obtained.
[0073] Step S64) a watershed segmentation step, performing segmentation on the separately marked target objects by a watershed segmentation algorithm to obtain a fourth image comprising two or more pixel blocks.
[0074] In the present embodiment, in the distance gradient field, the pixel points close to the edge of the particle are assigned small values, and the pixel points close to the center of the particle are assigned large values. Through the distance gradient field, the pixel blocks separately present in the target object can be subjected to watershed segmentation, considering the local peak value of each distance gradient field as the center of the particle, and separating different particles along the position where the distance field value is small. However, due to the limitation of shooting accuracy, most of the particles in contact with each other are connected together in the shooting image. For such connected pixel blocks, a "false" local peak of the distance field appears at the connecting part of the particles, and after the traditional watershed segmentation method is processed, a "false" particle is newly segmented, causing an over-segmentation problem.
[0075] In order to solve this problem, the connected pixel blocks originally in contact are eroded into a plurality of second independent pixel blocks much smaller than the volume of the particle by an erosion algorithm. By assigning a large value to these second independent pixel blocks and superimposing them into the distance field, the independent individuals in the image, i.e. the separately marked additional target objects, can be additionally marked. Then, using the watershed algorithm to segment the separately marked additional target objects can effectively avoid the over-segmentation problem in segmentation.
[0076] Step S7) a second segmentation step, calculating the size of the pixel block in the fourth image, the position of the centroid of the pixel block, and the moment of inertia of the pixel block. A threshold range is preset, and the pixel blocks whose size and moment of inertia are within the threshold range are first pixel blocks, and the pixel blocks whose size and moment of inertia are outside the threshold range are second pixel blocks. The second pixel blocks are segmented into first pixel blocks by convolution method.
[0077] In the present embodiment, in the second segmentation step S7), when the particle system constituting the first pixel block is near-spherical, the orientation of the particle in the first pixel block is identified by convolution method to obtain the accurate direction of the particle in the first pixel block, and the segmentation path is determined.
[0078] Further, the calculation formula of the size of the pixel block is
[0079] V n =∑δ(i-n)
[0080] Wherein, n represents the nth particle, the pixel point occupied by the particle is assigned a value of n; i represents an arbitrary pixel point, the pixel point is assigned a value of i; δ represents Dirac delta function, δ is 1 when i-n=0, and δ is 0 when i-n≠0; V represents the size of the pixel block.
[0081] Further, the calculation formula of the position of the pixel block centroid is
[0082]
[0083] Wherein, r n represents the position of the pixel block n centroid, r i represents the position of an arbitrary pixel point i.
[0084] Further, the calculation formula of the rotational inertia of the pixel block is
[0085] I n =∑δ(i-n)|r i -r n | 2
[0086] Wherein, I n represents the rotational inertia of the pixel block.
[0087] In this embodiment, by setting the threshold range of the pixel block size and the rotational inertia, which is set according to the segmentation requirement, some abnormal particles can be identified. In order to avoid segmentation errors, we only keep the segmentation results within the threshold range, and for the pixel blocks outside the threshold range, i.e. the second pixel blocks, we use the convolution algorithm to re-segment to obtain the first pixel blocks within the threshold range, and identify the size and centroid position thereof.
[0088] Finally, we can obtain the centroid positions and total pixel numbers of all the first pixel blocks, corresponding to the centroid positions and volume sizes of different particles.
[0089] Step S8) matching tracking step, based on the Hungarian matching tracking algorithm, a matching weight is preset, the two closest first pixel blocks are matched, the particles of the two first pixel blocks are one-to-one matched, and the final image is obtained.
[0090] In this embodiment, a matching weight is set by the distance between the particles, the matching weight is inversely proportional to the square of the distance between the particles, the smaller the distance, the higher the matching weight, and the matching weight is set to 0 when the distance exceeds five times the diameter of the particle. On the one hand, the closest particles in the two frames can be found, and on the other hand, the matching of particles with too far distance is avoided.
[0091] Therefore, we can obtain a final total weight maximum, the number of matching results, and match the particles of the two frames one by one, obtain the motion trajectory between the particles of the two frames, realize the tracking of the particle trajectory, finally obtain the three-dimensional internal structure diagram of the ore sample, analyze the particle structure and mineral composition distribution of the ore sample, optimize the related process of ore mining, when the copper mine is mined, the staff can adopt the best mining scheme, which has great scientific research value and practical application significance.
[0092] As shown in Figure 6 A storage medium 100 stores computer readable instructions, which, when read by a processor 110, cause the processor 110 to perform the particle system three-dimensional image segmentation and tracking method.
[0093] The advantage of the present application is to provide a particle system three-dimensional image segmentation and tracking method, the present application provides a particle system three-dimensional image segmentation and tracking method, which combines convolution method, watershed segmentation algorithm, and improved Hungarian matching tracking algorithm, realizes particle recognition segmentation and particle tracking of the granular system three-dimensional image composed of multiple individuals through binarization, denoising and hole filling, convolution, marker-based watershed segmentation algorithm, secondary convolution and Hungarian tracking algorithm, and optimizes or optimizes the imaging characteristics of the experimental granular system at each step. Ultimately, the segmentation result that meets the actual demand can be obtained, and the reliability of the segmentation result obtained through this series of processes can realize batch processing of a large number of image sequences to realize long-time tracking of dynamic particle systems, improve image segmentation accuracy, fast segmentation speed, good segmentation effect, and will not limit the particle motion speed when tracking the image particles, so that the three-dimensional internal structure diagram of the obtained particle system is more accurate.
[0094] The particle system three-dimensional image segmentation and tracking method provided by the embodiment of the present application is described in detail above, and the principles and implementation modes of the present application are described by applying specific examples. The above embodiment is only used to help understand the technical solutions and core ideas of the present application; those skilled in the art should understand that the technical solutions recorded in the above embodiments can be modified or some technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method of particle system 3D image segmentation and tracking, characterized by, The method comprises: an image acquisition step of acquiring at least one set of three-dimensional images; a preprocessing step of preprocessing the three-dimensional images to obtain a gray-scale image; a binarization step of presetting a first threshold value, binarizing the gray-scale image, marking a target object pixel with a pixel value greater than the first threshold value as 1, i.e., a first pixel point, marking a background pixel with a pixel value less than the first threshold value as 0, i.e., a second pixel point, to obtain a first image, and the first image comprising at least one connected region, the connected region comprising two or more first pixel points; an image optimization step of removing noise points composed of first pixel points in the background in the first image and holes composed of second pixel points in the target object in the first image to obtain a second image; a convolution step of filling the incomplete target object in the second image by a convolution method to obtain a third image; a first segmentation step of segmenting the third image based on a watershed algorithm and an erosion algorithm to obtain a fourth image comprising two or more pixel blocks; a second segmentation step of calculating the size, the position of the mass center of the pixel block, and the moment of inertia of the pixel block in the fourth image, presetting a threshold range, the pixel block with the size and the moment of inertia within the threshold range being a first pixel block, the pixel block with the size and the moment of inertia outside the threshold range being a second pixel block, and the second pixel block being segmented into the first pixel block by a convolution method; and a matching tracking step of presetting a matching weight based on a Hungarian matching tracking algorithm, matching the two closest first pixel blocks in the nearest neighbor sequence image in the three-dimensional image, and one-to-one matching the two first pixel blocks to obtain a final image.
2. The granular system three-dimensional image segmentation and tracking method of claim 1, wherein, The preprocessing step comprises: a brightness uniformization step of obtaining a background brightness distribution image of the three-dimensional image by an expansion algorithm when the brightness of the three-dimensional image is not uniform, and completing overall brightness uniformization processing of the image by dividing the three-dimensional image by the background brightness distribution image; and an image reconstruction step of reconstructing the three-dimensional image with uniform brightness to obtain a gray-scale image.
3. The granular system three-dimensional image segmentation and tracking method of claim 1, wherein, The image optimization step comprises: a first optimization step of presetting a second threshold value to remove a connected region with a pixel block volume lower than the second threshold value; and a second optimization step of presetting a third threshold value to remove a connected region with a pixel block volume lower than the third threshold value based on a morphological opening and closing algorithm.
4. The granular system three-dimensional image segmentation and tracking method of claim 1, wherein, The image filling step comprises: a template ball generation step of finding the mass center of a target particle with defects or 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 mass center as the center; and a filling step of taking the union of the template particle and the target particle to fill the target particle.
5. The granular system three-dimensional image segmentation and tracking method of claim 1, wherein, The first segmentation step comprises: a gradient field acquisition step of calculating the distance between each first pixel point in the third image and the nearest second pixel point to the first pixel point to obtain a distance gradient field of the third image; The erosion step defines a first independent pixel block as a pixel block containing only a single target particle in the third image, and a first connected pixel block as a pixel block containing two or more target particles, and erodes the first independent pixel block and the first connected pixel block into a second independent pixel block based on an erosion algorithm, the volume of the second independent pixel block being smaller than the volume of the target particle; The marking step presets a fourth threshold value, the fourth threshold value being the maximum value of the distance gradient field, assigns the second independent pixel block to the fourth threshold value, and superimposes the second independent pixel block after the assignment to the distance gradient field to complete the marking of the second independent pixel block and obtain a single-marked target object; and The watershed segmentation step segments the single-marked target object by a watershed segmentation algorithm to obtain a fourth image including two or more second independent pixel blocks.
6. The granular system three-dimensional image segmentation and tracking method of claim 1, wherein, The second segmentation step includes, 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 granular system three-dimensional image segmentation and tracking method of claim 1, wherein, The calculation formula of the size of the pixel block volume is V n =∑δ(i-n) wherein n represents the nth particle, the pixel point occupied by the particle being assigned a value of n; i represents an arbitrary pixel point, the pixel point being assigned a value of i; δ represents a Dirac delta function, δ being 1 when i-n=0, and δ being 0 when i-n≠0; and V represents the size of the pixel block.
8. The granular system three-dimensional image segmentation and tracking method of claim 7, wherein, The calculation formula of the position of the pixel block centroid is wherein r n represents the position of the centroid of the pixel block n, r i represents the position of an arbitrary pixel point i.
9. The particle system 3D image segmentation and tracking method of claim 8, wherein, The calculation formula of the rotational inertia of the pixel block is I n =∑δ(i-n)|r i -r n | 2 where I n represents the moment of inertia of the pixel block. 10.A storage medium storing computer readable instructions which, when read by a processor, cause the processor to perform 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
KR20230130459A