Ore sorting image processing method, device, equipment, medium and product
By performing logarithmic transformation and denoising on the target pixel region of large ore particles in X-ray images, the problem of identifying large and thick ore concentrates was solved, the ore sorting accuracy and processing efficiency were improved, and the application scope of X-ray sorting technology was expanded.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-03-31
AI Technical Summary
In X-ray sorting technology, when processing large or thick ores, the images acquired after X-ray penetration form a deep overall shadow covering the entire ore, making it difficult to accurately identify the concentrate area and reducing the beneficiation accuracy of the ore sorting equipment.
For target ore particles with a particle size greater than or equal to a preset threshold among multiple ore particles, a logarithmic transformation of the target pixel region is performed. By compressing the dynamic range of bright areas and expanding the dynamic range of dark areas, the pixel differences in the ore spot region are amplified. Combined with background removal and binarization processing, the ore spot characteristics are clearly highlighted.
It effectively improves the identification of large and thick ore concentrates, solves the problem of large particle identification, balances processing efficiency and resource cost, expands the types of ores applicable to X-ray sorting technology, and enhances its practical value for industrial application and promotion.
Smart Images

Figure CN121767334A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, specifically to an image processing method, apparatus, equipment, medium, and product for ore sorting. Background Technology
[0002] In the field of ore sorting, the core principle of X-ray sorting technology is to achieve precise separation based on the differences in X-ray penetration of different minerals. Specifically, the ore is conveyed at a constant speed to the X-ray irradiation area through a conveying device. Due to the inherent differences in elemental composition and density between the useful minerals (i.e., concentrate, often existing in the form of mineral patches) and gangue minerals in the ore, their absorption of X-rays will show significant differences. This difference is directly reflected in the acquired image: the mineral patch area appears darker (blacker) because it absorbs more X-rays. This feature has become the core basis for identifying concentrate. However, in practical applications, when processing large or thick ores, after X-rays penetrate such ores, a deep overall shadow covering the entire ore will be formed in the acquired image. This overall deep shadow directly obscures the dark identification feature that the mineral patch area should have, making it difficult to accurately identify the concentrate (mineral patch) area, thus directly reducing the beneficiation accuracy of the ore sorting equipment. This problem has become a key technical pain point in the promotion and application of X-ray sorting technology. Summary of the Invention
[0003] This invention provides an image processing method, apparatus, equipment, medium, and product for ore sorting, to solve the problem in related technologies where, when processing large or thick ores, X-rays penetrating such ores will form a deep overall shadow covering the entire ore in the acquired image, making it difficult to accurately identify the concentrate and thus directly reducing the beneficiation accuracy of the ore sorting equipment.
[0004] In a first aspect, the present invention provides an image processing method for ore sorting, the method comprising: acquiring an X-ray image of an ore to be sorted, the ore to be sorted comprising multiple ore particles; determining a target pixel region of at least one target ore particle in the X-ray image, the target ore particle being an ore particle among the multiple ore particles whose particle size is greater than or equal to a preset particle size threshold; and performing a logarithmic transformation on the pixel values of each pixel in the target pixel region to obtain a target image of the target ore particle.
[0005] The ore sorting image processing method provided by this invention specifically focuses on target ore particles with a particle size greater than or equal to a preset threshold among multiple ore particles, processing only their corresponding target pixel regions. This avoids meaningless extra calculations for small particles without shadow interference and accurately targets the problem of large particle identification that urgently needs to be solved in practical applications. In the processing of the target pixel regions, by utilizing the characteristics of logarithmic transformation to "compress the dynamic range of bright areas and expand the dynamic range of dark areas," the pixel differences of mineral spots that were originally covered by overall deep shadows are effectively amplified, thus clearly standing out from the overall shadows and significantly improving the recognition of concentrate areas. This processing method not only solves the problem of concentrate identification of large and thick ores but also takes into account processing efficiency and resource costs. Ultimately, it alleviates the problem of insufficient sorting accuracy of large and thick ores in related technologies from the root, further expands the applicable ore types of X-ray sorting technology, and enhances its practical value for industrial application and promotion.
[0006] In one optional implementation, the step of performing a logarithmic transformation on the pixel values of each pixel in the target pixel region to obtain a target image of the target ore particles includes: determining a highlight region and a shadow region in the target pixel region based on a target pixel threshold, wherein the highlight region contains multiple first pixels with pixel values greater than or equal to a preset pixel threshold, and the shadow region contains multiple second pixels with pixel values less than a preset pixel threshold; performing a linear transformation on the pixel values of each first pixel in the highlight region using a first relation to obtain the target pixel value of the corresponding first pixel; performing a logarithmic transformation on the pixel values of each second pixel in the shadow region using a second relation to obtain the target pixel value of the corresponding second pixel; and determining the target image of the target ore particles based on the target pixel values of the multiple first pixels and the multiple second pixels.
[0007] The method provided in this optional implementation subdivides the target pixel region into two major sub-regions: a bright tone region and a dark tone region, using a preset pixel threshold. A differentiated processing strategy is employed. For the bright tone region, which typically corresponds to the edge or thinner parts of the ore, a linear transformation is used. This maintains the original contrast and detail information of the region while avoiding image distortion caused by over-enhancement. For the dark tone region, which corresponds to the main body of the ore and the mineral patches, a targeted logarithmic transformation is applied. This fully utilizes the core characteristics of the logarithmic function—expanding the dynamic range of dark areas and compressing the dynamic range of bright areas—effectively amplifying the subtle grayscale differences between the mineral patches and the surrounding gangue minerals within the dark tone region. In X-ray images of large-particle ore, both the mineral patches and the overall shadow appear dark, with only slight grayscale differences. A single transformation is insufficient to distinguish this feature of darkness within darkness. Partition processing effectively solves this problem, clearly highlighting the features of the mineral patches that were originally submerged in the overall shadow. This allows the darker characteristics of the mineral patches to stand out from the overall black background, significantly improving the accuracy of mineral patch identification.
[0008] In one optional implementation, the step of acquiring an X-ray image of the ore to be sorted includes: acquiring an initial X-ray image of the ore to be sorted; performing background removal processing on the initial X-ray image to obtain a denoised image of the ore to be sorted; and performing binarization processing on the denoised image to obtain an X-ray image of the ore to be sorted.
[0009] The method provided by this optional implementation removes sensor noise and environmental interference through background field removal processing, highlighting the grayscale characteristics of the ore itself. Then, the binarization process clearly defines the boundary between the ore and the background and simplifies the image information. This not only ensures the purity and effectiveness of the X-ray image, but also reduces the difficulty of subsequent target ore particle positioning and improves computational efficiency. This lays a solid foundation for subsequent ore spot feature enhancement and accurate identification, and helps improve sorting accuracy.
[0010] In one optional implementation, the step of determining a target pixel region for at least one target ore particle in an X-ray image, wherein the target ore particle is an ore particle among a plurality of ore particles whose particle size value is greater than a preset particle size threshold, includes: processing the X-ray image using a preset connected component analysis algorithm to determine pixel regions corresponding to different ore particles in the X-ray image; determining at least one target ore particle among the plurality of ore particles based on the particle size value of each ore particle; and determining the target pixel region of the target ore particle in the pixel regions corresponding to different ore particles.
[0011] In one optional implementation, background removal and empty field processing are performed on the initial X-ray image to obtain a denoised image of the ore to be sorted, including: acquiring a background image and an empty field image; and using the background image and the empty field image to perform denoising processing on the initial X-ray image to obtain a denoised image of the ore to be sorted.
[0012] In one optional implementation, the X-ray image is processed using a preset connected component analysis algorithm to determine the pixel regions corresponding to different mineral particles in the X-ray image. This includes: processing the X-ray image using the preset connected component analysis algorithm to obtain a labeled X-ray image, the labeled X-ray image including labeled regions of multiple mineral particles; setting the pixel value of the background region in the labeled region of each mineral particle as the target value to obtain the pixel regions corresponding to different mineral particles.
[0013] Secondly, the present invention provides an ore sorting image processing apparatus, the apparatus comprising: an acquisition module for acquiring an X-ray image of an ore to be sorted, the ore to be sorted comprising a plurality of ore particles; a determination module for determining a target pixel region of at least one target ore particle in the X-ray image, the target ore particle being an ore particle among the plurality of ore particles whose particle size is greater than or equal to a preset particle size threshold; and a processing module for performing a logarithmic transformation on the pixel values of each pixel in the target pixel region to obtain a target image of the target ore particle.
[0014] Thirdly, the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the ore sorting image processing method of the first aspect or any corresponding embodiment described above.
[0015] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the ore sorting image processing method of the first aspect or any corresponding embodiment thereof.
[0016] Fifthly, the present invention provides a computer program product, including computer instructions for causing a computer to execute the ore sorting image processing method of the first aspect or any corresponding embodiment described above. Attached Figure Description
[0017] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0018] Figure 1 This is a schematic diagram of an application scenario according to an embodiment of the present invention; Figure 2 This is a schematic flowchart of a first method for image processing of ore sorting according to an embodiment of the present invention. Figure 3 This is a schematic diagram of a second process for an image processing method for ore sorting according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the third process of the ore sorting image processing method according to an embodiment of the present invention. Figure 5 This is a schematic diagram of the initial X-ray image in an embodiment of this application; Figure 6This is a schematic diagram of the denoised X-ray image in an embodiment of this application; Figure 7 This is a schematic diagram of the large ore images before and after transformation in the embodiments of this application; Figure 8 This is a structural block diagram of an ore sorting image processing apparatus according to an embodiment of the present invention; Figure 9 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in the present invention and their authorization should be obtained in accordance with relevant laws and regulations through appropriate means.
[0021] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0022] As an optional application scenario of this invention, the specific application environment architecture or specific hardware architecture on which the execution of the ore sorting image processing method depends is described herein. For example... Figure 1 As shown, the architecture system may include at least one terminal device and at least one server. Figure 1 The system is illustrated in the example, which includes a computer 101, a mobile terminal 102, and a server 103, and the terminal devices such as the computer 101 and the mobile terminal 102 are connected to the server 103 through a network 110.
[0023] Specifically, the terminal device can be a smartphone, tablet, laptop, PDA, desktop computer, game console, smart TV, smart wearable device, in-vehicle terminal, VR (Virtual Reality) device, AR (Augmented Reality) device, etc. Server 103 can be a standalone physical server, a server cluster, a distributed system, or a cloud server providing cloud services. Network 110 can be a wired or wireless network, examples of which include, but are not limited to, the Internet, corporate intranet, local area network, wide area network, mobile communication network, and combinations thereof.
[0024] In the field of ore sorting, the core principle of X-ray sorting technology is to achieve precise separation based on the differences in X-ray penetration of different minerals. Specifically, the ore is conveyed at a constant speed to the X-ray irradiation area through a conveying device. Due to the inherent differences in elemental composition and density between the useful minerals (i.e., concentrate, often existing in the form of mineral patches) and gangue minerals in the ore, their absorption of X-rays will show significant differences. This difference is directly reflected in the acquired image: the mineral patch area appears darker (blacker) because it absorbs more X-rays. This feature is also the core basis for identifying the concentrate. However, in practical applications, when processing large or thick ores, after X-rays penetrate such ores, a deep overall shadow covering the entire ore will be formed in the acquired image. This overall deep shadow directly obscures the dark identification feature that the mineral patch area should have, making it difficult to accurately identify the concentrate (mineral patch area), and thus directly reducing the beneficiation accuracy of the ore sorting equipment. This problem has become a key technical pain point in the promotion and application of X-ray sorting technology.
[0025] In view of this, the present invention provides an image processing method for ore sorting, which can be applied to a server to preprocess ore sorting images. The method provided in this application focuses specifically on target ore particles with a particle size greater than or equal to a preset threshold among multiple ore particles, processing only their corresponding target pixel regions. This avoids meaningless extra calculations for small particles without shadow interference and accurately targets the problem of large particle identification that urgently needs to be solved in practical applications. In the processing of the target pixel regions, by utilizing the characteristics of logarithmic transformation to "compress the dynamic range of bright areas and expand the dynamic range of dark areas," the pixel differences of mineral spots that were originally covered by overall deep shadows are effectively amplified, thus clearly standing out from the overall shadows and greatly improving the identification of concentrates. This processing method not only solves the problem of concentrate identification of large and thick ores, but also takes into account processing efficiency and resource costs, ultimately alleviating the problem of insufficient sorting accuracy of large and thick ores in related technologies from the root, further expanding the types of ores applicable to X-ray sorting technology, and enhancing its practical value for industrial application and promotion.
[0026] According to an embodiment of the present invention, an embodiment of an image processing method for ore sorting is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0027] This embodiment provides an image processing method for ore sorting, which can be used in the aforementioned server. Figure 2 This is a flowchart of an ore sorting image processing method according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps: Step S201: Obtain an X-ray image of the ore to be sorted, which includes multiple ore particles.
[0028] For example, the ore to be sorted is a raw material that needs to be separated from the concentrate (useful minerals) and gangue (useless minerals) using X-ray technology. The ore to be sorted is not a single whole, but is composed of multiple independent ore particles. An X-ray image is an image acquired after irradiating the ore to be sorted with X-rays, which can reflect the differences in X-ray absorption of minerals inside the ore.
[0029] Step S202: Determine the target pixel region of at least one target ore particle in the X-ray image. The target ore particle is an ore particle among multiple ore particles whose particle size value is greater than or equal to a preset particle size threshold.
[0030] For example, in the acquired X-ray image, mineral particles with a diameter greater than or equal to a preset particle size threshold are identified and delineated, i.e., target mineral particles, and the corresponding image pixel range is the target pixel region.
[0031] Step S203: Perform a logarithmic transformation on the pixel values of each pixel in the target pixel region to obtain the target image of the target ore particles.
[0032] For example, a pixel value represents the brightness of a pixel. In an X-ray mineral image, this value corresponds to the degree to which the mineral absorbs X-rays; a smaller value generally indicates greater X-ray absorption and a darker image area. Logarithmic transformation is a grayscale enhancement technique whose core function is to compress the dynamic range of bright areas and expand the dynamic range of dark areas, thus amplifying subtle grayscale differences in dark regions. In this embodiment, a logarithmic transformation operation is performed on an image region of a specific mineral particle to generate an enhanced target image.
[0033] The ore sorting image processing method provided in this embodiment specifically focuses on target ore particles with a particle size greater than or equal to a preset threshold among multiple ore particles, processing only their corresponding target pixel regions. This avoids meaningless extra calculations for small particles without shadow interference and accurately targets the problem of large particle recognition that urgently needs to be solved in practical applications. In the processing of the target pixel regions, by utilizing the characteristics of logarithmic transformation to "compress the dynamic range of bright areas and expand the dynamic range of dark areas," the pixel differences of mineral spots that were originally covered by overall deep shadows are effectively amplified, thus clearly standing out from the overall shadows and greatly improving the recognition of concentrate areas. This processing method not only solves the problem of concentrate recognition for large and thick ores but also takes into account processing efficiency and resource costs. Ultimately, it alleviates the problem of insufficient sorting accuracy for large and thick ores in related technologies from the root, further expands the applicable ore types of X-ray sorting technology, and enhances its practical value for industrial application and promotion.
[0034] This embodiment provides an image processing method for ore sorting, which can be used in the aforementioned server. Figure 3 This is a flowchart of an ore sorting image processing method according to an embodiment of the present invention, such as... Figure 3 As shown, the process includes the following steps: Step S301: Obtain an X-ray image of the ore to be sorted, which includes multiple ore particles.
[0035] Specifically, step S301 above includes: Step S3011: Obtain an initial X-ray image of the ore to be sorted.
[0036] For example, in this embodiment of the application, an initial X-ray image of the ore to be sorted is acquired by an X-ray image acquisition device.
[0037] Step S3012: The initial X-ray image is processed to remove background voids, resulting in a denoised image of the ore to be sorted.
[0038] For example, in this embodiment of the application, the initial X-ray image is subjected to background removal processing to eliminate noise interference, ensure data authenticity, and improve image quality and clarity, so as to obtain a denoised X-ray image.
[0039] In some optional implementations, step S3012 above includes: Step a1: Obtain the background image and the empty field image.
[0040] For example, in this embodiment of the application, the raw data values of the X-ray imaging sensor are acquired when X-rays are off to obtain a background image reflecting the inherent noise of the X-ray imaging sensor. The data values when X-rays are on but there is no sample (i.e., no ore) are used to obtain an empty field image reflecting the maximum imaging value of the imaging sensor directly irradiated by X-rays.
[0041] Step a2: Use the background image and the empty field image to denoise the initial X-ray image to obtain the denoised image of the ore to be sorted.
[0042] For example, the initial X-ray image is processed using the background image and the empty field image to obtain a background-removed and empty field-removed X-ray image, i.e., a denoised X-ray image. "Background-removal and empty field-removal processing" is a crucial step in X-ray image preprocessing. Its purpose is to eliminate dark current noise from the X-ray detector, ambient light interference, and the detector's own response inhomogeneity, ensuring that the denoised X-ray image accurately reflects the degree of X-ray absorption by the ore. Differences in X-ray absorption across different regions of the ore can be accurately characterized using a wide grayscale range. For instance, a smaller grayscale value indicates stronger X-ray absorption, corresponding to a darker area, possibly a deep shadow or mineral patch; a larger grayscale value indicates weaker absorption, corresponding to a brighter area, often a gangue area. The denoised X-ray image retains the 16-bit data precision of the initial denoised X-ray image (without downsampling), providing sufficient dynamic range for subsequent logarithmic transformation calculations and avoiding loss of detail.
[0043] Step S3013: Binarize the denoised image to obtain an X-ray image of the ore to be sorted.
[0044] For example, the background-removed X-ray image is binarized to obtain a binarized image. In this embodiment, by converting the image into a binarized image containing only black and white pixel values, the boundary between ore particles and the background is clearly defined, while significantly simplifying the complexity of image information, laying the foundation for the accurate positioning and processing of target ore particles. Specifically, background removal processing has removed sensor noise and environmental interference. At this point, the ore and background in the image still show a grayscale difference. Binarization can clearly distinguish the ore particle area from the background area by setting a pixel threshold, facilitating the rapid identification and delineation of the pixel range of a single ore particle, especially accurately locating target ore particles with a particle size larger than the preset threshold. At the same time, binarization removes redundant grayscale levels in the image, reducing the computational load of subsequent image processing, adapting to the efficiency requirements of real-time sorting in industrial settings, and avoiding deviations in target area extraction due to complex image information.
[0045] Step S302: Determine the target pixel region of at least one target ore particle in the X-ray image. The target ore particle is an ore particle among multiple ore particles whose particle size value is greater than or equal to a preset particle size threshold.
[0046] Specifically, step S302 includes: Step S3021: The X-ray image is processed using a preset connected component analysis algorithm to determine the pixel regions corresponding to different mineral particles in the X-ray image.
[0047] In some optional implementations, step S3021 above includes: Step b1: The X-ray image is processed using a preset connected component analysis algorithm to obtain a labeled X-ray image, which includes labeled regions of multiple mineral particles.
[0048] For example, the preset connected component analysis algorithm may include, but is not limited to, the Two-pass scanning method, the seed-filling method, or OpenCV and MATLAB functions. Using connected component analysis algorithms (including existing Two-pass scanning methods, seed-filling methods, or OpenCV and MATLAB functions) to process the binarized image, a labeled X-ray image is obtained. This allows for the labeling and feature extraction of different mineral particles in the background-removed X-ray image, assigning a unique non-zero index to each mineral particle. When factors such as small particle size cause the number of minerals per frame to exceed the upper limit, the non-zero index value in the labeled X-ray image will be greater than the preset maximum number of minerals, such as 1000. Non-zero index values exceeding the preset number of minerals will not be assigned indexes (avoiding array out-of-bounds errors that could cause program crashes and improving solution stability), used for quickly locating individual minerals and distinguishing minerals from the background.
[0049] Step b2: Set the pixel value of the background area in the marked area of each ore particle to the target value to obtain the pixel area corresponding to each ore particle.
[0050] For example, in this embodiment of the application, the background area is marked as 0, and the pixels of the background area with zero index in the marked X-ray image do not need to be enhanced. The pixel value of the corresponding pixel in the X-ray image with background field removed is set to the maximum value of 16-bit grayscale, 65535 (pure white), which ensures the uniform representation of the background area and skips invalid calculations.
[0051] Step S3022: Based on the particle size value of each ore particle, at least one target ore particle is determined among multiple ore particles.
[0052] For example, in this embodiment of the application, the particle size information of each non-zero indexed ore marker on the marked X-ray image is compared with the preset ore particle size information. If the particle size of each non-zero indexed ore marker on the X-ray image is greater than or equal to the preset ore particle size, then the ore marked by the non-zero index is determined to be a large ore, which is the pixel point to be processed. For example, a stone with a particle size ≥ 40cm is a large stone. If the particle size of each non-zero indexed ore marker on the marked X-ray image is less than the preset ore particle size, the pixel value at the corresponding position on the marked X-ray image is not processed. Since X-rays can fully penetrate medium and small ores, there are no obvious deep shadows in the image, and the ore spot features can be effectively identified without additional enhancement. Enhancement processing is only performed on large ores, which can accurately solve technical pain points and reduce unnecessary computation, further improving processing efficiency.
[0053] Step S3023: Determine the target pixel region of the target ore particle in the pixel regions corresponding to different ore particles.
[0054] Step S303: Perform a logarithmic transformation on the pixel values of each pixel in the target pixel region to obtain the target image of the target ore particles. For details, please refer to [link to relevant documentation]. Figure 2 Step S203 of the illustrated embodiment will not be described again here.
[0055] This embodiment provides an image processing method for ore sorting, which can be used in the aforementioned server. Figure 4 This is a flowchart of an ore sorting image processing method according to an embodiment of the present invention, such as... Figure 4 As shown, the process includes the following steps: Step S401: Obtain an X-ray image of the ore to be sorted, which includes multiple ore particles. For details, please refer to [link to relevant documentation]. Figure 3 Step S301 of the illustrated embodiment will not be described again here.
[0056] Step S402: Determine the target pixel region of at least one target ore particle in the X-ray image. The target ore particle is an ore particle among multiple ore particles whose particle size is greater than or equal to a preset particle size threshold. For details, please refer to [link to relevant documentation]. Figure 3 Step S302 of the illustrated embodiment will not be described again here.
[0057] Step S403: Perform a logarithmic transformation on the pixel values of each pixel in the target pixel region to obtain the target image of the target ore particles.
[0058] Specifically, step S403 includes: Step S4031: Based on the target pixel threshold, determine the bright tone region and the dark tone region in the target pixel region. The bright tone region contains multiple first pixels, and the pixel value of the first pixels is greater than or equal to the preset pixel threshold. The dark tone region contains multiple second pixels, and the pixel value of the second pixels is less than the preset pixel threshold.
[0059] For example, the preset pixel threshold can be determined according to actual needs, and this application embodiment does not impose specific limitations. In this application embodiment, the preset pixel threshold may include, but is not limited to, 25000.
[0060] Step S4032: Perform a linear transformation on the pixel values of each first pixel in the bright tonal region using the first relational formula to obtain the target pixel value of the corresponding first pixel.
[0061] For example, in this step, the bright area undergoes linear transformation (moderately adjusting brightness while preserving vein details). The bright area determination logic is as follows: the bright area determination condition is set as... This region corresponds to a thinner section of a large ore deposit or a gangue area (with weak X-ray absorption and high grayscale value), requiring no strong stretching, only moderate adjustment of brightness and contrast. In the embodiments of this application, the first relationship can be shown as follows:
[0062] in, This represents the target pixel value of the first pixel. This indicates the second gain, with a value ranging from 40 to 80; This represents the linear offset (value range 12000-42000), used to adjust the overall brightness of the bright areas to prevent the bright areas from becoming too dark due to contrast adjustment. The preset pixel threshold is set between 20,000 and 30,000, with 25,000 being preferred. The threshold setting has been verified through a large number of experiments to ensure that there are no obvious discontinuities in the transformation results between the dark and bright areas, and that the overall image transitions naturally, avoiding "enhancement traces". Indicates the second gain (Value range 40-80) is converted to a gain coefficient (0.4-0.8), used to adjust the contrast of bright areas: when When the gain coefficient is greater than 1, the contrast is improved. When the gain coefficient is less than 1, the contrast is reduced.
[0063] Compared to logarithmic transformation, linear transformation does not alter the relative gray levels of pixels within the highlight region, thus preserving the original details of the gangue region to the greatest extent and avoiding image distortion caused by over-enhancement. It should be noted that if the calculated... The image is forcibly limited to 65535 (the maximum value for a 16-bit grayscale image). The reason is that the grayscale value of the bright areas is inherently high, and after linear transformation, grayscale value overflow may occur, resulting in pixel saturation (pure white) and loss of details in the vein area; limiting it to 65535 can avoid image overexposure and ensure the integrity of details in the bright areas.
[0064] Step S4033: Use the second relation to perform a logarithmic transformation on the pixel values of each second pixel in the dark area to obtain the target pixel value of the corresponding second pixel.
[0065] For example, in an embodiment of this application, the second relation can be as follows:
[0066] in, This represents the target pixel value of the first pixel. This represents the first gain, where the first gain trend range is 20000-40000; The base value is 4000-7500; Avoidable When approaching 0, Numerical overflow occurs to ensure the validity of logarithmic calculations; 0.6 is a scaling factor used to adjust the sensitivity of logarithmic transformation, so that different gray values (corresponding to subtle differences between mineral patches and shadows) in the deep shadow area can be fully stretched. This indicates that the logarithmic calculation result is scaled to avoid the grayscale value range after transformation exceeding the effective range of the 16-bit image. Used to achieve grayscale inversion and stretching, mapping low grayscale values in dark areas to a higher grayscale range (e.g., stretching the grayscale values in deep shadow areas from 5000-20000 to 10000-50000), thus increasing the grayscale difference between mineral spots and shadows; 0.84 is a brightness calibration coefficient, used to correct the problem of overall image brightness being too high after logarithmic transformation, ensuring a natural brightness transition between dark and bright areas after enhancement, and avoiding local over-brightness.
[0067] It should be noted that if the calculated result is... The limit is set to 100. The reason is that even after logarithmic stretching, some extremely dark shadow pixels may still be in the low grayscale range. Without a lower limit constraint, these pixels will be confused with the low grayscale values of the mineral spots, resulting in blurred mineral spot boundaries. Limiting it to 100 ensures that the grayscale value of the extremely dark shadow area is higher than the lowest grayscale value of the mineral spot, further highlighting the contour features of the mineral spot.
[0068] Step S4034: Determine the target image of the target ore particle based on the target pixel values of multiple first pixel points and multiple second pixel points.
[0069] For example, in this embodiment of the application, the target pixel value is assigned to the current pixel to complete the enhancement processing of that pixel. GPU parallel computing can be used, and the processing of all pixels is performed synchronously. The enhancement process of a single frame image can be completed within 10ms, fully meeting the real-time processing requirements of ore sorting equipment.
[0070] The following is a specific embodiment to illustrate the ore sorting image processing provided by the present invention.
[0071] This application relates to an X-ray image processing method in the field of ore sorting. Specifically, it addresses the technical challenge of deep shadows obscuring the features of mineral patches (concentrates) in X-ray imaging of large-volume, thick ores. It provides a targeted image enhancement method that preserves good details. The core of this method is a hybrid transformation strategy of "precise screening of large ores - LOG stretching of dark areas - linear adjustment of bright areas" to effectively highlight the features of mineral patches. The specific steps include: Step S1: Acquire an initial X-ray image of the ore to be sorted using an X-ray image acquisition device, determine the ore attribute information (such as the size of the ore imaging area, ore particle size, etc.) in the X-ray image based on the initial X-ray image, and determine the X-ray image to be processed (by the number of pixels) based on the comparison of the ore attribute information with the preset ore attribute information. S11: Noise interference is eliminated from the initial X-ray image to ensure data authenticity and improve image quality and clarity, thereby obtaining a denoised X-ray image. Specifically, background field removal processing is performed on the initial X-ray image (specifically, the raw data values of the X-ray imaging sensor are obtained when X-rays are off to obtain a background image reflecting the inherent noise of the X-ray imaging sensor; the data values are obtained when X-rays are on but there is no sample (i.e., no ore) to obtain an empty field image reflecting the maximum imaging value of the imaging sensor directly irradiated by X-rays; the initial X-ray image is processed using the background image and the empty field image to obtain a denoised X-ray image; this image processing process is existing technology and will not be described in detail here), resulting in a background field-removed X-ray image, i.e., a denoised X-ray image. It should be noted that "background removal processing" is a crucial step in X-ray image preprocessing. Its purpose is to eliminate dark current noise from the X-ray detector, ambient light interference, and the detector's own response inhomogeneity. This ensures that the denoised X-ray image accurately reflects the degree of X-ray absorption by the ore (differences in X-ray absorption across different regions of the ore can be precisely characterized by a wide grayscale range; for example, smaller grayscale values indicate stronger X-ray absorption, corresponding to a darker area, possibly a deep shadow or mineral patch; larger grayscale values indicate weaker absorption, corresponding to a brighter area, often a gangue area). This process preserves the 16-bit data precision of the initial denoised X-ray image (without downscaling), providing sufficient dynamic range for subsequent LOG transform calculations and avoiding detail loss. The background-removed X-ray image is a 16-bit single-channel grayscale image to be processed, with pixel grayscale values ranging from 0 to 65535.
[0072] Specifically, the background removal step in X-ray ore image preprocessing is a preprocessing operation to eliminate X-ray image noise and improve image quality. Its purpose is to ensure the image accurately reflects the ore's X-ray absorption characteristics. This step can be determined using the following formula:
[0073]
[0074] in, This represents the denoised image data obtained after processing; It is the empty field value, which represents the detector data corresponding to the empty field image and reflects the reference value when X-rays directly hit the sensor. The background value represents the detector data corresponding to the background image, reflecting the inherent noise of the sensor itself; The raw data value represents the detector data corresponding to the initial X-ray image to be processed.
[0075] The calculation logic is: when The difference between the background and the empty field is large enough that... Subtract the background noise, then divide by Normalize the empty field reference, and finally multiply by . (The maximum pixel value of the 16-bit image is 65535, multiplied by a scaling factor of 0.9) to obtain the denoised image. ;when The difference between the background and the empty field is too small, and the normalized calculation will result in unstable results due to the small denominator. Therefore, a fixed value of 0.9 × 65535 is directly taken as the background. Initial X-ray images can be as follows: Figure 5 As shown, the denoised X-ray image can be as follows: Figure 6 As shown.
[0076] S12: Perform connected component labeling on the background-removed X-ray image. Specifically, binarize the background-removed X-ray image to obtain a binarized image. Then, use connected component analysis algorithms (including existing two-pass scanning methods, seed-filling methods, or OpenCV and MATLAB functions) to process the binarized image, resulting in a labeled X-ray image. This allows for labeling and feature extraction of different mineral particles in the background-removed X-ray image, assigning a unique non-zero index to each mineral particle, and marking the background region as 0. (Specifically, in the labeled X-ray image...) Pixels in the background region with zero index do not need to be enhanced. The pixel values of the corresponding pixels in the X-ray image with the background empty field removed are set to the maximum 16-bit grayscale value of 65535 (pure white). This ensures a uniform representation of the background region and skips invalid calculations. At the same time, when the number of stones in each frame exceeds the limit due to factors such as the small size of the stones, the value of the non-zero index in the marked X-ray image will be greater than the preset maximum number of ore, such as 1000. Non-zero index values exceeding the preset number of ore will not be assigned index marking to avoid array out-of-bounds errors that cause program crashes and improve the stability of the scheme. This is used to quickly locate individual ore and distinguish ore from the background. S13: Identify and store the feature information of each marked ore on the marked X-ray image. Specifically, extract and store the key attributes (including grain size, pixel coordinates, boundary contour range, etc.) of each non-zero index marked ore on the marked X-ray image to provide data support for the subsequent targeted logic of "only processing large ores". S14: Compare the feature information of each marked ore in the marked X-ray image with preset feature information to obtain the X-ray image to be processed. Specifically, extract the particle size information of each non-zero index marked ore in the marked X-ray image and compare it with the preset ore particle size information. If the particle size of each non-zero index marked ore in the X-ray image is greater than or equal to the preset ore particle size, then the ore marked with the non-zero index is determined to be a large ore, which is the pixel to be processed. For example, a stone with a particle size ≥ 40cm is a large stone. If the particle size of each non-zero index marked ore in the marked X-ray image is smaller than the preset ore particle size, the pixel value at the corresponding position in the marked X-ray image is not processed. Since X-rays can fully penetrate medium and small ores, there are no obvious deep shadows in the image, and the ore spot features can be effectively identified without additional enhancement. Enhancement processing is only performed on large ores, which can accurately solve technical pain points and reduce unnecessary computation, further improving processing efficiency.
[0077] Step S2: Retrieve the transformation parameter dataset from the preset database. Based on this dataset, perform a logarithmic transformation (LOG transformation) on the pixel values of the pixels in the X-ray image to be processed, obtaining the target X-ray image. The LOG transformation formula is as follows:
[0078] The pixel values of pixels in an X-ray image are processed using the LOG transform formula. If the pixel value of a pixel in the X-ray image to be processed is less than a pixel value threshold, the pixel is determined to be a dark area; otherwise, it is a bright area.
[0079] The transformation parameter dataset includes (transformation parameters) , , , And the threshold parameter th). The pixel values of the target image. Transformation parameters are the pixel values of the pixels in the X-ray image to be processed. The first gain is defined as the trend range of 20000-40000. This is the baseline value, with a range of 4000-7500. This is the second gain, with a value ranging from 40 to 80. The offset value ranges from 12000 to 42000, and th is the pixel value threshold, which ranges from 20000 to 30000, preferably 25000. The boundary between dark and light tones can be dynamically adjusted according to the actual ore type to improve the adaptability of the solution. Specifically, this can be achieved by adjusting the transformation parameters. , , , And the selection of the threshold parameter th to ensure that the two results in the formula are close, and then obtaining the current transformation parameters. , , , and threshold parameters The specific value.
[0080] It should be noted that the above parameters can be trained to obtain optimal values through a large amount of experimental data (for example, for different mineral types such as iron ore and copper ore, the corresponding parameter combinations can be calibrated respectively). They can also be integrated with adaptive algorithms to adjust in real time to ensure the best enhancement effect in different application scenarios. Specifically, the preset database can include multiple sets of transformation parameter datasets. For which set of transformation parameter datasets to retrieve, the optimal (most suitable) transformation parameter dataset for the current ore screening can be selected based on pre-selected experimental verification.
[0081] Step 21: Perform LOG transformation on the dark areas (stretch the grayscale range of the deep shadow areas to highlight the details of the mineral spots).
[0082] Furthermore, a targeted LOG transformation is performed on the dark areas, calculated using the following formula: The grayscale value X of the 16-bit integer, , Round to the nearest integer to avoid precision loss during calculations and ensure the accuracy of the transformation results; Offset effect: This can prevent x from approaching 0. In case of numerical overflow, ensure the validity of logarithmic calculations; The scaling factor of 0.6 is used to adjust the sensitivity of the LOG transformation, so that different gray values (corresponding to the subtle differences between the mineral spots and the shadows) in the deep shadow area can be fully stretched; : Scaling the logarithmic calculation results to avoid the grayscale value range after transformation exceeding the effective range of the 16-bit image; This feature enables grayscale value inversion and stretching, mapping low grayscale values in dark areas to a higher grayscale range (e.g., stretching the grayscale values in deep shadow areas from 5000-20000 to 10000-50000), thus increasing the grayscale difference between mineral patches and shadows. A brightness calibration factor of 0.84 is used to correct the problem of overall image brightness being too high after LOG transformation, ensuring a natural transition in brightness between dark and bright areas after enhancement, and avoiding local over-brightness.
[0083] It should be noted that if the calculated fxmax is less than 100, it should be forcibly limited to 100. The reason is that even after LOG stretching, some extremely dark shadow pixels may still be in the low grayscale range. Without a lower limit constraint, these pixels will be confused with the low grayscale values of the mineral spots, resulting in blurred mineral spot boundaries. Limiting it to 100 ensures that the grayscale values of the extremely dark shadow areas are higher than the lowest grayscale value of the mineral spots, further highlighting the contour features of the mineral spots.
[0084] Step 22: Perform linear transformation on the bright areas (adjust brightness appropriately to preserve vein details).
[0085] In this step, the bright area undergoes linear transformation (brightness is moderately adjusted to preserve gangue details). The logic for determining the bright area is as follows: the condition for determining the bright area is set to x≥25000. This area corresponds to the thinner part of the large ore or the gangue area (which has weak X-ray absorption and high gray value). No strong stretching is required; only moderate adjustment of brightness and contrast is needed.
[0086] Perform a linear transformation on the highlight region, and the calculation formula is as follows: .
[0087] The technical significance of each parameter and coefficient is as follows: : The second gain (Value range 40-80) is converted to a gain coefficient (0.4-0.8), used to adjust the contrast of bright areas: when When the gain factor is greater than 1, the contrast is improved; when When the gain coefficient is less than 1, the contrast is reduced. Linear offset (value range 12000-42000) is used to adjust the brightness of the bright areas as a whole, so as to avoid the bright areas becoming too dark due to contrast adjustment; Advantages of linear transformation: Compared to LOG transformation, linear transformation does not change the relative gray levels of each pixel in the highlight area, which can preserve the original details of the vein area to the greatest extent and avoid image distortion caused by over-enhancement.
[0088] It should be noted that if the calculated fxmin ≥ 65535, it should be forcibly limited to 65535 (the maximum value for a 16-bit grayscale image). The reason is that the grayscale values in the bright areas are inherently high, and after linear transformation, grayscale overflow may occur, leading to pixel saturation (pure white) and loss of details in the vein areas; limiting it to 65535 can prevent image overexposure and ensure the integrity of details in the bright areas.
[0089] Step S23: Transformation method selection and pixel value update (to achieve a smooth transition from shadow to highlight, thus completing the enhancement).
[0090] In some embodiments, the switching logic of the dual transformation strategy is as follows: Based on the x value of the current pixel, the corresponding transformation method is automatically selected: when x < 25000 (shadow area): the LOG transformation result is used. To highlight the features of mineral patches in deep shadow areas; when x ≥ 25000 (brightness area): use the results of linear transformation. This allows for the preservation of details in the bright tones.
[0091] The switching logic is based on a threshold of 25000. The threshold setting has been verified through a large number of experiments to ensure that the transformation results between the dark and bright areas are smooth without obvious abrupt changes, and the overall image transitions naturally, avoiding "enhancement artifacts".
[0092] In some embodiments, pixel values are updated in real time: the final determined transformation result (fxmin or fxmax) is assigned to the current pixel of x, completing the enhancement process for that pixel. Due to the use of GPU parallel computing, the processing of all pixels is performed synchronously, and the enhancement process of a single frame image can be completed within 10ms, fully meeting the real-time processing requirements of ore sorting equipment. Figure 7 This diagram illustrates the large ore image before and after the transformation. The values 40000, 35000, and 30000 correspond to the pixel values of the large ore image. In X-ray ore imaging, the pixel value (or signal value) corresponds to the degree of X-ray absorption by the ore: a larger value generally indicates less X-ray absorption and a brighter image area; a smaller value indicates more absorption and a darker area. The different numbers in the diagram (e.g., 40000→35000→20000) represent the changes in pixel / signal values of the large ore image during the LOG transformation: the decrease in value corresponds to the expansion of the dynamic range of the dark areas in the image by the LOG transformation. As the values are adjusted, the contrast of the originally blurry details (ore spots) of the large ore is improved, ultimately achieving the effect of "highlighting the ore spots."
[0093] The method provided in this application achieves three core objectives through a layered processing strategy of "precise screening of large ores - dark tone LOG stretching - bright tone linear adjustment": Targeted approach: Enhancement treatment is applied only to large ores to avoid ineffective calculations for medium and small ores, balancing processing efficiency and effectiveness; Highlighting details: By stretching the grayscale range of the deep shadow area of large ore through LOG transformation, the subtle grayscale differences between the ore spots and the shadows are amplified, solving the core pain point of "deep shadows covering ore spots"; Detail Preservation: Linear transformation is used in highlight areas to avoid loss of detail due to over-enhancement and ensure overall image quality; Real-time performance: Based on the CUDA parallel computing architecture, it achieves pixel-level parallel processing to meet the real-time operation requirements of ore sorting.
[0094] This embodiment also provides an ore sorting image processing apparatus for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0095] This embodiment provides an image processing device for ore sorting, such as... Figure 8 As shown, it includes: The acquisition module 801 is used to acquire X-ray images of the ore to be sorted, which includes multiple ore particles. The determination module 802 is used to determine the target pixel region of at least one target ore particle in the X-ray image, wherein the target ore particle is an ore particle among a plurality of ore particles whose particle size value is greater than or equal to a preset particle size threshold. The processing module 803 is used to perform a logarithmic transformation on the pixel values of each pixel in the target pixel region to obtain the target image of the target ore particles.
[0096] In some alternative implementations, the processing module 803 includes: The first determining submodule is used to determine a highlight region and a shadow region in the target pixel region based on the target pixel threshold. The highlight region contains multiple first pixels, and the pixel value of the first pixels is greater than or equal to the preset pixel threshold. The shadow region contains multiple second pixels, and the pixel value of the second pixels is less than the preset pixel threshold. The first processing submodule is used to perform a linear transformation on the pixel value of each first pixel in the bright tone region using the first relational formula to obtain the target pixel value of the corresponding first pixel. The second processing submodule is used to perform a logarithmic transformation on the pixel values of each second pixel in the dark region using the second relational formula to obtain the target pixel value of the corresponding second pixel. The second determination submodule is used to determine the target image of the target ore particle based on the target pixel values of multiple first pixel points and multiple second pixel points.
[0097] In some optional implementations, the acquisition module 801 includes: The acquisition submodule is used to acquire the initial X-ray image of the ore to be sorted; The third processing submodule is used to perform background removal processing on the initial X-ray image to obtain a denoised image of the ore to be sorted. The fourth processing submodule is used to binarize the denoised image to obtain an X-ray image of the ore to be sorted.
[0098] In some alternative implementations, the determining module 802 includes: The fifth processing submodule is used to process the X-ray image using a preset connected component analysis algorithm to determine the pixel regions corresponding to different mineral particles in the X-ray image. The third determination submodule is used to determine at least one target ore particle among multiple ore particles based on the particle size value of each ore particle. The fourth determination submodule is used to determine the target pixel region of the target ore particle in the pixel regions corresponding to different ore particles.
[0099] In some optional implementations, the third processing submodule includes: The acquisition unit is used to acquire the background image and the empty field image; The first processing unit is used to denoise the initial X-ray image using the background image and the empty field image to obtain a denoised image of the ore to be sorted.
[0100] In some alternative implementations, the fifth processing submodule includes: The second processing unit is used to process the X-ray image using a preset connected component analysis algorithm to obtain a labeled X-ray image, which includes labeled regions of multiple mineral particles. The setting unit is used to set the pixel value of the background area in the marked area of each ore particle to the target value, so as to obtain the pixel area corresponding to each ore particle.
[0101] The ore sorting image processing apparatus provided in this embodiment of the invention can execute the ore sorting image processing method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects for executing the method. Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0102] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.
[0103] The following is a detailed reference. Figure 9 This diagram illustrates a structural schematic suitable for implementing an electronic device according to embodiments of the present invention. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 901, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 902 or a program loaded from memory 908 into random access memory (RAM) 903. The RAM 903 also stores various programs and data required for the operation of the electronic device. The processor 901, ROM 902, and RAM 903 are interconnected via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0104] Typically, the following devices can be connected to I / O interface 905: input devices 906 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 907 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; memory devices 908 including, for example, magnetic tapes, hard disks, etc.; and communication devices 909. Communication device 909 allows electronic devices to exchange data via wireless or wired communication with other devices. Although Figure 9 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.
[0105] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 909, or installed from a memory 908, or installed from a ROM 902. When the computer program is executed by the processor 901, it performs the functions defined in the ore sorting image processing method of the embodiments of the present invention.
[0106] Figure 9 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.
[0107] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the ore sorting image processing method shown in the above embodiments is implemented.
[0108] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0109] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A method of ore sorting image processing, characterized by, The method comprises: acquiring an X-ray image of an ore to be sorted, the ore to be sorted comprising a plurality of ore particles; determining a target pixel region of at least one target ore particle in the X-ray image, the target ore particle being an ore particle with a particle size value greater than or equal to a preset particle size threshold in the plurality of ore particles; performing logarithmic transformation on pixel values of each pixel point in the target pixel region to obtain a target image of the target ore particle.
2. The method of claim 1, wherein, The step of performing logarithmic transformation on pixel values of each pixel point in the target pixel region to obtain a target image of the target ore particle comprises: determining a light tone region and a dark tone region in the target pixel region based on a target pixel threshold, the light tone region comprising a plurality of first pixel points, the pixel value of each first pixel point being greater than or equal to a preset pixel threshold, the dark tone region comprising a plurality of second pixel points, the pixel value of each second pixel point being less than the preset pixel threshold; performing linear transformation on the pixel value of each first pixel point in the light tone region using a first relationship to obtain a target pixel value of the corresponding first pixel point; performing logarithmic transformation on the pixel value of each second pixel point in the dark tone region using a second relationship to obtain a target pixel value of the corresponding second pixel point; determining the target image of the target ore particle based on the target pixel values of the plurality of first pixel points and the target pixel values of the plurality of second pixel points.
3. The method of claim 1, wherein, The step of acquiring an X-ray image of an ore to be sorted comprises: acquiring an X-ray initial image of the ore to be sorted; performing background and empty field processing on the X-ray initial image to obtain a denoised image of the ore to be sorted; performing binaryzation processing on the denoised image to obtain the X-ray image of the ore to be sorted.
4. The method according to any one of claims 1 to 3, characterized in that, The step of determining a target pixel region of at least one target ore particle in the X-ray image comprises: processing the X-ray image using a preset connected region analysis algorithm to determine pixel regions corresponding to different ore particles in the X-ray image; determining at least one target ore particle in the plurality of ore particles based on the particle size values of the ore particles; determining the target pixel region of the target ore particle in the pixel region corresponding to the target ore particle.
5. The method of claim 3, wherein, The step of performing background and empty field processing on the X-ray initial image to obtain a denoised image of the ore to be sorted comprises: acquiring a background image and an empty field image; performing denoising processing on the X-ray initial image using the background image and the empty field image to obtain the denoised image of the ore to be sorted.
6. The method of claim 4, wherein, The step of processing the X-ray image using a preset connected region analysis algorithm to determine pixel regions corresponding to different ore particles in the X-ray image comprises: processing the X-ray image using a preset connected region analysis algorithm to obtain a marked X-ray image, the marked X-ray image comprising marked regions of the plurality of ore particles; setting the pixel value of a background region in the marked region of each ore particle to a target value to obtain the pixel region corresponding to each ore particle.
7. An ore sorting image processing apparatus, characterized by, The device comprises: an acquisition module configured to acquire an X-ray image of an ore to be sorted, the ore to be sorted comprising a plurality of ore particles; The determining module is configured to determine a target pixel region of at least one target ore particle in the X-ray image, the target ore particle being an ore particle with a particle size value greater than or equal to a preset particle size threshold in a plurality of ore particles. The processing module is configured to perform logarithmic transformation on pixel values of each pixel point in the target pixel region to obtain a target image of the target ore particle.
8. An electronic device, comprising: The method comprises the following steps: A memory and a processor are connected in communication with each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the ore sorting image processing method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for causing a computer to execute the ore sorting image processing method according to any one of claims 1 to 6.
10. A computer program product, characterised in that, The computer instructions are used to cause a computer to execute the ore sorting image processing method according to any one of claims 1 to 6.