Sand grain grading rapid detection method based on dual-camera fusion
By employing a dual-camera fusion method for sand particle size distribution detection, combined with morphological calculations and convex defect analysis, the problem of adhered particles in sand particle size distribution detection was solved, achieving efficient and accurate size distribution detection.
Patent Information
- Application Number
- CN202510934207.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-08
- Publication Date
- 2025-11-28
AI Technical Summary
Existing methods for detecting sand particle size distribution struggle to balance accuracy and efficiency, especially when detecting cohesive particles.
A detection method based on dual-camera fusion is adopted, which combines morphological operations and improved convex defect analysis segmentation algorithms. Adhesive particles are adaptively separated by dynamically adjusting the shape factor threshold, and an imaging architecture combining global wide-angle and local micro-photo is constructed. Volume distribution weighted fusion technology is introduced.
It achieves a balance between a large field of view and fine particle detection accuracy while reducing the number of samples, thus improving detection efficiency and reliability and ensuring high accuracy in gradation detection.
Smart Images

Figure CN121032891A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of image processing and recognition, in particular to a rapid detection method for sand grain size distribution based on dual-camera fusion. BACKGROUND
[0002] The mechanism sand size distribution is a key indicator affecting the performance of materials such as concrete, and its rapid and accurate detection is of great significance.
[0003] However, the adhesion problem of sand particles and the stringent requirements of industrial sites on detection efficiency make it difficult for existing detection methods to balance accuracy and efficiency, and many challenges still remain.
[0004] Therefore, a new solution is needed to solve the above problems. SUMMARY
[0005] The purpose of the present application is to provide a rapid detection method for sand grain size distribution based on dual-camera fusion to solve the technical problems raised in the background art.
[0006] To achieve the above purpose, the present application provides the following technical solution: a rapid detection method for sand grain size distribution based on dual-camera fusion, characterized by at least comprising the following steps:
[0007] S1: Build a Hardware Architecture hardware architecture, based on the existing size distribution detection system for iterative upgrade, focusing on the dual-camera collaborative imaging module and the pneumatic sand cleaning module for innovation and optimization at the same time;
[0008] S2: Based on the S1 framework, propose a segmentation algorithm based on morphological operation and improved convex defect analysis, dynamically adjust the shape factor threshold, and adaptively split the adhered particles, that is, use block adaptive threshold segmentation and adhesion segmentation;
[0009] S3: Build a dual-camera collaborative imaging architecture combining global wide-angle and local macro, and introduce volume distribution weighted fusion technology, which not only takes into account the large field of view range and fine particle detection accuracy, but also maintains high accuracy of size distribution detection while reducing the number of samples, that is, build a particle size classification and dual-view compensation mechanism, and optimize the mechanism by building a corresponding optimization objective function, and finally obtain the weight vector that minimizes the SSE through iterative solution, which is used to accurately correct the global volume distribution.
[0010] Further, the block adaptive threshold segmentation uses a background removal strategy combining multi-frame background modeling and local block adaptive threshold, the core idea of which is to first extract the stable background component through multi-frame image fusion and eliminate it;
[0011] Then divide the image into several local blocks, for the (i,j)th sub-block, calculate its gray median Ti,j This serves as a local threshold, which is then used to binarize the block.
[0012] Where (x,y)∈B i,j
[0013] Among them, S i,j (x, y) is a local binarization result, processed for a local region (x, y) in the image; the binarization of each local region is based on a local threshold T. i,j The comparison is performed using +Δ, where I(x,y) is the grayscale value at that location. If the grayscale value is greater than a threshold plus a certain offset Δ, the binarization result at that location is 255, i.e., white; otherwise, it is 0, i.e., black. This process is performed in each local region B of the image. i,j The binarization process is performed within ψ; finally, these locally binarized results are stitched together to form a complete binary image, thereby improving the detection accuracy of fine particles in complex backgrounds.
[0014] Furthermore, the adhesion segmentation is a multi-stage progressive sand grain contour processing and segmentation algorithm, which can accurately separate complex adhesions while retaining effective particles.
[0015] For sand grains with non-closed contours at the image edge, the minimum bounding rectangle of each connected component is first obtained. The integrity of the grain contour is determined based on the contact between the rectangle and the image boundary. Incomplete grains are excluded in the binary mask. This ensures that subsequent contour extraction and shape analysis are performed only on complete closed sand grains, effectively avoiding interference from missing boundaries on the statistical results.
[0016] In sand grain image analysis, accurately distinguishing between individual particles and aggregates is a crucial step;
[0017] During the determination phase, three types of geometric features are first calculated for each connected component contour: equivalent diameter, shape factor, and density.
[0018] The equivalent diameter is defined as the horizontal width w of the smallest bounding rectangle of the profile, which is the number of pixels multiplied by the pixel value obtained from camera calibration – the physical size conversion factor mm_per_pixel, which is millimeters per pixel.
[0019] d = w × mm_per_pixel
[0020] The shape factor is defined as the ratio of the projected area of the particle profile to the square of the profile perimeter:
[0021]
[0022] Where A is the outline projection area, which can be converted from the number of pixels to square millimeters; P 2The pixel length is also converted to millimeters for the perimeter of the outline; when a single particle is approximately circular, SF approaches 1, while it will decrease significantly for aggregates or complex shapes.
[0023] Solidity is defined as the ratio of the particle profile area to its convex hull area, and is used to measure the compactness of the profile.
[0024]
[0025] The aforementioned geometric indicators can serve as a preliminary basis for distinguishing between independent particles and aggregates;
[0026] Next, the algorithm adaptively determines two threshold curves based on the equivalent diameter, corresponding to the thresholds for shape factor and density, respectively:
[0027] T s =max(0.6,0.8-0.05d)
[0028] T d =max(0.85,0.95-0.05d)
[0029] When a certain contour simultaneously meets the above two criteria, namely, both the shape factor and density are below the threshold, it can be considered that its shape has deviated from the rounded and dense characteristics that a single particle should have.
[0030] In addition, to prevent some adhesions that show signs of separation but do not exceed the limits in shape indexing by relying solely on threshold judgment, the algorithm adds convex hull defect analysis in the judgment stage.
[0031] First, extract all the concave points of the contour and compare the depth of each pair of concave points (i.e., their minimum distance from the convex hull, the point spacing, and the local angle) with an empirical threshold. Only when at least one pair of concave points simultaneously meets the three conditions of depth greater than the threshold, spacing greater than the minimum segmentation width, and angle less than the preset value, is the contour classified into the "adhesive" category.
[0032] Ultimately, if any branch of a connected region is determined to be adhered in the geometric threshold criterion or convex point defect analysis, it is identified as an adhered particle and enters the subsequent segmentation process.
[0033] The remaining connected regions are treated as independent and complete sand grains, and used for subsequent statistical calculations of grain size and shape.
[0034] Furthermore, for contours initially identified as "adhesive", a concave point detection strategy based on triple physical constraints was used for fine segmentation.
[0035] First, all potential depressions are extracted using convex hull defect analysis. Then, these depressions are filtered based on three constraints: depth, spacing, and angle.
[0036] Only when the depth of the depression exceeds the set threshold, the distance between any two depressions is greater than the minimum segmentation width, and the included angle of the local contour corresponding to the depression is less than the empirical threshold, will the pair of depressions be considered as valid segmentation points.
[0037] After obtaining the effective concave point pairs after filtering, the algorithm constructs a Euclidean distance matrix, prioritizes selecting the pair of concave points that are closest to each other and meet the constraints, and cuts the adhesive contour along the line connecting the two points.
[0038] After cutting, the same process is repeated on the sub-contours, recursively performing the segmentation until the sub-contour size is smaller than the minimum particle diameter, the aspect ratio returns to the normal range, or there are no more effective concave points.
[0039] This recursive segmentation process can efficiently remove connectivity and common boundaries between adhering particles, achieving accurate splitting and complete extraction of adhering particles.
[0040] Furthermore, in the design of the particle size classification, to improve the robustness of the particle size division, for each preset particle size interval D... i A single-gradation test was conducted to extract its Feret short diameter sample set {x}. i,j The least squares method was used to fit the corresponding normal distribution to characterize the typical Feret feature distribution of each particle size range at the image scale.
[0041]
[0042] Where, x i,j This refers to the particle size value of a certain particle within particle size range i. Here, the subscript i represents the particle size range, and j represents the particle number within that range. This indicates that the particle size follows a mean of μ. i The variance is The normal distribution; here μ i It is the mean value of particle size interval i. It is the variance of that interval;
[0043] After fitting, the Feret short axis distribution parameters for each particle size range can be obtained, including the mean μ. i With standard deviation σ i Based on these statistical characteristics, further analysis was conducted on each pair of adjacent particle size intervals D. i and D i+1 Construct its corresponding normal probability density function for subsequent boundary judgment and fuzzy interval discrimination modeling:
[0044]
[0045] f i (x * )=f i+1 (x * )
[0046] Where x is the particle size value to be evaluated; exp is an exponential function;
[0047] f is solved using numerical methods. i (x * )=f i+1 (x * This allows us to obtain the probability density equilibrium point of the two distributions. This equilibrium point, statistically speaking, corresponds to the optimal threshold that minimizes the misclassification rate of particles within the overlapping interval.
[0048] Finally, by combining all intersections Arranged in order, and combined with the physical minimum and maximum values of the upper and lower limits, a complete list of particle size division intervals can be generated:
[0049] Furthermore, the dual-view compensation mechanism introduces horizontal and vertical scaling factors k. h and k v ;
[0050] These two coefficients represent the proportional relationship between the physical pixel size of the local image in the horizontal and vertical directions and the global coordinate system, respectively;
[0051] For a local camera, its field of view width W l With height W l The corresponding pixel resolution is N l,x With N l,y Then the physical size of a unit pixel of the local camera in the horizontal and vertical directions can be expressed as:
[0052]
[0053] The global camera's field of view is W in width and height. g and H g The pixel resolution is N g,x ×N g,y The unit pixel size corresponding to the global camera is:
[0054]
[0055] Based on the above results, the scaling factors for the horizontal and vertical directions are:
[0056]
[0057] After determining the horizontal and vertical scaling factors, it is necessary to further consider the influence of the azimuth angle θ of the particles in the image plane on the measurement results.
[0058] According to the principles of geometric optics, when the observation direction is not aligned with the long axis of the particle, its projected length will vary in different directions.
[0059] Therefore, the locally measured Feret minor diameter L is obtained by applying the following nonlinear mapping. l Precisely mapped to the global coordinate system:
[0060]
[0061] When the azimuth angle θ of the particles is unmeasurable, the above expression can be integrally averaged over the interval [0,π] to obtain an unbiased statistical scaling factor:
[0062]
[0063] Through the average scaling factor Adjust the original length L l The new length obtained;
[0064] After completing the consistent mapping of the length dimension, the adjustment of the projected area follows the rules of two-dimensional measurement, requiring only the multiplication of the horizontal and vertical scale coefficients:
[0065] k A =k h k v
[0066] The locally measured particle pixel area A is then calculated using the following formula. local By switching to a global perspective, area conservation and directional bias are ensured:
[0067]
[0068] To unify the grain size data scale between local macro cameras and global wide-angle cameras, the data needs to be scaled according to the physical area ratio of their respective fields of view:
[0069]
[0070] The overall replacement formula is obtained as follows:
[0071]
[0072] This linear replacement strategy is based on a key point: the original particle size of sand is randomly distributed in the overall sample, and after being fully dispersed by the vibrating disk, the particle size distribution in each local acquisition area can be regarded as being basically consistent with the overall distribution. Because of this, the total area of fine particles measured in the local area can be linearly amplified according to the ratio of the physical area of the global and local fields of view without introducing deviation, thereby realizing the replacement of the area of small particles in the global image.
[0073] After replacing the area of the fine-particle region, to maintain the comparability of the overall volume distribution, the total volume of each particle size range needs to be renormalized. Let the volume of each particle size range after replacement compensation be v'. i The formula for calculating its normalized proportion is as follows:
[0074] Furthermore, the normalization operation ensures that the sum of the volume percentages of all particle size ranges is 100%, laying the foundation for subsequent alignment with the results of the sieving method.
[0075] However, due to the differences in imaging principles and scale sampling between local and global cameras, as well as the limitations of local coverage during the substitution process, the measurement results of the image method in each particle size range may still have systematic biases. In order to further improve the accuracy of the substitution data, a weighted optimization strategy based on volume ratio correction is introduced to finely adjust the volume distribution of the image method by fitting it with the results of the sieving method.
[0076] The normalized volume distribution obtained by the image method forms the feature matrix X, and the corresponding measured result by the sieving method is Y. The goal is to minimize the sum of squared residuals between the two by introducing a weight vector w to perform weighted correction on each particle size interval. The optimization objective function is defined as follows:
[0077]
[0078] Among them, X j Y represents the normalized volume distribution of the j-th particle size range; j The corresponding sieve method is the true value; the weight vector is updated iteratively using the BFGS quasi-Newton algorithm, with an all-1 vector as the initial value;
[0079] By utilizing the second-order information of the objective function approximated by the current gradient, efficient second-order convergence is achieved. Through iterative solution, the weight vector that minimizes SSE is finally obtained, which is used to accurately correct the global volume distribution.
[0080] Compared with the prior art, the beneficial effects of the present invention are:
[0081] This invention proposes innovative solutions from three aspects: image segmentation, imaging system, and sampling strategy. First, it proposes a segmentation algorithm based on morphological operations and improved convex defect analysis, which adaptively segments adherent particles by dynamically adjusting the shape factor threshold. Second, it constructs a dual-camera collaborative imaging architecture combining global wide-angle and local macro capabilities, and introduces volume distribution weighted fusion technology, which not only balances a large field of view and fine particle detection accuracy, but also maintains high accuracy in gradation detection while reducing the number of samples. Finally, it reveals the nonlinear relationship between the number of sample groups and detection accuracy and processing efficiency, and proposes a flexible shooting strategy that can dynamically adjust the grouping scheme according to the required accuracy threshold on site, compressing the acquisition and processing time of a single sample to the minute level, thereby simultaneously ensuring the efficiency and reliability of online detection. Attached Figure Description
[0082] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0083] Figure 1 This is a diagram showing the composition of the sampling device of the present invention;
[0084] Figure 2 This is a flowchart of the contour processing of the present invention;
[0085] Figure 3 This is a contour segmentation result diagram of the present invention;
[0086] Figure 4 This is a schematic diagram of the particle size distribution of the present invention. Detailed Implementation
[0087] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0088] Please see Figures 1-4 A rapid detection method for sand particle size distribution based on dual-camera fusion, characterized by including at least the following steps:
[0089] S1: Build the hardware architecture, iteratively upgrade the existing gradation detection system, and focus on innovative optimization of the dual-camera collaborative imaging module and the pneumatic sand removal module.
[0090] See Figure 1This invention is an iterative upgrade of the existing gradation detection system, with a focus on innovative optimizations to the dual-camera collaborative imaging module and the pneumatic sand removal module (see...). Figure 1 ).
[0091] The dual-camera collaborative imaging module employs differentiated optical configurations: a global wide-angle camera captures the entire sample distribution in a single shot, solving the inefficiency problem caused by traditional multi-region stitching; a local macro camera uses high-precision optical magnification to accurately capture the morphological details of particles with a full range of diameters from 0.075 to 4.75 mm, overcoming the technical bottleneck of single-camera systems where field of view and resolution cannot be simultaneously achieved. The pneumatic sand removal module introduces a high-pressure airflow-assisted telescopic jet mechanism, optimizing the jet path and sand removal timing logic. It initiates the sand removal action within 50ms after imaging, achieving efficient removal of residual sand particles (especially fine particles <0.6 mm), avoiding equipment wear and secondary pollution caused by traditional mechanical scraping. In addition, the feeding module improves the feeding accuracy to ±1% through dynamic calibration of gravity sensor thresholds and optimization of servo motor response; the dispersion module uses a multi-frequency vibration strategy combined with optical homogenization technology, significantly improving the uniformity of sand particle distribution. Each module is deeply coupled with PLC timing control through multi-sensor data fusion to form a closed-loop detection link of "precise feeding, intelligent dispersion, accurate image acquisition, and self-cleaning", providing highly robust hardware support for real-time gradation detection under complex working conditions.
[0092] To verify the stability and reliability of the dual-camera system, this study conducted parameter optimization tests on the imaging module under different lighting conditions, shooting distances, and triggering sequences using the controlled variable method. After repeated tests, the optimal parameter configuration of the dual-camera system was finally determined (see Table 1). This configuration not only meets the detection requirements of sand particles of different sizes but also significantly improves the accuracy and repeatability of the gradation analysis results.
[0093] Table 1 Imaging module parameter settings
[0094]
[0095]
[0096] S2: Based on the S1 framework, a segmentation algorithm based on morphological operations and improved convex defect analysis is proposed. By dynamically adjusting the shape factor threshold, the adhering particles are adaptively split, that is, block adaptive threshold segmentation and adhesion segmentation are adopted.
[0097] S3: Construct a dual-camera collaborative imaging architecture that combines global wide-angle and local macro, and introduce volume distribution weighted fusion technology. This not only takes into account the large field of view and fine particle detection accuracy, but also maintains high accuracy of gradation detection while reducing the number of samples. That is, build a particle size classification and dual-view compensation mechanism, and optimize the mechanism by building a corresponding optimization objective function. After iterative solution, the weight vector that minimizes SSE is finally obtained, which is used to accurately correct the global volume distribution.
[0098] The background complexity of sand grain images and the unevenness of the lighting equipment directly affect the extraction of particle contours, especially in non-ideal acquisition environments where images are often accompanied by obvious texture interference, uneven brightness, or sensor noise. For microparticles with a diameter of less than 0.15 mm, their edge signals are easily submerged by the background due to weak brightness and low contrast, making effective separation impossible. Traditional single-frame global thresholding methods are particularly unstable in such scenarios, failing to adapt to local brightness changes in the image and struggling to reliably preserve the boundary features of fine particles.
[0099] To address the above issues, a block-based adaptive threshold segmentation method is proposed.
[0100] Block-based adaptive thresholding segmentation employs a background removal strategy that combines multi-frame background modeling with local block adaptive thresholding. The core idea is to first extract stable background components through multi-frame image fusion and then eliminate them.
[0101] The image is then divided into several local blocks. For the (i,j)th sub-block, its grayscale mode T is calculated. i,j This serves as a local threshold, which is then used to binarize the block.
[0102] Where (x,y)∈B i,j
[0103] Among them, S i,j (x, y) is a local binarization result, processed for a local region (x, y) in the image; the binarization of each local region is based on a local threshold T. i,j The comparison is performed using +Δ, where I(x,y) is the grayscale value at that location. If the grayscale value is greater than a threshold plus a certain offset Δ, the binarization result at that location is 255, i.e., white; otherwise, it is 0, i.e., black. This process is performed in each local region B of the image. i,j The binarization process is performed within ψ; finally, these locally binarized results are stitched together to form a complete binary image, thereby improving the detection accuracy of fine particles in complex backgrounds and effectively enhancing the detection accuracy of fine particles in complex backgrounds.
[0104] In sand grain images, incomplete boundaries and grain adhesion are common problems, posing a challenge to accurate identification. Therefore, adhesion segmentation is employed. Adhesion segmentation is a multi-stage progressive algorithm for sand grain contour processing and segmentation, capable of accurately separating complex adhesions while preserving valid particles. (See [link to relevant documentation]). Figure 2 ;
[0105] For sand grains with non-closed contours at the image edge, the minimum bounding rectangle of each connected component is first obtained. The integrity of the grain contour is determined based on the contact between the rectangle and the image boundary. Incomplete grains are excluded in the binary mask. This ensures that subsequent contour extraction and shape analysis are performed only on complete closed sand grains, effectively avoiding interference from missing boundaries on the statistical results.
[0106] In sand grain image analysis, accurately distinguishing between individual particles and aggregates is a crucial step;
[0107] During the determination phase, three types of geometric features are first calculated for each connected component contour: equivalent diameter, shape factor, and density.
[0108] The equivalent diameter is defined as the horizontal width w of the smallest bounding rectangle of the profile, which is the number of pixels multiplied by the pixel value obtained from camera calibration – the physical size conversion factor mm_per_pixel, which is millimeters per pixel.
[0109] d = w × mm_per_pixel
[0110] The shape factor is defined as the ratio of the projected area of the particle profile to the square of the profile perimeter:
[0111]
[0112] Where A is the outline projection area, which can be converted from the number of pixels to square millimeters; P 2 The pixel length is also converted to millimeters for the perimeter of the outline; when a single particle is approximately circular, SF approaches 1, while it will decrease significantly for aggregates or complex shapes.
[0113] Solidity is defined as the ratio of the particle profile area to its convex hull area, and is used to measure the compactness of the profile.
[0114]
[0115] The aforementioned geometric indicators can serve as a preliminary basis for distinguishing between independent particles and aggregates;
[0116] Next, the algorithm adaptively determines two threshold curves based on the equivalent diameter, corresponding to the thresholds for shape factor and density, respectively:
[0117] T s=max(0.6,0.8-0.05d)
[0118] T d =max(0.85,0.95-0.05d)
[0119] When a certain contour simultaneously meets the above two criteria, namely, both the shape factor and density are below the threshold, it can be considered that its shape has deviated from the rounded and dense characteristics that a single particle should have.
[0120] In addition, to prevent some adhesions that show signs of separation but do not exceed the limits in shape indexing by relying solely on threshold judgment, the algorithm adds convex hull defect analysis in the judgment stage.
[0121] First, extract all the concave points of the contour and compare the depth of each pair of concave points (i.e., their minimum distance from the convex hull, the point spacing, and the local angle) with an empirical threshold. Only when at least one pair of concave points simultaneously meets the three conditions of depth greater than the threshold (excluding minor surface concave points), spacing greater than the minimum segmentation width (0.075mm), and angle less than the preset value, is the contour classified as "adhesive".
[0122] Ultimately, if any branch of a connected region is determined to be adhered in the geometric threshold criterion or convex point defect analysis, it is identified as an adhered particle and enters the subsequent segmentation process.
[0123] The remaining connected regions are treated as independent and complete sand grains, and used for subsequent statistical calculations of grain size and shape.
[0124] For contours initially identified as "adhesive", a concave point detection strategy based on triple physical constraints was used for fine segmentation.
[0125] First, all potential depressions are extracted using convex hull defect analysis. Then, these depressions are filtered based on three constraints: depth, spacing, and angle.
[0126] Only when the depth of the depression exceeds the set threshold (excluding minor surface depressions), the distance between any two depressions is greater than the minimum segmentation width (0.075mm), and the included angle of the local contour corresponding to the depression is less than the empirical threshold, will the pair of depressions be considered as valid segmentation points.
[0127] After obtaining the effective concave point pairs after filtering, the algorithm constructs a Euclidean distance matrix, prioritizes selecting the pair of concave points that are closest to each other and meet the constraints, and cuts the adhesive contour along the line connecting the two points.
[0128] After cutting, the same process is repeated on the sub-contours, recursively performing the segmentation until the sub-contour size is smaller than the minimum particle diameter, the aspect ratio returns to the normal range, or there are no more effective concave points.
[0129] This recursive segmentation process can efficiently remove connectivity and common boundaries between adhering particles, achieving accurate splitting and complete extraction of adhering particles. For example... Figure 3 As shown, after processing by this algorithm, whether it is two particles or multiple particles stuck together, the boundaries of each particle can be clearly separated while maintaining the integrity of the shape.
[0130] The accuracy of sand particle size distribution analysis depends on the precise division of particle size ranges. Traditional sieving methods rely on sieve aperture size. The particle size range is defined with clear criteria. However, in image processing, if this physical range is directly mapped to the image scale using a pixel-to-millimeter conversion, factors such as irregular particle shapes and differences in shooting angles can easily cause the Feret minor axis of some particles to deviate from the true particle size range, leading to misjudgments.
[0131] See Figure 4 In the design of particle size classification, to improve the robustness of particle size division, for each preset particle size interval D... i (e.g., [0.075, 0.15] mm, [0.15, 0.3] mm…[2.36, 4.75] mm) Single-gradation tests were conducted to extract the Feret short diameter sample set {x i,j The least squares method was used to fit the corresponding normal distribution to characterize the typical Feret feature distribution of each particle size range at the image scale.
[0132]
[0133] Where, x i,j This refers to the particle size value of a certain particle within particle size range i. Here, the subscript i represents the particle size range, and j represents the particle number within that range. This indicates that the particle size follows a mean of μ. i The variance is The normal distribution (Gaussian distribution) of μ; here μ i It is the mean value of particle size interval i. It is the variance of that interval;
[0134] After fitting, the Feret short axis distribution parameters for each particle size range can be obtained, including the mean μ. i With standard deviation σ i Based on these statistical characteristics, further analysis was conducted on each pair of adjacent particle size intervals D. i and D i+1 Construct its corresponding normal probability density function for subsequent boundary judgment and fuzzy interval discrimination modeling:
[0135]
[0136] fi (x * )=f i+1 (x * )
[0137] Where x is the particle size value to be evaluated; exp is an exponential function;
[0138] f is solved using numerical methods. i (x * )=f i+1 (x * This allows us to obtain the probability density equilibrium point of the two distributions. This equilibrium point, statistically speaking, corresponds to the optimal threshold that minimizes the misclassification rate of particles within the overlapping interval.
[0139] Finally, by combining all intersections Arranged in order, and combined with the physical minimum and maximum values of the upper and lower limits, a complete list of particle size division intervals can be generated:
[0140] In image measurement, accurately mapping the particle size in a local image to the global coordinate system requires considering the geometric characteristics of the camera imaging system. Different cameras, due to differences in pixel size, sensor arrangement, and lens field of view, may exhibit non-uniform scaling during the imaging process. This non-uniformity is not only reflected in the overall magnification ratio but may also manifest as different scaling ratios in the horizontal and vertical directions. Therefore, simply using focal length ratios or empirical coefficients for correction may not accurately compensate for this direction-dependent geometric distortion. To address this, a dual-viewpoint compensation mechanism is employed.
[0141] The dual-view compensation mechanism introduces horizontal and vertical scaling factors k. h and k v ;
[0142] These two coefficients represent the proportional relationship between the physical pixel size in the horizontal and vertical directions of the local image and the global coordinate system, respectively. In many industrial cameras, due to the fact that the aspect ratio of pixels is not strictly equal, coupled with the influence of lens distortion or sensor arrangement, there is orientation-dependent geometric distortion during the imaging process.
[0143] For a local camera, its field of view width W l With height W l The corresponding pixel resolution is N l,x With N l,y Then the physical size of a unit pixel of the local camera in the horizontal and vertical directions can be expressed as:
[0144]
[0145] The global camera's field of view is W in width and height. g and H g The pixel resolution is N g,x ×N g,y The unit pixel size corresponding to the global camera is:
[0146]
[0147] Based on the above results, the scaling factors for the horizontal and vertical directions are:
[0148]
[0149] After determining the horizontal and vertical scaling factors, it is necessary to further consider the influence of the azimuth angle θ of the particles in the image plane on the measurement results.
[0150] According to the principles of geometric optics, when the observation direction is not aligned with the long axis of the particle, its projected length will vary in different directions.
[0151] Therefore, the locally measured Feret minor diameter L is obtained by applying the following nonlinear mapping. l Precisely mapped to the global coordinate system:
[0152]
[0153] When the azimuth angle θ of the particles is unmeasurable, the above expression can be integrally averaged over the interval [0,π] to obtain an unbiased statistical scaling factor:
[0154]
[0155] Through the average scaling factor Adjust the original length L l The new length obtained;
[0156] After completing the consistent mapping of the length dimension, the adjustment of the projected area follows the rules of two-dimensional measurement, requiring only the multiplication of the horizontal and vertical scale coefficients:
[0157] k A =k h k v
[0158] The locally measured particle pixel area A is then calculated using the following formula. local By switching to a global perspective, area conservation and directional bias are ensured:
[0159]
[0160] To unify the grain size data scale between local macro cameras (<0.3mm) and global wide-angle cameras, the data needs to be scaled according to the physical area ratio of their respective fields of view:
[0161]
[0162] The overall replacement formula is obtained as follows:
[0163]
[0164] This linear replacement strategy is based on a key point: the original particle size of sand is randomly distributed in the overall sample, and after being fully dispersed by the vibrating disk, the particle size distribution in each local acquisition area can be regarded as being basically consistent with the overall distribution. Because of this, the total area of fine particles measured in the local area can be linearly amplified according to the ratio of the physical area of the global and local fields of view without introducing deviation, thereby realizing the replacement of the area of small particles in the global image.
[0165] After replacing the area of the fine-particle region, to maintain the comparability of the overall volume distribution, the total volume of each particle size range needs to be renormalized. Let the volume of each particle size range after replacement compensation be v'. i The formula for calculating its normalized proportion is as follows:
[0166] The normalization operation ensures that the sum of the volume percentages of all particle size ranges is 100%, laying the foundation for subsequent alignment with the results of the sieving method.
[0167] However, due to the differences in imaging principles and scale sampling between local and global cameras, as well as the limitations of local coverage during the substitution process, the measurement results of the image method in each particle size range may still have systematic biases. In order to further improve the accuracy of the substitution data, a weighted optimization strategy based on volume ratio correction is introduced to finely adjust the volume distribution of the image method by fitting it with the results of the sieving method.
[0168] The normalized volume distribution obtained by the image method forms the feature matrix X, and the corresponding measured result by the sieving method is Y. The goal is to minimize the sum of squared residuals between the two by introducing a weight vector w to perform weighted correction on each particle size interval. The optimization objective function is defined as follows:
[0169]
[0170] Among them, X j Y represents the normalized volume distribution of the j-th particle size range; j The corresponding sieve method is the true value; the weight vector is updated iteratively using the BFGS quasi-Newton algorithm, with an all-1 vector as the initial value;
[0171] By utilizing the second-order information of the objective function approximated by the current gradient, efficient second-order convergence is achieved. Through iterative solution, the weight vector that minimizes SSE is finally obtained, which is used to accurately correct the global volume distribution.
[0172] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
Claims
1. A rapid detection method for sand particle size distribution based on dual-camera fusion, characterized in that: At least the following steps are included: S1: Build the hardware architecture, iteratively upgrade the existing gradation detection system, and focus on innovative optimization of the dual-camera collaborative imaging module and the pneumatic sand removal module. S2: Based on the S1 framework, a segmentation algorithm based on morphological operations and improved convex defect analysis is proposed. By dynamically adjusting the shape factor threshold, the adhering particles are adaptively split, that is, block adaptive threshold segmentation and adhesion segmentation are adopted. S3: Construct a dual-camera collaborative imaging architecture that combines global wide-angle and local macro, and introduce volume distribution weighted fusion technology. This not only takes into account the large field of view and fine particle detection accuracy, but also maintains high accuracy of gradation detection while reducing the number of samples. That is, build a particle size classification and dual-view compensation mechanism, and optimize the mechanism by building a corresponding optimization objective function. After iterative solution, the weight vector that minimizes SSE is finally obtained, which is used to accurately correct the global volume distribution.
2. The rapid detection method for sand particle size distribution based on dual-camera fusion according to claim 1, characterized in that: The block adaptive threshold segmentation adopts a background removal strategy that combines multi-frame background modeling and local block adaptive thresholding. The core idea is to first extract stable background components through multi-frame image fusion and then eliminate them. The image is then divided into several local blocks. For the (i,j)th sub-block, its grayscale mode T is calculated. i,j This serves as a local threshold, which is then used to binarize the block. Where (x,y)∈B i,j Among them, S i,j (x, y) is a local binarization result, processed for a local region (x, y) in the image; the binarization of each local region is based on a local threshold T. i,j The comparison is performed using +Δ, where I(x,y) is the grayscale value at that location. If the grayscale value is greater than a threshold plus a certain offset Δ, the binarization result at that location is 255, i.e., white; otherwise, it is 0, i.e., black. This process is performed in each local region B of the image. i,j The binarization process is performed within ψ; finally, these locally binarized results are stitched together to form a complete binary image, thereby improving the detection accuracy of fine particles in complex backgrounds.
3. The rapid detection method for sand particle size distribution based on dual-camera fusion according to claim 1, characterized in that: The adhesion segmentation is a multi-stage progressive sand grain contour processing and segmentation algorithm, which can accurately separate complex adhesions while retaining effective particles; For sand grains with non-closed contours at the image edge, the minimum bounding rectangle of each connected component is first obtained. The integrity of the grain contour is determined based on the contact between the rectangle and the image boundary. Incomplete grains are excluded in the binary mask. This ensures that subsequent contour extraction and shape analysis are performed only on complete closed sand grains, effectively avoiding interference from missing boundaries on the statistical results. In sand grain image analysis, accurately distinguishing between individual particles and aggregates is a crucial step; During the determination phase, three types of geometric features are first calculated for each connected component contour: equivalent diameter, shape factor, and density. The equivalent diameter is defined as the horizontal width w of the smallest bounding rectangle of the profile, which is the number of pixels multiplied by the pixel value obtained from camera calibration – the physical size conversion factor mm_per_pixel, which is millimeters per pixel. d = w × mm_per_pixel The shape factor is defined as the ratio of the projected area of the particle profile to the square of the profile perimeter: Where A is the outline projection area, which can be converted from the number of pixels to square millimeters; P 2 The pixel length is also converted to millimeters for the perimeter of the outline; when a single particle is approximately circular, SF approaches 1, while it will decrease significantly for aggregates or complex shapes. Solidity is defined as the ratio of the particle profile area to its convex hull area, and is used to measure the compactness of the profile. The aforementioned geometric indicators can serve as a preliminary basis for distinguishing between independent particles and aggregates; Next, the algorithm adaptively determines two threshold curves based on the equivalent diameter, corresponding to the thresholds for shape factor and density, respectively: T s =max(0.6,0.8-0.05d) T d =max(0.85,0.95-0.05d) When a certain contour simultaneously meets the above two criteria, namely, both the shape factor and density are below the threshold, it can be considered that its shape has deviated from the rounded and dense characteristics that a single particle should have. In addition, to prevent some adhesions that show signs of separation but do not exceed the limits in shape indexing by relying solely on threshold judgment, the algorithm adds convex hull defect analysis in the judgment stage. First, extract all the concave points of the contour and compare the depth of each pair of concave points (i.e., their minimum distance from the convex hull, the point spacing, and the local angle) with an empirical threshold. Only when at least one pair of concave points simultaneously meets the three conditions of depth greater than the threshold, spacing greater than the minimum segmentation width, and angle less than the preset value, is the contour classified into the "adhesive" category. Ultimately, if any branch of a connected region is determined to be adhered in the geometric threshold criterion or convex point defect analysis, it is identified as an adhered particle and enters the subsequent segmentation process. The remaining connected regions are treated as independent and complete sand grains, and used for subsequent statistical calculations of grain size and shape.
4. The rapid detection method for sand particle size distribution based on dual-camera fusion according to claim 2, characterized in that: For contours initially identified as "adhesive", a concave point detection strategy based on triple physical constraints was used for fine segmentation. First, all potential depressions are extracted using convex hull defect analysis. Then, these depressions are filtered based on three constraints: depth, spacing, and angle. Only when the depth of the depression exceeds the set threshold, the distance between any two depressions is greater than the minimum segmentation width, and the included angle of the local contour corresponding to the depression is less than the empirical threshold, will the pair of depressions be considered as valid segmentation points. After obtaining the effective concave point pairs after filtering, the algorithm constructs a Euclidean distance matrix, prioritizes selecting the pair of concave points that are closest to each other and meet the constraints, and cuts the adhesive contour along the line connecting the two points. After cutting, the same process is repeated on the sub-contours, recursively performing the segmentation until the sub-contour size is smaller than the minimum particle diameter, the aspect ratio returns to the normal range, or there are no more effective concave points. This recursive segmentation process can efficiently remove connectivity and common boundaries between adhering particles, achieving accurate splitting and complete extraction of adhering particles.
5. The rapid detection method for sand particle size distribution based on dual-camera fusion according to claim 1, characterized in that: In the design of the particle size classification, to improve the robustness of the particle size division, for each preset particle size interval D... i A single-gradation test was conducted to extract its Feret short diameter sample set {x}. i,j The least squares method was used to fit the corresponding normal distribution to characterize the typical Feret feature distribution of each particle size range at the image scale. Where, x i,j This refers to the particle size value of a certain particle within particle size range i. Here, the subscript i represents the particle size range, and j represents the particle number within that range. This indicates that the particle size follows a mean of μ. i The variance is The normal distribution; here μ i It is the mean value of particle size interval i. It is the variance of that interval; After fitting, the Feret short axis distribution parameters for each particle size range can be obtained, including the mean μ. i With standard deviation σ i Based on these statistical characteristics, further analysis was conducted on each pair of adjacent particle size intervals D. i and D i+1 Construct its corresponding normal probability density function for subsequent boundary judgment and fuzzy interval discrimination modeling: f i (x * )=f i+1 (x * ) Where x is the particle size value to be evaluated; exp is an exponential function; f is solved using numerical methods. i (x * )=f i+1 (x * This allows us to obtain the probability density equilibrium point of the two distributions. This equilibrium point, statistically speaking, corresponds to the optimal threshold that minimizes the misclassification rate of particles within the overlapping interval. Finally, by combining all intersections Arranged in order, and combined with the physical minimum and maximum values of the upper and lower limits, a complete list of particle size division intervals can be generated:
6. The rapid detection method for sand particle size distribution based on dual-camera fusion according to claim 1, characterized in that: The dual-view compensation mechanism introduces horizontal and vertical scaling factors k. h and k v ; These two coefficients represent the proportional relationship between the physical pixel size of the local image in the horizontal and vertical directions and the global coordinate system, respectively; For a local camera, its field of view width W l With height W l The corresponding pixel resolution is N l,x With N l,y Then the physical size of a unit pixel of the local camera in the horizontal and vertical directions can be expressed as: The global camera's field of view is W in width and height. g and H g The pixel resolution is N g,x ×N g,y The unit pixel size corresponding to the global camera is: Based on the above results, the scaling factors for the horizontal and vertical directions are: After determining the horizontal and vertical scaling factors, it is necessary to further consider the influence of the azimuth angle θ of the particles in the image plane on the measurement results. According to the principles of geometric optics, when the observation direction is not aligned with the long axis of the particle, its projected length will vary in different directions. Therefore, the locally measured Feret minor diameter L is obtained by applying the following nonlinear mapping. l Precisely mapped to the global coordinate system: When the azimuth angle θ of the particles is unmeasurable, the above expression can be integrally averaged over the interval [0,π] to obtain an unbiased statistical scaling factor: Through the average scaling factor Adjust the original length L l The new length obtained; After completing the consistent mapping of the length dimension, the adjustment of the projected area follows the rules of two-dimensional measurement, requiring only the multiplication of the horizontal and vertical scale coefficients: k A =k h k v The locally measured particle pixel area A is then calculated using the following formula. local By switching to a global perspective, area conservation and directional bias are ensured: To unify the grain size data scale between local macro cameras and global wide-angle cameras, the data needs to be scaled according to the physical area ratio of their respective fields of view: The overall replacement formula is obtained as follows: This linear replacement strategy is based on a key point: the original particle size of sand is randomly distributed in the overall sample, and after being fully dispersed by the vibrating disk, the particle size distribution in each local acquisition area can be regarded as being basically consistent with the overall distribution. Because of this, the total area of fine particles measured in the local area can be linearly amplified according to the ratio of the physical area of the global and local fields of view without introducing deviation, thereby realizing the replacement of the area of small particles in the global image. After replacing the area of the fine-particle region, to maintain the comparability of the overall volume distribution, the total volume of each particle size range needs to be renormalized. Let the volume of each particle size range after replacement compensation be v. ' i The formula for calculating its normalized proportion is as follows:
7. The rapid detection method for sand particle size distribution based on dual-camera fusion according to claim 6, characterized in that: The normalization operation ensures that the sum of the volume percentages of all particle size ranges is 100%, laying the foundation for subsequent alignment with the results of the sieving method. However, due to the differences in imaging principles and scale sampling between local and global cameras, as well as the limitations of local coverage during the substitution process, the measurement results of the image method in each particle size range may still have systematic biases. In order to further improve the accuracy of the substitution data, a weighted optimization strategy based on volume ratio correction is introduced to finely adjust the volume distribution of the image method by fitting it with the results of the sieving method. The normalized volume distribution obtained by the image method forms the feature matrix X, and the corresponding measured result by the sieving method is Y. The goal is to minimize the sum of squared residuals between the two by introducing a weight vector w to perform weighted correction on each particle size interval. The optimization objective function is defined as follows: Among them, X j Y represents the normalized volume distribution of the j-th particle size range; j The corresponding sieve method is the true value; the weight vector is updated iteratively using the BFGS quasi-Newton algorithm, with an all-1 vector as the initial value; By utilizing the second-order information of the objective function approximated by the current gradient, efficient second-order convergence is achieved. Through iterative solution, the weight vector that minimizes SSE is finally obtained, which is used to accurately correct the global volume distribution.
Citation Information
Cited By
Multi-objective calculation method for grading optimization of solid waste-containing aggregate slurry
CN121708251A