A method for segmenting rock adhesion particles
Through the adaptive threshold method and the judgment of segmented smooth area ratio and curvature threshold, the segmentation line is formed by using concave point matching to solve the problem of segmentation of adhesion particles in the rock flake image, and accurate particle segmentation is achieved, avoiding oversegment, and is suitable for rock mineral component analysis.
Patent Information
- Application Number
- CN202210945422.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-08
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2042-08-08
AI Technical Summary
The prior art cannot effectively segment the adhesion particles appearing in rock flake images, affecting the accuracy of subsequent rock ore components and content determination, lithology description and flake naming.
After the binarization process is performed by the adaptive threshold method, the adhesion particles are judged by segmented smoothing the contours of the rock particles, combining the area ratio and curvature threshold, and the concave point matching is used to form a segmentation line for segmentation.
The disadvantages of strict requirements for concave points in the prior art are effectively overcome, over-division of non-adhesive particles is avoided, and the reasonable division of concave rock particles is achieved, and the basic shape of the outline and important concave point information are maintained.
Smart Images

Figure CN115527038B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of rock particle image segmentation, and in particular to a rock adhesion particle segmentation method. Background Art
[0002] Rock grain segmentation involves separating each mineral grain in a rock thin section image into a single, independent region. This provides the foundation for subsequent identification and analysis, including determination of rock and mineral composition and content, lithologic description, and thin section naming. Therefore, grain segmentation is a crucial foundational task. However, due to the complexity of strata and the diversity of diagenesis, grain adhesion often occurs in rock thin section images. Failure to accurately segment these adherent particles can negatively impact the accuracy of identification and analysis, including determination of rock and mineral composition and content, lithologic description, and thin section naming. However, due to the fuzzy edges and surface cleavage of rock mineral grains, traditional methods and deep learning-based approaches cannot directly achieve segmentation. Summary of the Invention
[0003] In view of the above-mentioned deficiencies in the prior art, the present invention provides a method for segmenting rock adhesion particles, which solves the problem of difficulty in segmenting rock adhesion particles.
[0004] In order to achieve the above-mentioned object of the invention, the technical solution adopted by the present invention is:
[0005] A method for segmenting rock adhesion particles is provided, which comprises the following steps:
[0006] S1, collecting the original image and binarizing it to obtain a binarized image;
[0007] S2, obtaining and performing segmented smoothing on the initial contours of the rock particles in the binary image to obtain smoothed contours of the rock particles;
[0008] S3. Calculate the rock particle area based on the smoothed rock particle contours;
[0009] S4, determining whether the ratio of the area of the rock particle to the area of the circumscribed convex hull is greater than an area ratio threshold; if so, the rock particle is determined to be a non-adhesive particle; otherwise, proceeding to step S5;
[0010] S5, calculating the curvature of each point on the smoothed rock particle contour, and taking the point whose curvature is less than the curvature threshold as a concave point;
[0011] S6, determining whether the number of concave points in the same smoothed rock particle contour is greater than or equal to a threshold value; if so, the rock particle is determined to be an adhesion particle, and the process proceeds to step S7; otherwise, the rock particle is determined to be a non-adhesion particle;
[0012] S7. A segmentation line is formed by matching the concave point pairs, and the segmentation line is used to segment the rock adhesion particles.
[0013] Furthermore, the specific method of step S1 is:
[0014] The original image is collected and binarized using the adaptive threshold method to segment the image into rock particles and background to obtain a binary image.
[0015] Furthermore, the specific method of step S2 includes the following sub-steps:
[0016] S2-1. Find the initial contours of rock particles based on the binary image;
[0017] S2-2, segmenting the point set of the initial contour and obtaining the minimum circumscribed rectangle of the coordinate point set of each segment;
[0018] S2-3. Determine whether the long side of the current minimum bounding rectangle meets the size threshold. If so, proceed directly to step S2-4. Otherwise, add the next segment of coordinate point set to the current coordinate point set until the long side of the minimum bounding rectangle meets the size threshold, and then proceed to step S2-4.
[0019] S2-4. The midpoint of the line connecting the midpoints of the short sides of two adjacent minimum circumscribed rectangles is used as the vertex of the post-sliding contour, and the vertices of a pair of adjacent and closest smoothed contours are connected to obtain the smoothed rock particle contour.
[0020] Furthermore, the specific method for segmenting the point set of the initial contour in step S2-2 is:
[0021] The segment is divided into segments with a length of 20 consecutive coordinate points, so that the coordinate point set of each segment contains 20 coordinate points.
[0022] Furthermore, the size threshold in step S2-3 is 50 pixels.
[0023] Furthermore, the area ratio threshold in step S4 is 0.9.
[0024] Furthermore, the specific method of step S5 includes the following sub-steps:
[0025] S5-1. Calculate the curvature of each point on the smoothed rock particle contour, and obtain the mean value and standard deviation of the curvature of all points.
[0026] S5-2, according to the formula:
[0027] q = mean - 2 × std
[0028] Get the curvature threshold q;
[0029] S5-3. The points whose curvature is less than the curvature threshold q are regarded as concave points.
[0030] Furthermore, the quantity threshold in step S6 is 2.
[0031] Furthermore, the specific method of step S7 includes the following sub-steps:
[0032] S7-1, constructing a minimum circumscribed polygon of rock particles, calculating the minimum value of the edge contour of the minimum circumscribed polygon from each concave point to the rock particle where it is located, and using the minimum value as the concave depth of the corresponding concave point;
[0033] S7-2, according to the formula:
[0034]
[0035] Get the depression depth threshold a; where n is the number of depression points on the same smoothed rock particle contour; d i represents the depth of the concave point i of the same smoothed rock particle profile;
[0036] S7-3, deleting the concave points on the same smoothed rock particle contour whose concave depth is less than the concave depth threshold a;
[0037] S7-4, determining whether the number of current concave points of the smoothed rock particle contour is less than or equal to 1, if so, determining that the rock particle is a non-adhesive particle; otherwise, determining that it is an adhesive particle, and proceeding to step S7-5;
[0038] S7-5. Calculate the curvature vectors of the remaining concave points and the angle between the curvature vectors of any two concave points to obtain an angle matrix.
[0039] S7-6, calculate the distance between each pair of concave points to obtain a distance matrix;
[0040] S7-7. Concatenate the angle matrix and the distance matrix to obtain the concatenated matrix:
[0041]
[0042] Among them D jk is the element in the jth row and kth column of the distance matrix; A jk is the element in the jth row and kth column of the angle matrix; n * is the number of remaining concave points on the same smoothed rock particle contour; D jk ,A jk Together they form an element of the concatenated matrix;
[0043] S7-8, take out the upper triangular matrix in the concatenated matrix, delete D in the upper triangular matrix jk and A jkFor the elements that are all 0, arrange the remaining elements according to the elements originally belonging to the distance matrix into the first column, and arrange the remaining elements according to the elements originally belonging to the angle matrix into the second column, and obtain the matrix DA;
[0044] S7-9, normalize the matrix DA to obtain a normalized matrix; the element of the f-th row in the normalized matrix corresponds to the f-th concave point pair;
[0045] S7-10. Calculate the eigenvalues and eigenvectors of the covariance matrix of the standardized matrix;
[0046] S7-11, according to the formula:
[0047]
[0048] Get the eigenvalue λ of the covariance matrix l Information contribution rate b l ; where λ r represents the rth eigenvalue of the covariance matrix; l=1,2;λ1≥λ2≥0;
[0049] S7-12, according to the formula:
[0050]
[0051] The eigenvectors of the covariance matrix form two indicator variables corresponding to the f-th concave point pair and where u 11 Represents the first element in the first eigenvector of the covariance matrix; u 12 Represents the second element in the first eigenvector of the covariance matrix; u 21 Represents the first element of the second eigenvector of the covariance matrix; u 22 Represents the second element in the second eigenvector of the covariance matrix; Represents the element in the fth row and first column of the standardized matrix; Represents the element in the fth row and second column of the standardized matrix;
[0052] S7-13, according to the formula:
[0053]
[0054] Get the comprehensive score Z of the f-th concave point pair f ;
[0055] S7-14, matching the pair of concave points with the highest comprehensive score, and deleting the matched concave points;
[0056] S7-15. Repeat steps S7-5 to S7-14 until no matching concave points are obtained, connect the matched concave points to obtain a segmentation line, and use the segmentation line to segment the rock adhesion particles.
[0057] Furthermore, in step S7-5, the curvature vector of the concave point is equal to the curvature of the concave point multiplied by the normal vector of the concave point.
[0058] The present invention provides the following beneficial effects: The contour smoothing method proposed in this method can represent the basic shape of the contour without losing important concave point information. This method effectively overcomes the shortcomings of existing technologies that require strict concave points and avoids over-segmentation of non-cohesive particles. This method can achieve reasonable and effective segmentation of cohesive rock particle images and has broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 Schematic diagram of the process of this method;
[0060] Figure 2 Generate an example diagram for the minimum bounding rectangle in the embodiment;
[0061] Figure 3 A schematic diagram of connecting vertices of a smoothed contour in an embodiment;
[0062] Figure 4 is the initial outline of rock particles;
[0063] Figure 5 This is the outline of the rock particles after smoothing;
[0064] Figure 6 is a curvature curve diagram of the smoothed rock particle profile in the embodiment;
[0065] Figure 7 Schematic diagram of concave points found by curvature;
[0066] Figure 8 is a schematic diagram of the curvature vector;
[0067] Figure 9 is a segmentation example diagram; Figure 9 (a) is a schematic diagram of connecting matching concave point pairs to form a segmentation line; Figure 9 (b) is a schematic diagram of the segmentation results. DETAILED DESCRIPTION
[0068] The specific embodiments of the present invention are described below to facilitate understanding of the present invention by those skilled in the art. However, it should be clear that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the appended claims, these changes are obvious, and all inventions and creations utilizing the concepts of the present invention are protected.
[0069] like Figure 1 As shown, the rock adhesion particle segmentation method includes the following steps:
[0070] S1, collecting the original image and binarizing it to obtain a binarized image;
[0071] S2, obtaining and performing segmented smoothing on the initial contours of the rock particles in the binary image to obtain smoothed contours of the rock particles;
[0072] S3. Calculate the rock particle area based on the smoothed rock particle contours;
[0073] S4, determining whether the ratio of the area of the rock particle to the area of the circumscribed convex hull is greater than an area ratio threshold; if so, the rock particle is determined to be a non-adhesive particle; otherwise, proceeding to step S5;
[0074] S5, calculating the curvature of each point on the smoothed rock particle contour, and taking the point whose curvature is less than the curvature threshold as a concave point;
[0075] S6, determining whether the number of concave points in the same smoothed rock particle contour is greater than or equal to a threshold value; if so, the rock particle is determined to be an adhesion particle, and the process proceeds to step S7; otherwise, the rock particle is determined to be a non-adhesion particle;
[0076] S7. A segmentation line is formed by matching the concave point pairs, and the segmentation line is used to segment the rock adhesion particles.
[0077] The specific method of step S1 is: collecting the original image and using the adaptive threshold method to binarize the image into rock particles and background to obtain a binary image.
[0078] The specific method of step S2 includes the following sub-steps:
[0079] S2-1. Find the initial contours of rock particles based on the binary image;
[0080] S2-2, segmenting the point set of the initial contour and obtaining the minimum circumscribed rectangle of the coordinate point set of each segment;
[0081] S2-3. Determine whether the long side of the current minimum bounding rectangle meets the size threshold. If so, proceed directly to step S2-4. Otherwise, add the next segment of coordinate point set to the current coordinate point set until the long side of the minimum bounding rectangle meets the size threshold, and then proceed to step S2-4.
[0082] S2-4. The midpoint of the line connecting the midpoints of the short sides of two adjacent minimum circumscribed rectangles is used as the vertex of the post-sliding contour, and the vertices of a pair of adjacent and closest smoothed contours are connected to obtain the smoothed rock particle contour.
[0083] The specific method of segmenting the point set of the initial contour in step S2-2 is: segmenting with a length of 20 consecutive coordinate points, so that the coordinate point set of each segment contains 20 coordinate points.
[0084] The specific method of step S5 includes the following sub-steps:
[0085] S5-1. Calculate the curvature of each point on the smoothed rock particle contour, and obtain the mean value and standard deviation of the curvature of all points.
[0086] S5-2, according to the formula:
[0087] q = mean - 2 × std
[0088] Get the curvature threshold q;
[0089] S5-3. The points whose curvature is less than the curvature threshold q are regarded as concave points.
[0090] The specific method of step S7 includes the following sub-steps:
[0091] S7-1, constructing a minimum circumscribed polygon of rock particles, calculating the minimum value of the edge contour of the minimum circumscribed polygon from each concave point to the rock particle where it is located, and using the minimum value as the concave depth of the corresponding concave point;
[0092] S7-2, according to the formula:
[0093]
[0094] Get the depression depth threshold a; where n is the number of depression points on the same smoothed rock particle contour; d i represents the depth of the concave point i of the same smoothed rock particle profile;
[0095] S7-3, deleting the concave points on the same smoothed rock particle contour whose concave depth is less than the concave depth threshold a;
[0096] S7-4, determining whether the number of current concave points of the smoothed rock particle contour is less than or equal to 1, if so, determining that the rock particle is a non-adhesive particle; otherwise, determining that it is an adhesive particle, and proceeding to step S7-5;
[0097] S7-5. Calculate the curvature vectors of the remaining concave points and the angle between the curvature vectors of any two concave points to obtain an angle matrix.
[0098] S7-6, calculate the distance between each pair of concave points to obtain a distance matrix;
[0099] S7-7. Concatenate the angle matrix and the distance matrix to obtain the concatenated matrix:
[0100]
[0101] Among them D jk is the element in the jth row and kth column of the distance matrix; A jk is the element in the jth row and kth column of the angle matrix; n * is the number of remaining concave points on the same smoothed rock particle contour; D jk ,A jk Together they form an element of the concatenated matrix;
[0102] S7-8, take out the upper triangular matrix in the concatenated matrix, delete D in the upper triangular matrix jk and A jk For the elements that are all 0, arrange the remaining elements according to the elements originally belonging to the distance matrix into the first column, and arrange the remaining elements according to the elements originally belonging to the angle matrix into the second column, and obtain the matrix DA;
[0103] S7-9, normalize the matrix DA to obtain a normalized matrix; the element of the f-th row in the normalized matrix corresponds to the f-th concave point pair;
[0104] S7-10. Calculate the eigenvalues and eigenvectors of the covariance matrix of the standardized matrix;
[0105] S7-11, according to the formula:
[0106]
[0107] Get the eigenvalue λ of the covariance matrix l Information contribution rate b l ; where λ r represents the rth eigenvalue of the covariance matrix; l=1,2;λ1≥λ2≥0;
[0108] S7-12, according to the formula:
[0109]
[0110] The eigenvectors of the covariance matrix form two indicator variables corresponding to the f-th concave point pair and where u 11 Represents the first element in the first eigenvector of the covariance matrix; u 12 Represents the second element in the first eigenvector of the covariance matrix; u 21 Represents the first element of the second eigenvector of the covariance matrix; u 22 Represents the second element in the second eigenvector of the covariance matrix; Represents the element in the fth row and first column of the standardized matrix; Represents the element in the fth row and second column of the standardized matrix;
[0111] S7-13, according to the formula:
[0112]
[0113] Get the comprehensive score Z of the f-th concave point pair f ;
[0114] S7-14, matching the pair of concave points with the highest comprehensive score, and deleting the matched concave points;
[0115] S7-15. Repeat steps S7-5 to S7-14 until no matching concave points are obtained, connect the matched concave points to obtain a segmentation line, and use the segmentation line to segment the rock adhesion particles.
[0116] In a specific implementation, the size threshold in step S2-3 is 50 pixels. The area ratio threshold in step S4 is 0.9. The quantity threshold in step S6 is 2. The curvature vector of the concave point in step S7-5 is equal to the curvature of the concave point multiplied by the normal vector of the concave point.
[0117] In one embodiment of the present invention, the initial rock particle contour image is as follows: Figure 4 As shown, the minimum bounding rectangle of the local point set is generated as follows Figure 2 As shown, the image after connecting the vertices of the smoothed contour is as follows Figure 3 As shown, and obtained as Figure 5 The smoothed rock particle contour is shown in Figure 2. The obtained point set curvature is as follows: Figure 6 As shown, the concave points found according to the curvature are as follows Figure 7 As shown by the small white dots. Get the curvature vector of the small white dots, and the resulting schematic diagram is as follows Figure 8 The schematic diagram of connecting matching concave point pairs to form a segmentation line is shown in Figure 9 As shown in (a), the results of rock adhesion segmentation based on the segmentation line are as follows: Figure 9 (b) shown.
[0118] The present invention's contour segmentation smoothing method, based on the minimum circumscribed rectangle, is more suitable for contour analysis of rock particle images. Unlike conventional particles like rice grains and cells, which have smooth edges and minimal shape variation, rock particles have rough, uneven edges and numerous small pits. Conventional image contour smoothing methods can still depict contour irregularities and small protrusions in detail, but can easily lead to over-segmentation of non-cohesive particles with multiple small pits. The contour smoothing method proposed in this invention can represent the basic shape of the contour without losing important pit information.
[0119] The method for judging adhered particles based on area ratio and concave point detection proposed in the present invention is supported by statistical knowledge and has a clear mathematical explanation, and fully considers the characteristic of obvious concave spots in the images of adhered particles of rock minerals.
[0120] The concave point matching method proposed in this paper considers the distance and angle between pairs of concave points as feature samples, comprehensively considering these two indicators to achieve effective matching between concave points. This method effectively overcomes the shortcomings of existing technologies that require strict concave points and avoids over-segmentation of non-cohesive particles. This method can achieve reasonable and effective segmentation of cohesive rock particle images and has broad application prospects.
Claims
1. A method for segmenting rock adhesion particles, characterized in that: The following steps are involved: S1, collecting the original image and binarizing it to obtain a binarized image; S2, obtaining and performing segmented smoothing on the initial contours of the rock particles in the binary image to obtain smoothed contours of the rock particles; S3. Calculate the rock particle area based on the smoothed rock particle contours; S4, determining whether the ratio of the area of the rock particle to the area of the circumscribed convex hull is greater than an area ratio threshold; if so, the rock particle is determined to be a non-adhesive particle; otherwise, proceeding to step S5; S5, calculating the curvature of each point on the smoothed rock particle contour, and taking the point whose curvature is less than the curvature threshold as a concave point; S6, determining whether the number of concave points in the same smoothed rock particle contour is greater than or equal to a threshold value; if so, the rock particle is determined to be an adhesion particle, and the process proceeds to step S7; otherwise, the rock particle is determined to be a non-adhesion particle; S7, forming a segmentation line by matching the concave point pairs, and segmenting the rock adhesion particles using the segmentation line; The specific method of step S2 includes the following sub-steps: S2-1. Find the initial contours of rock particles based on the binary image; S2-2, segmenting the point set of the initial contour and obtaining the minimum circumscribed rectangle of the coordinate point set of each segment; S2-3. Determine whether the long side of the current minimum bounding rectangle meets the size threshold. If so, proceed directly to step S2-4. Otherwise, add the next segment of coordinate point set to the current coordinate point set until the long side of the minimum bounding rectangle meets the size threshold, and then proceed to step S2-4. S2-4, taking the midpoint of the line connecting the midpoints of the short sides of two adjacent minimum circumscribed rectangles as the vertex of the post-sliding contour, and connecting the vertices of a pair of adjacent and closest smoothed contours to obtain the smoothed rock particle contour; The specific method for segmenting the point set of the initial contour in step S2-2 is: The segment is divided into segments with a length of 20 consecutive coordinate points, so that the coordinate point set of each segment contains 20 coordinate points.
2. The rock adhesion particle segmentation method according to claim 1, characterized in that: The specific method of step S1 is: The original image is collected and binarized using the adaptive threshold method to segment the image into rock particles and background to obtain a binary image.
3. The rock adhesion particle segmentation method according to claim 1, characterized in that: The size threshold in step S2-3 is 50 pixels.
4. The rock adhesion particle segmentation method according to claim 1, characterized in that: The area ratio threshold in step S4 is 0.
9.
5. The rock adhesion particle segmentation method according to claim 1, characterized in that: The specific method of step S5 includes the following sub-steps: S5-1. Calculate the curvature of each point on the smoothed rock particle contour, and obtain the mean value and standard deviation of the curvature of all points. S5-2, according to the formula: q =mean-2×std Get the curvature threshold q ; S5-3, the curvature is less than the curvature threshold q The points are regarded as concave points.
6. The rock adhesion particle segmentation method according to claim 1, characterized in that: The quantity threshold in step S6 is 2.
7. The rock adhesion particle segmentation method according to claim 1, characterized in that: The specific method of step S7 includes the following sub-steps: S7-1, constructing a minimum circumscribed polygon of rock particles, calculating the minimum value of the edge contour of the minimum circumscribed polygon from each concave point to the rock particle where it is located, and using the minimum value as the concave depth of the corresponding concave point; S7-2, according to the formula: Get the depression depth threshold a ;in n is the number of concave points on the same smoothed rock particle contour; The first i The depth of the depression at each point; S7-3, the concave depth on the same smoothed rock particle contour is less than the concave depth threshold a The concave points are deleted; S7-4, determining whether the number of current concave points of the smoothed rock particle contour is less than or equal to 1, if so, determining that the rock particle is a non-adhesive particle; otherwise, determining that it is an adhesive particle, and proceeding to step S7-5; S7-5. Calculate the curvature vectors of the remaining concave points and the angle between the curvature vectors of any two concave points to obtain an angle matrix. S7-6, calculate the distance between each pair of concave points to obtain a distance matrix; S7-7. Concatenate the angle matrix and the distance matrix to obtain the concatenated matrix: in is the distance matrix j Rank k Elements of the column; is the first j Rank k Elements of the column; is the number of remaining concave points on the same smoothed rock particle contour; Together they form an element of the concatenated matrix; S7-8, take out the upper triangular matrix in the spliced matrix, delete the upper triangular matrix and For the elements that are all 0, arrange the remaining elements according to the elements originally belonging to the distance matrix into the first column, and arrange the remaining elements according to the elements originally belonging to the angle matrix into the second column, and obtain the matrix DA; S7-9, normalize the matrix DA to obtain a normalized matrix; in the normalized matrix, f The elements of the row correspond to f pairs of concave points; S7-10. Calculate the eigenvalues and eigenvectors of the covariance matrix of the standardized matrix; S7-11, according to the formula: Get the eigenvalues of the covariance matrix Information contribution rate ;in represents the covariance matrix r eigenvalues; l =1,2; ; S7-12, according to the formula: The eigenvectors of the covariance matrix form two f The indicator variable corresponding to the concave point pair and ;in Represents the first element in the first eigenvector of the covariance matrix; Represents the second element in the first eigenvector of the covariance matrix; Represents the first element in the second eigenvector of the covariance matrix; Represents the second element in the second eigenvector of the covariance matrix; Indicates the first f The element in row and column 1; Indicates the first f The element in the row and column 2; S7-13, according to the formula: Get the f The comprehensive score of the concave point pairs ; S7-14, matching the pair of concave points with the highest comprehensive score, and deleting the matched concave points; S7-15. Repeat steps S7-5 to S7-14 until no matching concave points are obtained, connect the matched concave points to obtain a segmentation line, and use the segmentation line to segment the rock adhesion particles.
8. The rock adhesion particle segmentation method according to claim 7, characterized in that: In step S7-5, the curvature vector of the concave point is equal to the curvature of the concave point multiplied by the normal vector of the concave point.
Citation Information
Patent Citations
Segmentation method for overlapping rock particle images
CN103942808A
Circular masking-out area rate determination-based adhesive particle image concave point segmentation method
CN106447669A