An image target segmentation method and system thereof

By combining denoising and Mask RCNN with parallel processing technology, the problem of difficulty in segmenting XRT images in the ore field is solved, efficient ore image segmentation is achieved, and the sorting effect and efficiency are improved.

CN116543003BActive Publication Date: 2025-08-01HUNAN JUMPER TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210085593.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-25
Publication Date
2025-08-01
Estimated Expiration
2042-01-25

AI Technical Summary

Technical Problem

The existing XRT image segmentation technology has problems such as high noise, serious overlap of targets, irregular shapes and large grayscale changes in the application of the ore field, resulting in poor sorting effect and difficult to meet the efficient sorting needs of industrial production.

Method used

An image target segmentation method is adopted, including denoising, thresholding processing and a target segmentation model based on Mask RCNN, and image segmentation is used to segment the image using the adhesion region and the coordinates of the target center point, and combined with parallel processing technology to improve segmentation efficiency.

Benefits of technology

It improves the target segmentation accuracy and sorting efficiency of ore images, reduces resource waste, and is suitable for target segmentation of XRT images, especially real-time segmentation of ore images on conveyor belts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116543003B_ABST
    Figure CN116543003B_ABST
Patent Text Reader

Abstract

The present invention discloses an image target segmentation method and system thereof. The method includes: obtaining an original image to be segmented; denoising the original image; performing threshold processing on the denoised image to obtain a binary image; performing target segmentation on the binary image; wherein, based on the binary image, the center point coordinates of each target are recognized, and then the adhesion region and the center point coordinates of the targets within the adhesion region are input into a target segmentation model constructed based on a neural network to obtain a target segmentation result. Based on the above technical means, the method of the present invention can realize the ore target segmentation of ore images based on XRT, that is, it is applied to the ore target segmentation application. And in order to be applicable to the ore characteristics, the present invention also optimizes the denoising technology and the target segmentation technology, and adopts parallel technical means for processing, improving the image processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image processing, and particularly relates to an image target segmentation method and system thereof, especially for ore target segmentation of ore images, such as ore images based on dual-energy XRT; it is also applicable to the target segmentation of images in industry where the objects carried on the conveyor belt have irregular target shapes, large gray-scale differences inside the target, unfixed target positions, and the targets are in contact or overlap. Background Art

[0002] Image target segmentation technology is widely used in the detection field. Improving the accuracy of image target segmentation technology is one of the key factors to improve the detection results. Among them, there are various types of images. Compared with ordinary images, at present, XRT image detection technology is also widely used in many fields such as security inspection, medical treatment, and industrial detection. Especially in industrial production, it is used to sort foods such as vegetables and grains according to different qualities; applying XRT detection technology in the field of raw ore sorting can achieve the sorting of different ores, improve the enrichment ratio of different metals and the recovery of metals with different grades, and reduce resource waste. However, while ensuring the sorting effect, increasing the output has always been the ultimate goal for each ore dressing plant and is also a huge challenge.

[0003] Under this premise, the denoising and segmentation of XRT images are particularly important, which directly affect the recognition of targets and the execution efficiency of spray valves, and thus indirectly affect the sorting effect. However, XRT images are different from ordinary images. Their low-energy images have relatively high noise because the dose is too low; at the same time, factories pursue output, resulting in serious overlap of the image targets collected; in addition, the irregular shape of the stones themselves adds difficulties to image segmentation; furthermore, under X-ray irradiation, the gray-scale change range within a single stone is large and the mutation degree is high. For the above reasons, XRT images cannot use pixel value information to assist segmentation like ordinary image segmentation. Therefore, in order to apply XRT detection technology to the ore field, improve the sorting effect, and explore image processing technology suitable for the ore field, especially XRT image processing technology suitable for the ore field, it is necessary. Summary of the Invention

[0004] The purpose of the present invention is to provide an image target segmentation method and system thereof for at least some of the technical problems existing in the above image target segmentation technology, and to achieve image target segmentation with a new technical idea. In particular, the method is applicable to the target segmentation technology of ore images and the target segmentation of XRT images. The method of the present invention

[0005] On the one hand, an image target segmentation method provided by the present invention includes the following steps:

[0006] Step 1: Obtain the original image to be segmented;

[0007] Step 2: Denoise the original image;

[0008] Step 3: Perform threshold processing on the denoised image to obtain a binary image;

[0009] Step 4: Perform target segmentation on the binary image;

[0010] Among them, based on the binary image, the center point coordinates of each target are recognized, and then the adhesion area and the center point coordinates of the targets within the adhesion area are input into a target segmentation model constructed based on a neural network to obtain the target segmentation result.

[0011] Further optionally, the process of recognizing the target center point coordinates is as follows: in the distance transformation image of the binary image, within the NxN neighborhood of each pixel point, when the pixel mean value obtained by expanding one pixel circle outward from the pixel point and the pixel mean value of the previous pixel circle differ by 1, the center point within the NxN neighborhood is the target center point; or the target center point coordinates are determined by the following process:

[0012] Convert the binary image into a distance transformation image;

[0013] Within the NxN neighborhood of each pixel point in the distance transformation image, expand pixel circles outward with the pixel point as the center, and record the pixel mean values of the expanded pixel points;

[0014] Identify whether the original pixel point is the target center point by recognizing the size relationship between the pixel mean value of each expanded circle and the pixel value of the original pixel point;

[0015] Among them, if the pixel mean value is greater than the pixel value of the original pixel point, the original pixel point is not the target center point; otherwise, when the total feature sum accumulated by expanding outward within the NxN neighborhood is less than the preset threshold, the original pixel point is the target center point, otherwise, it is not the target center point; in the example of the present invention, the empirical value range of the preset threshold is: [1.12*N, 1.5*N]).

[0016] The total feature sum is the cumulative sum of sumi for each expanded circle. The feature sumi for the i-th expanded circle = 1.0*(abs(sub_vi) / i, where abs is the absolute value function and sub_vi is the pixel difference between the pixel mean value and the pixel value of the original pixel point.

[0017] Further optionally, the target segmentation model constructed based on the neural network is a Mask RCNN target segmentation model. In the training stage of the Mask RCNN target segmentation model, the adhesion area, the center point coordinates of the targets within the adhesion area, and the target segmentation results of the training sample images are input into the network for training;

[0018] The input of the trained Mask RCNN object segmentation model is the adhesion area and the center point coordinates of the object within the adhesion area, and the output is the object segmentation result.

[0019] Further optionally, the process of denoising the image in step 2 is as follows:

[0020] Calculate the similarity between every two pixel points in the image, and determine the set of similar candidate points for each pixel point based on the similarity threshold;

[0021] For each pixel point, construct the set of similar points for each pixel point by selecting the top pixel points from the set of similar candidate points in descending order of similarity;

[0022] For each pixel point, calculate the weights between it and each pixel point in the corresponding set of similar points, and then calculate the pixel value of the pixel point after denoising. The corresponding formula is as follows:

[0023]

[0024]

[0025] where w(x,y) is the weight between pixel x and pixel y, v(x), v(y) are the pixel values of pixel x and pixel y, n is the normalization factor, h is the filtering coefficient, u(x) is the denoising result of pixel x, and φ x is the set of similar points of pixel x.

[0026] Further optionally, the image is an ore image collected on a conveyor belt.

[0027] Further optionally, it is characterized in that: the original image is an XRT image.

[0028] Further optionally, in step 2, parallel denoising is performed on the obtained original image, and in step 4, parallel object segmentation is performed on the binary image.

[0029] In a second aspect, a system based on the above image object segmentation method provided by the present invention includes:

[0030] An image acquisition module for acquiring the original image to be segmented;

[0031] A denoising module for denoising the original image;

[0032] A binary image generation module for performing threshold processing on the denoised image to obtain a binary image;

[0033] An object segmentation module for performing object segmentation on the binary image;

[0034] Among them, the center point coordinates of each target are recognized based on the binary image, and then the adhesion region and the center point coordinates of the targets within the adhesion region are input into a target segmentation model constructed based on a neural network to obtain a target segmentation result.

[0035] In a third aspect, the present invention provides an electronic terminal, which includes: one or more processors;

[0036] a memory storing one or more computer programs;

[0037] The processor calls the computer program to implement:

[0038] Step 1: Obtain the original image to be segmented;

[0039] Step 2: Denoise the original image;

[0040] Step 3: Perform threshold processing on the denoised image to obtain a binary image;

[0041] Step 4: Perform target segmentation on the binary image;

[0042] Among them, the center point coordinates of each target are recognized based on the binary image, and then the adhesion region and the center point coordinates of the targets within the adhesion region are input into a target segmentation model constructed based on a neural network to obtain a target segmentation result.

[0043] In a fourth aspect, the present invention provides a readable storage medium, which stores a computer program, and the computer program is called by a processor to implement:

[0044] Step 1: Obtain the original image to be segmented;

[0045] Step 2: Denoise the original image;

[0046] Step 3: Perform threshold processing on the denoised image to obtain a binary image;

[0047] Step 4: Perform target segmentation on the binary image;

[0048] Among them, the center point coordinates of each target are recognized based on the binary image, and then the adhesion region and the center point coordinates of the targets within the adhesion region are input into a target segmentation model constructed based on a neural network to obtain a target segmentation result.

[0049] Beneficial effects

[0050] 1. The image target segmentation method provided by the present invention uses the adhesion region and the target center point coordinates as network inputs to obtain the target segmentation result, providing a new technical means to achieve image target segmentation and improving the efficiency of real-time segmentation. In particular, the method of the present invention can be applied to ore images, especially the collected images corresponding to the ore on the conveyor belt. At the same time, it can also be applied to XRT images. In summary, the method of the present invention is a target segmentation technology suitable for XRT images in the ore field.

[0051] 2. In a further preferred embodiment of the image target segmentation method of the present invention, the NLM denoising technology is optimized. For example, for ores, the positions of ore spots are random. When a certain pixel point is an ore spot, it does not mean that other pixel points in its neighborhood are also ore spots. They may be the image background, other coexisting metals, or quartz. Therefore, it is not appropriate to calculate the weight in the way of calculating the Gaussian weighted Euclidean distance with the block where the center point is located. Moreover, even if both blocks contain ore spots, the similarity between these two points may not be high because the grades of these two ore spots may vary greatly, which is manifested as a large difference in the pixel values of these two points in the image, and the calculated similarity value is very small, resulting in poor denoising effect of directly using NLM on ore images. The denoising technology proposed by the present invention is more suitable for the denoising characteristics of XRT raw ore images.

[0052] 3. In a further preferred embodiment of the image target segmentation method of the present invention, the Mask RCNN network is selected. The Mask RCNN segmentation effect is more accurate. Moreover, the present invention uses the adhesion region and the target center point coordinates as inputs, which can effectively reduce the time for the RPN network in the first stage of Faster RCNN to extract effective bounding boxes. Description of the Drawings

[0053] Figure 1 is a representative image of the density of raw ore distribution on the belt;

[0054] Figure 2 is a schematic diagram of the throughput comparison before and after applying the parallel strategy to all processes;

[0055] Figure 3 is a schematic diagram of the image target segmentation process, and the shaded part can be processed in parallel;

[0056] Figure 4 is a comparison image of the segmentation effect of the present invention and the region growing segmentation; among them, Figure a is the depth overlap image, Figure b is the schematic diagram of the region growing segmentation effect, and Figure c is the effect image of the method of the present invention;

[0057] Figure 5It is a comparison image of the segmentation effects of the segmentation and region growing of the present invention; among them, Figure a is the depth overlap image, Figure b is the schematic diagram of the region growing segmentation effect, and Figure c is the effect image of the method of the present invention. Detailed implementation manners

[0058] An image target segmentation method provided by the present invention is used to implement image target segmentation. Embodiment 1 of the present invention starts from the target segmentation of ore images, and proposes an ore XRT image technology based on a parallel strategy by studying ore characteristics and XRT image characteristics. It fully considers various characteristics such as the irregular shape of the ore itself, the large range of gray-scale changes within a single stone, the high degree of mutation, and the serious overlap of targets in XRT images. It should be understood that on the basis of not departing from the inventive concept of the present invention, the method of the present invention can also be applied to the image target segmentation of other fields that meet the segmentation accuracy requirements, especially for images of objects carried on a conveyor belt in industry, where the target shapes are irregular, the gray-scale differences within the targets are large, the target positions are not fixed, and the targets are in contact or overlap.

[0059] The present invention will be further described below in conjunction with embodiments.

[0060] Embodiment 1:

[0061] An image target segmentation method provided in this embodiment includes the following steps:

[0062] Step 1: Obtain an ore image. In this embodiment, the target to be recognized / segmented is ore, and taking the ore on the conveyor belt as an example, therefore, in this embodiment, an ore image on the conveyor belt is collected.

[0063] The dynamic acquisition of the raw ore sample in this embodiment is specifically implemented according to the following process:

[0064] 1. First, clean the conveyor belt. Since there are often small stones deposited and remaining on the belt, the ore dressing plant generally cleans the belt regularly according to actual needs. This not only ensures the service life of the belt, but also improves the accuracy of the sorting effect by cleaning the deposited ore slag.

[0065] 2. Prepare a large amount of raw ore with a particle size of 10 mm to 60 mm and pour it into the equipment feed bin. A particle size slightly larger than 60 mm is also feasible, but the larger the particle size span, the more difficult it is to ensure the sorting effect. Therefore, the most suitable particle size range of the present invention is between 10 mm and 60 mm.

[0066] 3. Adjust the belt running speed to 2 m / s, and the stones in the feed bin start to flow onto the conveyor belt for image acquisition.

[0067] Step 2: Denoise the image.

[0068] In this embodiment, in order to accelerate the processing speed, a parallel processing method is selected, and the OpenMP (Open Multi-Processing, hereinafter referred to as OpenMP) framework is taken as an example. It should be understood that for the denoising technology provided by the present invention, the processing processes of each pixel point are relatively independent. Therefore, the denoising process can be implemented in a parallel manner.

[0069] In this embodiment, it is considered that: the positions of ore spots in an ore are random. When a certain pixel point is an ore spot, it does not mean that other pixel points in its neighborhood are also ore spots. They may be the image background, other symbiotic metals, or quartz. Therefore, it is not appropriate to calculate the weight in the way of calculating the Gaussian weighted Euclidean distance based on the block where the center point is located. Moreover, even if both of the two blocks contain ore spots, the similarity between these two points is not necessarily high, because the grades of these two ore spots may vary greatly, which is manifested as a large difference in the pixel values of these two points in the image, and the calculated similarity value is very small. This results in a poor denoising effect on the ore image when directly using NLM. Based on the above two points, the present invention makes the following improvements:

[0070] 1. Instead of calculating the pixels in the neighborhood of the current pixel point x, the square of the difference in gray values between each pixel point y and x is calculated as the similarity within the entire image range. When the similarity is greater than the threshold Tsimilarity, then y is added to the set Vec_similarity of similar candidate points of pixel x. In this way, it is ensured that the found candidate points are points with ore grades similar to pixel point x. The calculations for each pixel point in this step have no dependency relationship and can be directly parallelized using OpenMP.

[0071] 2. Sort the similarities corresponding to the set Vec_similarity of candidate points of the current pixel point x from largest to smallest, and take the first num_similarity as the set Vec_last_similar of the true similar points of pixel point x, denoted as Here, the parallel sorting of std::execution::par_unseq in PSTL can be used.

[0072] 3. Calculate the corresponding weight w(x, y) for each pixel point in Vec_last_similar according to the following formula, where n is the normalization factor, h is the filtering coefficient, v(x) and v(y) respectively represent the pixel values of pixels x and y. The calculations here have no dependency and can be directly parallelized using OpenMP.

[0073]

[0074] 4. Finally, use the following formula to estimate the denoised pixel value of the current pixel point x. Here, because it is multiplication followed by addition, the parallel instruction specifically for reduction in OpenMP is used for parallel calculation.

[0075]

[0076] Step 3: Perform threshold processing on the denoised image to obtain a binary image.

[0077] In this embodiment, the criterion for obtaining background pixels is selected, and then the binary image is divided based on this. Specifically as follows: When there are no stones on the conveyor belt, 100 images are collected for the empty belt at a speed of 2 m / s, and then the average value of these 100 images is used as the background pixel value Background_value. Then, each pixel value of the image with a target is judged. If it is less than Background_value, it is the original ore target; otherwise, it is the background.

[0078] Step 4: Perform target segmentation on the binary image.

[0079] In this embodiment, it is considered that: the characteristics of high overlap, irregular shape, inability to use gray information, random position, etc. of ore XRT images make it difficult to train convolutional neural networks (abbreviated as CNNs in the present invention), and the long prediction time also makes it difficult for CNNs to be applied in fields with high requirements for real-time performance such as XRT image segmentation. In addition, traditional image segmentation algorithms such as region growing algorithms are also not suitable for XRT images, mainly for the following two reasons:

[0080] 1. Because the particle size range of the original ore in industrial production has a large span, whether it is to perform multiple erosions on the binary image to obtain the target center or to perform threshold division on the distance image through distance transformation to obtain the center, it is not suitable for the situation where large-particle-size and small-particle-size targets overlap. Because if eroded too many times, small-particle-size stones may be directly eroded away, resulting in no center for small-particle-size targets, while if the number of erosions is too small, the overlapping areas still stick together, and two stones still have only one center.

[0081] 2. Even if the accurate center is obtained, algorithms such as region growing still cannot be directly used. Because algorithms such as region growing are very prone to over-segmentation and under-segmentation, which will cause a stone to be divided into scattered pieces or several stones to be connected into one piece. If only the uppermost part of a stone is the mining area, over-segmentation causes the mining area to be separated from the entire stone, then when the spray valve is executed, only the mining area part will be sprayed with gas, but most of the stone is not covered by the airflow, so this ore cannot smoothly fall into the ore hopper, resulting in poor sorting effect; while under-segmentation causes several stones to be misjudged as one stone, then when the spray valve is executed, multiple stones will be sprayed with gas, resulting in multiple stones being covered by the airflow, so the ore among them also falls into the waste stone hopper, also resulting in poor sorting effect.

[0082] For the above reasons, the present invention proposes that the optimal object segmentation model in the XRT image of ore is the Mask RCNN object segmentation model, and the adhesion area and the set vec_pts of the stone center point coordinates in the adhesion area are used as prior knowledge.

[0083] Among them, the stone center point coordinates are determined as follows:

[0084] 1) Perform distance transformation on the entire binary image bwimg to obtain the distance transformation image distance_img. The distance transformation of an image means that first, the foreground and background of the image are distinguished, and then the minimum distance from each foreground pixel point to the background is calculated, and the original pixel value is replaced with this minimum value to obtain a single-channel image.

[0085] 2) Calculate the features of each pixel point in the distance transformation image distance_img. The main principle is that the center of each stone is the farthest from the background, that is, the distance value at the center is the largest, and the value becomes smaller as it moves towards the stone boundary. This also results in the distance values of each stone being distributed in a similar contour Figure 1 like distribution. According to this distribution feature, the present invention calculates that if the pixel value difference between each pixel expanded by one circle and the previous circle of pixels within the NxN neighborhood of each point is 1, then the center point within this NxN is the center point of the stone. After this step, through contour traversal, for example, if the current contour is composed of m stones adhered together, ideally, m center point coordinates can be found and placed in the set vec_pts. It is known from the research in the present invention that in industrial applications, the general range of stone particle sizes is between 10 mm and 60 mm, and the empirical value of N is determined to be 7 through multiple experiments.

[0086] Based on the above principle, the present embodiment specifically determines the center point coordinates of the ore according to the following process:

[0087] 1. For each pixel point pt0 in the distance transformation image distance_img, expand i (i>0) circles of pixels outward, and the set of expanded pixel values is {V_pti};

[0088] 2. Calculate the mean value of the set {V_pti} to obtain V_mean_i;

[0089] 3. Calculate the difference sub_vi between V_mean_i and pt0;

[0090] 4. If sub_vi is greater than 0, it means that there are points larger than pt0 among the pixels in this circle expanded by i. Then pt0 must not be the center point. The reason is that for the sorting particle size, even in the smallest particle size, it is almost impossible to have two stones within 7x7 at the same time.

[0091] 5. If sub_vi is not greater than 0, it proves that the current pixel point pt0 may be the center of the stone. Calculate the feature of the current circle sum_i = 1.0 * (abs(sub_vi) / i). Since the center of the stone has the rule that the average pixel value decreases by 1 for each outer circle, it can be inferred that sum_i is always approximately equal to 1. After many experiments, it is found that non - center points do not have this characteristic. However, if pt0 does not meet this condition, the following process should be continued.

[0092] 6. Calculate the total feature of all circles sum+ = sum_i.

[0093] 7. Determine whether i is less than N. If so, return to step (1) to continue expanding; otherwise, execute step (8).

[0094] 8. Determine whether the total feature value sum is less than the threshold thresh. If so, the current pixel point is the center point of the stone; otherwise, the current pixel point is not the center point of the stone.

[0095] According to the above method, the center point coordinates of all targets in the binary image can be determined. Then, determine the adhesion region to which each center point belongs. Finally, take each adhesion region and the stone center point coordinates as prior knowledge and input them into the MaskRegion Convolutional Neural Networks (abbreviated as Mask RCNN in this invention) network for segmentation. Compared with other CNNs methods, the segmentation effect of Mask RCNN is more accurate (as Figure 4 , Figure 5 shown), and the time consumption is relatively less. However, it is still less efficient when directly used in XRT image segmentation. The main reason is that Mask RCNN is actually a network structure formed by adding a branch for pixel - level prediction segmentation to Faster RCNN. Faster RCNN takes a long time to select ROIs for classification and regression. In this invention, passing the adhesion region and the stone center point coordinate set vec_pts into Mask RCNN can effectively reduce the time for the first - stage RPN network of Faster RCNN to extract effective bounding boxes.

[0096] It should be understood that for the entire image to be segmented, the binary image is obtained according to the above method steps 1 - step 3, then the coordinates of the center point of the stone within each adhesion region are obtained, and finally, the trained Mask RCNN is respectively input to obtain the segmentation results of each adhesion region. After the whole image is segmented, the number of different particle sizes of the raw ore can be counted. The commonly used segmentation ranges in industry are 10mm - 20mm, 20mm - 30mm, 30mm - 40mm, 40mm - 50mm, 50mm - 60mm. If the ore - waste discrimination algorithm is applied, the waste - throwing rate and the daily output can be counted at this time.

[0097] To verify the effectiveness of the method described in this embodiment, its segmentation effect is compared with that of algorithms such as regional production. As can be seen from Figure 4 the segmentation result diagram of the regional growth algorithm shown, when large stones and small stones are adhered together, there is an under-segmentation phenomenon; even stones with similar sizes have under-segmentation, and at the same time, over-segmentation occurs for medium-sized stones. On the contrary, in the effect diagram of the present invention, over-segmentation and under-segmentation phenomena are avoided as much as possible. As can be seen from Figure 5 shown, there are still over-segmentation, under-segmentation and unclear segmentation boundaries in the regional growth effect diagram. This will cause inaccurate execution of the spray valve at the rear end of the industrial equipment belt, resulting in poor sorting effect. Such a phenomenon rarely appears in the effect diagram of the present invention, and the segmentation line is closer to the shape of the stone itself. In this way, the subsequent sorting is more in line with the effect of the ore waste discrimination algorithm itself, and it is also more conducive to technicians to effectively adjust the algorithm.

[0098] It should be understood that this embodiment takes the ore application scenario as an example. For other application fields, an appropriate neural network type can be selected or updated according to the target features. It should also be understood that although the threshold processing of the denoised image in the present invention does not apply the parallel strategy in this part itself, the overall application of all steps of the present invention is the OPenMP parallel computing method. Therefore, the present invention uses the method of multiple OPenMP instructions to improve the throughput rate during the actual device application process, which makes this step different from the traditional serial method. The detailed description is as Figure 2 shown.

[0099] Embodiment 2:

[0100] This embodiment provides a system based on an image target segmentation method, which includes:

[0101] An image acquisition module, which is used to acquire the original image to be segmented. The image acquisition module can be implemented in a hardware manner, such as acquisition devices such as cameras and cameras; it can also be implemented in a software manner, that is, a software function module that communicates with the acquisition hardware to acquire images.

[0102] A denoising module, which is used to denoise the original image. Among them, the implementation process of the denoising technology can refer to the content of the foregoing method.

[0103] A binary image generation module, which is used to perform threshold processing on the denoised image to obtain a binary image;

[0104] A target segmentation module, which is used to perform target segmentation on the binary image. Among them, based on the binary image, the center point coordinates of each target are identified, and then the adhesion area and the center point coordinates of the targets within the adhesion area are input into a target segmentation model constructed based on a neural network to obtain a target segmentation result.

[0105] Among them, the specific implementation process of the target segmentation module can refer to the description of the content of the method.

[0106] It should be understood that the specific implementation process of the above unit modules refers to the content of the method, and the present invention will not elaborate on it here. Moreover, the division of the above functional module units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. At the same time, the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0107] Embodiment 3:

[0108] This embodiment provides an electronic terminal, which includes: one or more processors; a memory storing one or more computer programs; the processor calls the computer programs to implement:

[0109] Step 1: Obtain the original image to be segmented;

[0110] Step 2: Denoise the original image;

[0111] Step 3: Perform threshold processing on the denoised image to obtain a binary image;

[0112] Step 4: Perform target segmentation on the binary image;

[0113] Among them, based on the binary image, the center point coordinates of each target are identified, and then the adhesion area and the center point coordinates of the targets within the adhesion area are input into a target segmentation model constructed based on a neural network to obtain the target segmentation result.

[0114] Please refer to the description of the foregoing method for the specific implementation process of each step.

[0115] It should be understood that in the embodiments of the present invention, the so-called processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A part of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.

[0116] Embodiment 4:

[0117] This embodiment provides a readable storage medium that stores a computer program, and the computer program is called by a processor to implement:

[0118] Step 1: Obtain the original image to be segmented;

[0119] Step 2: Denoise the original image;

[0120] Step 3: Perform threshold processing on the denoised image to obtain a binary image;

[0121] Step 4: Perform target segmentation on the binary image;

[0122] Among them, based on the binary image, the center point coordinates of each target are recognized, and then the adhesion area and the center point coordinates of the targets within the adhesion area are input into a target segmentation model constructed based on a neural network to obtain a target segmentation result.

[0123] For the specific implementation process of each step, please refer to the description of the foregoing method.

[0124] The readable storage medium is a computer-readable storage medium, which may be an internal storage unit of the controller described in any of the foregoing embodiments, such as the hard disk or memory of the controller. The readable storage medium may also be an external storage device of the controller, such as a plug-in hard disk equipped on the controller, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Further, the readable storage medium may also include both the internal storage unit of the controller and the external storage device. The readable storage medium is used to store the computer program and other programs and data required by the controller. The readable storage medium may also be used to temporarily store the data that has been output or is to be output.

[0125] Based on such understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing readable storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc.

[0126] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code. The present application is a device that generates, with reference to the flowcharts of the methods, devices (systems), and computer program products according to the embodiments of the present application and / or the instructions executed by the processor, for implementing the functions specified in one or more processes of the flowchart and / or one or more boxes of the block diagram. These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufactured article including an instruction device that implements the functions specified in one or more processes of the flowchart and / or one or more boxes of the block diagram. These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes of the flowchart and / or one or more boxes of the block diagram.

[0127] The above are only the preferred embodiments of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions within the idea of the present invention belong to the protection scope of the present invention. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of the present invention, several improvements and refinements should also be regarded as within the protection scope of the present invention.

Claims

1. An image target segmentation method, characterized in that: It includes the following steps: Step 1: Obtain the original image to be segmented; Step 2: Denoise the original image; Step 3: Perform threshold processing on the denoised image to obtain a binary image; Step 4: Perform object segmentation on the binary image; Among them, based on the binary image, the center point coordinates of each object are recognized, and then the adhesion area and the center point coordinates of the objects within the adhesion area are input into an object segmentation model constructed based on a neural network to obtain the object segmentation result; The recognition process of the center point coordinates of the object is as follows: Convert the binary image into a distance transformation image; In the NxN neighborhood of each pixel point in the distance transformation image, expand circles of pixels outward with the pixel point as the center, and record the pixel mean values of the expanded pixel points; Identify whether the original pixel point is the center point of the object by recognizing the size relationship between the pixel mean value of each expanded circle and the pixel value of the original pixel point; Among them, if the pixel mean value is greater than the pixel value of the original pixel point, the original pixel point is not the center point of the object; otherwise, when the total feature sum accumulated by expanding outward within the NxN neighborhood is less than a preset threshold, the original pixel point is the center point of the object, otherwise, it is not the center point of the object; The total feature sum is the cumulative sum of the feature sums of each pixel expanded outwards by one circle. The feature i expanded outwards by the circle, where abs is the absolute value function, and sub_vi is the pixel difference between the pixel mean and the original pixel point.

2. The method according to claim 1, characterized in that: The object segmentation model constructed based on a neural network is a MaskRCNN object segmentation model. In the training stage of the Mask RCNN object segmentation model, the adhesion area of the training sample image, the center point coordinates of the objects within the adhesion area, and the object segmentation result are input into the network for training; The input of the trained Mask RCNN object segmentation model is the adhesion area and the center point coordinates of the objects within the adhesion area, and the output is the object segmentation result.

3. The method according to claim 1, characterized in that: The process of denoising the image in Step 2 is as follows: Calculate the similarity between every two pixel points in the image, and determine the set of similar candidate points for each pixel point based on a similarity threshold; For each pixel point, select the top pixel points from the set of similar candidate points in descending order of similarity to construct the set of similar points for each pixel point; For each pixel point, calculate the weight between it and each pixel point in the corresponding set of similar points, and then calculate the pixel value of the pixel point after denoising. The corresponding formula is as follows: ; Among them, is the pixel x and the weight of pixel y, are the pixel values of pixel x and pixel y, n is the normalization factor, h is the filtering coefficient, is the denoising result of pixel x, is the set of similar points of pixel x.

4. The method according to claim 1, wherein: The image is an ore image collected on a conveyor belt.

5. The method according to claim 1, characterized in that: The original image is an XRT image.

6. The method according to claim 1, characterized in that: In Step 2, parallel denoising is performed on the obtained original image, and in Step 4, parallel object segmentation is performed on the binary image.

7. A system based on the image target segmentation method according to any one of claims 1-6, characterized in that: It includes: An image acquisition / collection module for acquiring / collecting the original image to be segmented; A denoising module for denoising the original image; A binary image generation module for performing threshold processing on the denoised image to obtain a binary image; An object segmentation module for performing object segmentation on the binary image; Among them, based on the binary image, the center point coordinates of each object are recognized, and then the adhesion area and the center point coordinates of the objects within the adhesion area are input into an object segmentation model constructed based on a neural network to obtain the object segmentation result.

8. An electronic terminal, characterized in that: It includes: One or more processors; A memory storing one or more computer programs; The processor calls the computer program to implement: Steps of the image target segmentation method according to any one of claims 1-6.

9. A computer-readable storage medium, characterized in that: A computer program is stored, and the computer program is called by a processor to implement: Steps of the image target segmentation method according to claim 1.

Citation Information

Patent Citations

  • Method for segmenting ore image

    CN101710424A

  • Image denoising method based on projection sequential data similarity

    CN103150712A

  • Image segmentation method and device, readable medium and electronic equipment

    CN112418232A