Dynamic image analysis measurement method and system for cassiterite mineral particles
By acquiring and analyzing continuous frame images of cassiterite mineral particles, and combining flow field characteristics and gray-scale gradient difference methods, the accuracy problem of dynamic image analysis of cassiterite mineral particles in existing technologies has been solved, achieving higher measurement accuracy and reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINESE ACAD OF GEOLOGICAL SCI
- Filing Date
- 2026-02-24
- Publication Date
- 2026-06-26
AI Technical Summary
Existing industrial vision-based dynamic image analysis technology for cassiterite mineral particles cannot accurately distinguish between cross-frame displacement and independent motion of multiple particles in different motion states in a dynamic flow field. This leads to deviations in the target particle segmentation and contour tracking results, affecting the accuracy and reliability of the measurement.
By acquiring continuous frame images of cassiterite mineral particles in a dynamic flow field using an industrial vision system, the flow velocity characteristics of the flow field region are extracted. Combining the overlap of gray-level distribution of neighboring pixels and the stability of contour morphology, a density clustering algorithm is used to distinguish between cross-frame displacement and independent motion of multiple particles. The inter-frame gray-level gradient difference method is used to separate motion trails from the real contours of particles, thereby achieving the segmentation and contour tracking of target particles.
It significantly improves the robustness and accuracy of cassiterite particle image analysis, effectively removes motion blur, improves the accuracy of particle size and morphology parameter measurements, and provides reliable data for optimizing mineral processing.
Smart Images

Figure CN122289129A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial visual analysis technology, and in particular to a method and system for dynamic image analysis and measurement of cassiterite mineral particles. Background Technology
[0002] In the processing of cassiterite, dynamic detection of parameters such as particle size and morphology is crucial for optimizing beneficiation processes and improving resource recovery efficiency. Dynamic image analysis and measurement methods based on industrial vision can be applied to cassiterite particle detection. These methods acquire continuous images of cassiterite particles in a dynamic flow field using an industrial vision system, and then employ image processing algorithms to segment and trace the target particles, thereby enabling the analysis and measurement of particle parameters. Existing dynamic particle detection technologies based on industrial vision generally employ a single-frame image processing mode in the image processing stage. This involves extracting static features of particles from a single frame to complete target segmentation, and then performing contour correlation tracking based on the static position information of particles in adjacent frames.
[0003] Existing industrial vision-based dynamic image analysis and measurement technology for cassiterite mineral particles fails to consider the differences in particle motion states in dynamic flow fields caused by the inherent characteristics of cassiterite minerals when performing target particle segmentation and contour tracking. It relies solely on the logic of static processing of single-frame images and correlation with the static position of particles for analysis, which cannot accurately distinguish the cross-frame displacement of particles in different motion states in dynamic flow fields or the independent motion of multiple particles. At the same time, it is difficult to effectively separate the motion trails generated by high-speed moving particles from the true contours of the particles. Ultimately, this leads to deviations in the target particle segmentation and contour tracking results, affecting the accuracy and reliability of cassiterite mineral particle parameter measurement. Summary of the Invention
[0004] This invention addresses the technical problems existing in the prior art by providing a dynamic image analysis and measurement method and system for cassiterite mineral particles.
[0005] The technical solution of the present invention to solve the above-mentioned technical problems is as follows: Dynamic image analysis and measurement methods for cassiterite mineral grains include: S1. Collect continuous frame images of cassiterite mineral particles in a dynamic flow field using an industrial vision system, and extract the corresponding flow velocity characteristics of the flow field region. S2. Based on consecutive frame images, select candidate particles from two adjacent frames, calculate the overlap of grayscale distribution of neighboring pixels between frames, and fuse the flow field region velocity characteristics to determine whether there is a cross-frame displacement trend. S3. Extract the contour morphology stability of candidate particles with cross-frame displacement trends, and determine whether the cross-frame displacement trend of candidate particles matches the contour morphology stability. S4. For the matching candidate particles, construct the flow field velocity field constraint range by combining the flow field region velocity characteristics, obtain the motion vector field of the candidate particles, and use the density clustering algorithm combined with the motion vector amplitude corresponding to the cassiterite mineral density to distinguish between cross-frame displacement and multi-particle independent motion, and generate motion type distinction results. S5. Based on the motion type differentiation results and motion vector amplitude, candidate particles that meet the characteristics of high-speed motion are selected, and the inter-frame gray-level gradient difference method is used to separate motion trails from the true particle contours. S6. Based on the motion type differentiation results and the true contour of the particles, the target particles are segmented and their contours are tracked, and the measurement parameters are output.
[0006] Furthermore, S1 includes: Continuous frame images of cassiterite mineral particles in a dynamic flow field are acquired using an industrial vision system. Extracting image feature sequences representing the motion state of the flow field from consecutive frame images; Based on the changes in the image feature sequence between consecutive frames, the flow velocity characteristics of the dynamic flow field in the image acquisition area are calculated.
[0007] Furthermore, S2 includes: Select two adjacent frames from consecutive frames; In two adjacent frames of images, granular regions are identified as candidate particles. Extract the grayscale distribution of neighboring pixels for each candidate particle in the corresponding frame image; Calculate the overlap of grayscale distribution of neighboring pixels of corresponding candidate particles between two adjacent frames; By combining the flow velocity characteristics of the flow field region and the correlation between the overlap of grayscale distribution of neighboring pixels and the flow velocity characteristics of the flow field region, it is determined whether the candidate particles have a cross-frame displacement trend.
[0008] Furthermore, S3 includes: For candidate particles that are judged to have a cross-frame displacement trend, the contour geometric features of the corresponding candidate particles are extracted from the two adjacent frames of the image. Based on the contour geometric features extracted in two adjacent frames, the contour morphology stability of the corresponding candidate particles is calculated. Based on the preset matching rules, the cross-frame displacement trend of candidate particles is compared with their contour morphology stability to determine whether the cross-frame displacement trend of candidate particles matches their contour morphology stability.
[0009] Furthermore, the preset matching rule is to set a correlation threshold between the quantization index of cross-frame displacement trend and the quantization index of contour shape stability; specifically, by comparing the quantization values of the cross-frame displacement trend and contour shape stability of the candidate particles, it is determined whether the ratio between the two quantization values is within the range limited by the correlation threshold; if it is within the range limited by the correlation threshold, it is determined that the cross-frame displacement trend and contour shape stability of the candidate particles match.
[0010] Furthermore, S4 includes: For candidate particles whose cross-frame displacement trend matches their profile stability, the flow field velocity field constraint range is defined based on the flow field velocity characteristics of the flow field region. Within the constraints of the flow field velocity field, the motion vectors of matching candidate particles are calculated between consecutive frames to form a motion vector field; Extract the motion vector amplitude of each motion vector from the motion vector field; Clustering parameters were set based on the physical relationship between cassiterite mineral density and motion vector amplitude, and density clustering algorithm was used to perform cluster analysis on motion vector amplitude. Based on the results of cluster analysis, the motion vectors in the motion vector field are divided into types that represent cross-frame displacement and types that represent independent motion of multiple particles, thus generating motion type classification results.
[0011] Furthermore, based on the physical correlation between cassiterite mineral density and motion vector amplitude, clustering parameters are set, and the implementation of density clustering algorithm for cluster analysis of motion vector amplitude includes: determining the expected distribution range of motion vector amplitude based on the theoretical relationship between cassiterite mineral density and particle velocity in the flow field; converting the characteristic values of the expected distribution range into neighborhood distance parameters and minimum number of core points required by the density clustering algorithm; and using the density clustering algorithm with set parameters, analyzing the set of motion vector amplitudes of all candidate particles, and dividing them into different clusters according to the aggregation of motion vector amplitudes in the feature space.
[0012] Furthermore, S5 includes: Based on the results of motion type differentiation and motion vector amplitude, candidate particles with motion vector amplitude exceeding a preset amplitude threshold are selected from the candidate particles and used as candidate particles that meet the characteristics of high-speed motion. For candidate particles that meet the characteristics of high-speed motion, the gray-level gradient field of their corresponding image regions is calculated in consecutive frame images; Calculate the difference in gray-level gradient fields between consecutive frames to obtain the inter-frame gray-level gradient difference results; Based on the inter-frame gray-level gradient difference results, the true contours of particles are distinguished and extracted from the image regions of candidate particles that conform to high-speed motion characteristics, thereby separating motion blur from the true contours of particles.
[0013] Furthermore, S6 includes: Based on the results of differentiating motion types, the true contours of particles are categorized and integrated; Based on the true contours of the particles after classification and integration, the precise region of the target particles is defined in the image, thus completing the target particle segmentation. Based on the motion vector association information provided by the motion type differentiation results, the contour correspondence of the target particles is established and matched between consecutive frame images to achieve contour tracking of the target particles. Based on the stable contours of the target particles obtained by contour tracking in consecutive frames, the particle size and morphology measurement parameters of the target particles are calculated and output.
[0014] On the other hand, the present invention provides a dynamic image analysis and measurement system for cassiterite mineral particles, comprising: The image acquisition module is used to acquire continuous frame images of cassiterite mineral particles in a dynamic flow field through an industrial vision system, and extract the corresponding flow velocity characteristics of the flow field region. The trend judgment module is used to select candidate particles in two adjacent frames based on continuous frame images, calculate the overlap of gray-level distribution of neighboring pixels between frames, and fuse the flow velocity characteristics of the flow field region to determine whether there is a cross-frame displacement trend. The matching and judgment module is used to extract the contour morphology stability of candidate particles with cross-frame displacement trends and to determine whether the cross-frame displacement trend of candidate particles matches the contour morphology stability. The differentiation generation module is used to construct the flow field velocity field constraint range for matching candidate particles in combination with the flow field region velocity characteristics, obtain the motion vector field of candidate particles, and use density clustering algorithm combined with the motion vector amplitude corresponding to cassiterite mineral density to distinguish cross-frame displacement and multi-particle independent motion, and generate motion type differentiation results. The contour separation module is used to select candidate particles that meet the characteristics of high-speed motion based on the motion type differentiation results and motion vector amplitude, and uses the inter-frame gray-level gradient difference method to separate motion trails from the real particle contours. The parameter output module is used to segment and track the target particles based on the motion type differentiation results and the actual particle contour, and outputs the measurement parameters.
[0015] The beneficial effects of this invention are: 1. By integrating dynamic flow field characteristics with particle motion analysis, the robustness and accuracy of cassiterite particle image analysis under complex motion scenarios are significantly improved. First, macroscopic flow field velocity characteristics are extracted from continuous image sequences, providing key physical environment constraints for subsequent particle motion analysis. This breaks through the limitations of traditional single-frame static analysis. By calculating the overlap of gray-level distribution in the neighborhood between frames and combining it with flow velocity characteristics to determine displacement trends, and further verifying the stability of contour morphology, a multi-feature collaborative cross-frame association judgment mechanism is constructed. This mechanism can effectively distinguish between real particle displacement and accidental position overlap, laying the foundation for subsequent accurate tracking.
[0016] 2. To address the image degradation caused by the density characteristics of cassiterite minerals and high-speed motion, this study clusters motion vectors based on the physical relationship between density and motion amplitude. This enables automatic differentiation between cross-frame displacement following mainstream motion and locally irregular independent motion particles. Furthermore, for the identified high-speed moving particles, an inter-frame grayscale gradient difference strategy is employed to effectively remove motion blur and restore the true geometric contours of the particles. Finally, based on accurate motion type differentiation and clean particle contours, segmentation and multi-frame tracking are completed, directly improving the accuracy and reliability of key parameter measurements such as particle size and morphology, providing more reliable data for optimizing the sorting process. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of this application, the accompanying drawings used in this application will be briefly described below. Obviously, the drawings described below are merely some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without any creative effort.
[0018] Figure 1 This is a flowchart of the dynamic image analysis and measurement method for cassiterite mineral particles according to the present invention; Figure 2 This is a schematic diagram of the dynamic image analysis and measurement system for cassiterite mineral particles according to the present invention. Detailed Implementation
[0019] The embodiments of the technical solution of this application will now be described in detail with reference to the accompanying drawings. These embodiments are only used to more clearly illustrate the technical solution of this application and are therefore merely examples, and should not be used to limit the scope of protection of this application.
[0020] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0021] In this document, the term "comprising" indicates the presence of a described feature, integral, step, operation, element, and / or component, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or collections thereof. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," with exclusions being otherwise specifically emphasized. Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying one or more of the feature. In the description of embodiments of this application, unless otherwise stated, "a plurality of" means two or more.
[0022] Figure 1 The present invention provides a dynamic image analysis and measurement method for cassiterite mineral particles, comprising: S1. Collect continuous frame images of cassiterite mineral particles in a dynamic flow field using an industrial vision system, and extract the corresponding flow velocity characteristics of the flow field region. S2. Based on consecutive frame images, select candidate particles from two adjacent frames, calculate the overlap of grayscale distribution of neighboring pixels between frames, and fuse the flow field region velocity characteristics to determine whether there is a cross-frame displacement trend. S3. Extract the contour morphology stability of candidate particles with cross-frame displacement trends, and determine whether the cross-frame displacement trend of candidate particles matches the contour morphology stability. S4. For the matching candidate particles, construct the flow field velocity field constraint range by combining the flow field region velocity characteristics, obtain the motion vector field of the candidate particles, and use the density clustering algorithm combined with the motion vector amplitude corresponding to the cassiterite mineral density to distinguish between cross-frame displacement and multi-particle independent motion, and generate motion type distinction results. S5. Based on the motion type differentiation results and motion vector amplitude, candidate particles that meet the characteristics of high-speed motion are selected, and the inter-frame gray-level gradient difference method is used to separate motion trails from the true particle contours. S6. Based on the motion type differentiation results and the true contour of the particles, the target particles are segmented and their contours are tracked, and the measurement parameters are output.
[0023] According to step S1, continuous frame images of cassiterite mineral particles in a dynamic flow field are acquired using an industrial vision system, and the corresponding flow velocity characteristics of the flow field region are extracted. In the specific implementation process, it is first necessary to construct an industrial vision environment suitable for dynamic observation of mineral particles. An industrial digital camera with sufficient resolution and frame rate is fixedly mounted above or to the side of the dynamic flow field region, ensuring that its optical axis is perpendicular to or at a fixed angle to the mainstream flow direction to clearly capture the movement of particles in the flow field. A uniform and stable background light source is arranged around the dynamic flow field region. The color temperature and brightness of the light source need to be adjusted to reduce the interference of light reflection from the water surface and enhance the contrast between the cassiterite mineral particles and the background.
[0024] It should be noted that the frame rate of the industrial digital camera is set based on the maximum expected flow velocity of the flow field and the image field of view. The principle is to ensure that, between two adjacent frames, the displacement of the vast majority of particles does not exceed the pixel size they occupy in the image. For example, the frame rate can be set to a value between 500 frames per second and 2000 frames per second. By continuously shooting with the industrial digital camera, a series of digital images containing moving particles in the dynamic flow field are obtained at equal time intervals. These images constitute a continuous frame image of cassiterite mineral particles.
[0025] After acquiring consecutive frame images, it is necessary to extract image feature sequences that characterize the overall motion state of the fluid from these image sequences. One implementation method is to use particle image velocimetry based on gray-level cross-correlation. First, a representative image sub-region is selected as the query window for flow field state analysis in the acquired consecutive frame images. For each frame image, feature points with obvious gray-level gradients are identified within the query window, or the average gray-level distribution texture within the window is calculated. The image feature sequence is composed of the set of feature point locations or texture patterns extracted within the same query window in these consecutive frames. For example, feature points can be obtained by detecting local extrema or corner points of gray-level values in the image, while texture patterns can be characterized by calculating the statistics of the gray-level co-occurrence matrix of the image sub-region. These feature points or texture patterns undergo continuous changes in position or shape in consecutive frame images as the fluid moves, and their change trajectory or evolution pattern directly reflects the motion state of the underlying flow field, thus forming a set of image feature sequences that evolve over time.
[0026] Based on the changes in the extracted image feature sequence between consecutive frames, the flow velocity characteristics of the dynamic flow field in the image acquisition area are calculated.
[0027] The specific calculation process is as follows: For the feature point method, the pixel coordinates of the same feature point are tracked in multiple consecutive frames of images. Based on the pixel displacement of the feature point between two adjacent frames, the time interval between the two frames, and the ratio between the image pixel size and the actual physical size obtained through pre-calibration, the velocity vector of the feature point on the two-dimensional image plane can be calculated; the ratio between the image pixel size and the actual physical size is obtained by taking pictures and measuring a standard calibration plate with known physical size placed at the flow field location. The velocity vectors of all traceable feature points within the query window are statistically averaged, and the average velocity magnitude and direction are calculated to obtain the average flow velocity characteristics of the local flow field represented by the query window. For the texture pattern method, the gray-level cross-correlation function of the query window in two consecutive frames of images is calculated, and the position offset of the peak of the cross-correlation function is found. This offset corresponds to the overall displacement of the texture pattern, and then the overall flow velocity vector of the window area is obtained by combining the time interval and spatial calibration coefficient.
[0028] The flow velocity characteristics of the flow field region are characterized by a set of velocity vectors calculated from multiple such query windows within the image acquisition area. This describes the spatial distribution of flow velocity across the entire observation field of view, including, for example, the main flow direction, average velocity magnitude, and relative velocity differences between different regions. This characteristic is a quantitative description of the physical flow field motion state directly derived from image data, providing crucial background flow field information for subsequent particle motion analysis.
[0029] According to step S2, candidate particles in two adjacent frames are selected based on continuous frame images, the overlap of grayscale distribution of neighboring pixels between frames is calculated, and the flow velocity characteristics of the flow field region are fused to determine whether there is a cross-frame displacement trend.
[0030] In practice, the process begins by selecting two consecutive images from a sequence of frames captured by the industrial vision system. These two images are chosen as a set of adjacent frames to be processed. The time interval between these adjacent frames is determined by the frame rate of the industrial digital camera; for example, if the frame rate is 1000 frames per second, the time interval between adjacent frames is 0.001 seconds. During processing, the analysis typically begins at the beginning of the sequence and proceeds sequentially.
[0031] After selecting two adjacent image frames, it is necessary to identify granular regions that may be cassiterite mineral particles in each image frame and mark these regions as candidate particles. The identification process typically employs image segmentation techniques.
[0032] One approach is to preprocess the image to enhance contrast and suppress noise, for example, by using a Gaussian filter to smooth the image.
[0033] Next, a thresholding method is used to separate the particle foreground from the background. The background grayscale threshold used for segmentation is set to the average background grayscale value plus three times the standard deviation of the background grayscale value. The background region is determined by manually selecting or automatically detecting areas without significant particles in the image. The average background grayscale value and the standard deviation of the background grayscale value are calculated by calculating the grayscale values of all pixels within that background region. For adhering particles, a watershed algorithm can be further applied for segmentation.
[0034] Finally, for each segmented connected region, its basic morphological parameters such as area and circularity are calculated, and an area range threshold and a circularity range threshold are set.
[0035] It should be noted that the lower and upper limits of the area range threshold are set based on the expected physical size of the cassiterite mineral particles and the image resolution. For example, by calibrating to determine the actual physical size represented by a single pixel, and combining this with the typical diameter range of cassiterite particles, the pixel area range in the image can be calculated. Areas occupying one ten-thousandth to one thousandth of the total image pixels are set as valid area range thresholds. The lower limit of the roundness range threshold is set based on the relatively regular rather than extremely elongated shape of cassiterite particles. Roundness is calculated as 4π multiplied by the area of the region divided by the square of the region's perimeter; the closer the value is to 1, the closer the shape is to a circle. Regions with a roundness greater than 0.6 can be set to meet the roundness range threshold. The area of each connected region is compared with the area range threshold, and the roundness of each connected region is also compared with the roundness range threshold. Regions that simultaneously satisfy the condition of having an area greater than or equal to the lower limit of the area range threshold and less than or equal to the upper limit of the area range threshold, and a roundness greater than or equal to the lower limit of the roundness range threshold, are formally identified as candidate particles in that frame of the image.
[0036] For each candidate particle identified in two adjacent frames, its neighborhood pixel grayscale distribution in the corresponding frame needs to be extracted. Neighborhood pixel grayscale distribution refers to the statistical characteristics of the grayscale values of all pixels within a rectangular or circular window region of a specific size, centered on the geometric center or centroid of the candidate particle. The window size needs to be larger than the pixel size of the candidate particle itself to ensure sufficient background information is included for matching; for example, it can be set to 1.5 to 2 times the side length of the smallest bounding rectangle that completely surrounds the candidate particle. During extraction, firstly, based on the window size and center position, the neighborhood sub-image is extracted from the original grayscale image. Then, the grayscale histogram of this sub-image is calculated, which describes the frequency distribution of different grayscale levels within this neighborhood. To further characterize the spatial distribution, the neighborhood sub-image can be divided into, for example, four-by-four regular sub-blocks, and the average grayscale value of each sub-block is calculated, thus forming a feature vector describing the spatial variation characteristics of grayscale. The neighborhood pixel grayscale distribution is thus characterized by grayscale histogram statistics or spatial feature vectors.
[0037] Calculate the overlap of the grayscale distribution of neighboring pixels for corresponding candidate particles between two adjacent frames. Here, "correspondence" refers to initial pairing based on the principle of spatial proximity. For each candidate particle in the first frame, its center position is estimated according to the average velocity direction and magnitude indicated by the flow velocity characteristics of the flow field region obtained in step S1, predicting its possible displacement region in the second frame. The estimated displacement can be obtained by multiplying the average velocity vector in the flow field region's velocity characteristics by the inter-frame time interval. Within this estimated displacement region in the second frame, find the candidate particle with the closest center position as its potential corresponding candidate particle. For a pair of candidate particles in two frames that have been initially paired, calculate the similarity measure between their respective neighboring pixel grayscale distributions; this measure is the inter-frame neighboring pixel grayscale distribution overlap. The specific calculation method depends on the extracted distribution representation form. If a grayscale histogram is used, the overlap can be measured by calculating the Barton coefficient between the two histograms. The calculation of the Barton coefficient involves multiplying the probability values of the two histograms at each grayscale level, taking the square root, and then summing the results. The closer the coefficient value is to 1, the higher the overlap. If spatial feature vectors are used, the cosine similarity between two vectors can be calculated as the degree of overlap. The cosine similarity is calculated by dividing the dot product of the two vectors by the product of their respective magnitudes. The calculated degree of overlap is a value between 0 and 1.
[0038] By combining the flow velocity characteristics of the flow field region and the correlation between the overlap of grayscale distribution of neighboring pixels and the flow velocity characteristics of the flow field region, it is determined whether candidate particles have a cross-frame displacement trend. This determination process requires setting an overlap determination threshold. This overlap determination threshold is not a fixed value, but is dynamically related to the flow velocity characteristics of the flow field region. In specific implementation, a basic overlap determination threshold is first set, for example, 0.7. Then, the basic overlap determination threshold is dynamically adjusted according to the magnitude of the average velocity component in the flow velocity characteristics of the flow field region. The principle of adjustment is that the higher the flow velocity, the greater the possible changes in the reflective properties and attitude of the particle surface between frames, and the expected decrease in the stability of its neighboring grayscale distribution. Therefore, the allowable overlap determination threshold should be lowered accordingly. The adjustment method can be to subtract an adjustment amount proportional to the magnitude of the average velocity from the basic overlap determination threshold to generate an overlap determination threshold; the proportional coefficient of this adjustment amount can be obtained through experimental calibration, for example, set to reduce the threshold by 0.05 per unit pixel per frame velocity. Therefore, for candidate particles at different locations in the flow field, an overlap determination threshold is calculated based on their local flow velocity.
[0039] In the actual judgment, the calculated overlap of the gray-level distribution of neighboring pixels of a pair of candidate particles is compared with the overlap judgment threshold corresponding to the image position of the particle. If the overlap of the gray-level distribution of neighboring pixels is greater than or equal to the overlap judgment threshold, it is determined that the pair of candidate particles has a cross-frame displacement trend; if the overlap of the gray-level distribution of neighboring pixels is less than the overlap judgment threshold, it is determined that they do not have a cross-frame displacement trend. This judgment result will be used for further screening in the subsequent step S3.
[0040] According to step S3, the contour morphology stability of candidate particles with cross-frame displacement trends is extracted, and it is determined whether the cross-frame displacement trend of the candidate particles matches the contour morphology stability. In the specific implementation process, each pair of candidate particles judged to have cross-frame displacement trends in step S2 is first processed. This pair of candidate particles is located in two adjacent frames and is initially considered to be images of the same particle at adjacent time points.
[0041] For a pair of candidate particles identified as having a cross-frame displacement trend, it is necessary to extract the contour geometric features of the corresponding candidate particles from the two adjacent frames. The first step in extracting contour geometric features is to obtain the precise contour of the candidate particles. For the candidate particle region identified in step S2, an edge detection algorithm, such as the Canny edge detector, is used to detect the boundary pixel sequence of the particle within its local image region, thereby obtaining its contour. Next, based on the obtained contour, a set of geometric features that can describe its shape are calculated. These contour geometric features include area, perimeter, the major and minor axis lengths of the minimum bounding rectangle, and Hu invariant moments calculated from the contour point set. The area refers to the total number of pixels contained within the contour. The perimeter is the sum of the Euclidean distances between all adjacent pixel pairs on the contour. The minimum bounding rectangle is the smallest rectangle that can completely enclose the contour, obtained by the rotation caliper algorithm; its long side length is the major axis length, and its short side length is the minor axis length. Hu invariant moments are a set of moment features that are invariant to translation, rotation, and scaling, and are derived from the spatial moments and central moments of the contour points. For the same particle, its contour geometric feature values in two adjacent frames should be similar.
[0042] After extracting the contour geometric features of corresponding candidate particles from two adjacent frames, the contour morphology stability of the corresponding candidate particles is calculated based on these extracted features. Contour morphology stability is a quantitative indicator used to measure the degree to which the contour shape of the same particle remains unchanged over a short time interval. Calculating contour morphology stability requires comparing the same type of contour geometric features calculated for the same pair of candidate particles in the two frames. For example, area, major axis length, and the first Hu invariant moment are selected for calculation. For the area feature, the relative difference in area values between the two frames is calculated, i.e., the absolute value of the area difference between the two frames divided by the average area of the two frames.
[0043] For the major axis length feature, the relative difference is calculated similarly. For the Hu invariant moment feature, the absolute value of the difference can be calculated directly. To synthesize these differences into a single stability index, a tolerance threshold needs to be set for each feature difference. The tolerance thresholds for relative area difference, relative major axis length difference, and Hu moment difference are pre-set based on experimental statistical data of inter-frame deformation of typical cassiterite particles. The specific setting method is as follows: Under controlled laboratory conditions, record image sequences of known single cassiterite particles moving in a smooth flow field, manually label and confirm multiple sets of cross-frame matching particle pairs; calculate the relative differences in area, relative differences in major axis length, and Hu moment differences of these real matching particle pairs; statistically analyze the distribution of these three differences, and set the 95th percentile of each distribution as its respective tolerance threshold; for example, the 95th percentile of the relative area difference may be 0.1, so the tolerance threshold for the relative area difference is set to 0.1; the 95th percentile of the relative major axis length difference may be 0.08, so the tolerance threshold for the relative major axis length difference is set to 0.08; the 95th percentile of the Hu moment difference may be 0.05, so the tolerance threshold for the Hu moment difference is set to 0.05.
[0044] In some specific embodiments, the contour morphology stability quantification index is calculated as follows: the calculated relative area difference is compared with a pre-set relative area difference tolerance threshold; simultaneously, the calculated relative major axis length difference is compared with a pre-set relative major axis length difference tolerance threshold; and simultaneously, the calculated Hu moment difference is compared with a pre-set Hu moment difference tolerance threshold. If the relative area difference is less than the relative area difference tolerance threshold, and the relative major axis length difference is less than the relative major axis length difference tolerance threshold, and the Hu moment difference is less than the Hu moment difference tolerance threshold, then the contour morphology stability quantification index is marked as 1, indicating high stability; otherwise, the contour morphology stability quantification index is marked as 0, indicating instability.
[0045] Based on preset matching rules, the cross-frame displacement trend of candidate particles is compared with their contour morphology stability to determine whether the cross-frame displacement trend and contour morphology stability match. The preset matching rules set a correlation threshold between the quantization index of the cross-frame displacement trend and the quantization index of the contour morphology stability. The quantization index of the cross-frame displacement trend directly uses the value of the overlap of grayscale distribution of neighboring pixels in the inter-frame region calculated in step S2. The quantization index of the contour morphology stability is the value calculated above. The correlation threshold consists of a lower correlation threshold and an upper correlation threshold, defining a reasonable range for a proportional relationship. Specifically, by comparing the quantization values of the cross-frame displacement trend and the contour morphology stability of the candidate particles, it is determined whether the proportional relationship between the two quantization values is within the range limited by the correlation threshold. The proportional relationship refers to the quotient obtained by dividing the quantization index of the contour morphology stability by the quantization index of the cross-frame displacement trend. The setting of the lower and upper correlation thresholds is based on physical experience and experimental data analysis.
[0046] In some specific embodiments, the specific setting method is as follows: A training dataset is constructed, containing multiple sets of correctly matched particle pairs processed in steps S1 and S2 and ultimately confirmed manually; the ratio of the contour morphology stability quantification index of these correctly matched particle pairs to their cross-frame displacement trend quantification index is calculated; the distribution of these ratios is statistically analyzed, and the 5th percentile of this distribution is taken as the lower limit of the association threshold, and the 95th percentile of this distribution is taken as the upper limit of the association threshold. During the judgment, the ratio of the contour morphology stability quantification index to the cross-frame displacement trend quantification index of the current candidate particle pair is calculated; this ratio is compared with the lower and upper limits of the association threshold; if the ratio is greater than or equal to the lower limit and less than or equal to the upper limit, it is considered to be within the range defined by the association threshold. If it is within the range defined by the association threshold, the cross-frame displacement trend and contour morphology stability of the candidate particle are determined to match. If the ratio is less than the lower limit or greater than the upper limit, it is determined to be a mismatch. Candidate particles determined to be matched will proceed to the subsequent step S4 for processing.
[0047] According to step S4, for the matching candidate particles, a flow field velocity field constraint range is constructed based on the flow field velocity characteristics of the flow field region. The motion vector field of the candidate particles is obtained, and a density clustering algorithm is used to combine the motion vector amplitude corresponding to the cassiterite mineral density to distinguish between cross-frame displacement and independent motion of multiple particles, generating motion type distinction results. In the specific implementation process, all candidate particle pairs that are determined to match the cross-frame displacement trend and contour morphology stability in step S3 are first processed. These matching candidate particle pairs are considered to be high-probability cross-frame images of the same particle, which is a reliable basis for subsequent group motion analysis.
[0048] For candidate particles whose cross-frame displacement trends and contour morphology stability match, a flow field velocity constraint range is defined based on the flow field velocity characteristics of the flow field region. The flow field velocity characteristics are obtained from step S1 and describe the average distribution of flow field velocity within the entire image acquisition area. The purpose of defining the flow field velocity constraint range is to provide a physically reasonable spatial boundary for subsequent motion vector calculations, avoiding large erroneous displacement vectors due to particle position prediction errors. The definition method is as follows: First, extract the average velocity component Vxavg in the x-direction and the average velocity component Vyavg in the y-direction of the entire observation area from the flow field velocity characteristics. Simultaneously, extract the standard deviation σx of the x-direction velocity component and the standard deviation σy of the y-direction velocity component; these two standard deviations characterize the degree of spatial fluctuation of the flow field velocity. Then, for each pair of matching candidate particles, a rectangular flow field velocity constraint range is constructed centered on its center coordinates in the first frame image.
[0049] The width W of the rectangular area is calculated using the formula: W = (|Vxavg| × Δt + 3 × σx × Δt) × k. The height H of the rectangular area is calculated using the formula: H = (|Vyavg| × Δt + 3 × σy × Δt) × k. Here, Δt represents the inter-frame time interval, and k represents the safety factor. The safety factor k is set to ensure that, in most cases, the actual particle displacement falls within this range; its value can be determined through historical data statistics, and is typically set to 2. Through this calculation, a possible region for searching the corresponding position in the second frame is determined for each particle's position in the first frame; this is the flow field velocity field constraint range. This range considers both the average transport of the main flow and the influence of local turbulence or velocity fluctuations.
[0050] Within the constraints of the flow field and velocity field, the motion vectors of matching candidate particles are calculated between consecutive frames to form a motion vector field. For each pair of candidate particles confirmed as matched in step S3, they each have their own defined center coordinates in two adjacent frames. The calculation of the motion vector is directly based on these two center coordinates. Specifically, the motion vector is a two-dimensional vector whose x-direction component is equal to the center x-coordinate of the candidate particle in the second frame minus the center x-coordinate of the corresponding candidate particle in the first frame, and its y-direction component is equal to the center y-coordinate of the candidate particle in the second frame minus the center y-coordinate of the corresponding candidate particle in the first frame. The physical meaning of this vector is the displacement of the particle on the image plane within the time interval between two adjacent frames. The set of calculated motion vectors for all matching candidate particle pairs constitutes the motion vector field for the current analysis time period. Each motion vector in this motion vector field is associated with a specific, confirmed particle trajectory segment.
[0051] The motion vector amplitude of each motion vector is extracted from the motion vector field. The motion vector amplitude refers to the length or magnitude of each motion vector. For a given motion vector, its amplitude is calculated by adding the square of the x-axis component to the square of the y-axis component, and then taking the square root of the result. The unit of motion vector amplitude is pixels per frame, directly reflecting the speed of the corresponding particle's movement within the frame interval. After extracting the motion vector amplitudes of all motion vectors, a set of motion vector amplitudes is obtained, which serves as the input data for subsequent cluster analysis.
[0052] Clustering parameters were set based on the physical correlation between cassiterite mineral density and motion vector amplitude, and a density clustering algorithm was used to perform cluster analysis on the motion vector amplitude. The density of cassiterite is a known physical constant, typically between 6.8 and 7.1 grams per cubic centimeter. The steady-state settling velocity of particles in a fluid is related to its density, particle size, and fluid viscosity. In the dynamic flow field of mineral processing, although the particle velocity is not entirely the settling velocity, its velocity distribution exhibits certain characteristics due to the influence of its density. Based on the theoretical relationship between cassiterite mineral density and particle velocity in the flow field, the expected distribution range of the motion vector amplitude can be determined.
[0053] In some specific embodiments, the method involves first estimating the terminal settling velocity range of cassiterite particles in a static fluid using Stokes' theorem, based on the viscosity of the fluid medium, the typical particle size range, and the density of the cassiterite mineral. Stokes' theorem states that the terminal settling velocity of spherical particles is directly proportional to the density difference between the particle and the fluid, directly proportional to the square of the particle diameter, and inversely proportional to the fluid viscosity. The estimated physical velocity range is then converted into pixel-per-frame units in the image by combining the spatial calibration parameters of the image system and the inter-frame time interval, resulting in a basic velocity range.
[0054] Then, considering that the dynamic flow field itself has a velocity, and the actual motion of the particles is a vector superposition of the settling velocity and the flow field velocity, the lower limit of the above basic velocity range is subtracted by a background velocity value, and the upper limit is added to a background velocity value. This expands the expected distribution range of the motion vector amplitude of cassiterite particles in the dynamic flow field. The characteristic value of the expected distribution range, i.e., its width, is used to convert it into parameters required by the density clustering algorithm. The density clustering algorithm used here is the DBSCAN algorithm, which requires two key parameters: the neighborhood distance parameter and the minimum number of core points parameter. The neighborhood distance parameter is set to a value between one-tenth and one-fifth of the width of the expected distribution range. For example, if the width of the expected distribution range is 10 pixels per frame, the neighborhood distance parameter can be set to 1.5 pixels per frame. The minimum number of core points parameter is set according to the total number of matching candidate particle pairs, usually set to a value between 2% and 10% of the total number, and ensuring that this value is not less than 2. Using the density clustering algorithm with the neighborhood distance parameter and the minimum number of core points set, the set of motion vector amplitudes of all candidate particles is analyzed. The algorithm treats motion vector amplitudes as points in a one-dimensional feature space and identifies clusters based on the density distribution of these points. Different clusters are formed based on the aggregation of motion vector amplitudes in the feature space. Typically, cluster analysis yields two main clusters: one cluster has smaller and more concentrated motion vector amplitudes, corresponding to particles moving across frames following the mainstream translation; the other cluster has more dispersed motion vector amplitudes with potentially higher mean values, corresponding to particles undergoing independent motion due to local eddies or collisions.
[0055] Based on the clustering analysis results, the motion vectors in the motion vector field are distinguished into two types: those representing cross-frame displacement and those representing independent multi-particle motion, thus generating motion type distinction results. The density clustering algorithm assigns a cluster label to each point in the set of motion vector amplitudes. Motion vectors belonging to the main large clusters and with smaller amplitudes are labeled as representing cross-frame displacement, indicating that the motion of these particles is smooth, coherent, and conforms to the mainstream motion trend. The remaining motion vectors, including points belonging to small clusters and noise points not assigned to any cluster, are labeled as representing independent multi-particle motion, indicating that the motion of these particles may deviate from the mainstream and is independent and heterogeneous. Finally, for each candidate particle pair that matches in step S3, its corresponding motion vector is assigned a type label of either cross-frame displacement or independent multi-particle motion; this label set is the generated motion type distinction result. This result clearly separates different particle motion modes in the flow field, laying a crucial foundation for subsequent processing of trailing images of high-speed moving particles and final accurate measurement.
[0056] According to step S5, candidate particles that meet the characteristics of high-speed motion are selected based on the motion type differentiation results and motion vector amplitude. The inter-frame gray-level gradient difference method is used to separate motion trails from the true particle contours. In the specific implementation process, firstly, based on the motion type differentiation results and motion vector amplitude, candidate particles whose motion vector amplitude exceeds a preset amplitude threshold are selected as candidate particles that meet the characteristics of high-speed motion. The motion type differentiation results are obtained from step S4, and they contain the motion type label of each matching candidate particle pair, i.e., cross-frame displacement or independent motion of multiple particles. The motion vector amplitude is the magnitude of each motion vector extracted from the motion vector field in step S4. During the selection, a preset amplitude threshold needs to be set. The preset amplitude threshold is set based on the average velocity of the flow field and the critical velocity at which cassiterite particles produce obvious motion trails. The specific setting method is as follows: First, based on the average velocity magnitude in the flow field region velocity characteristics obtained in step S1, combined with the spatial calibration parameters of the image system and the inter-frame time interval, an amplitude reference value reflecting the mainstream velocity is calculated. The amplitude reference value is calculated by multiplying the average velocity by the inter-frame time interval and then by the image calibration coefficient, resulting in a value per pixel per frame. Then, through experimental observation, it was determined that under shooting conditions, when the particle motion speed reaches a certain multiple of the amplitude reference value, a visually perceptible motion blur begins to appear in the image. This multiple is the empirical coefficient; for example, an empirical coefficient of 1.5 can be used. The preset amplitude threshold can be set as the amplitude reference value multiplied by the empirical coefficient. The selection criteria are: for each candidate particle pair, if its motion vector amplitude is greater than the preset amplitude threshold, the candidate particle pair is considered to meet the characteristics of high-speed motion. These selected candidate particle pairs will undergo subsequent motion blur processing.
[0057] For candidate particles that meet the characteristics of high-speed motion, the grayscale gradient field of their corresponding image regions is calculated in consecutive frame images. For each candidate particle that meets the characteristics of high-speed motion, an image region for analysis needs to be defined in the two adjacent frame images. This image region is usually a sufficiently large rectangular window centered on the center coordinates of the candidate particle in the current frame, ensuring that it can completely cover the area that the particle may be affected by motion blur.
[0058] It should be noted that the window size is related to the amplitude of the particle's motion vector. For example, the window width can be set as the particle's equivalent diameter plus the absolute value of the motion vector's x-direction component, multiplied by an expansion coefficient. The window height can be set as the particle's equivalent diameter plus the absolute value of the motion vector's y-direction component, multiplied by the same expansion coefficient, where the expansion coefficient can be 2. Within this image region, the grayscale gradient field is calculated on the original grayscale image.
[0059] The gray-level gradient field reflects the intensity and direction of the change in gray-level values at various pixel locations in an image. The gray-level gradient field is calculated using a gradient operator through convolution. Specifically, the Sobel operator is used, with both horizontal and vertical Sobel operator templates convolved with the image region to obtain the horizontal gradient component Gx and the vertical gradient component Gy for each pixel. Therefore, the gradient magnitude G of that pixel can be calculated as: The gradient direction is determined by the arctangent function of Gy divided by Gx. For all pixels within an image region, their gradient magnitude and direction together constitute the gray-level gradient field of that region. Performing the above calculation on the image regions corresponding to the candidate particle in the first and second frames respectively yields two consecutive gray-level gradient fields.
[0060] The difference between the gray-level gradient fields of consecutive frames is calculated to obtain the inter-frame gray-level gradient difference result. The difference calculation is performed on the two consecutive gray-level gradient fields obtained above. Specifically, the gray-level gradient fields of the first frame image region and the gray-level gradient fields of the second frame image region are compared with the corresponding pixel values. Since the particles are in motion, direct pixel-to-pixel difference may be inaccurate. Therefore, it is necessary to first spatially align the gray-level gradient field of the second frame according to the particle motion vector.
[0061] Assuming the particle's motion vector from the first frame to the second frame is (dx, dy), before differencing, the grayscale gradient field of the second frame is first translated by dx pixels and dy pixels in the opposite direction to roughly align it with the particle's position in the first frame. When dx or dy is not an integer, bilinear interpolation is used for sub-pixel precision translation. After alignment, the inter-frame grayscale gradient difference result can be obtained by calculating the difference in gradient magnitude at corresponding pixel points between the two aligned gradient fields. For pixels with the same position coordinates in the two aligned gradient fields, the difference value D(x,y) is: D(x,y)=|G1(x,y)-G2(x,y)|, where G1(x,y) and G2(x,y) represent the gradient magnitude at point (x,y) after alignment of the first and second frames, respectively. This calculation is performed on all pixels to obtain a new two-dimensional matrix, which is the inter-frame grayscale gradient difference result. In this result matrix, regions with larger values usually correspond to parts of the image that have undergone significant changes.
[0062] Based on inter-frame grayscale gradient difference results, the true contours of particles are distinguished and extracted from image regions containing candidate particles that exhibit high-speed motion characteristics, thus separating motion blur from the true particle contours. To achieve this distinction, a gradient difference threshold needs to be set. The purpose of setting the gradient difference threshold is to separate high-difference regions belonging to the true contour edges from low-difference regions belonging to the interior of the blur or stable background. This threshold can be determined by analyzing the statistical characteristics of the difference result matrix, for example, by calculating the average value μ and standard deviation σ of all pixel values in the difference result matrix, and then setting the gradient difference threshold T to μ plus 2 multiplied by σ. Based on this threshold, the difference result matrix is binarized: pixel positions with difference values greater than the gradient difference threshold T are marked as foreground, and pixel positions with difference values less than or equal to the gradient difference threshold T are marked as background. This results in a binarized edge map.
[0063] To extract the complete true particle contours, the binarized edge map needs post-processing. First, morphological closing operations are used to connect adjacent edge breaks and fill small holes. The structuring element of the closing operation can be a circle with a radius of 2 pixels. Then, all connected regions in the binary image are searched, and the area of each connected region is calculated. Connected regions with areas greater than a minimum area threshold and less than a maximum area threshold are selected as candidate contours. The minimum and maximum area thresholds are set according to the typical size of the particles. Next, the pixel positions of these candidate contours are mapped back to the original first frame image region. In the original image region, using the candidate contour pixels extracted from the aforementioned binarized edge map as seed points, an edge tracking algorithm is used to trace along the direction with the largest gradient magnitude and continuous direction in the gray-level gradient field of the original image, starting from these seed points, thus outlining a closed and precise particle boundary. This boundary is the true particle contour obtained after separation. The blurred parts in the original image region that belong to the particle but are not included in this precise boundary, and are gray-level gradients connected behind the contour, are determined to be motion blur. Through the above process, the motion blur and the true outline of the particles are separated.
[0064] According to step S6, the target particle segmentation and contour tracking are completed based on the motion type differentiation results and the true particle contours, and the measurement parameters are output. In the specific implementation process, the true particle contours are first classified and integrated according to the motion type differentiation results. The motion type differentiation results are obtained from step S4, and they contain the motion type label of each tracked candidate particle, i.e., cross-frame displacement or independent motion of multiple particles. The true particle contours are the accurate particle boundary contours separated in step S5, after removing the influence of motion blur. The purpose of classification and integration is to organize multiple contour instances belonging to the same physical particle that appear in consecutive frames according to their motion type and spatiotemporal relationship to form a prototype of particle trajectory. The specific operation is as follows: an empty set of particle trajectories is created. For each true particle contour appearing in the first frame image, it is used as the starting point of a trajectory, and its contour point set, center position, and the motion type label corresponding to the particle obtained from step S4 are recorded. Then, for each true particle contour in the second frame image, the Euclidean distance between its center position and the center position of the last contour of each existing trajectory in the first frame is calculated.
[0065] Simultaneously, considering the consistency of motion type, if the particle motion type labels in two frames are the same, the matching priority is considered higher. The first frame contour with the smallest distance and highest motion type matching degree is found as its potential predecessor. If this minimum distance is less than a preset maximum association distance threshold, the contour of the second frame is assigned to the trajectory of the first frame contour, becoming the second point of that trajectory; otherwise, the second frame contour is used as the starting point of a new trajectory. The preset maximum association distance threshold is set based on the average velocity of the flow field and the inter-frame time interval. Specifically, the average velocity in the flow field region is first calculated, multiplied by the inter-frame time interval to obtain the average pixel displacement, and then multiplied by a coefficient to obtain the maximum association distance threshold. This coefficient is usually determined by analyzing the distance distribution between successfully matched particle pairs in historical data, for example, 1.5. This frame-by-frame processing associates the contours of subsequent frames with existing trajectories, ultimately classifying and integrating all the actual particle contours into different trajectories. Each trajectory represents a particle's motion sequence over a period of time.
[0066] Based on the categorized and integrated true particle contours, the precise region of the target particle is defined in the image, completing the target particle segmentation. Each particle trajectory obtained after categorization and integration contains the particle's contour across multiple consecutive frames. Target particle segmentation refers to determining the precise pixel region occupied by the particle in a single frame image. For each contour instance in the trajectory, i.e., the contour of the particle in a specific frame, a segmentation mask needs to be generated based on this contour. Specifically, based on the closed boundary point set of the contour, a binary image of the same size as the frame image is created in memory, and all pixel values are initialized to 0, representing the background. Then, a polygon filling algorithm is used to set the pixel values inside the contour boundary to 1. The polygon filling algorithm uses a scanline seed filling method, starting from a seed point inside the contour and filling left and right until the boundary pixel is encountered. The seed point can be obtained by calculating the centroid of the contour point set; the centroid coordinates are the average of the x-coordinates and y-coordinates of all points in the contour. After filling, the region with a pixel value of 1 is the precise segmentation region of the target particle in the current frame. This process is performed independently on each frame of the trajectory to obtain the segmentation result of the particle in each frame, thus completing the accurate separation of the target particle from the image background.
[0067] Based on the motion vector association information provided by the motion type differentiation results, contour correspondences of target particles are established and matched between consecutive frame images to achieve contour tracking of target particles. The motion vector association information is obtained from step S4, specifically referring to the motion vectors calculated in step S4 that connect matching candidate particle pairs between adjacent frames. While the classification and integration stage in step S6 has already preliminarily utilized positional proximity for inter-frame association, contour tracking requires more precise establishment and confirmation of this cross-frame correspondence. The implementation method is as follows: for two contours already classified into the same trajectory in adjacent frames, their correspondence has been preliminarily established by the motion vectors in step S4 and the classification and integration in step S6. To enhance the reliability of this correspondence and for accurate tracking, the shape similarity between these two contours needs to be calculated as verification. The method for calculating shape similarity can employ contour matching algorithms, such as calculating the Hausdorff distance between two contour point sets. The Hausdorff distance is calculated as follows: for each point on the first contour, calculate the shortest distance from it to all points on the second contour, and take the maximum value among these shortest distances. Then, perform the same calculation on the distance from the second contour to the first contour and take the maximum value. Finally, take the larger of the two maximum values as the Hausdorff distance between the two contours. If the Hausdorff distance is less than a preset shape difference threshold, the correspondence between the two contours is confirmed to be valid, thus achieving contour tracking from frame t to frame t+1.
[0068] It should be noted that the shape difference threshold is set based on the maximum possible deformation of the particle between frames, which can be obtained through experimental observation. For example, by measuring the contour changes of multiple known matching particle pairs in adjacent frames and statistically analyzing the distribution of their Hausdorff distances, the 95th percentile is set as the shape difference threshold. If the Hausdorff distance exceeds the shape difference threshold, it indicates that the tracking may be broken, the trajectory terminates in this frame, and the contour in a subsequent frame may initiate a new trajectory. In this way, a correspondence between the target particle contours is established and matched across all consecutive frames, thereby achieving continuous contour tracking of the particles and obtaining the contour sequence of each particle over time.
[0069] Based on the stable contours of target particles obtained through contour tracking in consecutive frames, the particle size and morphology measurement parameters are calculated and output. Contour tracking yields a series of contours for each target particle within a consecutive frame sequence. Stable contours are those whose particle shape remains relatively unchanged across multiple frames, without severe occlusion or overlap. To obtain reliable measurements, stable contours need to be selected from the trajectory. The selection criteria are: the contour's roundness is greater than a preset lower threshold, and the average Hausdorff distance between the contour and its adjacent contours in preceding and following frames is less than 50% of a shape difference threshold. For each frame's stable contour that passes the selection, its particle size and morphology parameters are calculated.
[0070] Granularity measurement parameters mainly refer to the size of the particles, such as calculating the equivalent diameter of the stable contour in each frame. The equivalent diameter is calculated as follows: the equivalent diameter equals four times the contour area divided by pi, and then the square root of the result is taken. The contour area is the total number of pixels enclosed by the contour multiplied by the actual physical area represented by each pixel. The actual physical area is obtained through spatial calibration of the image system. The calibration method involves capturing an image of a calibration board of known size and calculating the ratio between the pixel size and the actual size. The arithmetic mean of the equivalent diameters calculated from multiple frames of stable contours is taken as the final granularity parameter for the target particle, for example, reported as the average equivalent diameter. Morphological measurement parameters describe the shape characteristics of the particles. The roundness and aspect ratio of the stable contour in each frame are calculated. Roundness is calculated as follows: roundness equals four times pi multiplied by the contour area divided by the square of the contour perimeter. The contour perimeter is the sum of the Euclidean distances between all adjacent pixel pairs on the contour boundary. The aspect ratio is calculated as follows: the aspect ratio equals the length of the longer side of the minimum bounding rectangle of the profile divided by the length of the shorter side; the minimum bounding rectangle is obtained using a rotating caliper algorithm. Similarly, the arithmetic mean of the roundness and aspect ratio calculated from the stable profiles across multiple frames is taken as the final morphological parameters of the target particle. Finally, the identification of each target particle, its average equivalent diameter, average roundness, average aspect ratio, and its motion type label are output as a complete set of measurement parameters. The output format can be a structured data list or a file, thus completing the dynamic analysis and measurement of cassiterite mineral particle parameters in a dynamic flow field.
[0071] The preset lower limit threshold for roundness is set as follows: By performing imaging analysis on known cassiterite mineral particle samples, a large amount of contour data of real particles is obtained and their roundness is calculated; the distribution of these roundness values is statistically analyzed, and the low percentile value of the distribution is used as the basis for setting the threshold; for example, the 10th percentile of the roundness distribution is taken as the lower limit threshold for roundness. This value indicates that 90% of real cassiterite particles have a roundness higher than this value, thereby ensuring that the threshold can effectively distinguish particles from noise or irregular fragments.
[0072] Figure 2 A schematic diagram of the dynamic image analysis and measurement system for cassiterite mineral particles of the present invention is provided. The dynamic image analysis and measurement system for cassiterite mineral particles includes: The image acquisition module is used to acquire continuous frame images of cassiterite mineral particles in a dynamic flow field through an industrial vision system, and extract the corresponding flow velocity characteristics of the flow field region. The trend judgment module is used to select candidate particles in two adjacent frames based on continuous frame images, calculate the overlap of gray-level distribution of neighboring pixels between frames, and fuse the flow velocity characteristics of the flow field region to determine whether there is a cross-frame displacement trend. The matching and judgment module is used to extract the contour morphology stability of candidate particles with cross-frame displacement trends and to determine whether the cross-frame displacement trend of candidate particles matches the contour morphology stability. The differentiation generation module is used to construct the flow field velocity field constraint range for matching candidate particles in combination with the flow field region velocity characteristics, obtain the motion vector field of candidate particles, and use density clustering algorithm combined with the motion vector amplitude corresponding to cassiterite mineral density to distinguish cross-frame displacement and multi-particle independent motion, and generate motion type differentiation results. The contour separation module is used to select candidate particles that meet the characteristics of high-speed motion based on the motion type differentiation results and motion vector amplitude, and uses the inter-frame gray-level gradient difference method to separate motion trails from the real particle contours. The parameter output module is used to segment and track the target particles based on the motion type differentiation results and the actual particle contour, and outputs the measurement parameters.
[0073] The calculations involved in the embodiments are all dimensionless numerical calculations, and the preset parameters and thresholds in the calculations are set by those skilled in the art according to the actual situation.
[0074] It should be noted that this invention can be deployed on the device itself to realize embedded applications, or it can run on a PC or other terminal with a user interface, thereby meeting various hardware environments and usage requirements.
[0075] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions according to the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wireless or wired transmission; wired transmission methods include optical fiber, twisted pair, coaxial cable, etc.; wireless transmission includes infrared, microwave, etc. Computer-readable storage media can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more sets of available media. Available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media. Semiconductor media can be solid-state drives.
[0076] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and modules described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0077] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.
[0078] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0079] In addition, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.
[0080] If a function is implemented as a software module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0081] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0082] In conclusion, the above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for dynamic image analysis and measurement of cassiterite mineral particles, characterized in that, include: S1. Collect continuous frame images of cassiterite mineral particles in a dynamic flow field using an industrial vision system, and extract the corresponding flow velocity characteristics of the flow field region. S2. Based on consecutive frame images, select candidate particles from two adjacent frames, calculate the overlap of grayscale distribution of neighboring pixels between frames, and fuse the flow field region velocity characteristics to determine whether there is a cross-frame displacement trend. S3. Extract the contour morphology stability of candidate particles with cross-frame displacement trends, and determine whether the cross-frame displacement trend of candidate particles matches the contour morphology stability. S4. For the matching candidate particles, construct the flow field velocity field constraint range by combining the flow field region velocity characteristics, obtain the motion vector field of the candidate particles, and use the density clustering algorithm combined with the motion vector amplitude corresponding to the cassiterite mineral density to distinguish between cross-frame displacement and multi-particle independent motion, and generate motion type distinction results. S5. Based on the motion type differentiation results and motion vector amplitude, candidate particles that meet the characteristics of high-speed motion are selected, and the inter-frame gray-level gradient difference method is used to separate motion trails from the true particle contours. S6. Based on the motion type differentiation results and the true contour of the particles, the target particles are segmented and their contours are tracked, and the measurement parameters are output.
2. The dynamic image analysis and measurement method for cassiterite mineral particles according to claim 1, characterized in that, S1 includes: Continuous frame images of cassiterite mineral particles in a dynamic flow field are acquired using an industrial vision system. Extracting image feature sequences representing the motion state of the flow field from consecutive frame images; Based on the changes in the image feature sequence between consecutive frames, the flow velocity characteristics of the dynamic flow field in the image acquisition area are calculated.
3. The dynamic image analysis and measurement method for cassiterite mineral particles according to claim 1, characterized in that, S2 include: Select two adjacent frames from consecutive frames; In two adjacent frames of images, granular regions are identified as candidate particles. Extract the grayscale distribution of neighboring pixels for each candidate particle in the corresponding frame image; Calculate the overlap of grayscale distribution of neighboring pixels of corresponding candidate particles between two adjacent frames; By combining the flow velocity characteristics of the flow field region and the correlation between the overlap of grayscale distribution of neighboring pixels and the flow velocity characteristics of the flow field region, it is determined whether the candidate particles have a cross-frame displacement trend.
4. The dynamic image analysis and measurement method for cassiterite mineral particles according to claim 1, characterized in that, S3 include: For candidate particles that are judged to have a cross-frame displacement trend, the contour geometric features of the corresponding candidate particles are extracted from the two adjacent frames of the image. Based on the contour geometric features extracted in two adjacent frames, the contour morphology stability of the corresponding candidate particles is calculated. Based on the preset matching rules, the cross-frame displacement trend of candidate particles is compared with their contour morphology stability to determine whether the cross-frame displacement trend of candidate particles matches their contour morphology stability.
5. The dynamic image analysis and measurement method for cassiterite mineral particles according to claim 4, characterized in that, The preset matching rule is to set a correlation threshold between the quantization index of cross-frame displacement trend and the quantization index of contour shape stability; specifically, by comparing the quantization values of the cross-frame displacement trend and contour shape stability of the candidate particles, it is determined whether the ratio between the two quantization values is within the range limited by the correlation threshold. If it is within the range of the correlation threshold, then the cross-frame displacement trend of the candidate particle is determined to match the stability of the contour shape.
6. The dynamic image analysis and measurement method for cassiterite mineral particles according to claim 1, characterized in that, S4 include: For candidate particles whose cross-frame displacement trend matches their profile stability, the flow field velocity field constraint range is defined based on the flow field velocity characteristics of the flow field region. Within the constraints of the flow field velocity field, the motion vectors of matching candidate particles are calculated between consecutive frames to form a motion vector field; Extract the motion vector amplitude of each motion vector from the motion vector field; Clustering parameters were set based on the physical relationship between cassiterite mineral density and motion vector amplitude, and density clustering algorithm was used to perform cluster analysis on motion vector amplitude. Based on the results of cluster analysis, the motion vectors in the motion vector field are divided into types that represent cross-frame displacement and types that represent independent motion of multiple particles, thus generating motion type classification results.
7. The dynamic image analysis and measurement method for cassiterite mineral particles according to claim 6, characterized in that, The implementation of clustering analysis of motion vector amplitude using density clustering algorithm is based on setting clustering parameters according to the physical relationship between cassiterite mineral density and particle velocity in flow field. This includes: determining the expected distribution range of motion vector amplitude based on the theoretical relationship between cassiterite mineral density and particle velocity in flow field; converting the feature values of the expected distribution range into neighborhood distance parameters and minimum number of core points required by density clustering algorithm; and using density clustering algorithm with set parameters to analyze the set of motion vector amplitudes of all candidate particles and dividing them into different clusters according to the aggregation of motion vector amplitudes in feature space.
8. The dynamic image analysis and measurement method for cassiterite mineral particles according to claim 1, characterized in that, S5 includes: Based on the results of motion type differentiation and motion vector amplitude, candidate particles with motion vector amplitude exceeding a preset amplitude threshold are selected from the candidate particles and used as candidate particles that meet the characteristics of high-speed motion. For candidate particles that meet the characteristics of high-speed motion, the gray-level gradient field of their corresponding image regions is calculated in consecutive frame images; Calculate the difference in gray-level gradient fields between consecutive frames to obtain the inter-frame gray-level gradient difference results; Based on the inter-frame gray-level gradient difference results, the true contours of particles are distinguished and extracted from the image regions of candidate particles that conform to high-speed motion characteristics, thereby separating motion blur from the true contours of particles.
9. The dynamic image analysis and measurement method for cassiterite mineral particles according to claim 1, characterized in that, S6 include: Based on the results of differentiating motion types, the true contours of particles are categorized and integrated; Based on the true contours of the particles after classification and integration, the precise region of the target particles is defined in the image, thus completing the target particle segmentation. Based on the motion vector association information provided by the motion type differentiation results, the contour correspondence of the target particles is established and matched between consecutive frame images to achieve contour tracking of the target particles. Based on the stable contours of the target particles obtained by contour tracking in consecutive frames, the particle size and morphology measurement parameters of the target particles are calculated and output.
10. A dynamic image analysis and measurement system for cassiterite mineral particles, used to implement the dynamic image analysis and measurement method for cassiterite mineral particles according to any one of claims 1-9, characterized in that, include: The image acquisition module is used to acquire continuous frame images of cassiterite mineral particles in a dynamic flow field through an industrial vision system, and extract the corresponding flow velocity characteristics of the flow field region. The trend judgment module is used to select candidate particles in two adjacent frames based on continuous frame images, calculate the overlap of gray-level distribution of neighboring pixels between frames, and fuse the flow velocity characteristics of the flow field region to determine whether there is a cross-frame displacement trend. The matching and judgment module is used to extract the contour morphology stability of candidate particles with cross-frame displacement trends and to determine whether the cross-frame displacement trend of candidate particles matches the contour morphology stability. The differentiation generation module is used to construct the flow field velocity field constraint range for matching candidate particles in combination with the flow field region velocity characteristics, obtain the motion vector field of candidate particles, and use density clustering algorithm combined with the motion vector amplitude corresponding to cassiterite mineral density to distinguish cross-frame displacement and multi-particle independent motion, and generate motion type differentiation results. The contour separation module is used to select candidate particles that meet the characteristics of high-speed motion based on the motion type differentiation results and motion vector amplitude, and uses the inter-frame gray-level gradient difference method to separate motion trails from the real particle contours. The parameter output module is used to segment and track the target particles based on the motion type differentiation results and the actual particle contour, and outputs the measurement parameters.