Image segmentation method, image segmentation device, electronic equipment and storage medium

By adjusting the brightness of ore image and identifying the color characteristics of ore, the problem of difficulty in identifying ore and background edges is solved, and the accuracy of image segmentation and anti-interference ability are improved.

CN120047480AActive Publication Date: 2025-05-27BEIJING HONEST TECHNOLOGY CO LTD

Patent Information

Application Number
CN202510535812.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-27
Publication Date
2025-05-27
Estimated Expiration
2045-04-27

AI Technical Summary

Technical Problem

During the ore sorting process, the edge between the ore collected by the image and the background is difficult to be accurately identified, affecting the accuracy of image segmentation.

Method used

By adjusting the image brightness of the ore image, the optimal image is obtained, so that the color difference between the ore area and the background area is greatest; based on the ore color characteristics determined by the optimal image, the ore is identified and an ore mask image is generated.

Benefits of technology

The anti-interference ability and accuracy of image segmentation are improved, making the final target mask image more accurate and reliable.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120047480A_ABST
    Figure CN120047480A_ABST
Patent Text Reader

Abstract

The invention relates to the field of ore separation, in particular to an image segmentation method, an image segmentation device, electronic equipment and a storage medium. The image segmentation method comprises the following steps: acquiring a to-be-processed ore image; the image brightness of the ore image is adjusted, an optimal image is obtained, and the color difference between an ore area and a background area in the optimal image is the maximum value of the background area in the normal exposure state; on the basis of ore color features determined by the optimal image, identifying ore in the optimal image to obtain an ore mask image; and obtaining a target mask image corresponding to the ore image based on the ore mask image. The anti-interference capability of image segmentation can be effectively enhanced, and the accuracy of image segmentation is improved, so that the finally obtained target mask image can be more accurate and reliable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of ore sorting, and in particular to an image segmentation method, an image segmentation device, an electronic device, and a computer storable medium. Background Art

[0002] In the material mining and processing industry, material segmentation is a crucial link. With the development of digital image processing technology, material segmentation technology is also constantly improving. However, in the process of image acquisition, the edge between the ore and the background in the generated image may not be accurately identified due to reasons such as ore properties or acquisition environment, thus affecting the accuracy of image segmentation. Summary of the invention

[0003] To overcome the problems existing in the related art, an exemplary embodiment of the present disclosure provides an image segmentation method, which includes: acquiring an ore image to be processed; adjusting the image brightness of the ore image to obtain an optimal image, wherein the color difference between the ore area and the background area in the optimal image is the maximum value of the background area under normal exposure; based on the ore color features determined by the optimal image, identifying the ore in the optimal image to obtain an ore mask image; based on the ore mask image, obtaining a target mask image corresponding to the ore image.

[0004] In some embodiments, the image brightness of the ore image is adjusted to obtain an optimal image, including: performing gain processing on multiple color channels of the ore image to increase the color difference between the ore area and the background area in the ore image when the background area is in a normal exposure state to obtain an intermediate image; performing nonlinear brightness adjustment processing on the intermediate image to obtain an optimal image.

[0005] In some embodiments, based on the ore color features determined by the optimal image, the ore in the optimal image is identified to obtain an ore mask image, including: performing color space conversion on the optimal image to obtain a multi-color channel image, the color channel image corresponds one-to-one to the color channels in the color space; based on the ore color features determined by the optimal image, the ore color threshold interval corresponding to each color channel is determined respectively; based on the matching result between the color value in each color channel image and the corresponding ore color threshold interval, the ore in the optimal image is identified to obtain an ore mask image.

[0006] In some embodiments, based on the ore mask image, a target mask image corresponding to the ore image is obtained, including: identifying the maximum ore contour in the ore mask image; determining the seed point of the maximum ore contour; based on the seed point, expanding the maximum ore contour to obtain the target ore contour; and performing mask morphology repair based on the target ore contour to obtain the target mask image corresponding to the ore image.

[0007] In some embodiments, obtaining an image of an ore to be processed includes: obtaining an ore transmission image collected by a ray collection device of an ore sorting device, the ore sorting device including a color sorting collection device located downstream of the ray collection device; obtaining a color sorting image corresponding to the ore transmission image collected by the color sorting collection device; identifying an ore contour in the ore transmission image; determining a local image in the color sorting image corresponding to the ore contour; and extracting the ore image to be processed from the color sorting image based on the local image.

[0008] In some embodiments, the method further includes: determining an image position of the ore image on the color-sorted image; and superimposing the target mask image on the color-sorted image according to the image position to obtain a segmented and annotated image corresponding to the color-sorted image.

[0009] In some embodiments, the method further includes: performing noise reduction processing on the ore image; performing noise reduction processing on the optimal image; and / or performing noise reduction processing on the ore mask image; wherein the noise reduction processing includes performing any one or a combination of the following processing: mean blur processing, Gaussian blur processing, and median blur processing.

[0010] In a second aspect, the present disclosure further provides an image segmentation device, which includes: an acquisition module, used to acquire an ore image to be processed; an adjustment module, used to adjust the image brightness of the ore image to obtain an optimal image, wherein the color difference between the ore area and the background area in the optimal image is the maximum value of the background area under normal exposure; a first processing module, using the ore color features determined based on the optimal image to identify the ore in the optimal image to obtain an ore mask image; and a second processing module, used to obtain a target mask image corresponding to the ore image based on the ore mask image.

[0011] In a third aspect, the present disclosure further provides an electronic device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the image segmentation method provided in any one of the above aspects by executing the computer instructions.

[0012] In a fourth aspect, the present disclosure further provides a computer-readable storage medium, which stores the following program, and the program is used to execute any of the above-mentioned image segmentation methods.

[0013] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.

[0014] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: According to the image segmentation method provided by the present disclosure, by adjusting the image brightness of the ore image, the color difference between the ore area and the background area can be increased as much as possible when the background area is under normal exposure, so as to make the contour boundary between the ore and the background clearer, and then image segmentation is performed based on the obtained optimal image and the determined ore color characteristics, which can effectively enhance the anti-interference ability of image segmentation and improve the accuracy of image segmentation, so that the final target mask image can be more accurate and reliable. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The present disclosure may be better understood by describing exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, in which:

[0016] Figure 1 It is a schematic diagram of the structure of a sorting device according to an exemplary embodiment of the disclosure;

[0017] Figure 2 is a flowchart of an image segmentation method according to an exemplary embodiment of the disclosure;

[0018] Figure 3 is a flowchart of an image segmentation method according to another exemplary embodiment of the present disclosure;

[0019] Figure 4 is an image of a mineral according to an exemplary embodiment of the disclosure;

[0020] Figure 5 is a target mask image shown according to an exemplary embodiment of the disclosure;

[0021] Figure 6 A segmented and labeled image is shown according to an exemplary embodiment of the disclosure;

[0022] Figure 7 is a schematic diagram of the architecture of an image segmentation device according to an exemplary embodiment of the disclosure;

[0023] Figure 8 The invention is a schematic diagram of the architecture of an electronic device according to an exemplary embodiment of the disclosure. DETAILED DESCRIPTION

[0024] The specific implementation methods of the present disclosure will be described below. It should be noted that in the specific description of these implementation methods, in order to provide a concise description, it is impossible for this specification to provide a detailed description of all the features of the actual implementation methods. It should be understood that in the actual implementation of any implementation method, just as in the process of any engineering project or design project, in order to achieve the specific goals of the developer and to meet system-related or business-related restrictions, various specific decisions are often made, and this will also change from one implementation method to another. In addition, it can also be understood that although the efforts made in this development process may be complex and lengthy, for ordinary technicians in the field related to the content disclosed by the present disclosure, some changes in design, manufacturing or production based on the technical content disclosed in the present disclosure are just conventional technical means, and should not be understood as insufficient content of the present disclosure.

[0025] Unless otherwise defined, the technical terms or scientific terms used in the present disclosure shall have the usual meanings understood by persons with ordinary skills in the technical field to which the present disclosure belongs. The words "first", "second" and similar words used in the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. Words such as "one" or "one" and the like do not indicate a quantitative limitation, but rather indicate the presence of at least one. Words such as "include" or "comprise" and the like mean that the elements or objects appearing before "include" or "comprise" cover the elements or objects listed after "include" or "comprise" and their equivalents, and do not exclude other elements or objects. Words such as "connect" or "connected" and the like are not limited to physical or mechanical connections, nor are they limited to direct or indirect connections.

[0026] In the field of ore sorting, when sorting ore, ore sorting equipment needs to identify and classify the collected ore images, and then carry out targeted sorting. Figure 1 As shown, the ore sorting equipment 100 may include a feeding mechanism 110, a transmission mechanism 120, a detection mechanism 130 and a sorting device 140. The feeding mechanism 110 is used to feed the ore to be sorted into the transmission mechanism 120. The transmission mechanism 120 may be a structure such as a conveyor belt or a chute, which is used to transport the ore to be sorted fed by the feeding mechanism 110. The detection mechanism 130 is used to detect the ore transported on the transmission mechanism 120 to detect whether the ore is the ore to be removed; the ore to be removed refers to the ore to be separated by the sorting equipment. The ore to be removed may be the desired ore or the undesired ore, as long as the ore can be sorted. The sorting device 140 is used to remove the ore to be removed.

[0027] However, during the image acquisition process, the edge between the ore and the background in the generated image may not be accurately identified due to reasons such as the ore properties or the acquisition environment. For example, the properties of the ore may include the reflective properties of the ore surface or the color of the ore. If the ore surface is highly reflective, the strong reflective effect of the ore surface will cause the irradiated light to be reflected at a high angle during the image acquisition process, causing the brightness of the same area in the image to change dramatically, which will make it difficult for the edge detection algorithm to accurately determine the boundary of the ore. If the color difference between the two ores to be sorted is small, the outline of the ore cannot be correctly identified. If the acquisition environment is in a low-contrast environment, the lack of image details will also make ore identification particularly difficult and the recognition rate low.

[0028] To solve the above problems, an exemplary embodiment of the present disclosure provides an image segmentation method. Figure 2 As shown, the image segmentation method may include:

[0029] Step S210, obtaining an ore image to be processed.

[0030] The ore image refers to an image containing ore. The ore image may be obtained during the process of the transmission mechanism of the ore sorting equipment transmitting the ore. By obtaining the ore image to be processed, the ore in the ore image may be analyzed in a targeted manner, so that the ore sorting efficiency may be improved when the ore is subsequently sorted by the sorting mechanism.

[0031] Step S220, adjusting the image brightness of the ore image to obtain an optimal image.

[0032] In the actual image acquisition process, factors such as the reflective properties of the ore surface, camera parameters, and lighting environment will affect the image brightness of the ore image, resulting in some parts of the image being too bright and some parts being too dark, making the segmentation edge between the ore and the background in the ore image unclear, affecting the accuracy of ore segmentation.

[0033] Therefore, in order to improve the reliability and accuracy of image segmentation, the image brightness of the ore image is adjusted to maximize the color difference between the ore area and the background area in the ore image. To ensure the rationality of the adjustment of the image brightness, the image brightness of the ore image is adjusted when the background area is in a normal exposure state, thereby obtaining the optimal image. Among them, the color difference between the ore area and the background area in the optimal image is the maximum value when the background area is in a normal exposure state.

[0034] By adjusting the ore image to the optimal image, the brightness contrast between the ore area and the background area can be made more obvious, and then when the image is segmented later, the accuracy and reliability of boundary recognition can be improved, thereby helping to improve the accuracy of image segmentation.

[0035] Step S230, based on the ore color features determined by the optimal image, identifying the ore in the optimal image to obtain an ore mask image.

[0036] In the process of the transmission mechanism transmitting ore, the ore is directly placed on the transmission mechanism. The transmission parts of the transmission mechanism and the ore are two objects of different materials. Therefore, in the process of image recognition, the color characteristics of the two have certain differences. Therefore, in order to improve the accuracy of image segmentation, the color characteristics of the ore are determined by the optimal image, so that the image of which area in the optimal image belongs to the image corresponding to the ore can be located according to the color characteristics of the ore, so as to perform effective segmentation and obtain the ore mask image. Among them, the ore mask image is a binary image, and the ore area and the background area correspond to different values ​​respectively.

[0037] In some examples, in the ore mask image, "0" and "1" can be used to identify the ore area and the background area respectively. For example, in the image segmentation process, the ore area belongs to the focus area, and the background area belongs to the non-focus area. Therefore, the ore area can be identified with "1" and the background area can be identified with "0", so that the computer can quickly distinguish the areas, reduce the probability of false detection, and improve the efficiency of image segmentation.

[0038] In other examples, in the ore mask image, "black" and "white" can be used to mark the ore area and the background area respectively. For example, "white" is used to mark the ore area, and "black" is used to mark the background area, so that when performing image segmentation later, the outline of the ore area can be made clearer and more prominent, which is convenient for accurate segmentation and improves the image segmentation accuracy.

[0039] Step S240, based on the ore mask image, obtaining a target mask image corresponding to the ore image.

[0040] Since the optimal image is the result of brightness adjustment of the ore image, a corresponding relationship between the ore mask image and the ore image can be established based on the obtained ore mask image to make it clear that the ore mask image is determined based on the ore image, so that the target mask image can accurately depict the position of the ore in the ore image, thereby obtaining the target mask image corresponding to the ore image, so that the target mask image can be used to perform targeted analysis on the ore in the ore image in the subsequent step, thereby improving the accuracy and efficiency of ore sorting.

[0041] According to the image segmentation method provided by the present disclosure, by adjusting the image brightness of the ore image, the color difference between the ore area and the background area can be increased as much as possible when the background area is under normal exposure, so as to make the contour boundary between the ore and the background clearer, and then image segmentation is performed based on the obtained optimal image and the determined ore color characteristics, which can effectively enhance the anti-interference ability of image segmentation and improve the accuracy of image segmentation, so that the final target mask image can be more accurate and reliable.

[0042] In some embodiments, the above step S220 may include the following steps:

[0043] Step a1, performing gain processing on multiple color channels of the ore image, so as to increase the color difference between the ore area and the background area in the ore image when the background area is in a normal exposure state, and obtain an intermediate image.

[0044] In order to improve the image quality, gain processing is performed on multiple color channels of the ore image to increase the image brightness of the corresponding color channel, so as to make the brightness of the ore area in the ore image more prominent while ensuring the exposure of the background area remains unchanged as much as possible, thereby obtaining an intermediate image.

[0045] In some optional application scenarios, the three color channels R (red), G (green), and B (blue) of the ore image can be linearly enhanced to increase the color difference between the ore area and the background area, so as to more easily identify and separate the ore. For example, the three color channels R (red), G (green), and B (blue) of the ore image can be processed with at least one gain. If the exposure of the background area is detected to have changed during the gain adjustment process, the gain is reduced to determine the optimal gain multiple without changing the exposure of the background area as much as possible, thereby obtaining a reliable intermediate image.

[0046] In other optional application scenarios, the multiple color channels of the ore image can also be gain processed in any of the following ways or in combination: white balance-guided gain adjustment, multi-channel joint linear operation processing, etc. The specific gain adjustment method can be determined according to actual needs and is not limited here. Among them, the white balance-guided gain adjustment may include: calculating the gain factor of each color channel through an automatic white balance algorithm to balance the gray area of ​​the image to eliminate the influence of light color cast. Multi-channel joint linear operation processing may include: performing joint gain processing on multiple color channels using matrix operations, and then adjusting the coupling relationship between channels through matrix coefficients to obtain the desired intermediate image. ‌

[0047] Step a2, performing nonlinear brightness adjustment processing on the intermediate image to obtain an optimal image.

[0048] During the image acquisition process, some details in the intermediate image may not be clearly displayed due to the low brightness due to factors such as ore reflection or low light intensity in the image acquisition environment. Therefore, nonlinear brightness adjustment is performed on the intermediate image to enhance the brightness of the local darker areas and improve the clarity of the local details. In addition, since it is a nonlinear brightness adjustment process, it can effectively prevent the overexposure of the highlight area in the intermediate image during the adjustment process, ensure the reliability of the detail brightness adjustment, avoid invalid adjustment, and thus help improve the efficiency of determining the optimal image. Among them, the nonlinear brightness adjustment process can include but is not limited to any one or a combination of the following methods: histogram equalization, gamma correction, image adaptive enhancement, exponential gain adjustment, etc., which can be determined according to actual needs.

[0049] By performing gain processing and nonlinear brightness adjustment processing on multiple color channels of the ore image, the rationality of the brightness adjustment can be guaranteed, so as to maximize the brightness difference between the ore area and the background area while ensuring that the exposure state of the background area is normal, and make the ore detail features in the ore area as clear and obvious as possible, so that when the image is segmented subsequently, the boundary between the ore area and the background area can be quickly identified, thereby improving the accuracy and efficiency of image segmentation and making the image segmentation process more anti-interference.

[0050] In some embodiments, the above step S230 may include the following steps:

[0051] Step b1, performing color space conversion on the optimal image to obtain a multi-color channel image.

[0052] Since in the process of ore transmission, there may be different types of ores but similar colors. Therefore, in order to improve the accuracy of ore segmentation, the optimal image is converted into a color space to determine the color channel image corresponding to each color channel, so as to facilitate the subsequent screening of pixels in each color channel image in combination with the color characteristics of the ore, and ensure the reliability and accuracy of the determination of the ore area. Among them, the color channel image corresponds to the color channel in the color space one by one. For example, if the color space is HSV, the color channels can be H channel, S channel, and V channel, respectively, where the H channel represents hue, the S channel represents saturation, and the V channel represents brightness. If the color space is HSL, the color channels can be H channel, S channel, and L channel, respectively, where the H channel represents hue, the S channel represents saturation, and the L channel represents brightness. If the color space is Lab, the color channels can be L channel, a channel, and b channel, respectively, where the L channel represents brightness, the a channel represents the color range from green to red, and the b channel represents the color range from blue to yellow.

[0053] Step b2, based on the ore color features determined by the optimal image, respectively determine the ore color threshold interval corresponding to each color channel.

[0054] According to the color characteristics of the ore, the color distribution of the ore area can be determined, and then the ore color threshold range corresponding to each color channel can be determined respectively, so that the subsequent screening of pixels of each color channel image can be more targeted and effectively avoid misidentification.

[0055] In some application scenarios, taking the color space of HSV as an example, according to the color characteristics of the ore, the distribution of the ore in the hue channel can be determined to determine the main hue corresponding to the ore, so that the ore color threshold interval corresponding to the color channel H can be determined. According to the color characteristics of the ore, the distribution of the ore in the saturation channel can be determined, so that the ore color threshold interval corresponding to the color channel S can be determined. According to the color characteristics of the ore, the distribution of the ore in the brightness channel can be determined, so that the ore color threshold interval corresponding to the color channel V can be determined. For example, based on the analysis results of the ore color characteristics, it can be determined that the ore color threshold interval corresponding to the color channel H is 20-150, the ore color threshold interval corresponding to the color channel S is 95-130, and the ore color threshold interval corresponding to the color channel V is 115-225.

[0056] Step b3, based on the matching result between the color value in each color channel image and the corresponding ore color threshold interval, identify the ore in the optimal image to obtain the ore mask image.

[0057] Through the mineral color threshold, the maximum color value and the minimum color value belonging to the mineral in the corresponding color channel can be determined, and then by matching the color value of each pixel in each color channel image with the corresponding mineral color threshold, it can be quickly determined whether the current pixel belongs to the mineral area. For example, if the color value of the pixel is in the mineral color threshold interval of the corresponding color channel, it indicates that the pixel belongs to the mineral. If the pixel color value is not in the mineral color threshold interval of the corresponding color channel, it indicates that the pixel does not belong to the mineral and can be considered as a pixel belonging to the background.

[0058] Identifying the ore in the optimal image by pixel matching can effectively improve the positioning efficiency of the ore area, thereby quickly obtaining the required ore mask image.

[0059] In some examples, since pixel matching is performed on a color channel basis, there may be some pixels whose color values ​​are only in the corresponding ore color threshold range but do not belong to the ore. Therefore, in order to improve the reliability of determining the ore mask image, the pixels corresponding to the color channel images can be integrated, and the pixels belonging to the ore in multiple color channel images can be regarded as the pixels corresponding to the ore. Thus, based on the pixels finally determined to belong to the ore, a ore mask image corresponding to the ore is generated, which can effectively avoid the occurrence of misidentification and is conducive to improving the generation quality of the ore mask image.

[0060] In some embodiments, the above step S240 may include the following steps:

[0061] Step c1, identifying the maximum ore contour in the ore mask image;

[0062] Step c2, determining the seed point of the maximum ore contour;

[0063] Step c3, based on the seed point, expanding the maximum ore contour to obtain the target ore contour;

[0064] Step c4, performing mask morphology repair based on the target ore contour to obtain a target mask image corresponding to the ore image.

[0065] Specifically, during the ore transmission process, there may be adjacent ores at a relatively close distance, which may result in the extracted ore image containing a complete ore image and partial images of other ores. Therefore, the number of ore mask images may be at least one.

[0066] In order to ensure the accuracy and completeness of image segmentation, the ore mask image is processed for contour recognition to determine the maximum ore contour in the ore mask image. The maximum ore contour can be considered as the contour with the most complete contour information in the ore mask image.

[0067] Since different contour recognition algorithms may have certain recognition deviations, the obtained ore contour may have a certain pixel difference with the ore area. Therefore, in order to improve the reliability of the maximum ore contour, the seed point of the maximum ore contour is analyzed and determined, and then combined with the seed point, the maximum ore contour is expanded to eliminate the recognition error, thereby obtaining a reliable target ore contour. For example, the seed point can be the center point, centroid or feature point with obvious characteristics on the contour of the maximum ore contour, which can be determined according to actual needs. Among them, if the seed point is the centroid of the maximum ore contour, it can be determined by the moment or centerOfMass function. The way to expand the maximum ore contour may include but is not limited to any of the following methods: First, through a morphological expansion operation (such as a dilate function), with the seed point as the starting point, the contour is expanded by iterative expansion to obtain a target ore contour that is consistent with expectations; Second, using the seed point as a reference, the FloodFill algorithm is used to achieve adaptive area expansion.

[0068] After obtaining the target ore contour, the target ore contour is repaired by mask morphology to make the contour edge smoother and more natural, and the mask image area smoother and more complete, so as to obtain a higher quality target mask image. Among them, mask morphology repair may include but is not limited to using operations such as corrosion and dilation to repair the contour to eliminate small holes or noise on the target ore contour; use fillPoly or drawContours functions to fill the area within the contour. In some application scenarios, when repairing the target ore contour by mask morphology repair, the burrs on the mask edge can be eliminated by the corrosion operation of the 3×3 structural element, and the holes inside the target ore contour can be filled to improve the quality of the generated target mask image.

[0069] In some embodiments, Figure 3 As shown, the above step S210 may include the following steps:

[0070] Step 211, obtaining an ore transmission image collected by a ray collection device of the ore sorting equipment.

[0071] In order to better identify the ore and facilitate subsequent targeted sorting, the ray collection device of the ore sorting equipment is used to collect images to obtain ore ray images corresponding to the ore, so that the ore can be subsequently analyzed in a targeted manner based on the obtained ore transmission images. For example, internal structure analysis and component analysis of the ore. Among them, the ray collection device can include an X-ray imaging system or a gamma-ray imaging system, which can be determined based on actual needs.

[0072] Step 212, obtaining a color sorting image corresponding to the ore transmission image collected by the color sorting collection device.

[0073] The ore sorting equipment includes a color sorting collection device located downstream of the ray collection device. In order to facilitate targeted analysis of the identified ore, the color sorting collection device determines a color sorting image corresponding to the ore transmission image, so as to determine the appearance characteristics of the ore, such as color, surface texture and other characteristics, according to the color sorting image.

[0074] In some examples, the process of determining the color sorting image can be as follows: based on the distance between the ray collection device and the color sorting collection device and the speed at which the transmission mechanism transmits the ore, the time when the color sorting collection device collects the color sorting image can be synchronized with the time when the ray collection device collects the ore transmission image, and then according to the collection time corresponding to the multiple frames of images collected by the color sorting collection device, the color sorting image corresponding to the ore transmission image can be quickly determined.

[0075] Step 213, identifying the ore contour in the ore transmission image.

[0076] In order to determine the position of the ore in the ore transmission image, the ore transmission image is subjected to contour recognition processing to obtain the ore contour corresponding to the ore.

[0077] Step 214, determining a local image corresponding to the ore contour in the color sorting image.

[0078] Since the ore transmission image and the color sorting image are acquired by using different image acquisition devices respectively, in order to determine the image corresponding to the ore contour in the color sorting image, a geometric mapping relationship is established according to the installation positions of the radiographic imaging system and the color sorting acquisition device, and according to the position of the ore contour in the ore transmission image, the coordinates of the stone contour mapped to the ore contour in the color sorting image are determined, so that the local image corresponding to the ore contour in the color sorting image is obtained according to the stone contour coordinates.

[0079] Step 215: extracting the ore image to be processed from the color sorted image based on the local image.

[0080] During the contour recognition process, there may be a certain pixel error between the recognized ore contour and the real ore contour due to the defects of the algorithm itself. Therefore, in order to eliminate the influence of the error, the local image is expanded so that the adjusted local image can contain the complete image corresponding to the ore as much as possible, thereby obtaining the ore image to be extracted, providing a strong and reliable data basis for subsequent image segmentation.

[0081] In some examples, the local image is subjected to regional expansion processing, and the height and width of the local image may be adjusted according to the specified pixel compensation. That is, the corresponding specified pixel compensation may be added to the width and height of the local image, respectively, to obtain the ore image after regional expansion. Taking the specified pixel compensation as 10 pixels as an example, if the width and height of the local image are 100 pixels and 200 pixels respectively, then the width and height of the ore image after regional expansion are 110 pixels and 210 pixels respectively.

[0082] In other examples, the local image is subjected to regional expansion processing, and the height and width of the local image may be adjusted according to a preset pixel ratio. That is, according to the width of the local image and the preset pixel ratio, the width pixel difference to be compensated may be determined; according to the height of the local image and the preset pixel ratio, the height pixel difference to be compensated may be determined. The width of the local image is pixel-compensated according to the height pixel difference, and the height of the local image is pixel-compensated according to the width pixel difference, and then the ore image after regional expansion is obtained according to the compensation results of the width and height. For example, taking the preset pixel ratio of 10% as an example, if the width and height of the local image are 100 pixels and 200 pixels respectively, the width pixel difference = 100 pixels * 10% = 10 pixels; the height pixel difference = 200 pixels * 10% = 20 pixels, and the width and height of the ore image after regional expansion are 110 (100 + 10) pixels and 220 (200 + 20) pixels respectively.

[0083] By extracting ore images in the above manner, the quality of ore images can be guaranteed, the ore contour information included therein can be made more complete, a reliable data basis can be provided for subsequent image segmentation, and the generation quality of the target mask image can be guaranteed. When the target mask image is subsequently used to sort the ore, the quality of sorting can be effectively improved, which helps to promote the efficiency of ore sorting.

[0084] In some other embodiments, the above image segmentation method may further include the following steps:

[0085] Step d1, determining the image position of the ore image on the color sorting image;

[0086] Step d2: superimpose the target mask image on the color-sorted image according to the image position to obtain a segmented and annotated image corresponding to the color-sorted image.

[0087] Specifically, since the target mask image is generated based on the ore image extracted from the color sorted image, ideally, the area covered by the target mask image on the color sorted image should completely correspond to the ore image.

[0088] Therefore, in order to determine the quality of the target mask image, the image position of the ore image on the color sorting image is determined so as to determine the coverage position of the target mask image. The target mask image is superimposed on the color sorting image according to the image position to obtain the segmented annotation image corresponding to the color sorting image. Then, according to the position of the target mask image in the segmented annotation image and the image content covered by the target mask image, the quality of the target mask image can be analyzed intuitively and quickly, which will help to make targeted improvements or maintenance to the image segmentation process in the future, so as to improve the accuracy and reliability of image segmentation, ensure the stability and accuracy of subsequent analysis using the target mask image, and help improve the performance of ore sorting. In some application scenarios, in order to facilitate the distinction between the target mask image and its corresponding color sorting image content, the generated segmented annotation image uses color annotation to locate the position of the target mask image on the color sorting image.

[0089] In some embodiments, the above-mentioned image segmentation method may further include performing noise reduction processing on the ore image to improve the visibility of the ore features. The noise reduction processing includes performing any one or a combination of the following processing: mean blur processing, Gaussian blur processing, and median blur processing. For example, mean blur processing may be performing noise reduction processing on the ore image using a 5*5 convolution kernel. Gaussian blur processing or median blur processing may be performing noise reduction processing on the ore image using a 15*15 convolution kernel. It should be noted that the convolution kernel size in the example is only for example, which depends on actual needs and is not limited here.

[0090] In some embodiments, the above-mentioned image segmentation method may further include performing noise reduction processing on the optimal image to ensure the quality of subsequent analysis. The noise reduction processing includes performing any one or a combination of the following processing: mean blur processing, Gaussian blur processing, and median blur processing. For example, mean blur processing may be performing noise reduction processing on the optimal image using a 5*5 convolution kernel. Gaussian blur processing or median blur processing may be performing noise reduction processing on the optimal image using a 15*15 convolution kernel. It should be noted that the convolution kernel size in the example is only for example, which depends on actual needs and is not limited here.

[0091] In some embodiments, the above-mentioned image segmentation method may further include performing noise reduction processing on the ore mask image to protect the ore features while removing noise. The noise reduction processing includes performing any one or a combination of the following processing: mean blur processing, Gaussian blur processing, and median blur processing. For example, mean blur processing may be performing noise reduction processing on the ore mask image using a 5*5 convolution kernel. Gaussian blur processing or median blur processing may be performing noise reduction processing on the ore mask image using a 15*15 convolution kernel. It should be noted that the convolution kernel size in the example is only for example, which depends on actual needs and is not limited here.

[0092] In some examples, the noise reduction process can be determined according to the quality of the ore image, the optimal image or the ore mask image. For example, if the quality of the ore image, the optimal image or the ore mask image is good, any one of the noise reduction processing methods of mean blur processing, Gaussian blur processing and median blur processing can be used for noise reduction. If the quality of the ore image, the optimal image or the ore mask image is medium, any two combined noise reduction processing methods of mean blur processing, Gaussian blur processing and median blur processing can be used for noise reduction. If the quality of the ore image, the optimal image or the ore mask image is relatively poor, a three-level cascade filtering process is performed in combination with mean blur processing, Gaussian blur processing and median blur processing to eliminate noise interference as much as possible, enhance the image characteristics of the ore, and ensure the generation reliability of the target mask image.

[0093] In some optional application scenarios, the process of determining the target mask image by the image segmentation method provided by the present disclosure can be as follows: in the process of the ore sorting equipment transmitting the ore through the transmission mechanism, the image is collected by the ray collection device to obtain the ore transmission image. Based on the distance between the ray collection device and the color sorting collection device and the speed at which the ore is transmitted by the transmission mechanism, the color sorting image corresponding to the ore transmission image collected by the color sorting collection device is obtained. The ore contour in the ore transmission image is identified, and based on the installation position of the ray imaging system and the color sorting collection device, the local image corresponding to the ore contour in the color sorting image is determined. The local image is subjected to regional expansion processing to obtain the ore image to be processed, and is extracted from the color sorting image.

[0094] Gain processing is performed on multiple color channels (RGB) of the ore image to increase the color difference between the ore area and the background area in the ore image when the background area is in a normal exposure state, thereby obtaining an intermediate image. Nonlinear brightness adjustment processing is then performed on the intermediate image to enhance the brightness of the local darker area and improve the clarity of the local details, thereby obtaining the optimal image.

[0095] The optimal image is converted into color space to obtain multiple color channel images corresponding to the HSV color space. Based on the ore color features determined by the optimal image, the ore color threshold interval corresponding to each color channel is determined respectively, and based on the matching result between the color value in each color channel image and the corresponding ore color threshold interval, the ore in the optimal image is identified to obtain the ore mask image.

[0096] Identify the maximum ore contour in the ore mask image and determine the seed point of the maximum ore contour. Based on the seed point, the FloodFill algorithm is used to achieve adaptive region expansion to obtain the target ore contour. Perform mask morphology repair on the target ore contour to obtain the target mask image corresponding to the ore image.

[0097] The image segmentation method provided by the present disclosure can improve the anti-interference ability of image segmentation of ore images in complex environments, so that the accuracy of ore edge detection can be effectively improved, and the efficiency of misidentification can be reduced, thereby helping to ensure the accuracy and reliability of image segmentation. In addition, the calculation logic of image segmentation is relatively simple, which can effectively ensure the efficiency of image segmentation and meet the needs of industrial real-time performance.

[0098] In some other optional application scenarios, based on the ore transmission image, the ore image extracted from the color sorting image can be as follows: Figure 4 According to the image segmentation method provided by the present disclosure, the ore image is processed and the following can be obtained: Figure 5 The target mask image shown in FIG. The effect of the segmentation annotation image formed by superimposing the target mask image on the color-selected image can be shown as follows: Figure 6 As shown, the generation quality and effectiveness of the target mask image can be determined through the segmented and annotated image, so that the above image segmentation process can be further optimized later.

[0099] Based on the same inventive concept, the present disclosure also provides an image segmentation device. Figure 7 As shown, the image segmentation device 300 includes:

[0100] An acquisition module 310 is used to acquire an image of the ore to be processed;

[0101] An adjustment module 320 is used to adjust the image brightness of the ore image to obtain an optimal image, wherein the color difference between the ore area and the background area in the optimal image is the maximum value of the background area under normal exposure;

[0102] The first processing module 330 uses the ore color features determined based on the optimal image to identify the ore in the optimal image and obtain an ore mask image;

[0103] The second processing module 340 is used to obtain a target mask image corresponding to the ore image based on the ore mask image.

[0104] In some embodiments, the adjustment module 320 includes: a first adjustment unit, used to perform gain processing on multiple color channels of the ore image to increase the color difference between the ore area and the background area in the ore image when the background area is in a normal exposure state, so as to obtain an intermediate image; a second adjustment unit, used to perform nonlinear brightness adjustment processing on the intermediate image to obtain an optimal image.

[0105] In some embodiments, the first processing module 330 includes: a first processing unit, used to perform color space conversion on the optimal image to obtain a multi-color channel image, and the color channel image corresponds one-to-one to the color channel in the color space; a first determination unit, used to determine the ore color threshold interval corresponding to each color channel based on the ore color characteristics determined by the optimal image; a second processing unit, used to identify the ore in the optimal image based on the matching result between the color value in each color channel image and the corresponding ore color threshold interval, to obtain the ore mask image.

[0106] In some embodiments, the second processing module 340 includes: an identification unit for identifying the maximum ore contour in the ore mask image; a second determination unit for determining the seed point of the maximum ore contour; a third processing unit for expanding the maximum ore contour based on the seed point to obtain a target ore contour; and a fourth processing unit for performing mask morphology repair based on the target ore contour to obtain a target mask image corresponding to the ore image.

[0107] In some embodiments, the acquisition module 310 includes: a first acquisition unit, used to acquire an ore transmission image collected by a ray collection device of the ore sorting equipment, the ore sorting equipment including a color sorting collection device located downstream of the ray collection device; a second acquisition unit, used to acquire a color sorting image corresponding to the ore transmission image collected by the color sorting collection device; a second identification unit, used to identify the ore contour in the ore transmission image; a third determination unit, used to determine a local image corresponding to the ore contour in the color sorting image; and a fifth processing unit, used to extract the ore image to be processed from the color sorting image based on the local image.

[0108] In some embodiments, the image segmentation device 300 also includes: a third processing module for determining the image position of the ore image on the color sorted image; and a fourth processing module for superimposing the target mask image on the color sorted image according to the image position to obtain a segmented and labeled image corresponding to the color sorted image.

[0109] In some embodiments, the image segmentation device 300 also includes: a first noise reduction module for performing noise reduction processing on the ore image; a second noise reduction module for performing noise reduction processing on the optimal image; and / or a third noise reduction module for performing noise reduction processing on the ore mask image; wherein the noise reduction processing includes performing any one or a combination of the following processing: mean blur processing, Gaussian blur processing and median blur processing.

[0110] Regarding the image detection device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0111] Based on the same inventive concept, Figure 8 As shown, one embodiment of the present disclosure provides an electronic device. The electronic device includes: one or more processors 410, a memory 420, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 8 A processor 410 is taken as an example.

[0112] The processor 410 may be a central processing unit, a network processor or a combination thereof. The processor 410 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable logic gate array, a general purpose array logic or any combination thereof.

[0113] The memory 420 stores instructions executable by at least one processor 410, so that the at least one processor 410 executes the image segmentation method shown in the above embodiment.

[0114] The memory 420 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 420 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 420 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0115] The memory 420 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 420 may also include a combination of the above types of memory.

[0116] The electronic device also includes an input device 430 and an output device 440. The processor 410, the memory 420, the input device 430 and the output device 440 may be connected via a bus or other means. Figure 8 The example of connecting through bus is taken in the following.

[0117] The input device 430 can receive input digital or character information and generate key signal input related to the user settings and function control of the electronic device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator rod, one or more mouse buttons, a trackball, a joystick, etc. The output device 440 may include a display device, an auxiliary lighting device (e.g., an LED), and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display, and a plasma display. In some optional embodiments, the display device may be a touch screen.

[0118] Based on the same inventive concept, the present disclosure further provides a computer-readable storage medium, which stores the following program, and the program is used to execute the image segmentation method of any of the aforementioned embodiments.

[0119] The present disclosure uses specific words to describe the embodiments of the present disclosure. For example, "one embodiment", "an embodiment", and / or "some embodiments" refer to a certain feature, structure or characteristic related to at least one embodiment of the present disclosure. Therefore, it should be emphasized and noted that "one embodiment" or "an embodiment" or "an alternative embodiment" mentioned twice or more in different locations in this specification does not necessarily refer to the same embodiment. In addition, certain features, structures or characteristics in one or more embodiments of the present disclosure may be appropriately combined.

[0120] In the context of the present disclosure, unless the context clearly indicates an exception, the words "a", "an", "a kind" and / or "the" do not refer to the singular, but may also include the plural. Generally speaking, the terms "include" and "comprise" only indicate the inclusion of the steps and elements that have been clearly identified, and these steps and elements do not constitute an exclusive list, and the method or device may also include other steps or elements.

[0121] Similarly, it should be noted that in order to simplify the description of the disclosure and thus help understand one or more application embodiments, in the above description of the embodiments of the disclosure, multiple features are sometimes combined into one embodiment, figure or description thereof. However, this disclosure method does not mean that the features required by the object of the disclosure are more than the features required for protection. In fact, the features of the embodiment are less than all the features of the single embodiment disclosed above.

[0122] The basic concepts have been described above. Obviously, for those skilled in the art, the above disclosure is only an example and does not constitute a limitation of the present disclosure. Although not explicitly stated herein, those skilled in the art may make various modifications, improvements and corrections to the present disclosure. Such modifications, improvements and corrections are suggested in the present disclosure, so such modifications, improvements and corrections still belong to the spirit and scope of the embodiments of the present disclosure.

Claims

1. An image segmentation method, characterized in that: The method comprises: Acquire an image of the ore to be processed; Adjusting the image brightness of the ore image to obtain an optimal image, wherein the color difference between the ore area and the background area in the optimal image is the maximum value of the background area under normal exposure; Based on the color features of the ore determined by the optimal image, identifying the ore in the optimal image to obtain an ore mask image; Based on the ore mask image, a target mask image corresponding to the ore image is obtained.

2. The image segmentation method according to claim 1, characterized in that: The step of adjusting the image brightness of the ore image to obtain an optimal image includes: Performing gain processing on multiple color channels of the ore image to increase the color difference between the ore area and the background area in the ore image when the background area is in a normal exposure state, thereby obtaining an intermediate image; Nonlinear brightness adjustment is performed on the intermediate image to obtain the optimal image.

3. The image segmentation method according to claim 1, characterized in that: The method of identifying the ore in the optimal image based on the ore color feature determined by the optimal image to obtain the ore mask image includes: Performing color space conversion on the optimal image to obtain a multi-color channel image, wherein the color channel image corresponds one-to-one to the color channels in the color space; Based on the ore color features determined by the optimal image, respectively determine the ore color threshold interval corresponding to each color channel; Based on the matching result between the color value in each color channel image and the corresponding ore color threshold interval, the ore in the optimal image is identified to obtain the ore mask image.

4. The image segmentation method according to claim 1 or 3, characterized in that: The step of obtaining a target mask image corresponding to the ore image based on the ore mask image includes: identifying a maximum ore contour in the ore mask image; Determining a seed point of the maximum ore contour; Based on the seed point, the maximum ore contour is expanded to obtain a target ore contour; The mask morphology is repaired based on the target ore contour to obtain the target mask image corresponding to the ore image.

5. The image segmentation method according to claim 1, characterized in that: The step of obtaining the ore image to be processed comprises: Acquire a transmission image of the ore collected by a ray collection device of the ore sorting equipment, wherein the ore sorting equipment comprises a color sorting collection device located downstream of the ray collection device; Acquire a color sorting image corresponding to the ore transmission image collected by a color sorting collection device; identifying an ore contour in the ore transmission image; Determining a local image corresponding to the ore contour in the color sorting image; Based on the partial image, the ore image to be processed is extracted from the color sorted image.

6. The image segmentation method according to claim 5, characterized in that: The method further comprises: Determining an image position of the ore image on the color sorted image; According to the image position, the target mask image is superimposed on the color-sorted image to obtain a segmented and annotated image corresponding to the color-sorted image.

7. The image segmentation method according to claim 1, characterized in that: The method further comprises: Performing noise reduction processing on the ore image; Performing noise reduction processing on the optimal image; and / or Performing noise reduction processing on the ore mask image; The noise reduction process includes performing any one or a combination of the following processes: mean blur processing, Gaussian blur processing, and median blur processing.

8. An image segmentation device, characterized in that: The device comprises: An acquisition module, used for acquiring an ore image to be processed; An adjustment module, used for adjusting the image brightness of the ore image to obtain an optimal image, wherein the color difference between the ore area and the background area in the optimal image is the maximum value of the background area under normal exposure; A first processing module, using the ore color features determined based on the optimal image, identifies the ore in the optimal image to obtain an ore mask image; The second processing module is used to obtain a target mask image corresponding to the ore image based on the ore mask image.

9. An electronic device, characterized in that: include: 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 image segmentation method according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores the following program, which is used to execute the image segmentation method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Ore rapid identification method

    CN108090434A

  • Ore identification method, detection mechanism and mineral product sorting machine

    CN113112466A

  • Ore image recognition method and device based on color feature filtering

    CN116229108A

  • Ore classification method and system

    CN118941879A

  • Ore image segmentation optimization method and system based on edge detection

    CN119810126A

Cited By

  • Target area identification method, image acquisition system and sorting machine

    CN121504969A