An image recognition-based iron ore detection method and system
By extracting the gradient direction vector and local curvature value of iron ore particles using image recognition technology, and combining this with grayscale statistical differences to screen for dividing lines, the problem of low accuracy in identifying agglomerated particles was solved, enabling more precise particle size statistics and quality monitoring.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA CERTIFICATION & INSPECTION GRP SHANDONG CO LTD
- Filing Date
- 2026-04-21
- Publication Date
- 2026-07-03
Smart Images

Figure CN122089771B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital image processing technology. More specifically, this invention relates to an iron ore detection method and system based on image recognition. Background Technology
[0002] In the international trade and port logistics of iron ore, the sampling precision of the mechanical sampling system determines the fairness of trade settlement. Currently, the error generated during the sampling process accounts for a relatively high proportion of the total inspection error. In order to improve the precision of iron ore sampling, it is necessary to obtain the iron ore particle size distribution information of the material flow on the conveyor belt in real time, and dynamically adjust the sampling frequency and single sample quantity of the mechanical sampling system according to relevant standards.
[0003] Currently, using image recognition technology for iron ore particle size detection has become an industry trend. However, because imported iron ore typically contains high moisture content, iron ore particles are prone to physical adhesion. Existing technologies often fail to distinguish the true physical boundaries of iron ore particles from moisture reflections or surface cracks when processing adhered particles. This leads to systematic deviations in particle size statistics, causing a mismatch between the sampling instructions from the mechanical sampling system and the actual uniformity of the material, increasing the risk of trade disputes.
[0004] Furthermore, existing image processing methods often rely on single edge information for segmentation when dealing with complex material flows. When there are deep textures similar to boundaries or bright spots formed by moisture on the surface of iron ore, the segmentation algorithm with a fixed threshold shows certain limitations in restoring the independent geometric shape of particles, resulting in limited precision in the discrimination of adhered parts. When dealing with the ever-changing industrial environment, its recognition accuracy is still insufficient, and there is room for further optimization in suppressing false texture interference and improving the reliability of segmentation path logic. Summary of the Invention
[0005] To address the aforementioned technical problem of low accuracy in identifying adherent particles, the present invention provides solutions in the following aspects.
[0006] In a first aspect, the present invention provides an image recognition-based method for detecting iron ore, comprising:
[0007] The process involves acquiring a raw color image of iron ore and converting it to grayscale. Edge detection is performed on the grayscale image to obtain the gradient direction vector for each pixel. Based on the distortion degree of the local edge morphology of each pixel in the grayscale image, the local curvature value of each pixel is calculated, and the maximum value of the local curvature value is extracted as a candidate concave point. Based on the spatial pointing projection of the gradient direction vector and the centroid spatial deviation of each pixel, the center response intensity of each pixel is calculated, and the maximum value of the center response intensity is extracted as a local peak pixel. Candidate segmentation paths are generated between the candidate concave points and the local peak pixels. Based on the grayscale statistical difference and edge fit degree of the regions on both sides of the candidate segmentation path, the heterogeneity discrimination index of each candidate segmentation path is calculated. According to the relationship between the heterogeneity discrimination index and a preset heterogeneity threshold, the final segmentation line is selected. The grayscale image is binarized to obtain a binary mask, and the coordinates of the final segmentation line are mapped to the binary mask to achieve the separation of iron ore particles.
[0008] This invention acquires original color images of iron ore and extracts gradient direction vectors. It obtains candidate depression points by utilizing the degree of distortion of local edge morphology. Simultaneously, it combines spatial pointing projection and centroid spatial deviation to obtain the center response intensity and determine local peak pixels. This enables the identification of key segmentation sites for adhered particles in complex conveyor belt backgrounds. Based on the gray-scale statistical differences and edge fit of the regions on both sides of the candidate segmentation path, the final segmentation line is selected. Finally, the connectivity is broken by coordinate mapping of the binarized mask and background marking operations. This improves the situation where iron ore particles are difficult to distinguish due to adhesion under uneven lighting or moisture reflection. The dual constraints of geometric morphology and physical features enhance the logical reliability of the segmentation path, reduce counting deviations caused by particle overlap, and improve the accuracy of individual iron ore particle identification during transportation. Consequently, the subsequent ore particle size statistics and quality monitoring results are closer to the true distribution.
[0009] Preferably, the step of performing edge detection on the grayscale image to obtain the gradient direction vector of each pixel includes:
[0010] Edge detection is performed on the grayscale image, and the horizontal and vertical gradient components of each pixel in the grayscale image are calculated. The horizontal and vertical gradient components are used as the component values in the horizontal and vertical directions, respectively, to establish a two-dimensional spatial vector and obtain the gradient direction vector of each pixel.
[0011] Preferably, the local curvature values satisfy the following relationship:
[0012] ;
[0013] In the formula, Represents pixels The local curvature value; Represents pixels The absolute value of the change in the included angle; This represents the total number of pixels within the neighborhood window; Indicates the number of elements within the neighborhood window. The coordinates of each pixel; Indicates the number of elements within the neighborhood window. The coordinates of each pixel; The symbol for the Euclidean norm of a vector.
[0014] This invention obtains the local curvature value by calculating the ratio of the absolute value of the angle change to the spatial extension distance of the pixels in the neighborhood window. It evaluates the collapse state of the edge by using the proportional relationship between the degree of directional change of the local trajectory and the path span, thereby transforming the discrete pixel distribution into a continuous geometric feature representation. This enhances the ability to judge the subtle depression signals at the adhesion position, reduces the interference of false features generated by natural textures or noise points on the particle surface, and makes the extraction of candidate depression points more consistent with the geometric evolution law of the physical boundary of iron ore.
[0015] Preferably, the central response intensity satisfies the following relationship:
[0016] ;
[0017] In the formula, Represents pixels The central response intensity; Indicates the number of edge points in the edge point set; Represents the first edge point in the set of edge points. Gradient direction vectors at each edge point; Represents the first edge point in the set of edge points. Each edge point points to a pixel. The unit vector; Represents the first edge point in the set of edge points. Candidate center coordinates of edge points; Represents pixels The brightness centroid coordinates; Represents the distance attenuation constant; The symbol for the Euclidean norm of a vector; Represents an exponential function with the natural constant as its base; This represents the dot product of vectors.
[0018] This invention calculates the dot product of the unit vector pointing from the edge point to any pixel point and the gradient direction vector, and obtains the center response intensity by combining the spatial deviation distance between the candidate center coordinates and the brightness centroid coordinates. It then associates and matches the geometrically calculated edge position with the physical distribution centroid of the material. In the case of irregular iron ore shape and complex surface shadows, it locates the adhesion position through geometric pointing distribution, reduces the false centroid positioning phenomenon caused by background noise or ore surface reflection, and improves the pointing accuracy of logical association pairs in complex spatial arrangements.
[0019] Preferably, generating a candidate segmentation path between the candidate concave point and the local peak pixel includes:
[0020] The distribution of each candidate indentation point within a preset spatial radius is statistically analyzed. All local peak pixels within the preset spatial radius are filtered out. Pixel growth is performed based on the optimal path algorithm to generate candidate segmentation paths between the candidate indentation points and their corresponding arbitrary local peak pixels.
[0021] Preferably, the heterogeneity discriminant index satisfies the following relationship:
[0022] ;
[0023] In the formula, Indicates the first Heterogeneity discriminant index of candidate segmentation paths; Indicates the first The mean gray value of the left sampling area of each candidate segmentation path; Indicates the first The mean gray value of the sampling area on the right side of each candidate segmentation path; Indicates the first The standard deviation of grayscale values in the left sampling region of each candidate segmentation path; Indicates the first The standard deviation of grayscale values in the right sampling region of each candidate segmentation path; Indicates a preset micro value; Indicates the first The number of path points on each candidate segmentation path; Indicates the first The first candidate segmentation path The gradient direction vector of the i-th path point, and the i-th path point The angle between the normal directions of the candidate segmentation paths at the path point; Represents the absolute value symbol.
[0024] This invention obtains a heterogeneity discrimination index by statistically analyzing the mean and standard deviation of gray levels in the sampling areas on both sides of a candidate segmentation path, and combining the cosine of the angle between the gradient direction vector and the path normal. By utilizing the difference in features between the regions on both sides of the path and the degree of edge fit of the path trajectory, the quality of the candidate segmentation path is evaluated. This reduces false segmentation paths that mistakenly pass through flat areas or random cracks inside particles, improves the stability of segmentation decisions in complex stacking scenarios, and enhances the anti-interference ability of candidate segmentation paths under non-uniform lighting conditions.
[0025] Preferably, the step of binarizing the grayscale image to obtain a binary mask, and mapping the coordinates of the final segmentation line to the binary mask to achieve the separation of iron ore particles, includes:
[0026] The Otsu method is used to perform adaptive thresholding on the grayscale image to obtain a binarized mask containing the background and iron ore particles. The coordinates of the path points on the final segmentation line are mapped onto the binarized mask, and the coordinates of the path points are marked as background on the binarized mask, thereby cutting off the adhesion between the iron ore particles.
[0027] This invention utilizes the Otsu method to obtain a binary mask containing the background and iron ore particles. Based on the coordinates of the path points on the final segmentation line, a background attribute marking operation is performed within the binary mask, thereby blocking the pixel connectivity between adjacent targets. This causes the originally continuous pixel clusters to split into independent connected domains that do not touch each other during recognition. While maintaining the original morphological characteristics of the iron ore, the physical separation of individual particles is achieved, reducing the particle size statistical error caused by pixel adhesion, and thus improving the resolution accuracy of the automated detection system for densely stacked ore flows.
[0028] Preferably, obtaining the candidate center coordinates includes:
[0029] Edge detection is performed on the grayscale image to extract the outer contour edge line of the iron ore particles. The coordinates of all edge points on the outer contour edge line are stored in the edge point set. The projection distance is preset, and the projection distance of any edge point in the edge point set is extended along its gradient direction vector to obtain the candidate center coordinates of the corresponding edge point.
[0030] Preferably, obtaining the absolute value of the angle change includes:
[0031] Using any pixel as the origin, select the th pixel within its neighborhood window. The pixel and the Point the corresponding pixel to the first pixel. The vector of the nth pixel is used as the first chord vector, pointing the corresponding pixel to the nth chord vector. The vector of the nth pixel is used as the second chord vector. The angle between the first chord vector and the second chord vector is calculated using the dot product formula to obtain the nth chord vector. For each local angle, traverse all adjacent pixels within the neighborhood window, calculate the absolute value of the difference between two adjacent local angles, and accumulate them to obtain the absolute value of the angle change of the corresponding pixel.
[0032] Secondly, the present invention provides an iron ore detection system based on image recognition, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned iron ore detection method based on image recognition is implemented.
[0033] By adopting the above technical solution, a computer program for the image recognition-based iron ore detection method is generated and stored in a memory for loading and execution by a processor. This allows for the creation of a terminal device based on the memory and processor, facilitating its use.
[0034] The beneficial effects of this invention are as follows: By combining the deflection law of particle edge trajectories with the centroid distribution characteristics of material entities, this invention improves the reliability of iron ore particle adhesion identification in complex environments such as conveyor belts. Since texture interference and moisture reflection on the iron ore surface often cause conventional segmentation algorithms to fail, this invention introduces a proportional logic of the total directional mutation and spatial extension scale to evaluate edge curvature. Combined with gradient pointing projection and brightness centroid displacement, it locates the particle centroid, thereby reducing missegmentation caused by false edges or texture fragments. Simultaneously, it utilizes the difference in features between the regions on both sides of the path and the edge fit of the path trajectory to obtain a heterogeneity discrimination index, ensuring that the generated segmentation path fits the true boundary gaps between particles. Finally, through coordinate mapping and attribute rewriting of a binarized mask, pixel connectivity is blocked at the logical level, thereby achieving the separation and independent representation of individual particles, reducing particle size statistical errors and counting redundancy caused by pixel adhesion, and improving the industrial practical value of image recognition technology in automated mining inspection scenarios. Attached Figure Description
[0035] Figure 1 The flowchart of an image recognition-based iron ore detection method according to the present invention is illustrated schematically.
[0036] Figure 2 A schematic diagram illustrating the results of key site identification is shown below;
[0037] Figure 3 The diagram illustrates the final splitting execution result. Detailed Implementation
[0038] This invention discloses an image recognition-based iron ore detection method, referring to... Figure 1 This includes steps S100-S400:
[0039] S100: Acquire the original color image of the iron ore and convert it into a grayscale image. Perform edge detection on the grayscale image to obtain the gradient direction vector of each pixel.
[0040] It should be noted that due to the complex environment of iron ore production, the acquired raw images often contain specular interference from moisture reflection and particle noise caused by ore dust. Furthermore, uneven illumination at the ore edges often leads to gradient diffusion. Considering that bilateral filtering can assign weights based on pixel spatial proximity and gray-level similarity, it can filter out high-frequency reflective noise while maintaining the original intensity and direction characteristics of the edge gradient. Therefore, by performing smoothing processing and constructing gradient vectors, vector field data can be provided for the structured representation of image features, thereby improving the robustness of the basic feature extraction process to environmental noise.
[0041] Specifically, an industrial camera deployed directly above the conveyor belt captures raw color images of the iron ore. These raw color images are then converted to grayscale and smoothed. For example, the smoothing process employs a bilateral filtering algorithm. Bilateral filtering can suppress random high-frequency noise generated by moisture reflection from the iron ore surface and preserve edge strength. Bilateral filtering is existing technology and will not be elaborated upon here.
[0042] Edge detection is performed on the grayscale image, and the horizontal and vertical gradient components of each pixel in the grayscale image are calculated. These horizontal and vertical gradient components are then used as the component values in the horizontal and vertical directions, respectively, to establish a two-dimensional spatial vector, thus obtaining the gradient direction vector of each pixel. For example, the edge detection uses the Sobel operator, which is existing technology and will not be elaborated upon here.
[0043] At this point, the gradient direction vector of each pixel has been obtained.
[0044] S200. Based on the degree of distortion of the local edge morphology of each pixel in the grayscale image, calculate the local curvature value of each pixel and extract the maximum value of the local curvature value as a candidate concave point; based on the spatial pointing projection of the gradient direction vector and combined with the centroid spatial deviation of each pixel, calculate the center response intensity of each pixel and extract the maximum value of the center response intensity as a local peak pixel; generate a candidate segmentation path between the candidate concave point and the local peak pixel.
[0045] It should be noted that during the stacking process of iron ore particles, the edge contour lines at the contact points experience inward collapse in terms of geometric topology, and this collapse manifests as a nonlinear abrupt change in the tangent vector direction in discrete space. Considering that local curvature can capture the degree of distortion of the contour morphology at the microscale, reflecting not only the severity of angular deflection but also the spatial span of edge segments, this invention constructs a proportional model of the degree of local edge morphological distortion and the length of the boundary distribution to pinpoint the maximum point, thereby identifying the physical boundary starting point between iron ore particles and suppressing the false depression signal generated by the natural texture of the iron ore particle surface.
[0046] Specifically, the local curvature value of each pixel is calculated based on the degree of distortion of the local edge shape, including:
[0047] A neighborhood window is set with any pixel as the center. For example, the size of the neighborhood window is 5×5.
[0048] In pixels Using the origin as the coordinate point, select the th element within its neighborhood window. The pixel and the Each pixel Pointing to the The vector of each pixel is used as the first chord vector, and the pixel... Pointing to the The vector of the nth pixel is used as the second chord vector. The angle between the first chord vector and the second chord vector is calculated using the dot product formula to obtain the nth chord vector. For each local angle, traverse all adjacent pixels within the neighborhood window, calculate the absolute value of the difference between two adjacent local angles, and sum them to obtain the pixel value. The absolute value of the change in the included angle.
[0049] The local curvature value of any pixel satisfies the following relationship:
[0050] ;
[0051] In the formula, Represents pixels The local curvature value; Represents pixels The absolute value of the change in the included angle; This represents the total number of pixels within the neighborhood window; Indicates the number of elements within the neighborhood window. The coordinates of each pixel; Indicates the number of elements within the neighborhood window. The coordinates of each pixel; The symbol for the Euclidean norm of a vector.
[0052] In this relationship, the larger the absolute value of the angle change, the more significant the pixel change. The more severe the geometric collapse or transition at a point, the more likely it is to correspond to a depression created at the contact point of adhesive particles; conversely, it indicates a pixel. The surface tends to be straight or rounded, and the direction changes gradually. This represents the cumulative geometric arc length of the edge segments within the neighborhood window. The larger the cumulative geometric arc length, the longer the spatial extension of the pixels with the same number of pixels; conversely, the smaller the cumulative geometric arc length, the more densely the pixels are distributed in space.
[0053] Preferably, candidate concave points are obtained by extracting the maxima of local curvature values through local extremum extraction. It should be noted that the local extremum extraction is non-maximum suppression, which is existing technology and will not be elaborated upon here. For example, the search window size for non-maximum suppression is set to 3×3, and the suppression threshold is set to 0.2.
[0054] At this point, the local curvature values of each pixel have been obtained.
[0055] It should be noted that, due to the highly irregular shape of iron ore and the complex shadow details on its surface, and considering that the physical center of gravity of iron ore particles is usually located at the intersection of geometric symmetries, which manifests as a high convergence of edge gradient vectors in the image, while also maintaining spatial proximity to the brightness centroid of the material distribution, the center response intensity is calculated by combining the edge pointing distribution characteristics with the spatial deviation distance of the center of gravity. This allows for the correlation and verification between geometric predictions and physical entity distribution, reducing the probability of background clutter or moisture textures being misidentified as the centroid of iron ore particles.
[0056] Preferably, the center response intensity of each pixel is calculated based on the correlation characteristics between edge pointing distribution and centroid spatial deviation, including:
[0057] Edge detection is performed on the grayscale image to extract the outer contour edge lines of the iron ore particles. The coordinates of all edge points on the outer contour edge lines are stored in an edge point set. A preset projection distance is used to extend the projection distance of any edge point in the edge point set along its gradient direction vector to obtain the candidate center coordinates of the corresponding edge point. For example, the projection distance is set to 25 pixels.
[0058] In pixels Centered on a given point, within its neighborhood window, all edge points are weighted according to their grayscale values to obtain the pixel values. The brightness centroid coordinates.
[0059] The center response intensity of any pixel satisfies the following relationship:
[0060] ;
[0061] In the formula, Represents pixels The central response intensity; Indicates the number of edge points in the edge point set; Represents the first edge point in the set of edge points. Gradient direction vectors at each edge point; Represents the first edge point in the set of edge points. Each edge point points to a pixel. The unit vector; Represents the first edge point in the set of edge points. Candidate center coordinates of edge points; Represents pixels The brightness centroid coordinates; This represents the distance attenuation constant, which can be set to 10 for normalization. The symbol for the Euclidean norm of a vector; Represents an exponential function with the natural constant as its base; This represents the dot product of vectors.
[0062] In this relation, Indicates the measurement of the first Does the direction of the fastest grayscale change at each edge point coincide with the direction of space detection? The larger the value, the more likely it is to be the first. The geometric orientation of each edge point falls on the pixel. The higher the probability of it being on the right; conversely, it indicates that the probability of it being on the right is higher. Each edge point to pixel The geometric contribution of the center is relatively low. This represents the potential centroid location of the edge point prediction relative to the pixel. The spatial deviation distance between the local solid centers of gravity is considered. A larger spatial deviation distance indicates a mismatch between the center predicted by edge geometry and the actual physical center of gravity of the stacked material, which may be due to background interference or false textures caused by moisture. Conversely, a smaller spatial deviation distance indicates a high degree of agreement between the geometric prediction and the physical solid distribution, and a high degree of agreement between the pixel points. There exists a real mineral crystal structure there. This represents the combined geometric and physical signal-to-noise ratio response of a single edge pixel to a specific spatial location serving as the centroid of an iron ore particle.
[0063] Preferably, the maximum value in the central response intensity is extracted by local extremum extraction to obtain local peak pixels. It should be noted that the local extremum extraction is non-maximum suppression, and the search window size for non-maximum suppression is set to 3×3, and the suppression threshold is set to 0.2.
[0064] For example, Figure 2This is a schematic diagram of the key site identification results. The figure shows candidate depression points determined based on local curvature maxima, and local peak pixels determined by combining spatial pointing projection and centroid deviation. This figure illustrates the identification results of locking adhesion sites using the degree of edge morphology distortion, and locating the particle centroid using gradient pointing and physical centroid distribution.
[0065] The distribution of each candidate concave point within a preset spatial radius is statistically analyzed. All local peak pixels within the preset spatial radius are then filtered. Pixel growth is performed based on a path cost function minimization criterion, generating candidate segmentation paths between the candidate concave points and their corresponding arbitrary local peak pixels. For example, the spatial radius can be set to 20 pixels in length. The path cost function minimization criterion is an optimal path algorithm, which is existing technology and will not be elaborated upon here.
[0066] At this point, candidate segmentation paths have been obtained.
[0067] S300. Based on the gray-scale statistical differences and edge fit of the regions on both sides of the candidate segmentation path, calculate the heterogeneity discrimination index of each candidate segmentation path.
[0068] It should be noted that candidate lines generated by the optimal path algorithm may cross shadowed areas inside particles or cracks on the ore surface, causing the segmentation position to deviate from the true physical boundary. Considering that the two sides of the true adhesion boundary usually belong to different individual particles, the differences in their mineral composition and illumination angle will lead to asymmetry in the statistical characteristics of the two sides, and the gradient direction of the boundary pixels should be strictly orthogonal to the path direction. Therefore, by constructing a heterogeneity discriminant index of contrast of the fusion region and trajectory fit, the physical properties of the candidate segmentation path can be quantitatively screened to suppress false segmentation interference located in flat areas or random cracks inside particles.
[0069] Specifically, based on the differences in regional features and edge fit on both sides of the candidate segmentation path, the heterogeneity discrimination index of each candidate segmentation path is calculated, including:
[0070] For each path point on any candidate segmentation path, a preset detection distance is extended to both sides along the normal direction of the path point to construct the left sampling area and the right sampling area of the candidate segmentation path. The gray mean and gray standard deviation of all pixels in the left and right sampling areas are calculated.
[0071] The heterogeneity discriminant index of any candidate segmentation path satisfies the following relation:
[0072] ;
[0073] In the formula, Indicates the first Heterogeneity discriminant index of candidate segmentation paths; Indicates the first The mean gray value of the left sampling area of each candidate segmentation path; Indicates the first The mean gray value of the sampling area on the right side of each candidate segmentation path; Indicates the first The standard deviation of grayscale values in the left sampling region of each candidate segmentation path; Indicates the first The standard deviation of grayscale values in the right sampling region of each candidate segmentation path; This represents a preset microvalue to prevent the denominator from being 0; it can be set to 0.001. Indicates the first The number of path points on each candidate segmentation path; Indicates the first The first candidate segmentation path The gradient direction vector of the i-th path point, and the i-th path point The angle between the normal directions of the candidate segmentation paths at the path point; Represents the absolute value symbol.
[0074] In this relation, This indicates the degree of difference in grayscale distribution between the materials on both sides of the candidate segmentation path. The larger the value, the more obvious the brightness jump between the left and right sides of the candidate segmentation path; conversely, the smaller the value, the more consistent the brightness on both sides of the candidate segmentation path, which may be located in a flat area inside the same particle and is a false path that has been misjudged. Indicates the first The degree of coincidence between the direction of the fastest change in image grayscale at each path point and the direction of the path normal. The larger the value, the more likely the actual light-dark boundary line in the image extends along the candidate segmentation path; conversely, the smaller the value, the more likely the actual grayscale change direction in the image has deviated from the direction of the candidate segmentation path.
[0075] Thus, the heterogeneity discrimination index of each candidate segmentation path was obtained.
[0076] S400. Based on the relationship between the heterogeneity discrimination index and the preset heterogeneity threshold, the final dividing line is selected; the grayscale image is binarized to obtain a binary mask, and the coordinates of the final dividing line are mapped to the binary mask to achieve the separation of iron ore particles.
[0077] It should be noted that since binarization can only distinguish between ore targets and the background, it cannot identify and sever pixel connectivity between particles. Considering that candidate segmentation paths represent gaps or contact surfaces between two particles, this invention obtains the final segmentation line by screening the candidate segmentation paths, maps the coordinates of the final segmentation line to a binarization mask and marks it as the background. This can block pixel adhesion between adjacent particles, splitting the originally continuous pixel clusters into independent connected regions, thereby improving the individual recognition efficiency of high-density adhered targets.
[0078] Specifically, a heterogeneity threshold is preset; for example, the heterogeneity threshold is set to 2.0. Candidate segmentation paths with a heterogeneity discriminant index greater than or equal to the heterogeneity threshold are used as the final segmentation line. It should be noted that if there are multiple candidate segmentation paths for the same pair of concave points, only the candidate segmentation path with the largest heterogeneity discriminant index value is retained as the final segmentation line.
[0079] The Otsu method is used to perform adaptive thresholding on the grayscale image to obtain a binarized mask containing the background and iron ore particles. The coordinates of the path points on the final segmentation line are mapped onto the binarized mask, and the coordinates of the path points are marked as background on the binarized mask, thereby cutting off the adhesion between the iron ore particles.
[0080] For example, Figure 3 This is a schematic diagram of the final segmentation effect. The diagram shows the state after the filtered final segmentation lines are mapped onto a binary mask and marked as background attributes. This diagram demonstrates how coordinate mapping breaks the pixel connectivity between adjacent particles, splitting the originally continuous pixel clusters into independent connected domains that do not touch each other, thus achieving the physical separation of individual particles.
[0081] This completes the identification and separation of the adhering iron ore particles.
[0082] This invention also discloses an image recognition-based iron ore detection system, including a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement an image recognition-based iron ore detection method according to the present invention.
[0083] The system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.
[0084] While this specification has shown and described numerous embodiments of the invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will occur to those skilled in the art without departing from the spirit and essence of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in the practice of this invention.
Claims
1. A method for detecting iron ore based on image recognition, characterized in that, include: The original color image of the iron ore is acquired and converted into a grayscale image. Edge detection is performed on the grayscale image to obtain the gradient direction vector of each pixel. Based on the degree of distortion of the local edge morphology of each pixel in the grayscale image, the local curvature value of each pixel is calculated, and the maximum value of the local curvature value is extracted as a candidate concave point; based on the spatial pointing projection of the gradient direction vector and combined with the centroid spatial deviation of each pixel, the center response intensity of each pixel is calculated, and the maximum value of the center response intensity is extracted as a local peak pixel; a candidate segmentation path is generated between the candidate concave point and the local peak pixel. Based on the gray-scale statistical differences and edge fit of the regions on both sides of the candidate segmentation path, the heterogeneity discrimination index of each candidate segmentation path is calculated. Based on the relationship between the heterogeneity discrimination index and the preset heterogeneity threshold, the final dividing line is selected; the grayscale image is binarized to obtain a binary mask, and the coordinates of the final dividing line are mapped to the binary mask to achieve the separation of iron ore particles.
2. The iron ore detection method based on image recognition according to claim 1, characterized in that, The process of edge detection on the grayscale image to obtain the gradient direction vector of each pixel includes: Edge detection is performed on the grayscale image, and the horizontal and vertical gradient components of each pixel in the grayscale image are calculated. The horizontal and vertical gradient components are used as the component values in the horizontal and vertical directions, respectively, to establish a two-dimensional spatial vector and obtain the gradient direction vector of each pixel.
3. The iron ore detection method based on image recognition according to claim 1, characterized in that, The local curvature values satisfy the following relationship: ; In the formula, Represents pixels The local curvature value; Represents pixels The absolute value of the change in the included angle; This represents the total number of pixels within the neighborhood window; Indicates the number of elements within the neighborhood window. The coordinates of each pixel; Indicates the number of elements within the neighborhood window. The coordinates of each pixel; The symbol for the Euclidean norm of a vector.
4. The iron ore detection method based on image recognition according to claim 1, characterized in that, The central response intensity satisfies the following relationship: ; In the formula, Represents pixels The central response intensity; Indicates the number of edge points in the edge point set; Represents the first edge point in the set of edge points. Gradient direction vectors at each edge point; Represents the first edge point in the set of edge points. Each edge point points to a pixel. The unit vector; Represents the first edge point in the set of edge points. Candidate center coordinates of edge points; Represents pixels The brightness centroid coordinates; Represents the distance attenuation constant; The symbol for the Euclidean norm of a vector; Represents an exponential function with the natural constant as its base; This represents the dot product of vectors.
5. The iron ore detection method based on image recognition according to claim 1, characterized in that, The step of generating a candidate segmentation path between candidate concave points and local peak pixels includes: The distribution of each candidate indentation point within a preset spatial radius is statistically analyzed. All local peak pixels within the preset spatial radius are filtered out. Pixel growth is performed based on the optimal path algorithm to generate candidate segmentation paths between the candidate indentation points and their corresponding arbitrary local peak pixels.
6. The iron ore detection method based on image recognition according to claim 1, characterized in that, The heterogeneity discriminant index satisfies the following relationship: ; In the formula, Indicates the first Heterogeneity discriminant index of candidate segmentation paths; Indicates the first The mean gray value of the left sampling area of each candidate segmentation path; Indicates the first The mean gray value of the sampling area on the right side of each candidate segmentation path; Indicates the first The standard deviation of grayscale values in the left sampling region of each candidate segmentation path; Indicates the first The standard deviation of grayscale values in the right sampling region of each candidate segmentation path; Indicates a preset micro value; Indicates the first The number of path points on each candidate segmentation path; Indicates the first The first candidate segmentation path The gradient direction vector of the i-th path point, and the i-th path point The angle between the normal directions of the candidate segmentation paths at the path point; Represents the absolute value symbol.
7. The iron ore detection method based on image recognition according to claim 1, characterized in that, The process of binarizing the grayscale image to obtain a binary mask, and mapping the coordinates of the final segmentation line to the binary mask to achieve the separation of iron ore particles, includes: The Otsu method is used to perform adaptive thresholding on the grayscale image to obtain a binarized mask containing the background and iron ore particles. The coordinates of the path points on the final segmentation line are mapped onto the binarized mask, and the coordinates of the path points are marked as background on the binarized mask, thereby cutting off the adhesion between the iron ore particles.
8. The iron ore detection method based on image recognition according to claim 4, characterized in that, Obtaining the candidate center coordinates includes: Edge detection is performed on the grayscale image to extract the outer contour edge line of the iron ore particles. The coordinates of all edge points on the outer contour edge line are stored in the edge point set. The projection distance is preset, and the projection distance of any edge point in the edge point set is extended along its gradient direction vector to obtain the candidate center coordinates of the corresponding edge point.
9. The iron ore detection method based on image recognition according to claim 3, characterized in that, Obtaining the absolute value of the angle change includes: Using any pixel as the origin, select the th pixel within its neighborhood window. The pixel and the Point the corresponding pixel to the first pixel. The vector of the nth pixel is used as the first chord vector, pointing the corresponding pixel to the nth chord vector. The vector of the nth pixel is used as the second chord vector. The angle between the first chord vector and the second chord vector is calculated using the dot product formula to obtain the nth chord vector. For each local angle, traverse all adjacent pixels within the neighborhood window, calculate the absolute value of the difference between two adjacent local angles, and accumulate them to obtain the absolute value of the angle change of the corresponding pixel.
10. An iron ore detection system based on image recognition, characterized in that, include: A processor and a memory, the memory storing computer program instructions that, when executed by the processor, implement an image recognition-based iron ore detection method according to any one of claims 1-9.