Method for material recognition, method for material sorting and apparatus for material sorting
By employing multi-core scale morphological black hat processing and feature fusion technology, the problem of missed detection and misidentification of minute materials in single-energy X-ray sorting equipment has been solved, achieving higher accuracy in material classification and identification.
Patent Information
- Application Number
- CN202611245877.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-17
- Publication Date
- 2026-11-06
AI Technical Summary
In existing technologies, when sorting materials based on monoenergetic X-rays, it is difficult to effectively capture the subtle grayscale changes of tiny materials, resulting in a high rate of missed detections and easy misidentification of tiny materials as noise or waste, which affects the performance of the sorting equipment.
Morphological black hat processing is performed using multi-core size, and feature fusion is combined with multi-scale black hat data. Feature maps focusing on micro-materials and conventional materials are generated through two sets of differentiated weights. Classification and identification are performed by comprehensively considering grayscale distribution, thereby reducing false negatives and false positives.
It improves the accuracy and reliability of material category determination, reduces the probability of missing small and effective materials, and enhances the recognition accuracy of material sorting equipment.
Smart Images

Figure CN123052718A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of ore sorting technology, specifically to a material identification method, a material sorting method, and a material sorting device. Background Technology
[0002] In the field of material sorting, X-rays are mainly used to separate materials. Different components and densities of materials exhibit significantly different degrees of X-ray absorption and attenuation. High-density target materials will appear as darker gray spots in X-ray transmission images, allowing personnel to distinguish between usable materials and waste.
[0003] In related technologies, material sorting methods based on monoenergetic X-rays mainly employ image feature extraction at a single scale. When there are tiny effective material points occupying only 1-2 pixels in the image, the single-scale feature extraction method cannot capture the subtle grayscale changes of these tiny targets. This not only easily leads to a high rate of missed detection for tiny materials but also makes it easy to misidentify real tiny materials as noise or waste impurities, ultimately affecting the performance of the material sorting equipment. Summary of the Invention
[0004] To overcome the problems existing in related technologies, an exemplary embodiment of this disclosure provides a material identification method applied to a material sorting device. The method includes: acquiring a target image of the material to be detected; performing morphological black hat processing on the target image based on multiple kernel sizes to obtain multi-scale black hat data, wherein the multiple kernel sizes include at least a maximum kernel size and a minimum kernel size; performing feature fusion processing on the multi-scale black hat data based on a first weighted reassembly corresponding to the multiple kernel sizes to obtain a first feature map, wherein the weight value corresponding to the minimum kernel size in the first weighted reassembly is the maximum weight value, and the weight value corresponding to the maximum kernel size is the minimum weight value; performing feature fusion processing on the multi-scale black hat data based on a second weighted reassembly corresponding to the multiple kernel sizes to obtain a second feature map, wherein the weight value corresponding to the maximum kernel size in the second weighted reassembly is the maximum weight value, and the weight value corresponding to the minimum kernel size is the minimum weight value, and the first weighted reassembly and the second weighted reassembly are weighted using an inverse weight allocation logic; and performing classification and identification based on the grayscale distribution of the first feature map and the second feature map to determine the material category of the material to be detected.
[0005] In some embodiments, classification and identification based on the grayscale distribution of a first feature map and a second feature map to determine the material category of the material to be detected includes: performing region screening on the first feature map and the second feature map respectively to obtain at least one first candidate region and / or at least one second candidate region; determining a first identification result of the first candidate region based on the grayscale distribution of the first feature map; determining a second identification result of the second candidate region based on the grayscale distribution of the second feature map; and determining the material category of the material to be detected based on the first identification result and the second identification result.
[0006] In some embodiments, region filtering is performed on the first feature map and the second feature map respectively to obtain a first candidate region and a second candidate region, including: region filtering of the first feature map using a first grayscale threshold to obtain at least one first candidate region; and / or, region filtering of the second feature map using a second grayscale threshold to obtain at least one second candidate region.
[0007] In some embodiments, determining a first recognition result for a first candidate region based on the grayscale distribution of a first feature map includes: determining a first annular region surrounding the first candidate region according to the position of the first candidate region in the first feature map; determining a first central grayscale value of the first candidate region, a first average grayscale value of the first annular region, and a first gradient direction of the first annular region; and obtaining a first classification result based on the first central grayscale value, the first average grayscale value, and the first gradient direction. Determining a second recognition result for a second candidate region based on the grayscale distribution of a second feature map includes: determining a second annular region surrounding the second candidate region according to the position of the second candidate region in the second feature map; determining a second central grayscale value of the second candidate region, a second average grayscale value of the second annular region, and a second gradient direction of the second annular region; and obtaining a second classification result based on the second central grayscale value, the second average grayscale value, and the second gradient direction.
[0008] In some embodiments, determining a first annular region surrounding the first candidate region based on the position of the first candidate region in the first feature map includes: determining a target local image based on the position of the first candidate region in the first feature map, wherein the target local image is a local region image centered on the first candidate region in the first feature map; performing pixel magnification on the target local image according to a specified dilation factor to obtain an updated first feature map; and determining a first annular region surrounding the first candidate region based on the updated first feature map.
[0009] In some embodiments, obtaining a first classification result based on a first center gray value, a first average gray value, and a first gradient direction includes: determining a first difference between the first average gray value and the first center gray value; determining the proportion of a first pixel pointing towards the center of a first candidate region in a first annular region according to the first gradient direction; if the first difference is greater than or equal to a first threshold, and the proportion of the first pixel is greater than or equal to a first proportion threshold, then determining the first classification result as valid material; and if the first difference is less than the first threshold and / or the proportion of the first pixel is less than the first proportion threshold, then determining the first classification result as interference. Obtaining a second classification result based on a second center gray value, a second average gray value, and a second gradient direction includes: determining a second difference between the second average gray value and the second center gray value; determining the proportion of a second pixel pointing towards the center of a second candidate region in a second annular region according to the second gradient direction; if the second difference is greater than or equal to a second threshold, and the proportion of the second pixel is greater than or equal to a second proportion threshold, then determining the second classification result as valid material; and if the second difference is less than the second threshold and / or the proportion of the second pixel is less than the second proportion threshold, then determining the second classification result as interference.
[0010] In some embodiments, the material sorting device includes a single-energy X-ray detection device to acquire a target image of the material to be detected, including: acquiring a transmission image of the material to be detected based on the single-energy X-ray detection device; enhancing the grayscale of the transmission image to obtain an updated transmission image; segmenting the updated transmission image, determining and extracting the local image corresponding to the material to be detected, and obtaining the target image.
[0011] In some embodiments, morphological black hat processing is performed on the target image based on the size of each morphological kernel to obtain multi-scale black hat data, including: determining the number of morphological kernels and the size of each morphological kernel according to the material characteristics of the current working condition and the resolution of the single-energy X-ray detection device; and performing morphological black hat processing on the target image based on the size of each morphological kernel to obtain multi-scale black hat data.
[0012] Secondly, this disclosure also provides a material sorting method applied to a material sorting device. The method includes: using the material identification method provided in any of the foregoing aspects to determine the material category of the material to be detected; and sorting the material to be detected according to the material category.
[0013] Thirdly, this disclosure also provides a material sorting device, comprising: a feeding mechanism for providing materials to be sorted; a conveying mechanism for receiving and conveying the materials to be sorted; an identification mechanism for determining the material category of the materials to be sorted using the material identification method provided in any of the foregoing aspects; and a sorting mechanism for sorting the materials to be sorted according to the material category.
[0014] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure.
[0015] The technical solutions provided by the embodiments of this disclosure can include the following beneficial effects: According to the material identification method provided by this disclosure, multi-scale morphological black-hat operations are performed on the target image, and pixel detail features of materials of different sizes are extracted using morphological kernels of different sizes; then, weighted fusion is performed using two sets of differentiated weights to generate two independent feature maps that focus on small materials and those that focus on regular materials. In the classification and identification process, the joint judgment based on the multi-dimensional detail features carried by the two feature maps can effectively overcome the defects of missed detection and false detection caused by single-scale feature extraction, improve the accuracy and reliability of material category determination results, and fundamentally reduce the probability of missing the identification of small and effective materials. Attached Figure Description
[0016] This disclosure can be better understood by describing exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, in which: Figure 1 This is a schematic flowchart illustrating a material identification method according to an exemplary embodiment of the present disclosure; Figure 2 This is a schematic diagram of a material image according to an exemplary embodiment of the present disclosure; Figure 3 This is a schematic diagram illustrating a feature map according to an exemplary embodiment of the present disclosure; Figure 4 This is a schematic diagram illustrating another feature map according to an exemplary embodiment of the present disclosure; Figure 5 This is a comparative schematic diagram illustrating pixel dilation according to an exemplary embodiment of the present disclosure; Figure 6 This is a schematic diagram of a gradient distribution according to an exemplary embodiment of the present disclosure; Figure 7 This is a schematic diagram of another gradient distribution according to an exemplary embodiment of the present disclosure; Figure 8 This is a schematic flowchart illustrating a material sorting method according to an exemplary embodiment of the present disclosure; Figure 9 This is a schematic diagram of the structure of a material sorting device according to an exemplary embodiment of the present disclosure. Detailed Implementation
[0017] The following describes specific embodiments of this disclosure. It should be noted that, in order to provide a concise description, this specification cannot exhaustively describe all features of the actual embodiments. It should be understood that, in the actual implementation of any embodiment, just as in any engineering or design project, various specific decisions are often made to achieve the developer's specific goals and to meet system-related or business-related constraints, and this can change from one embodiment to another. Furthermore, it is understood that although the efforts made in this development process may be complex and lengthy, for those skilled in the art related to the content disclosed in this disclosure, changes in design, manufacturing, or production based on the technical content disclosed in this disclosure are merely conventional technical means and should not be construed as insufficient content of this disclosure.
[0018] Unless otherwise defined, the technical or scientific terms used in this disclosure shall have the ordinary meaning understood by one of ordinary skill in the art to which this disclosure pertains. The terms “first,” “second,” and similar terms used in this disclosure do not indicate any order, quantity, or importance, but are merely used to distinguish different components. The terms “a” or “one,” etc., do not indicate a quantity limitation, but rather indicate the presence of at least one. The terms “comprising,” “including,” etc., mean that the element or object preceding “comprising” or “including” encompasses the elements or objects listed following “comprising” or “including” and their equivalents, and do not exclude other elements or objects. The terms “connected,” “linked,” etc., are not limited to physical or mechanical connections, nor are they limited to direct or indirect connections.
[0019] In related technologies, material sorting methods based on monoenergetic X-rays mainly employ image feature extraction at a single scale. When there are tiny effective material points occupying only 1-2 pixels in the image, the single-scale feature extraction method cannot capture the subtle grayscale changes of these tiny targets. This not only easily leads to a high rate of missed detection for tiny materials but also makes it easy to misidentify real tiny materials as noise or waste impurities, ultimately affecting the performance of the material sorting equipment.
[0020] For example, taking ore as an example, the concentrate and gangue (waste rock) in the ore differ in elemental composition and density, resulting in different degrees of X-ray absorption and attenuation. This is reflected in the transmission image, where the imaging area corresponding to the concentrate is darker in gray, forming dark mineral spots. For micro-mineral points that are only imaged as a few pixels, their X-ray absorption and attenuation signals are weak, and they highly overlap with the gray range of equipment noise and fine gangue impurities. If only a single-scale morphological method is used to extract image features, the effective features of micro-mineral points are difficult to highlight, making it very easy to miss detections or misclassify them as noise or useless impurities.
[0021] Therefore, this disclosure provides a material identification method applied to material sorting equipment. For example... Figure 1 As shown, the material identification method may include the following steps: Step S110: Obtain the target image of the material to be detected.
[0022] To achieve targeted identification of the category of the material to be inspected, a target image can be obtained based on the image acquisition results of a single-energy X-ray detection device. The target image can be a segmented image containing only the material pixels, or a rectangular image cropped along the smallest bounding rectangle of the material to be inspected.
[0023] For example, if the target image can be a cut-out image, then the target image does not contain other background pixels, and when material recognition is performed using the target image, the interference of background or noise can be effectively reduced, thereby improving the recognition accuracy.
[0024] If the target image is a rectangular image cropped along the smallest bounding rectangle, then the target image includes the complete outline of the material to be sorted. Therefore, when material identification is performed through the target image, the accuracy of material identification can be guaranteed due to the completeness of the information.
[0025] Step S120: Perform morphological black hat processing on the target image based on the multi-kernel size to obtain multi-scale black hat data.
[0026] In actual production, while the overall size of materials to be sorted in the same batch tends to be uniform, extremely small materials can still be mixed in during the material conveying process. For example, in such X-ray transmission images, only 1 to 2 pixels may be present. When using X-ray imaging for detection, it is easy to fail to effectively distinguish whether the current pixel belongs to valid material or is an artifact caused by interference. Interference can include dust, waste, etc.
[0027] Therefore, to improve material identification accuracy and enhance the pixel difference between valid materials and interfering objects, morphological black hat processing is performed on the target image using multiple kernel sizes to fully extract pixel regions for all suspected valid materials in the target image, thus obtaining multi-scale black hat data. The multiple kernel sizes include at least the maximum kernel size and the minimum kernel size.
[0028] The process of performing morphological black hat processing can be represented by the following formula: ; in, For the first k Structural elements of various sizes This is a morphological closing operation. For the current pixel, This represents the grayscale value at the current pixel coordinates. For the first k After performing black-hat operations on structuring elements of various sizes, the output image is in The location is represented by a black hat morphological kernel. The structuring element can be characterized by a circular or rectangular kernel. The size of the morphological kernel can be determined based on one or more of the following: prior process knowledge, material characteristics under current operating conditions, and detector resolution of the single-energy X-ray detection equipment. This helps ensure the suitability and effectiveness of the selection of kernel size and number. For example, to extract feature pixels from large areas of material or mesh-like material, a larger morphological kernel (e.g., kernel size = 31) can be added to optimize feature extraction.
[0029] In some examples, the number of morphological kernels can be set to two sets, namely, a maximum kernel size and a minimum kernel size. When performing morphological black-hat processing using the minimum kernel size, feature pixels in the pixel region corresponding to tiny materials can be extracted specifically; when performing morphological black-hat processing using the maximum kernel size, feature pixels in the pixel region corresponding to materials of regular size can be extracted completely. This allows for subsequent material identification based on the fusion result, effectively improving the shortcomings of single-scale extraction in terms of missed or false detections. Here, "tiny materials" is a relative concept, referring to materials smaller than the average size of materials to be detected. For example, the actual image pixels corresponding to such materials may be in the range of 1 to 2 pixels. This disclosure does not limit the absolute size of tiny materials; the specific size can be determined according to actual working conditions.
[0030] In some optional application scenarios, a gradient size interval is set between the minimum morphological kernel and the maximum morphological kernel to prevent the feature extraction from overlapping due to the small difference in the size of adjacent kernels, thereby helping to ensure the effectiveness and reliability of multidimensional feature pixel extraction.
[0031] In other examples, the kernel size can be four, for example, the kernel size can be 3, 7, 11 and 15 respectively. Then, based on the kernel of multiple sizes, morphological black hat processing can be performed to mine feature pixels of materials of different sizes in multiple dimensions, reduce the problem of missing identification of small materials, and realize the complete extraction of material pixels in the full size range, which helps to provide reliable data support for subsequent high-precision classification and recognition.
[0032] Step S130: Based on the first weight reorganization corresponding to the multi-core size, perform feature fusion processing on the multi-scale black hat data to obtain the first feature map.
[0033] Each morphological kernel is assigned a corresponding first weight, and the black hat data corresponding to each kernel size are fused according to the corresponding weights to obtain a first feature map. This feature fusion method highlights the detailed features of tiny materials and reduces the probability of missed identification. In the first weighting, the weight corresponding to the smallest kernel size is the maximum weight value, and the weight corresponding to the largest kernel size is the minimum weight value.
[0034] For example, taking multi-core sizes of 3, 7, 11, and 15 as examples, when the first weighted reassembly is represented by a vector, the weight vector can be: .Will The first feature map is obtained by weighted fusion with multi-scale black hat data, and the difference between the fusion result and the target image is calculated.
[0035] Step S140: Based on the second weight reorganization corresponding to the multi-core size, perform feature fusion processing on the multi-scale black hat data to obtain the second feature map.
[0036] A second weight is assigned to each morphological kernel, and the black hat data corresponding to each kernel size are fused according to the corresponding weights to obtain a second feature map. This feature fusion enhances the detailed features of materials of regular size and reduces the probability of misidentification. In the second weighting, the weight corresponding to the largest kernel size is the maximum weight value, and the weight corresponding to the smallest kernel size is the minimum weight value. The first and second weightings are weighted using an inverse weighting allocation logic. By using an inverse weighting allocation logic for the first and second weightings, the pixel detail features of micro-materials and regular-sized materials can be highlighted respectively, thereby effectively reducing the probability of misidentification or missed identification and ensuring the accuracy of material identification. For example, taking multi-kernel sizes of 3, 7, 11, and 15 as an example, if each weighting is represented by a vector, and the weight vector of the first weighting group is: Then, the weight vector of the second weight group can be: .Will The second feature map is obtained by weighted fusion with multi-scale black hat data, and the difference between the fusion result and the target image is calculated.
[0037] In some examples, the first and second weighted reassemblies can be dynamically generated by combining at least one of the following factors: the proportion of minute materials in real-time operating conditions, the average size of the materials, and the detector resolution. For example, if the system detects an increase in the proportion of minute materials in the incoming material, it automatically increases the weight corresponding to the smallest kernel size in the first weighted reassembly and simultaneously decreases the weight of the smallest kernel size in the second weighted reassembly, dynamically adapting to changing production conditions and continuously ensuring recognition effectiveness.
[0038] In some other examples, the first and second weighted recombinations can be determined based on the number of morphological nuclei and the minimum weighted interval between adjacent and sized elements, thereby avoiding identification bias caused by scale faults.
[0039] Step S150: Classify and identify the material category of the material to be detected based on the grayscale distribution of the first feature map and the second feature map.
[0040] In some optional application scenarios, the target image can be as follows Figure 2 As shown, based on the first weighting reorganization corresponding to the multi-core size, feature fusion processing is performed on multi-scale black hat data, and the resulting first feature map can be as follows: Figure 3 As shown; based on the second weight reassembly corresponding to the multi-kernel size, feature fusion processing is performed on multi-scale black hat data, and the resulting second feature map can be as follows. Figure 4 As shown.
[0041] Combination Figure 3 and Figure 4 It can be seen that the grayscale distribution of the first feature map can accurately determine whether there are detailed features of minute materials in the target image and their location when they exist. The grayscale distribution of the second feature map can accurately determine whether there are detailed features of conventional materials in the target image and their location when they exist.
[0042] By combining the detailed features of minute materials with those of conventional materials for comprehensive classification and identification, it is possible to ensure that no tiny, effective materials occupying only a few pixels are missed during the identification process, nor are complete conventional materials misidentified. This ensures the completeness of feature information extraction, making the overall identification process more accurate and reliable, thereby effectively improving the accuracy of material category determination.
[0043] According to the material identification method provided in this disclosure, multi-scale morphological black-hat computation is performed on the target image, and pixel detail features of materials of different sizes are extracted using morphological kernels of different sizes. Then, weighted fusion is performed using two sets of differentiated weights to generate two independent feature maps: one focusing on minute materials and the other on conventional materials. During the classification and identification process, the combined judgment of the multi-dimensional detail features carried by the two feature maps effectively overcomes the defects of missed detections and false detections caused by single-scale feature extraction, improving the accuracy and reliability of material category determination results and fundamentally reducing the probability of missing the identification of minute and valid materials.
[0044] In some embodiments, step S150 above may include: Step a1: Perform region filtering on the first feature map and the second feature map respectively to obtain the first candidate region and the second candidate region.
[0045] To filter out meaningless image noise and improve the computational efficiency of material recognition, region filtering is performed on the first feature map and the second feature map respectively to retain effective connected components within the image that possess material features, resulting in at least one first candidate region and / or at least one second candidate region. That is, both first and second candidate regions can exist, or at least one first candidate region or one second candidate region can exist. Each effective connected component in the first feature map constitutes a separate first candidate region, and each effective connected component in the second feature map constitutes a separate second candidate region. For example, as... Figure 3 As shown, the area marked by the gray rectangle is the area with a higher gray value in the first feature map. When performing region filtering, the selected area within the box will be determined as the first candidate region.
[0046] In some examples, the first feature map can be filtered by a first grayscale threshold to obtain at least one first candidate region.
[0047] In other examples, the second feature map can be filtered by a second grayscale threshold to obtain at least one second candidate region.
[0048] The first and second candidate regions can coexist, or only one type may exist. The generation of the two candidate regions is independent of each other; there is no constraint that the existence of one must necessitate the existence of the other. By configuring corresponding grayscale thresholds for the two feature maps with different focuses, the region can be accurately divided into micro-material regions and regular-sized material regions. The features of the two types of materials do not overlap or interfere with each other, thus avoiding the situation where the grayscale features of large-sized materials mask the pixels of weak and micro-sized materials, helping to reduce the probability of missing the identification of micro-materials.
[0049] In some examples, the first grayscale threshold is relatively low, ensuring that connected regions of minute materials can be effectively identified and not rejected as noise during region filtering. The second grayscale threshold is relatively high, preserving large, continuous, and complete material pixel regions while filtering out scattered and fragmented interfering pixels. By setting differentiated grayscale thresholds, precise segmentation of minute and regular material regions can be achieved, completely separating candidate regions corresponding to minute and regular materials. This avoids mutual occlusion of features from materials of different sizes, providing clear and independent detection objects for subsequent category identification. Here, the detection objects refer to the first and second candidate regions.
[0050] Step a2: Based on the grayscale distribution of the first feature map, determine the first recognition result of the first candidate region.
[0051] Based on the grayscale distribution of the first feature map, the grayscale dispersion of pixels within the first candidate region can be determined. For example, if the pixel dispersion within the first candidate region is low and there are a small number of consecutive pixels, it can be determined to be effective micromaterials; if there are only a single isolated pixel and the grayscale variance fluctuates drastically, it can be determined to be interfering substances such as dust or waste.
[0052] This method of material identification can accurately distinguish between real tiny materials and interfering impurities at the grayscale feature level, effectively reducing the probability of missing tiny materials and thus obtaining the first identification result corresponding to the first candidate region.
[0053] Step a3: Based on the grayscale distribution of the second feature map, determine the second recognition result of the second candidate region.
[0054] Based on the grayscale distribution of the second feature map, the degree of grayscale dispersion of pixels within the second candidate region can be determined. For example, if the grayscale pixel distribution within the second candidate region is continuous and uniform, without obvious grayscale breaks or missing pixels, and the total area of pixels in the region reaches the preset standard for conventional material size, then the second candidate region can be determined as a valid conventional material. If the grayscale distribution within the second candidate region is chaotic, with severe breaks, large areas of missing pixels, or the total area of pixels in the region is far below the standard for conventional materials, and the grayscale features highly match the preset waste and dust interference features, then the second candidate region can be determined as dust, waste, or other interfering substances, and is not considered a valid material.
[0055] This method of material identification can effectively avoid the situation where conventional materials are mistakenly identified as invalid impurities due to accidental factors such as local grayscale loss or surface defects. It can accurately locate the effective conventional material area, significantly reduce the probability of misidentification of conventional materials, and further purify the candidate area, providing a reliable basis for subsequent comprehensive determination of material category.
[0056] Step a4: Based on the first identification result and the second identification result, determine the material category of the material to be detected.
[0057] By combining the first and second identification results, material categories can be comprehensively distinguished from two dimensions: micro-materials and conventional materials. This allows the entire discrimination process to cover material characteristics across the entire size range, overcoming the limitations of single-scale feature extraction and effectively improving the accuracy and reliability of material category determination.
[0058] In some examples, if at least one of the first and second identification results indicates that the material type of the material to be detected is a valid material, then the material category of the material to be detected is determined to be a valid material; if both the first and second identification results indicate that the material type of the material to be detected is an interfering substance, then the material category of the material to be detected is determined to be an interfering substance. Determining the material category of the material to be detected in this way can minimize the omission of valid materials and ensure the recovery rate of valid materials during the production process.
[0059] In other examples, if both the first and second identification results indicate that the material type of the material to be detected is a valid material, then the material category of the material to be detected is determined to be a valid material; if at least one of the first and second identification results indicates that the material type of the material to be detected is an interfering object, then the material category of the material to be detected is determined to be an interfering object. Determining the material category of the material to be detected in this way can effectively improve the accuracy of material identification.
[0060] In some embodiments, step a2 above may include the following steps: Step a21: Determine the first annular region surrounding the first candidate region based on the position of the first candidate region in the first feature map; Step a22: Determine the first center gray value of the first candidate region, the first average gray value of the first annular region, and the first gradient direction of the first annular region; Step a23: Based on the first center gray value, the first average gray value, and the first gradient direction, the first classification result is obtained.
[0061] Specifically, using the geometric center of the first candidate region as a reference, a ring-shaped region is generated by expanding outward by a preset pixel width. This ring-shaped region completely encloses the first candidate region and does not overlap with the pixels of the candidate region itself. Therefore, this ring-shaped region can be defined as the first ring-shaped region. For example, if the first candidate region is a 2×2 pixel block, expanding outward by 3 pixels will result in a ring-shaped region surrounding the material and containing only background noise. By determining the first ring-shaped region, the grayscale features of the surrounding background of the first candidate region can be extracted, enabling a grayscale comparison between the main pixels of the object corresponding to the first candidate region and the surrounding interfering pixels. This allows for the differentiation between real minute materials and isolated dust particles from the perspective of background differences.
[0062] The pixel grayscale values of the central region of the first candidate region are averaged to obtain the first central grayscale value of the first candidate region, which is used to characterize the core grayscale of the object corresponding to the first candidate region.
[0063] The grayscale values of all pixels within the first annular region are iterated and the average value is calculated to obtain the first average grayscale value, which is used to characterize the overall grayscale level of the background surrounding the tiny material.
[0064] The grayscale trend of the edge pixels in the first annular region is statistically analyzed to determine the first gradient direction, which serves as an auxiliary criterion for distinguishing between valid materials and interfering impurities. For example, the edges of real, tiny materials exhibit a uniform inward-converging gradient direction, while interfering objects such as dust and fine debris lack stable contour boundaries, resulting in chaotic gradient directions without a concentrated convergence pattern. In some examples, the first gradient direction can be calculated using the Scharr operator. That is, the Scharr operator is used to determine the horizontal X and vertical Y gradients of each pixel in the first annular region, and then the gradient magnitude and gradient descent direction are calculated based on the two sets of gradients to obtain the first gradient direction. In other examples, the first gradient direction can also be determined using edge operators such as Sobel and Prewitt.
[0065] The first classification result is determined by the first center gray value, the first average gray value, and the first gradient direction. It can perform joint verification through the three dimensions of material body gray value, background gray value, and edge gradient, which makes up for the single defect of relying solely on the area of connected regions. It can accurately distinguish between weak signal micro materials and random dust noise, thereby effectively improving the accuracy of micro material identification and reducing the probability of missing micro material identification and false dust identification.
[0066] Step a3 above may include the following steps: Step a31: Determine the second annular region surrounding the second candidate region based on the position of the second candidate region in the second feature map; Step a32: Determine the second center gray value of the second candidate region, the second average gray value of the second annular region, and the second gradient direction of the second annular region; Step a33: Based on the second center gray value, the second average gray value, and the second gradient direction, the second classification result is obtained.
[0067] Since the principle for determining the second classification result is similar to that for determining the first classification result, the process for determining the second classification result will not be explained in detail.
[0068] In some embodiments, step a21 above may include: Step a211: Determine the target local image based on the position of the first candidate region in the first feature map; Step a212: Magnify the local image of the target pixel by a specified dilation factor to obtain the updated first feature map; Step a213: Based on the updated first feature map, determine the first annular region surrounding the first candidate region.
[0069] Specifically, because the number of pixels in minute materials is small, and the absorption and attenuation signal of such mineral deposits to X-rays is weak, the grayscale difference between them and background noise and gangue impurities is small. Conventional enhancement methods are difficult to effectively highlight their features and they are easily masked by noise. Therefore, based on the geometric center of the first candidate region, an image block containing the complete first candidate region and a certain range of surrounding background pixels is cropped as the target local image. The target local image is a local region image centered on the first candidate region in the first feature map. For example, if the first candidate region is a 2×2 pixel block, a 5×5 pixel block can be cropped as the target local image.
[0070] The target local image is magnified pixel by pixel according to the preset dilation factor to expand the candidate region boundary outward, which can widen the gray level boundary between the material body and the surrounding background pixels, weaken the interference of fine noise inside the image, and thus obtain the updated first feature map.
[0071] In some examples, pixel-wise magnification of the target local image can be based on the Lanczos interpolation algorithm, thereby improving collision efficiency. For instance, a target local image can be magnified by a factor of 2 using a Lanczos interpolation algorithm with a kernel width of 4. Figure 5 As shown, it is possible to process a 5×5 pixel target local image ( Figure 5 The left side uses the Lanczos interpolation algorithm to calculate pixels, resulting in an expanded version of 10×10 pixels. Figure 5 (Right side). In other examples, pixel enlargement of the target local image can also be achieved through algorithms such as bilinear interpolation and bicubic interpolation to achieve the purpose of boundary expansion.
[0072] Since pixel magnification can widen the grayscale interval between the target material and the background, the average grayscale and gradient direction features of the subsequently extracted first annular region are more distinguishable. Therefore, constructing a first annular region around the first candidate region based on the updated first feature map can significantly improve the discrimination accuracy between tiny materials and dust or impurities.
[0073] In some embodiments, the process of obtaining the first classification result based on the first center gray value, the first average gray value, and the first gradient direction can be as follows: Step b1: Determine the first difference between the first average gray value and the first center gray value; Step b2: Determine the proportion of the first pixel pointing to the center of the first candidate region in the first annular region according to the first gradient direction; Step b3: If the first difference is greater than or equal to the first threshold and the proportion of the first pixel is greater than or equal to the first proportion threshold, then the first classification result is determined to be a valid material. Step b4: If the first difference is less than the first threshold and / or the proportion of the first pixel is less than the first proportion threshold, then the first classification result is determined to be an interference.
[0074] Specifically, to quantify the difference in grayscale brightness between the object corresponding to the first candidate region and the surrounding background, a difference calculation is performed between the first average grayscale value and the first center grayscale value to obtain the first difference value. The larger the first difference value, the more significant the grayscale distinction between the object and the background, and the higher the probability that the region is a real micromaterial.
[0075] The first threshold is the minimum grayscale difference required to determine the authenticity of the material. When the first difference is greater than or equal to the first threshold, it indicates that the object corresponding to the first candidate region has a clear grayscale boundary with the surrounding background and possesses the grayscale characteristics of a valid material.
[0076] The first pixel percentage is used to quantify the convergence of the gradient at the annular edge. Among them, complete micro-materials have closed contours, and the gradient direction of most edge pixels in the annular region will be towards the geometric center of the first candidate region, corresponding to a relatively higher pixel percentage value. In contrast, dust and fine debris do not have stable closed contours, and the gradient direction is chaotic and scattered, with a relatively lower pixel percentage pointing towards the center.
[0077] The first proportion threshold is the minimum percentage benchmark for determining whether the gradient convergence characteristics conform to the standard of real materials. When the percentage of the first pixel is greater than or equal to the first proportion threshold, it indicates that the gradient of the annular edge has a concentrated inward convergence pattern, which conforms to the contour characteristics of effective materials.
[0078] Therefore, if the first difference is greater than or equal to the first threshold, and the proportion of the first pixel is greater than or equal to the first proportion threshold, it can be determined that the object corresponding to the first candidate region is a real material, and thus the first classification result is determined to be a valid material. If the first difference is less than the first threshold and / or the proportion of the first pixel is less than the first proportion threshold, it indicates that the possibility of the object corresponding to the first candidate region being a real material is questionable. Therefore, to ensure the accuracy of subsequent recognition, the first classification result can be determined to be an interference.
[0079] By filtering image noise interference through dual constraints, the shortcomings of relying solely on a single grayscale index can be overcome, which can easily lead to misjudgment. This can effectively improve the recognition accuracy of tiny materials and reduce the probability of missing tiny materials or misidentifying dust particles.
[0080] In some optional application scenarios, the condition for determining that the object corresponding to the first candidate region is a valid material can be expressed by the following formula: ; ; ; ; in, The first difference, The first threshold, The first average gray value, The first center gray value; The percentage of the first pixel. The first proportional threshold, This represents the total number of pixels within the outer ring-shaped area. This indicates that the current pixel coordinates belong to the outer ring region. This represents the total number of pixels within the center region of the first candidate region. This indicates that the current pixel coordinates belong to the center region of the first candidate region. This represents the number of pixels in the outer annular region whose gradient direction points towards the center of the candidate region.
[0081] In other embodiments, to improve the recovery accuracy of effective materials and reduce the probability of missing small materials, when determining the first classification result, if the detected first difference is greater than or equal to a first threshold, or the first pixel proportion is greater than or equal to a first proportion threshold, the first classification result can be directly determined as effective material. This can improve the capture of weak material pixels with single material characteristics, increase the detection rate of effective materials, simplify the identification logic, and improve the identification efficiency of effective materials, thereby promoting the rapid advancement of the entire sorting process. If the first difference is less than the first threshold and the first pixel proportion is less than the first proportion threshold, the first classification result is determined to be interference, which can ensure the identification accuracy of interference, reduce the situation where effective materials are misclassified as impurities, and help stabilize the judgment criteria of subsequent material sorting processes.
[0082] In some optional application scenarios, with Figure 6 Taking the partial image on the left, including the first candidate region and the surrounding first annular region, as an example, without performing pixel magnification processing on the first candidate region, the gradient distribution effect of the first candidate region and the surrounding first annular region in the first feature map can be seen as follows: Figure 6 As shown on the right, the gradients of each pixel in this image are scattered and sparsely distributed, with no prominent convergence features. After adjusting the gradients according to a preset dilation factor... Figure 6 After pixel enlargement processing of the first candidate region on the right, the updated first candidate region and the surrounding first annular region can be visualized as follows: Figure 7 As shown on the left, the gradient distribution effect of the corresponding generated first feature map is as follows: Figure 7 As shown on the right, the pixel gradients in the first annular region are more concentrated and show a clear and significant inward convergence trend. Therefore, by enhancing the gradient convergence feature through pixel magnification, the grayscale boundary between the material and the background can be effectively widened, the distinguishability of the gradient pixel ratio can be improved, and thus the recognition accuracy of tiny materials can be effectively improved.
[0083] In some embodiments, the process of obtaining the second classification result based on the second center gray value, the second average gray value, and the second gradient direction can be as follows: Step c1: Determine the second difference between the second average gray value and the second center gray value; Step c2: Determine the proportion of the second pixel pointing to the center of the second candidate region in the second annular region according to the second gradient direction; Step c3: If the second difference is greater than or equal to the second threshold, and the proportion of the second pixel is greater than or equal to the second proportion threshold, then the second classification result is determined to be valid material; and Step c4: If the second difference is less than the second threshold and / or the second pixel proportion is less than the second proportion threshold, then the second classification result is determined to be an interference.
[0084] Since the judgment principle of the second classification result is similar to that of the first classification result, the judgment process of the second classification result will not be explained in detail.
[0085] In some embodiments, the material sorting equipment includes a single-energy X-ray detection device, and step S110 above may include: Step d1: Based on a single-energy X-ray detection device, acquire a transmission image of the material to be detected; Step d2: Enhance the grayscale of the transmission image to obtain the updated transmission image; Step d3: Segment the updated transmission image, identify and extract the local image corresponding to the material to be detected, and obtain the target image.
[0086] Specifically, mainstream industrial single-energy X-ray inspection equipment can be used to acquire transmission images of the material to be inspected. The images are stored in 16-bit raw grayscale data format, which fully preserves the high-contrast details of the image and avoids the loss of grayscale difference information between the effective material and the interfering object.
[0087] The transmission image undergoes grayscale enhancement processing to suppress environmental interference and detector thermal noise, increasing the grayscale contrast between the image region corresponding to the effective material and the image region corresponding to the interfering object, thus obtaining an updated transmission image. The grayscale enhancement algorithm can include, but is not limited to, any one or a combination of the following: background correction algorithm, arctangent enhancement algorithm, logarithmic enhancement, gamma correction, adaptive histogram equalization (CLAHE), etc., the specific algorithm to be determined based on the actual characteristics of the material to be detected.
[0088] Image segmentation processing is performed on the updated transmission image to separate the local image corresponding to the material to be detected from the background region, thereby reducing noise interference from background pixels and reducing the computational load for subsequent material identification. The segmentation algorithm may include, but is not limited to, adaptive binarization and contour segmentation.
[0089] In some embodiments, step S120 may include: Step f1: Determine the number of morphological nuclei and the size of each morphological nuclei based on the material characteristics under the current working conditions and the resolution of the single-energy X-ray detection equipment. Step f2 involves performing morphological black hat processing on the target image based on the size of each morphological kernel to obtain multi-scale black hat data.
[0090] Specifically, the size range of the material, the density difference of the material itself, and the clarity of X-ray imaging all directly affect the extraction effect of grayscale details. Therefore, it is necessary to configure the parameters of the multi-scale morphological nuclei in advance, taking into account the actual characteristics of the material at the working site and the inherent resolution of the single-energy X-ray detection equipment. For example, small-sized morphological nuclei can be configured for tiny materials, and medium / large-sized morphological nuclei can be configured for materials of conventional sizes, thus obtaining a set of morphological nuclei covering the entire size range of the material.
[0091] Different morphological kernels of different sizes are used to perform black hat processing on the target image. Small kernels can extract the detailed features of weak and tiny materials, while large kernels can extract the contour features of conventional large materials. Finally, multi-scale black hat data containing detailed information of materials of multiple specifications is obtained, realizing the synchronous acquisition of features of materials of different sizes. This solves the problem that a single-scale kernel can only extract materials of a single specification and is prone to missed detection.
[0092] By configuring the parameters of the multi-scale morphological kernel and performing black hat processing, it is possible to adapt to the imaging characteristics of different types and sizes of materials, providing comprehensive and accurate basic data support for subsequent feature map generation and material classification and recognition, and ensuring the recognition accuracy and sorting efficiency of various materials.
[0093] In some optional application scenarios, taking the identification of concentrate as an example, the process of identifying concentrate using ore sorting equipment can be as follows: Transmission images of the ore to be tested are obtained using a single-energy X-ray detection device.
[0094] The grayscale of the transmission image is enhanced to obtain an updated transmission image.
[0095] The updated transmission image is segmented, and the local image corresponding to the ore to be detected is identified and extracted to obtain the target image.
[0096] Multiple morphological kernels with different kernel sizes are used to perform morphological black hat processing on the target image to obtain multi-scale black hat data.
[0097] Based on the first weighting of the multi-core size, feature fusion processing is performed on the multi-scale black hat data. The fusion result is then compared with the target image, and the difference map is normalized to obtain the first feature map.
[0098] Based on the second weighting of the multi-kernel size, feature fusion processing is performed on the multi-scale black hat data. The fusion result is then compared with the target image, and the difference map is normalized to obtain the second feature map.
[0099] Region filtering is performed on the first feature map and the second feature map respectively to obtain the first candidate region and the second candidate region.
[0100] Based on the position of the first candidate region in the first feature map, the target local image is determined. A Lanczos interpolation algorithm with a kernel width of 4 is used to magnify the target local image by a factor of 2, resulting in an updated first feature map. Based on the updated first feature map, a first annular region surrounding the first candidate region is determined, along with the first center gray value of the first candidate region, the first average gray value of the first annular region, and the first gradient direction of the first annular region.
[0101] If the first difference is greater than or equal to the first threshold, and the proportion of the first pixel is greater than or equal to the first ratio threshold, then the ore to be detected is determined to possess the inherent characteristics of X-ray imaging of extremely small metallic mineral deposits; therefore, the first classification result is determined to be a valid ore. If the first difference is less than the first threshold and / or the proportion of the first pixel is less than the first ratio threshold, then the first classification result is determined to be interference.
[0102] Based on the position of the second candidate region in the second feature map, a second annular region surrounding the second candidate region is determined, and the second center gray value of the second candidate region, the second average gray value of the second annular region, and the second gradient direction of the second annular region are determined.
[0103] If the second difference is greater than or equal to the second threshold, and the proportion of the second pixel is greater than or equal to the second proportion threshold, then the ore to be detected is determined to possess the inherent X-ray imaging characteristics of a conventional mineral spot; therefore, the second classification result is determined to be a valid ore. If the second difference is less than the second threshold and / or the proportion of the second pixel is less than the second proportion threshold, then the second classification result is determined to be interference.
[0104] If at least one of the first and second classification results is determined to be valid ore, then the ore to be detected corresponding to the target image is determined to be concentrate. If both the first and second classification results are determined to be interference, then the ore to be detected corresponding to the target image is determined to be waste ore.
[0105] Based on the same inventive concept, this disclosure also provides a material sorting method applied to material sorting equipment. For example... Figure 8 As shown, the material sorting method may include: Step S210: Use a material identification method to determine the material category of the material to be detected. The material identification method can be any one provided in this disclosure.
[0106] Step S220: Sort the materials to be tested according to the material category.
[0107] The material sorting method provided in this disclosure can significantly reduce the material missed detection rate, ensure the efficiency of continuous online material sorting, and improve the overall performance of the material sorting equipment, thereby helping to ensure the stable operation of material sorting production.
[0108] Based on the same inventive concept, this disclosure also provides a material sorting device. For example... Figure 9 As shown, the material sorting equipment may include: Feeding mechanism 310 is used to provide materials to be sorted; The transmission mechanism 320 is used to receive and transmit materials to be sorted. The identification mechanism 330 is used to determine the material category of the material to be sorted by employing a material identification method; wherein, the material identification method can be any one of those provided in this disclosure; The sorting mechanism 340 is used to sort materials according to their categories.
[0109] This disclosure uses specific terms to describe embodiments of the present disclosure. Terms such as "an embodiment," "one embodiment," and / or "some embodiments" refer to a particular feature, structure, or characteristic associated with at least one embodiment of the present disclosure. Therefore, it should be emphasized and noted that references to "an embodiment," "one embodiment," or "an alternative embodiment" in different locations throughout this specification do not necessarily refer to the same embodiment. Furthermore, certain features, structures, or characteristics in one or more embodiments of the present disclosure can be appropriately combined.
[0110] In the context of this disclosure, unless the context clearly indicates otherwise, the words "a," "an," "an," and / or "the" do not specifically refer to the singular and may also include the plural. Generally speaking, the terms "comprising" and "including" only indicate the inclusion of expressly identified steps and elements, which do not constitute an exclusive list, and the method or apparatus may also include other steps or elements.
[0111] Similarly, it should be noted that, in order to simplify the description of this disclosure and thus aid in the understanding of one or more embodiments, the foregoing description of embodiments of this disclosure may sometimes combine multiple features into a single embodiment, drawing, or description thereof. However, this disclosure method does not imply that the subject matter of this disclosure requires more features than the features claimed. In fact, the embodiments contain fewer features than all the features of the single embodiments disclosed above.
[0112] The basic concepts have been described above. It is obvious that the above disclosure is merely illustrative and does not constitute a limitation of this disclosure. Although not explicitly stated herein, various modifications, improvements, and corrections may be made to this disclosure by those skilled in the art. Such modifications, improvements, and corrections are suggested in this disclosure and therefore remain within the spirit and scope of the embodiments of this disclosure.
Claims
1. A material identification method, characterized in that, The method, applied to material sorting equipment, includes: Acquire a target image of the material to be inspected; Morphological black hat processing is performed on the target image based on multiple kernel sizes to obtain multi-scale black hat data, wherein the multiple kernel sizes include at least the maximum kernel size and the minimum kernel size; Based on the first weighting reorganization corresponding to the multi-kernel size, feature fusion processing is performed on the multi-scale black hat data to obtain a first feature map, wherein the weight value corresponding to the minimum kernel size in the first weighting reorganization is the maximum weight value, and the weight value corresponding to the maximum kernel size is the minimum weight value. Based on the second weighting reorganization corresponding to the multi-core size, feature fusion processing is performed on the multi-scale black hat data to obtain a second feature map. In the second weighting reorganization, the weight value corresponding to the largest kernel size is the maximum weight value, and the weight value corresponding to the smallest kernel size is the minimum weight value. The first weighting reorganization and the second weighting reorganization are weighted using reverse weighting allocation logic. Classification and identification are performed based on the grayscale distribution of the first feature map and the second feature map to determine the material category of the material to be detected.
2. The material identification method according to claim 1, characterized in that, The classification and identification based on the grayscale distribution of the first feature map and the second feature map to determine the material category of the material to be detected includes: Region filtering is performed on the first feature map and the second feature map respectively to obtain at least one first candidate region and / or at least one second candidate region; Based on the grayscale distribution of the first feature map, the first recognition result of the first candidate region is determined; Based on the grayscale distribution of the second feature map, a second recognition result for the second candidate region is determined; Based on the first identification result and the second identification result, the material category of the material to be detected is determined.
3. The material identification method according to claim 2, characterized in that, The step of performing region filtering on the first feature map and the second feature map respectively to obtain the first candidate region and the second candidate region includes: The first feature map is filtered by a first grayscale threshold to obtain at least one first candidate region; and / or, The second feature map is filtered by a second grayscale threshold to obtain at least one second candidate region.
4. The material identification method according to claim 2, characterized in that, The first recognition result for determining the first candidate region based on the grayscale distribution of the first feature map includes: Based on the position of the first candidate region in the first feature map, a first annular region is determined around the first candidate region; Determine the first center gray value of the first candidate region, the first average gray value of the first annular region, and the first gradient direction of the first annular region; and, Based on the first center gray value, the first average gray value, and the first gradient direction, a first classification result is obtained; The second recognition result for determining the second candidate region based on the grayscale distribution of the second feature map includes: Based on the position of the second candidate region in the second feature map, a second annular region is determined around the second candidate region; Determine the second center gray value of the second candidate region, the second average gray value of the second annular region, and the second gradient direction of the second annular region; and, The second classification result is obtained based on the second center gray value, the second average gray value, and the second gradient direction.
5. The material identification method according to claim 4, characterized in that, Determining the first annular region surrounding the first candidate region based on its position in the first feature map includes: Based on the position of the first candidate region in the first feature map, a target local image is determined, wherein the target local image is a local region image in the first feature map centered on the first candidate region; The target local image is pixel-enlarged according to a specified dilation factor to obtain an updated first feature map; Based on the updated first feature map, a first annular region is determined surrounding the first candidate region.
6. The material identification method according to claim 4 or 5, characterized in that, The first classification result is obtained based on the first center gray value, the first average gray value, and the first gradient direction, including: Determine the first difference between the first average gray value and the first center gray value; Based on the first gradient direction, determine the proportion of the first pixel in the first annular region that points to the center of the first candidate region; If the first difference is greater than or equal to the first threshold, and the first pixel proportion is greater than or equal to the first ratio threshold, then the first classification result is determined to be valid material; and If the first difference is less than the first threshold and / or the first pixel proportion is less than the first proportion threshold, then the first classification result is determined to be an interference. The second classification result is obtained based on the second center gray value, the second average gray value, and the second gradient direction, including: Determine the second difference between the second average gray value and the second center gray value; Based on the second gradient direction, determine the proportion of the second pixel in the second annular region that points to the center of the second candidate region; If the second difference is greater than or equal to the second threshold, and the second pixel proportion is greater than or equal to the second proportion threshold, then the second classification result is determined to be valid material; and If the second difference is less than the second threshold and / or the second pixel proportion is less than the second proportion threshold, then the second classification result is determined to be an interference.
7. The material identification method according to claim 1, characterized in that, The material sorting equipment includes a single-energy X-ray detection device, and acquiring the target image of the material to be detected includes: Based on the single-energy X-ray detection device, a transmission image of the material to be detected is obtained; The grayscale of the transmitted image is enhanced to obtain an updated transmitted image; The updated transmission image is segmented, and the local image corresponding to the material to be detected is determined and extracted to obtain the target image.
8. The material identification method according to claim 7, characterized in that, The morphological black hat processing of the target image based on multiple kernel sizes yields multi-scale black hat data, including: Based on the material characteristics under the current working conditions and the resolution of the single-energy X-ray detection equipment, determine the number of morphological nuclei and the size of each morphological nuclei; The target image is subjected to morphological black hat processing based on the size of each morphological kernel to obtain the multi-scale black hat data.
9. A material sorting method, characterized in that, The method, applied to material sorting equipment, includes: The material identification method according to any one of claims 1-8 is used to determine the material category of the material to be detected; The materials to be tested are sorted according to the material category.
10. A material sorting device, characterized in that, include: The feeding mechanism is used to provide materials to be sorted. A transmission mechanism for receiving and transmitting the materials to be sorted; An identification mechanism is used to determine the material category of the material to be sorted by employing the material identification method according to any one of claims 1-8; The sorting mechanism is used to sort the materials to be sorted according to the material category.
