Image processing method and device, computer device and storage medium

By identifying interference areas in X-ray images and selecting appropriate pixel processing methods to remove interference, the problem of poor image quality in traditional methods is solved, achieving high-quality image processing.

CN117173050BActive Publication Date: 2025-11-28WUHAN UNITED IMAGING HEALTHCARE SURGICAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311148226.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-17
Publication Date
2025-11-28
Estimated Expiration
2041-03-17

AI Technical Summary

Technical Problem

Traditional methods for removing interference from X-ray images result in poor quality of processed X-ray medical images, especially during real-time surgical navigation, where metallic foreign objects severely interfere with the imaging of human tissues, affecting image accuracy.

Method used

By identifying a first region centered on the interfering object in medical images, and using this as a basis to determine a larger third region, the interfering object can be removed by selecting either background pixel filling or mean filtering based on the pixel values ​​of the second region, thereby improving image quality.

Benefits of technology

Accurate removal of interfering elements in medical images improves the quality of processed images and reduces radiation damage from re-images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117173050B_ABST
    Figure CN117173050B_ABST
Patent Text Reader

Abstract

The application relates to an image processing method and device, computer equipment and a storage medium. The method comprises the following steps: obtaining a medical image to be processed, and determining a first region in the medical image; wherein the first region is a region determined with a disturbance in the medical image as a center; determining a target processing method for removing the disturbance in the medical image according to a pixel value of a second region; wherein the second region is a region obtained by removing the first region in a third region; the third region is a region determined with the disturbance as a center, and the area of the third region is larger than that of the first region; and removing the disturbance in the medical image by using the target processing method to obtain a processed medical image. The method can improve the quality of the obtained processed medical image.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] The present patent application is a divisional application of the Chinese Invention Patent Application No. 2021102860286, entitled "Image Processing Method and Device, Computer Device and Storage Medium", filed on March 17, 2021. TECHNICAL FIELD

[0002] The present application relates to the technical field of medical images, in particular to an image processing method and device, a computer device and a storage medium. BACKGROUND

[0003] X-ray-based medical image analysis plays an important role in medical diagnosis, intraoperative planning and postoperative evaluation. However, in the actual X-ray imaging process, there are often imaging of interference objects. In particular, in real-time surgical navigation, there are many metal markers, bone markers, optical calibration arrays and surgical instruments in the imaging area of the X-ray machine. Since the attenuation effects of metal foreign bodies and human bone tissue on X-rays are quite different, metal foreign bodies can seriously interfere with the imaging of human tissue, thereby affecting the accuracy of the obtained X-ray image. Therefore, removing the imaging of interference objects in the X-ray image is particularly important in medical research.

[0004] In the traditional technology, the complete edge of the metal foreign body is detected, and then the pixel points satisfying a certain gray threshold range are selected as seed points. The region is grown with the metal foreign body edge as a constraint, and then the metal foreign body in the X-ray medical image is extracted to obtain the processed X-ray medical image.

[0005] However, the conventional method for removing interference objects from X-ray images has the problem of poor quality of the processed X-ray medical image. SUMMARY

[0006] Therefore, it is necessary to provide an image processing method, device, computer device and storage medium capable of improving the quality of the processed X-ray medical image.

[0007] An image processing method, the method comprising:

[0008] obtaining a medical image to be processed, and determining a first region in the medical image; wherein the first region is a region determined with a interference object in the medical image as the center;

[0009] determining a target processing method for removing the interference object in the medical image according to the pixel value of a second region; wherein the second region is a region obtained by excluding the first region in a third region; the third region is a region determined with the interference object as the center, and the area of the third region is greater than the area of the first region;

[0010] The target processing method is used to remove the interference in the medical image to obtain a processed medical image.

[0011] In one of the embodiments, the target processing method for removing the interference in the medical image according to the pixel value of the second region comprises:

[0012] The variance or the standard deviation of the pixels in the second region is obtained according to the pixel value of all the pixels in the second region.

[0013] The target processing method is determined according to the variance or the standard deviation.

[0014] In one of the embodiments, the target processing method is determined according to the variance or the standard deviation, which comprises:

[0015] If the variance is greater than a preset first threshold or the standard deviation is greater than a preset second threshold, the target processing method is determined to be a background pixel filling method.

[0016] If the variance is less than the first threshold or the standard deviation is less than the second threshold, the target processing method is determined to be a mean filter method.

[0017] In one of the embodiments, if the target processing method is the background pixel filling method, the target processing method is used to remove the interference in the medical image to obtain a processed medical image, which comprises:

[0018] A first image block of a preset size is cut out with a point on the edge of the first region as a center point.

[0019] A second image block of the same size as the first image block is cut out in a region of the medical image other than the first region.

[0020] The similarity between the first image block and each second image block is calculated.

[0021] A second image block corresponding to a preset condition is determined as a target image block, and the target image block is used to replace the first image block to obtain the processed medical image; the preset condition is that the similarity between the first image block and the second image block is greater than a preset third threshold.

[0022] In one of the embodiments, if the target processing method is the mean filter method, the target processing method is used to remove the interference in the medical image to obtain a processed medical image, which comprises:

[0023] determine pixel values of pixels corresponding to image blocks adjacent to the first region in the medical image, taking the image block corresponding to the first region as a basic unit;

[0024] obtain a mean value of the pixel values of the pixels corresponding to the image blocks adjacent to the first region;

[0025] replace the pixel values of the pixels in the first region with the mean value to obtain the processed medical image.

[0026] In one of the embodiments, the image blocks adjacent to the first region include four-neighbor image blocks adjacent to the first region or eight-neighbor image blocks adjacent to the first region.

[0027] In one of the embodiments, the medical image to be processed includes an X-ray image.

[0028] An image processing apparatus, the apparatus comprising:

[0029] an acquisition module configured to acquire a medical image to be processed and determine a first region in the medical image, wherein the first region is a region determined with a disturbing object in the medical image as a center;

[0030] a determination module configured to determine a target processing method for removing the disturbing object in the medical image according to pixel values of a second region, wherein the second region is a region obtained by removing the first region in a third region, the third region is a region determined with the disturbing object as a center, and an area of the third region is greater than an area of the first region;

[0031] a processing module configured to remove the disturbing object in the medical image by using the target processing method to obtain a processed medical image.

[0032] A computer device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the following steps when executing the computer program:

[0033] acquire a medical image to be processed and determine a first region in the medical image, wherein the first region is a region determined with a disturbing object in the medical image as a center;

[0034] determine a target processing method for removing the disturbing object in the medical image according to pixel values of a second region, wherein the second region is a region obtained by removing the first region in a third region, the third region is a region determined with the disturbing object as a center, and an area of the third region is greater than an area of the first region;

[0035] Adopt the target processing method, remove the interference in the medical image, obtain the medical image after processing.

[0036] A computer readable storage medium, having stored thereon a computer program, the computer program is executed by a processor to implement the following steps:

[0037] Obtain the medical image to be processed, and determine a first region in the medical image; Wherein, the first region is a region determined with the interference in the medical image as the center;

[0038] According to the pixel value of the second region, determine the target processing method for removing the interference in the medical image; Wherein, the second region is the region obtained by removing the first region in the third region; The third region is a region determined with the interference as the center, and the area of the third region is greater than the area of the first region;

[0039] Adopt the target processing method, remove the interference in the medical image, obtain the medical image after processing.

[0040] The above image processing method, device, computer equipment and storage medium, by determining the first region in the medical image to be processed with the interference in the medical image as the center, and determining the third region with the interference as the center, the area of the third region is greater than the area of the first region, removing the first region from the third region to obtain the second region, so that the target processing method for removing the interference in the medical image can be determined according to the pixel value of the second region, and then the determined target processing method can be used to remove the interference in the medical image, and the medical image after processing is obtained. Because the target processing method for removing the interference in the medical image is determined according to the pixel value of the second region in the process of obtaining the medical image after processing, the interference in the medical image can be accurately removed by the determined target processing method, so as to improve the quality of the medical image after processing. BRIEF DESCRIPTION OF DRAWINGS

[0041] Figure 1 It is the application environment diagram of the image processing method in one embodiment;

[0042] Figure 2 It is the flowchart of the image processing method in one embodiment;

[0043] Figure 3 It is the schematic diagram of the medical image to be processed in one embodiment;

[0044] Figure 4 It is the schematic diagram of the medical image after processing in one embodiment;

[0045] Figure 5A schematic diagram of a processed medical image in one embodiment;

[0046] Figure 6 A schematic diagram of a flow of an image processing method in another embodiment;

[0047] Figure 7 A schematic diagram of a background pixel filling method in one embodiment;

[0048] Figure 8 A schematic diagram of a confidence calculation method in one embodiment;

[0049] Figure 9 A schematic diagram of a first region in one embodiment;

[0050] Figure 10 A schematic diagram of a mask corresponding to the first region in one embodiment;

[0051] Figure 11 A schematic diagram of an operation of a mean filter algorithm in one embodiment;

[0052] Figure 12 A schematic diagram of a processed medical image obtained in one embodiment;

[0053] Figure 13 A schematic diagram of a flow of an image processing method in one embodiment;

[0054] Figure 14 A block diagram of an image processing apparatus in one embodiment. DETAILED DESCRIPTION

[0055] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not used to limit the present application.

[0056] The image processing method provided by the embodiments of the present application can be applied to, for example, Figure 1The computer device shown in the figure. The computer device includes a processor, a memory connected by a system bus, the memory stores a computer program, and the processor executes the computer program to perform the steps of the method embodiments described below. Optionally, the computer device can also include a network interface, a display screen and an input device. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with the external terminal through the network connection. Optionally, the computer device can be a server, a personal computer, a personal digital assistant, or other terminal devices such as tablets, mobile phones, etc. It can also be a cloud or remote server, and the specific form of the computer device is not limited in the embodiments of the present application.

[0057] X-ray-based medical image analysis plays an important role in medical diagnosis, intraoperative planning, and postoperative evaluation. The main imaging principle of X-ray medical images is to use the penetration and differential absorption of X-rays, that is, different substances have different absorption effects on X-rays. For human body structures, bone tissue has better absorption effect on X-rays than muscle, organs and other tissues. Therefore, after the X-rays pass through the human body, they will show different density shadows on the photographic film. Combined with the knowledge of human anatomy, clinical manifestations and X-ray images, it can be inferred whether a part of the human body is normal. However, in the actual X-ray imaging process, there are often imaging of interfering objects, especially in real-time surgical navigation, there are many metal markers, bone markers, optical calibration arrays and surgical instruments in the imaging area of the X-ray machine. Because the attenuation effect of metal foreign bodies and human bone tissue on X-rays is quite different, metal foreign bodies can seriously interfere with the imaging of human tissues, and thus affect the accuracy of the obtained X-ray images. Clinically, for X images with serious interference, the method of re-shooting is often used to obtain X images with less interference, but the re-shooting method will increase the number of human body exposure and cause more radiation damage. Therefore, an image processing method is needed to process X images with serious interference to remove the interfering objects in the X-ray images.

[0058] In one embodiment, as shown in Figure 2 , an image processing method is provided, which is applied to Figure 1 the computer device as an example for illustration, including the following steps:

[0059] S201, acquire a medical image to be processed, and determine a first region in the medical image; wherein the first region is a region determined with a disturbance in the medical image as a center.

[0060] The medical image to be processed can be a medical image of different human tissues. Optionally, the medical image to be processed includes an X-ray image. It can be understood that the medical image to be processed can also be a digital X-ray image, that is, a direct digital flat panel X-ray imaging system (Digital Radiography, DR) image. Optionally, the medical image to be processed can be a high-quality X-ray image or a low-quality X-ray image. Specifically, the computer device acquires the medical image to be processed, and determines the first region in the medical image with the disturbance as a center. Optionally, the disturbance can be a metal marker, a bone marker, an optical tracking array, a surgical instrument, and the like. Optionally, the computer device can input the medical image to be processed into a preset detection model to determine the first region in the medical image by a detection algorithm, or compare each pixel value of the medical image to be processed with a preset threshold to outline the profile of the metal disturbance in the medical image to determine the first region in the medical image. For example, for a medical image including an optical tracking array, a metal marker, and the like, a detection algorithm can be used to detect the disturbance in the medical image to be processed, and then a mask corresponding to the region where the disturbance is located in the medical image is generated to determine the first region. Alternatively, the computer device can compare each pixel value of the medical image to be processed with a preset threshold to outline the profile of the disturbance in the medical image to generate a mask to determine the first region. Optionally, the computer device can acquire the medical image to be processed in real time from a medical imaging device, or acquire the medical image to be processed from the storage of the medical imaging device at a preset time interval.

[0061] S202, determine a target processing method for removing the disturbance in the medical image according to the pixel value of the second region; wherein the second region is a region obtained by removing the first region in the third region; the third region is a region determined with the disturbance as a center, and the area of the third region is greater than the area of the first region.

[0062] Specifically, the computer device determines a third region with the above-mentioned interference as a center, wherein the area of the third region is larger than the area of the first region, and then subtracts the first region from the third region to obtain a second region. According to the pixel value of the second region, the computer device determines a target processing method for removing the interference in the medical image to be processed. Optionally, the computer device can compare the pixel value of the second region with a preset threshold, and determine the target processing method for removing the interference in the medical image according to the comparison result. Optionally, the computer device can adopt different processing methods to remove the interference in the medical image according to different comparison results. For example, if the variance of the pixel value of the second region is greater than the preset threshold, it indicates that the pixel value of the second region fluctuates greatly, and the background pixel filling method can be adopted to remove the interference in the medical image. If the pixel value of the second region is less than or equal to the preset threshold, it indicates that the pixel value of the target interference region fluctuates less, and the filtering method can be adopted to remove the interference in the medical image.

[0063] S203, removing the interference in the medical image by using the target processing method to obtain a processed medical image.

[0064] Specifically, the computer device removes the interference in the medical image by using the target processing method to obtain a processed medical image. Optionally, before removing the interference in the medical image by using the target processing method, the computer device can preprocess the medical image to remove the interference in the preprocessed medical image to obtain a processed medical image. Optionally, the preprocessing of the medical image by the computer device can include any one of resampling processing, size adjustment processing, skull removal processing, image non-uniform correction processing, histogram matching processing and gray scale normalization processing. For example, Figure 3 The medical image to be processed shown is an X-ray image to be processed as an example, Figure 4 the X-ray image after removing the metal marker beads, Figure 5 the X-ray image after removing the metal bone nail.

[0065] In the image processing method, the computer device determines the first region in the medical image to be processed with the interference in the medical image as the center, determines the third region with the interference as the center and with an area larger than that of the first region, removes the first region from the third region to obtain the second region, and determines the target processing method for removing the interference in the medical image according to the pixel value of the second region. Then, the determined target processing method is used to remove the interference in the medical image to obtain the processed medical image. Since the target processing method for removing the interference in the medical image is determined according to the pixel value of the second region in the process of obtaining the processed medical image, the interference in the medical image can be accurately removed by the determined target processing method, thereby improving the quality of the obtained processed medical image.

[0066] In the scenario of determining the target processing method for removing the interference in the medical image according to the pixel value of the second region, the computer device can determine the target processing method for removing the interference in the medical image according to the pixel value of all pixels in the second region. In one embodiment, as shown in Figure 6 S202 includes:

[0067] S301 obtains the variance or standard deviation of the pixels in the second region according to the pixel value of all pixels in the second region.

[0068] Specifically, the computer device obtains the variance or standard deviation of the pixels in the second region according to the determined pixel value of all pixels in the second region. It can be understood that the standard deviation of the pixels is obtained by taking the square root of the variance of the pixels. The variance of the pixels reflects the range of the pixels. For an image with strong edge texture, the variance is generally large. For an image with a relatively flat gray scale change and no obvious edge texture, the variance is generally small. Optionally, the variance of the pixels in the second region can be the total variance of the pixels in the second region, or the sample variance of the pixels in the second region. The standard deviation of the pixels in the second region can be the total standard deviation of the pixels in the second region, or the sample standard deviation of the pixels in the second region. For example, the sample variance of the pixels in the second region is taken as the sample standard deviation. The sample variance of the pixels in the second region can be obtained by formula (1) and formula (2): wherein, represents the mean value of all pixels in the second region, x i represents the pixel value of each pixel in the second region, s represents the sample standard deviation of the edge pixels of the target interference region, and n represents the number of pixels in the second region.

[0069] S302 determines the target processing method according to the variance or standard deviation.

[0070] Specifically, the computer device determines the target processing method for removing the interference in the medical image according to the variance or the standard deviation of the pixels in the second region obtained above. Optionally, the computer device can compare the variance or the standard deviation of the pixels in the second region with a preset threshold, and determine the target processing method for removing the interference in the medical image according to the comparison result. For example, if the variance of the pixels in the second region is greater than the preset threshold, it indicates that the edge pixel value of the second region fluctuates greatly, and the filling method can be used to remove the interference in the medical image. If the variance of the pixels in the second region is less than the preset threshold, it indicates that the variance of the edge pixels of the second region fluctuates less, and the filtering method can be used to remove the interference in the medical image.

[0071] In this embodiment, the computer device can obtain the variance or the standard deviation of the pixels in the second region according to the pixel values of all the pixels in the second region, and the variance or the standard deviation of the pixels in the second region can reflect the fluctuation of the pixel values of the second region. Therefore, the target processing method for removing the interference in the medical image can be accurately determined according to the variance or the standard deviation of the pixels in the second region, and the interference in the medical image can be accurately removed by the determined target processing method, thereby improving the quality of the processed medical image.

[0072] In the above scenario of determining the target processing method for removing the interference in the medical image according to the variance or the standard deviation of the second region, the target processing method determined by the computer device can be the background pixel filling method or the mean filtering method. In one embodiment, the S302 includes:

[0073] 1) If the variance of the pixels in the second region is greater than a preset first threshold or the standard deviation of the pixels in the second region is greater than a preset second threshold, the target processing method is determined to be the background pixel filling method.

[0074] Specifically, if the obtained variance of the pixels in the second region is greater than the preset first threshold or the standard deviation of the pixels in the second region is greater than the preset second threshold, the computer device determines that the target processing method for removing the interference in the medical image is the background pixel filling method.

[0075] 2) If the variance of the pixels in the second region is less than the first threshold or the standard deviation of the pixels in the second region is less than the second threshold, the target processing method is determined to be the mean filtering method.

[0076] Specifically, if the obtained variance of the pixels in the second region is less than the first threshold or the standard deviation of the pixels in the second region is less than the second threshold, the computer device determines that the target processing method for removing the interference in the medical image is the mean filtering method.

[0077] In the embodiment, the computer device can accurately determine the target processing method for removing the interference in the medical image according to the variance of the pixels in the second region and the preset first threshold value, or the standard deviation of the pixels in the second region and the preset second threshold value, and then accurately remove the interference in the medical image through the determined target processing method, thereby improving the quality of the processed medical image.

[0078] In the scenario where the target processing method determined by the computer device is the background pixel filling method, S203 includes:

[0079] Step A: taking a point on the edge of the first region as a center point, and intercepting a first image block of a preset size.

[0080] Step B: intercepting a second image block of the same size as the first image block in a region of the medical image other than the first region.

[0081] Step C: calculating the similarity between the first image block and each second image block.

[0082] Step D: determining a second image block that meets a preset condition as a target image block, replacing the first image block with the target image block, and obtaining a processed medical image; the preset condition is that the similarity between the first image block and the second image block is greater than a preset third threshold value.

[0083] Specifically, as Figure 7As shown, the computer device takes a point on the edge of the first region as a center point, intercepts a first image block of a preset size, intercepts a second image block of the same size as the first image block in a region of the medical image to be processed except the first region, calculates the similarity between the first image block and each second image block, determines the second image block corresponding to a preset condition as a target image block, replaces the first image block with the target image block, and obtains a processed medical image, wherein the preset condition is that the similarity between the first image block and the second image block is greater than a preset third threshold. It can be understood that the computer device adopts a background pixel filling method to remove the interference in the medical image, which is a "from outside to inside" filling idea. It should be noted that the computer device can determine an initial point on the edge of the first region by the following method: the computer device calculates the confidence and the gradient of each pixel of the first region, the size of the confidence of the pixel expresses the number of background region pixels contained in the image block where the pixel is located, the more the number is, the more the known prior information near the pixel is, and thus it is more conducive to filling the target region of the center and the filling effect is more realistic; the size of the gradient expresses the edge texture feature strength of the pixel, and generally the closer to the edge texture, the higher the priority of the pixel is. The filling order of each pixel of the first region can be sorted by priority, wherein the priority can be calculated by the confidence and the gradient of each pixel, and the calculation formula is as follows: priority = Confidence x Gradient, the calculation method of the confidence is as follows: Figure 8 As shown, the gray corresponds to the background pixel, the white corresponds to the foreground pixel, and the black corresponds to the mask edge pixel. Assuming that a 5x5 region around each edge pixel is selected as the center, the confidence of No. 1 pixel is the ratio of the total number of background pixels to the total number of foreground pixels, so the confidence of No. 1 pixel is 4. The calculation formula of the gradient is as follows: wherein G x and G yThe gradient values of each pixel in x direction and each pixel in y direction can be calculated by the difference of adjacent pixels. After the priority of all edge pixels is calculated, the foreground region in the 5*5 neighborhood of the target pixel can be filled according to the priority of each edge pixel, that is, an image block with the same size as the image block where the target pixel is located is found in the background region of the medical image to be processed, which is most similar to the image block where the target pixel is located, and then the image block is used to replace the image block where the target pixel is located. The similarity between the determined image block and the image block where the target pixel is located can be obtained by adding the mean square error of the pixel gray values of the determined image block and the image block where the target pixel is located and the Euclidean distance of the pixel coordinates, that is, the similarity between the determined image block and the image block where the target pixel is located can be obtained according to the formula Similarity = Squareerror + Euclideandistance, wherein Squareerror is the mean square error of the pixel gray values of the determined image block and the image block where the target pixel is located, which represents the sum of squares of the difference values of the corresponding pixels of two image blocks with the same size, for example, for image block A and image block B, a ij and b ij The expression of Squareerror can be: Euclidean distance represents the Euclidean distance of the pixel coordinates of the determined image block and the image block where the target pixel is located, which represents the geometric spatial distance of the image blocks at different positions in the same image. Because the image is a two-dimensional spatial structure, in general, the closer the pixels, the smaller the geometric spatial distance of the corresponding image blocks.

[0084] In this embodiment, the computer device takes a point on the edge of the first region as a center point, and intercepts a first image block with a preset size. In the region of the medical image to be processed except the first region, a second image block with the same size as the first image block is intercepted, the similarity between the intercepted first image block and each second image block is calculated, the second image block with a similarity greater than a preset third threshold value is determined as a target image block, and the target image block is used to replace the intercepted first image block. The whole filling process is similar to the morphological operation of corrosion. Through this "from outside to inside" processing method, the medical image to be processed can be accurately processed, and the quality of the processed medical image is improved.

[0085] In the scenario where the target processing method determined by the computer device is the mean filtering method, S203 includes:

[0086] Step E: Using the image block corresponding to the first region as the basic unit, determine the pixel value of the corresponding pixel in each image block adjacent to the first region in the medical image.

[0087] Step F: Obtain the average pixel value of the corresponding pixels of each image block adjacent to the first region.

[0088] Step G: Replace the pixel values ​​of the corresponding pixels in the first region with the mean value to obtain the processed medical image.

[0089] Specifically, the computer device uses image blocks corresponding to the first region as basic units. In the medical image to be processed, it determines the pixel values ​​of pixels corresponding to each image block adjacent to the first region, obtains the average pixel value of each image block adjacent to the first region, and replaces the pixel values ​​of the corresponding pixels in the first region with this average value to obtain the processed medical image. For example, if the first region and its adjacent image blocks contain 64 pixels, the average pixel value of each image block adjacent to the first region is: the average pixel value of the first pixel in each image block, the average pixel value of the second pixel in each image block, ..., the average pixel value of the 64th pixel in each image block. Optionally, the image blocks adjacent to the first region include four-neighbor image blocks or eight-neighbor image blocks adjacent to the first region. For example, as... Figure 9 As shown, Figure 9 The first region of the X-ray image containing the metallic marker. Figure 10 For its corresponding mask, the mean filtering algorithm provided in this embodiment operates on image patches as the basic unit, such as... Figure 11 As shown, the image patches with smoother edges in their four neighboring regions are summed, and the average value is used to replace the image patch containing the central metal marker. Figure 12 This is a schematic diagram of the processed medical image obtained in this embodiment. As can be seen, for areas with indistinct edge texture features, the mean filtering algorithm provided in this embodiment can achieve very good removal results.

[0090] In this embodiment, the computer device uses the image block corresponding to the first region as the basic unit, determines the pixel value of the corresponding pixel of each image block adjacent to the first region in the medical image to be processed, obtains the average value of the pixel value of each image block adjacent to the first region, and replaces the pixel value of the corresponding pixel in the first region with the average value to obtain the processed medical image. Through this process, the medical image to be processed can be processed with high accuracy, thereby accurately removing the interference in the medical image to be processed and obtaining a high-quality processed medical image.

[0091] It should be noted that the above to-be-processed medical image can include multiple interference region, and different interference regions can adopt different target processing methods, that is, some regions of interest adopt the background pixel filling method, and some regions of interest adopt the mean filtering method. After the computer device processes the to-be-processed medical image by using different target processing methods, as shown in Figure 13 , the regions of interest processed by using different target processing methods can be integrated, and then the integrated regions of interest are processed to obtain the above processed medical image.

[0092] It should be understood that, although Figures 2-13 the flowchart shows various steps in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, Figures 2-13 at least part of the steps in may include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be alternately executed with other steps or steps or stages in other steps.

[0093] Figure 14 In one embodiment, as shown in , an image processing apparatus is provided, comprising an acquisition module, a determination module and a processing module, wherein:

[0094] The acquisition module is configured to acquire a to-be-processed medical image and determine a first region in the medical image; wherein the first region is a region determined with an interference object in the medical image as a center.

[0095] The determination module is configured to determine a target processing method for removing the interference object in the medical image according to a pixel value of a second region; wherein the second region is a region obtained by excluding the first region in a third region; and the third region is a region determined with the interference object as a center, and the area of the third region is greater than the area of the first region.

[0096] The processing module is configured to remove the interference object in the medical image by using the target processing method to obtain a processed medical image.

[0097] Optionally, the to-be-processed medical image includes an X-ray image.

[0098] The image processing apparatus provided in the embodiment can execute the above method embodiments, and has similar implementation principles and technical effects, which will not be described here.

[0099] On the basis of the above-mentioned embodiment, optionally, the determining module comprises a first obtaining unit and a first determining unit, wherein:

[0100] The first obtaining unit is configured to obtain the variance or the standard deviation of the pixels in the second region according to the pixel values of all the pixels in the second region.

[0101] The first determining unit is configured to determine the target processing method according to the variance or the standard deviation.

[0102] The image processing device provided in the embodiment can execute the above-mentioned method embodiment, and has similar implementation principles and technical effects, which will not be described here again.

[0103] On the basis of the above-mentioned embodiment, optionally, the first determining unit is specifically configured to determine the target processing method as the background pixel filling method if the variance is greater than a preset first threshold value or the standard deviation is greater than a preset second threshold value, and determine the target processing method as the mean filtering method if the variance is less than the first threshold value or the standard deviation is less than the second threshold value.

[0104] The image processing device provided in the embodiment can execute the above-mentioned method embodiment, and has similar implementation principles and technical effects, which will not be described here again.

[0105] On the basis of the above-mentioned embodiment, optionally, if the target processing method is the background pixel filling method, the processing module comprises a first cutting unit, a second cutting unit, a calculation unit and a processing unit, wherein:

[0106] The first cutting unit is configured to cut a first image block of a preset size with a point on the edge of the first region as a center point.

[0107] The second cutting unit is configured to cut a second image block of the same size as the first image block in a region of the medical image other than the first region.

[0108] The calculation unit is configured to calculate the similarity between the first image block and each second image block.

[0109] The processing unit is configured to determine a second image block corresponding to a preset condition as a target image block, replace the first image block with the target image block, and obtain a processed medical image; the preset condition is that the similarity between the first image block and the second image block is greater than a preset third threshold value.

[0110] The image processing device provided in the embodiment can execute the above-mentioned method embodiment, and has similar implementation principles and technical effects, which will not be described here again.

[0111] On the basis of the above-mentioned embodiment, optionally, if the target processing method is the mean filtering method, the processing module comprises a second determining unit, a second obtaining unit and a third obtaining unit, wherein:

[0112] The second determining unit is configured to determine, as a basic unit, pixel values of pixels corresponding to each image block adjacent to the first region in the medical image.

[0113] The second obtaining unit is configured to obtain a mean value of the pixel values of the pixels corresponding to each image block adjacent to the first region.

[0114] The third obtaining unit is configured to replace the pixel values of the pixels in the first region with the mean value to obtain a processed medical image.

[0115] Optionally, each image block adjacent to the first region includes a four-neighbor image block adjacent to the first region or an eight-neighbor image block adjacent to the first region.

[0116] The image processing apparatus provided in the embodiment can execute the method embodiments, and has similar implementation principles and technical effects, which will not be described herein again.

[0117] The specific limitations on the image processing apparatus can be referred to the limitations on the image processing method, which will not be described herein again. Each module in the image processing apparatus can be realized by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in a hardware form, or can be stored in a memory in a computer device in a software form, so as to be called and executed by a processor to perform operations corresponding to each module.

[0118] In one embodiment, a computer device is provided, including a memory and a processor, the memory stores a computer program, and the processor executes the computer program to implement the following steps:

[0119] Obtaining a medical image to be processed, and determining a first region in the medical image; wherein the first region is a region determined with an interference object in the medical image as a center;

[0120] Determining a target processing method for removing the interference object in the medical image according to pixel values of a second region; wherein the second region is a region obtained by removing the first region in a third region; the third region is a region determined with the interference object as a center, and an area of the third region is greater than an area of the first region;

[0121] Removing the interference object in the medical image by using the target processing method to obtain a processed medical image.

[0122] The computer device provided in the above embodiments has similar implementation principles and technical effects to the above method embodiments, which will not be described herein again.

[0123] In one embodiment, a computer readable storage medium is provided, having stored thereon a computer program which, when executed by a processor, implements the following steps:

[0124] The medical image to be processed is acquired, and a first region is determined in the medical image; wherein the first region is a region determined with the interference object in the medical image as the center;

[0125] According to the pixel value of the second region, a target processing method for removing the interference object in the medical image is determined; wherein the second region is a region obtained by excluding the first region in the third region; the third region is a region determined with the interference object as the center, and the area of the third region is greater than the area of the first region;

[0126] The target processing method is used to remove the interference object in the medical image, and a processed medical image is obtained.

[0127] The computer readable storage medium provided in the above embodiments has similar implementation principles and technical effects to the method embodiments, and will not be described here.

[0128] Those skilled in the art can understand that all or part of the processes in the above method embodiments can be completed by a computer program instructing related hardware, and the computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes of the above embodiments. In the embodiments provided in the present application, any reference to memory, storage, database or other medium can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0129] The technical features of the above embodiments can be combined in any way. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described, but as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.

[0130] The above-described embodiments are merely illustrative of several embodiments of the present application, which are described in more detail and in a specific manner, but should not be construed as limiting the scope of the patent. It should be noted that for those skilled in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.

Claims

1. An image processing method, characterized in that, The method includes: A medical image to be processed is acquired, and a first region is determined in the medical image; wherein, the first region is a region determined with an interfering object in the medical image as the center; Based on the pixel values ​​of all pixels in the second region, the variance or standard deviation of the pixels in the second region is obtained. If the variance is greater than a preset first threshold or the standard deviation is greater than a preset second threshold, the target processing method for removing interference from the medical image is determined to be background pixel filling. If the variance is less than the first threshold or the standard deviation is less than the second threshold, the target processing method is determined to be mean filtering. The second region is the region obtained after removing the first region from the third region. The third region is the region centered on the interference, and the area of ​​the third region is greater than the area of ​​the first region. The target processing method is used to remove interference from the medical image to obtain a processed medical image. If the medical image to be processed includes multiple different interference regions, the step of removing the interference from the medical image using the target processing method to obtain the processed medical image includes: processing the region of interest (ROI) of the medical image to be processed using different target processing methods; integrating the ROI processed by the different target processing methods; and processing the integrated ROI to obtain the processed medical image.

2. The method according to claim 1, characterized in that, If the target processing method is a background pixel filling method, the step of using the target processing method to remove interference in the medical image to obtain the processed medical image includes: Using the points on the edge of the first region as the center points, a first image block of a preset size is extracted; In the medical image, a second image block of the same size as the first image block is extracted from the region other than the first region; Calculate the similarity between the first image patch and each of the second image patches; The second image block that meets the preset conditions is determined as the target image block, and the first image block is replaced by the target image block to obtain the processed medical image; the preset condition is that the similarity between the first image block and the second image block is greater than a preset third threshold.

3. The method according to claim 1, characterized in that, If the target processing method is mean filtering, the step of using the target processing method to remove interference in the medical image to obtain the processed medical image includes: Using the image block corresponding to the first region as the basic unit, determine the pixel value of the corresponding pixel of each image block adjacent to the first region in the medical image; Obtain the average pixel value of the corresponding pixels of each image block adjacent to the first region; The pixel values ​​of the corresponding pixels in the first region are replaced with the mean value to obtain the processed medical image.

4. The method according to claim 3, characterized in that, Each image block adjacent to the first region includes a four-neighbor image block or an eight-neighbor image block adjacent to the first region.

5. An image processing apparatus, characterized in that, The device includes: An acquisition module is used to acquire a medical image to be processed and to determine a first region in the medical image; wherein the first region is a region determined with an interfering object in the medical image as the center; The determination module is used to obtain the variance or standard deviation of the pixels in the second region based on the pixel values ​​of all pixels in the second region. If the variance is greater than a preset first threshold or the standard deviation is greater than a preset second threshold, the target processing method for removing interference from the medical image is determined to be background pixel filling; if the variance is less than the first threshold or the standard deviation is less than the second threshold, the target processing method is determined to be mean filtering. The second region is the region obtained by removing the first region from the third region; the third region is the region centered on the interference, and the area of ​​the third region is greater than the area of ​​the first region. A processing module is used to remove interference from the medical image using the target processing method to obtain a processed medical image. Wherein, if the medical image to be processed includes multiple different interference regions, removing the interference from the medical image using the target processing method to obtain the processed medical image includes: processing the region of interest (ROI) of the medical image to be processed using different target processing methods; integrating the ROI processed by the different target processing methods; and processing the integrated ROI to obtain the processed medical image.

6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Medical image interpretation method and device, computer equipment and storage medium

    CN110136103A

  • Medical image display system, medical image display program and medical image display method

    JP2017131454A