Metal detection methods, apparatus, equipment and storage media
By detecting the difference between the metal edge region and the target edge region in medical images, seed points are extracted for region growing, which solves the problems of increased dose and poor image quality caused by low metal grayscale values, and achieves more efficient metal detection and image quality improvement.
Patent Information
- Application Number
- CN201910515515.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-06-14
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2039-06-14
AI Technical Summary
During the detection process of medical imaging equipment, the gray value of the metal is lower than that of the target object, which requires an increase in dosage to meet the image acquisition requirements. In addition, the metal is not clearly separated from the target object, resulting in poor image quality.
By obtaining the difference between the target edge region and the metal edge region in medical images, seed points are extracted and region growing is performed to detect metal in medical images.
To avoid subjects receiving additional radiation doses and to improve image quality.
Smart Images

Figure CN110246150B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical image processing technology, and in particular to a metal detection method, apparatus, device and storage medium. Background Technology
[0002] Medical imaging equipment may capture images of metal objects, such as surgical instruments made of various metals, within its image acquisition area. During operation, the equipment simultaneously captures images of both the metal objects and the target subject within the acquisition area. Typically, the grayscale value of the metal in the acquired medical image is lower than that of the target subject. For example, in a C-arm imaging system, the metal attenuates X-rays more effectively than the target subject, resulting in a lower grayscale value for the metal in the acquired medical image.
[0003] However, the above situation can lead to several problems. For example, medical imaging equipment adjusts the dosage based on the grayscale values in the acquired medical images. Since metal has a low grayscale value, more dosage is needed to ensure that the overall grayscale value of the medical image meets the acquisition target. This results in the patient receiving many extra doses. Furthermore, when the medical imaging equipment performs post-processing on the acquired medical images, if the metal and the target object are not separated, the metal may occupy a portion of the grayscale range that should be displaying the target object, leading to low grayscale contrast and poor image quality. Summary of the Invention
[0004] This invention provides a metal detection method, apparatus, device, and storage medium to achieve the effect of detecting metals in medical images.
[0005] In a first aspect, embodiments of the present invention provide a metal detection method, which may include:
[0006] Acquire medical images of the target object and extract the target edge region of at least one region of interest in the medical image;
[0007] Obtain the target neighborhood of each pixel in the medical image, and determine the metal edge region based on the gray value of each pixel in the target neighborhood;
[0008] The difference between the metal edge region and the target edge region is obtained, seed points are extracted from the difference, and region growth is performed based on the seed points to detect metal in medical images.
[0009] Optionally, region growing based on seed points to detect metals in medical images may include:
[0010] Based on the seed point, perform region growth to obtain the current region growth result, as well as the visited region consisting of the visited pixels during the region growth process.
[0011] Update the target edge region based on the difference between the target edge region and the access region, and update the metal edge region based on the difference between the metal edge region and the access region;
[0012] Repeat the operation of obtaining the difference set between the metal edge region and the target edge region until the metal edge region or the target edge region meets the preset termination condition, and use the growth results of each current region as the metal in the medical image.
[0013] Optionally, region growing based on seed points to detect metals in medical images may include:
[0014] Region growth is performed based on seed points to obtain the current region growth result, and the first grayscale mean value of each pixel in the current region growth result is calculated.
[0015] Calculate the adaptive threshold for the metal edge region, and calculate the second grayscale mean of each pixel in the metal edge region that is less than the adaptive threshold;
[0016] Based on the numerical relationship between the first grayscale mean and the second grayscale mean, determine whether the growth result of the current region is a metal in the medical image.
[0017] Optionally, region growing based on seed points may include:
[0018] Identify the pixels within the preset neighborhood of the seed point that satisfy the preset region growth conditions, and update the seed point based on the pixels that satisfy the preset region growth conditions.
[0019] Repeatedly execute the operation on pixels within the preset neighborhood of the seed point that meet the preset region growth conditions until all pixels that meet the preset region growth conditions are empty.
[0020] Optionally, determine the pixels within a preset neighborhood of the seed point that satisfy the preset region growth conditions, which may specifically include:
[0021] Pixels within the preset neighborhood of the seed point are used as neighboring points. Based on the structural similarity between the neighboring points and the seed point, the intersection of the neighboring points and the target edge region, and the gray-level similarity between the neighboring points and the mean values of each seed point, pixels that meet the preset region growth conditions are selected from each neighboring point.
[0022] Optionally, determining the metal edge region based on the grayscale values of each pixel in the target neighborhood may include: filtering out the metal edge region from the target neighborhood based on the grayscale variance values of each pixel in the target neighborhood.
[0023] Optionally, after acquiring the medical images of the target object, the method may further include: normalizing the medical images and updating the medical images based on the processing results.
[0024] Secondly, embodiments of the present invention also provide a metal detection device, which may include:
[0025] The target edge region extraction module is used to acquire medical images of the target object and extract the target edge region of at least one region of interest in the medical image.
[0026] The metal edge region determination module is used to obtain the target neighborhood of each pixel in the medical image and determine the metal edge region based on the gray value of each pixel in the target neighborhood.
[0027] The metal detection module is used to obtain the difference between the metal edge region and the target edge region, extract seed points from the difference, and perform region growth based on the seed points to detect metals in medical images.
[0028] Thirdly, embodiments of the present invention also provide an apparatus, which may include:
[0029] One or more processors;
[0030] Memory, used to store one or more programs;
[0031] When one or more programs are executed by one or more processors, the one or more processors implement the metal detection method provided in any embodiment of the present invention.
[0032] Fourthly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the metal detection method provided in any embodiment of the present invention.
[0033] The technical solution of this invention involves first extracting at least one target edge region from a medical image, which may be a metal boundary or a target object boundary. Second, the metal edge region is determined based on the grayscale values of pixels in the target neighborhood of each pixel in the medical image, thereby determining whether metal exists in the medical image. Furthermore, if a metal edge region exists, the difference between the metal edge region and the target edge region is obtained, and seed points are extracted from the difference. Finally, region growing is performed based on the seed points to detect metal in the medical image. This technical solution can detect the presence of metal in medical images, thereby avoiding additional doses to the patient and improving image quality. Attached Figure Description
[0034] Figure 1This is a flowchart of a metal detection method according to Embodiment 1 of the present invention;
[0035] Figure 2 This is a schematic diagram of a medical image in a metal detection method according to Embodiment 1 of the present invention;
[0036] Figure 3 This is a flowchart of a metal detection method according to Embodiment 2 of the present invention;
[0037] Figure 4 This is a structural block diagram of a metal detection device according to Embodiment 3 of the present invention;
[0038] Figure 5 This is a schematic diagram of the structure of a device in Embodiment 4 of the present invention. Detailed Implementation
[0039] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.
[0040] Example 1
[0041] Figure 1 This is a flowchart of a metal detection method provided in Embodiment 1 of the present invention. This embodiment is applicable to detecting the presence of metal in medical images, especially in medical images acquired using a C-arm optics system. The method can be executed by the metal detection device provided in this embodiment, which can be implemented in software and / or hardware and can be integrated into various devices.
[0042] See Figure 1 The method of this invention specifically includes the following steps:
[0043] S110. Acquire the medical image of the target object and extract the target edge region of at least one region of interest in the medical image.
[0044] The medical images can be X-ray images, computed tomography (CT) images, ultrasound images, or other types of medical images. Because the grayscale values of the metal and the target object differ in these medical images, this difference may be due to the different degrees of attenuation of the radiation involved in medical imaging by the metal and the target object. As long as the grayscale values of the metal and the target object in the medical image differ, the metal detection method based on this invention can detect the presence of metal in the medical image.
[0045] Optionally, after acquiring the medical image of the target object, the image can be preprocessed. For example, if the medical image is an X-ray related image, such as a CT image, since X-rays decay exponentially, a logarithmic transformation, such as a log transformation, can be applied to the image to make the contrast of the medical image linearly related to the attenuation of X-rays, while also increasing the contrast in the low grayscale range. Another example is normalization, which processes medical images with different grayscale ranges to the same grayscale range, such as 0-1. The advantage of this setting is that any medical image can be processed based on the same threshold. After preprocessing the medical image, it needs to be updated based on the processing results.
[0046] Extracting the target edge region of at least one region of interest from a medical image. This target edge region may be a metallic boundary or the boundary of a target object. Specifically, edge operators such as Roberts, Sobel, Prewitt, Laplacian, and Canny can be used to extract the target edge region of at least one region of interest from the medical image. Typically, the target edge region extracted based on edge operators can be an M*N rectangular region, where M and N are both positive integers. For example, the target edge region could be a 3*3 rectangular region.
[0047] S120. Obtain the target neighborhood of each pixel in the medical image, and determine the metal edge region based on the gray value of each pixel in the target neighborhood.
[0048] In medical images, the grayscale values of metal and the target object differ. For example, in X-ray images, metal attenuates X-rays more effectively than the target object, resulting in a lower grayscale value for the metal. This difference also creates a significant gradient between the metal boundary and the target object boundary. Based on this, the presence of metal in a medical image can be determined. Specifically, the target neighborhood of each pixel in the medical image is obtained. This target neighborhood can be a rectangular region. Optionally, the target edge region can be considered a thin rectangular region, while the target neighborhood can be considered a thick rectangular region. For example, if the target edge region is a 3x3 rectangular region, then the target neighborhood can be a rectangular region no smaller than 5x5.
[0049] After acquiring the target neighborhood of each pixel in the medical image, the metal edge region can be determined based on the grayscale values of each pixel within the target neighborhood. For example, the metal edge region can be filtered out from the target neighborhood based on the grayscale variance of each pixel. This is because there are significant gradient changes at metal boundaries and / or target object boundaries, resulting in larger grayscale variance values for pixels in the target neighborhood located at these boundaries. Therefore, the target neighborhood that meets a preset grayscale variance threshold can be considered the metal edge region. This metal edge region may contain areas with lower grayscale values and areas with higher grayscale values; the areas with lower grayscale values are likely metal.
[0050] The resulting metal edge region can be one or more. When multiple metal edge regions exist, they can be integrated, and the integrated result can be used as the metal edge region. In this case, the interior of the metal edge region may be continuous or discontinuous.
[0051] S130. Obtain the difference between the metal edge region and the target edge region, extract seed points from the difference, and perform region growth based on the seed points to detect metal in medical images.
[0052] If a metallic edge region exists, the difference between the metallic edge region and the target edge region is obtained. Pixels in this difference set belong to the metallic edge region but not to the target edge region. These pixels may be located at either the metal boundary or the target object boundary. Therefore, seed points can be extracted from the difference set. For example, in X-ray images, since the grayscale value of metal in X-ray images is lower than that of the target object, if the pixel with the smallest grayscale value in the difference set is used as the seed point, this seed point must be a pixel in the metallic region. Furthermore, region growing can be performed based on this seed point to detect metal in medical images.
[0053] Typically, medical imaging equipment needs to acquire multiple medical images for each subject's target object. After acquiring the first medical image, metal can be detected in the image based on the steps described above. In the early stages of medical image acquisition, such as when acquiring the second and subsequent images, the dosage can be adjusted based on the grayscale values of areas other than metal in the image. This solves the problem of needing to increase the dosage to meet the overall grayscale target of the medical image due to the low grayscale value of metal, which would result in the subject receiving excessive additional dosage. Furthermore, in the later stages of medical image processing, such as when processing the second and subsequent images, the grayscale value of the entire medical image can be adjusted based on the grayscale values of areas other than metal. This solves the problem of metal occupying a portion of the grayscale range that should be displaying the target object, leading to low grayscale contrast and poor image quality.
[0054] The technical solution of this invention involves first extracting at least one target edge region from a medical image, which may be a metal boundary or a target object boundary. Second, the metal edge region is determined based on the grayscale values of pixels in the target neighborhood of each pixel in the medical image, thereby determining whether metal exists in the medical image. Furthermore, if a metal edge region exists, the difference between the metal edge region and the target edge region is obtained, and seed points are extracted from the difference. Finally, region growing is performed based on the seed points to detect metal in the medical image. This technical solution can detect the presence of metal in medical images, thereby avoiding additional doses to the patient and improving image quality.
[0055] An optional technical solution involves region growing based on seed points to detect metals in medical images. Specifically, this may include: performing region growing based on seed points to obtain a current region growing result, and defining an access region composed of visited pixels during the region growing process; updating the target edge region based on the difference between the target edge region and the access region, and updating the metal edge region based on the difference between the metal edge region and the access region; repeatedly performing the operation of obtaining the difference between the metal edge region and the target edge region until either the metal edge region or the target edge region meets a preset termination condition, and using each current region growing result as metal in the medical image.
[0056] In cases where multiple metals exist in a medical image, and these metals are not contiguous, region growing based on seed points can only detect a portion of the metals. Therefore, multiple detections are required to ensure that every metal in the medical image is detected. Specifically, firstly, region growing is performed based on seed points to obtain the current region growth result, which represents a portion of the metals in the medical image. Furthermore, during region growing, visited pixels can form access regions. These access regions are extracted separately because they do not need to be revisited in subsequent region growing processes, improving detection efficiency. Secondly, the target edge region is updated based on the difference between the target edge region and the access region, and the metal edge region is updated based on the difference between the metal edge region and the access region, resulting in the target edge region and the metal edge region after removing the access regions. Thirdly, the operation of obtaining the difference between the metal edge region and the target edge region is repeated to achieve multiple detections of the medical image until either the metal edge region or the target edge region meets a preset termination condition, such as the metal edge region or the target edge region being empty. At this point, each current region growth result is considered as the metal in the medical image.
[0057] An optional technical solution involves performing region growth based on seed points to detect metal in medical images. Specifically, it may include: performing region growth based on seed points to obtain the current region growth result, and calculating the first gray-level mean of each pixel in the current region growth result; calculating an adaptive threshold for the metal edge region, and calculating the second gray-level mean of each pixel in the metal edge region that is less than the adaptive threshold; and determining whether the current region growth result is metal in the medical image based on the numerical relationship between the first gray-level mean and the second gray-level mean.
[0058] When determining the presence of metal in medical images, the following situation may arise: Based on the grayscale values of pixels in the target neighborhood of each pixel in the medical image, the metal edge region may contain areas with lower grayscale values and areas with higher grayscale values. However, the areas with lower grayscale values may be the target object, while the areas with higher grayscale values may be air, as air attenuates X-rays the least. This could lead to the target object being mistaken for metal. Therefore, further verification of the obtained metal edge region is necessary to confirm whether it is indeed metal.
[0059] Specifically, when the grayscale value of the metal is lower than that of the target object, region growing is performed based on the seed point to obtain the current region growing result. The first grayscale mean of each pixel in the current region growing result is then calculated. This first grayscale mean can be considered as the grayscale characteristic of each pixel that has been verified and identified as belonging to the metal. Taking a specific metal edge region in a medical image as the operation object, an adaptive threshold for the metal edge region is calculated, for example, based on large-scale segmentation. Then, the second grayscale mean of each pixel in the metal edge region that is less than the adaptive threshold is calculated. The reason for this step is that if the metal edge region includes metal, the second grayscale mean should represent the grayscale characteristic of the metal pixels, meaning the second grayscale mean and the first grayscale mean should be similar; conversely, the second grayscale mean should represent the grayscale characteristic of the target object pixels, meaning the second grayscale mean and the first grayscale mean should have a large difference. Therefore, based on the numerical relationship between the first and second gray-scale mean values, it can be determined whether the current region's growth result represents metal in a medical image. For example, if the difference between the second and first gray-scale mean values is greater than a preset threshold, it is considered that no metal exists in the metal edge region; otherwise, metal exists. The advantage of the above steps is that it allows for further verification of whether metal truly exists in each obtained metal edge region.
[0060] For example, in order to better understand the interrelationships of the various technical features involved in the above steps, such as Figure 2 As shown, the medical image 10 includes a target object 20 and a metal 30. The target object is represented by a solid line. The target edge region may be the target object boundary 401 or the metal boundary 402. The metal edge region 50 has a part with a low gray value and a part with a high gray value. The target edge region and the metal edge region 50 are represented by dashed lines. The metal edge region 50 can be a thick rectangular region, and the target edge region can be a thin rectangular region.
[0061] Example 2
[0062] Figure 3 This is a flowchart of a metal detection method provided in Embodiment 2 of the present invention. This embodiment is an optimization based on the above-described technical solutions. In this embodiment, optionally, region growth is performed based on seed points, which may specifically include: determining pixels within a preset neighborhood of the seed point that satisfy preset region growth conditions, and updating the seed point according to the pixels satisfying the preset region growth conditions; repeatedly performing the operation of determining pixels within a preset neighborhood of the seed point that satisfy the preset region growth conditions until the number of pixels satisfying the preset region growth conditions is empty. The explanations of terms that are the same as or corresponding to those in the above embodiments are not repeated here.
[0063] like Figure 3As shown, the method in this embodiment may specifically include the following steps:
[0064] S210. Acquire the medical image of the target object and extract the target edge region of at least one region of interest in the medical image.
[0065] S220. Obtain the target neighborhood of each pixel in the medical image, and determine the metal edge region based on the gray value of each pixel in the target neighborhood.
[0066] S230. Obtain the difference set between the metal edge region and the target edge region, and extract the seed point from the difference set.
[0067] S240. Determine the pixels in the preset neighborhood of the seed point that meet the preset region growth conditions, and update the seed point based on the pixels that meet the preset region growth conditions; repeat the operation of determining the pixels in the preset neighborhood of the seed point that meet the preset region growth conditions until the pixels that meet the preset region growth conditions are empty, so as to detect metal in medical images.
[0068] The process involves identifying pixels within a preset neighborhood (e.g., a 4-neighborhood or an 8-neighborhood) of a seed point that meet preset region growth conditions. These pixels are then used as new seed points to continue region growth until all pixels meeting the preset conditions are exhausted, meaning no new seed points exist. Since multiple seed points may exist simultaneously, region growth can be performed based on these seed points to improve detection efficiency. During region growth, all pixels that have been used as seed points can be considered metal, thus detecting metal in medical images. Optionally, pixels visited during the region growth process can be marked so that they do not need to be revisited in subsequent region growth processes, further improving detection efficiency.
[0069] Optionally, determining the pixels within the preset neighborhood of the seed point that meet the preset region growth conditions may specifically include: taking the pixels within the preset neighborhood of the seed point as neighborhood points, and selecting the pixels that meet the preset region growth conditions from each neighborhood point based on the structural similarity between the neighborhood points and the seed point, the intersection of the neighborhood points and the target edge region, and the grayscale similarity between the neighborhood points and the mean values of each seed point.
[0070] For example, a preset nonparametric image transformation, such as Census transform, can be performed on the medical image to obtain transformed points of neighboring points. The structural similarity between the transformed points and seed points, such as the Hamming distance, should be less than a first threshold. Here, the seed points are untransformed seed points. Alternatively, structural similarity can be calculated based on the histograms of neighboring points and seed points. Another example is that the intersection of neighboring points and the target edge region is empty, meaning that neighboring points cannot be located on the target edge region, as this is a termination condition for region growing. Yet another example is that the grayscale similarity between the grayscale value of a neighboring point and the mean of each seed point should be less than a second threshold, meaning the difference between the grayscale value of a neighboring point and the grayscale value of a pixel already identified as metal should be small. If a pixel satisfies the preset region growing conditions, it should satisfy at least one of the above conditions. Furthermore, the pixel cannot be a previously visited pixel; each pixel can only be calculated once so that region growing can end.
[0071] The technical solution of this invention determines pixels within a preset neighborhood of a seed point that meet preset region growth conditions, thereby extracting new seed points within that neighborhood. Based on these new seed points, the process repeats, searching for pixels within their preset neighborhoods that meet the preset region growth conditions until no more seed points exist, at which point region growth ends. Each pixel that has served as a seed point is then identified as a metal. This technical solution, based on region growth for metal identification, is characterized by high efficiency and high accuracy.
[0072] Example 3
[0073] Figure 4 This is a structural block diagram of a metal detection device provided in Embodiment 3 of the present invention. This device is used to execute the metal detection method provided in any of the above embodiments. This device and the metal detection methods of the above embodiments belong to the same inventive concept. Details not described in detail in the embodiments of the metal detection device can be found in the embodiments of the above metal detection methods. See also... Figure 4 The device may specifically include: a target edge region extraction module 310, a metal edge region determination module 320, and a metal detection module 330.
[0074] The target edge region extraction module 310 is used to acquire medical images of the target object and extract the target edge region of at least one region of interest in the medical image.
[0075] The metal edge region determination module 320 is used to obtain the target neighborhood of each pixel in the medical image and determine the metal edge region based on the gray value of each pixel in the target neighborhood.
[0076] The metal detection module 330 is used to obtain the difference between the metal edge region and the target edge region, extract seed points from the difference, and perform region growth based on the seed points to detect metal in medical images.
[0077] Optional, the metal detection module 330 may specifically include:
[0078] The current region growth result is obtained by a unit used to perform region growth based on the seed point, to obtain the current region growth result, and the visited region consisting of visited pixels during the region growth process.
[0079] An edge region update unit is used to update the target edge region based on the difference between the target edge region and the access region, and to update the metal edge region based on the difference between the metal edge region and the access region.
[0080] The first metal detection unit is used to repeatedly perform the operation of obtaining the difference set between the metal edge region and the target edge region until the metal edge region or the target edge region meets the preset termination condition, and the growth results of each current region are used as metal in the medical image.
[0081] Optional, the metal detection module 330 may specifically include:
[0082] The first gray-scale mean calculation unit is used to perform region growth based on seed points, obtain the current region growth result, and calculate the first gray-scale mean of each pixel in the current region growth result.
[0083] The second grayscale mean calculation unit is used to calculate the adaptive threshold of the metal edge region and to calculate the second grayscale mean of each pixel in the metal edge region that is less than the adaptive threshold.
[0084] The second metal detection unit is used to determine whether the growth result in the current area is a metal in the medical image based on the numerical relationship between the first gray-scale mean and the second gray-scale mean.
[0085] Optional, the metal detection module 330 may specifically include:
[0086] The seed point update unit is used to determine the pixels in the preset neighborhood of the seed point that meet the preset region growth conditions, and update the seed point according to the pixels that meet the preset region growth conditions.
[0087] The repetitive execution unit is used to repeatedly execute the operations of pixels within the preset neighborhood of the seed point that meet the preset region growth conditions until the number of pixels that meet the preset region growth conditions is empty.
[0088] Optional, the seed point update unit can be used for:
[0089] Pixels within the preset neighborhood of the seed point are used as neighboring points. Based on the structural similarity between the neighboring points and the seed point, the intersection of the neighboring points and the target edge region, and the gray-level similarity between the neighboring points and the mean values of each seed point, pixels that meet the preset region growth conditions are selected from each neighboring point.
[0090] Optionally, the metal edge region determination module 320 can be used to: filter out the metal edge region from the target neighborhood based on the grayscale variance value of each pixel in the target neighborhood.
[0091] Optionally, based on the above-described apparatus, the apparatus may further include:
[0092] The normalization module is used to normalize medical images and update them based on the processing results.
[0093] The metal detection device provided in Embodiment 3 of this invention extracts at least one target edge region from a medical image using a target edge region extraction module. This target edge region may be a metal boundary or a target object boundary. A metal edge region determination module can determine the metal edge region based on the grayscale values of pixels in the target neighborhood of each pixel in the medical image, thereby determining whether metal exists in the medical image. If a metal edge region exists, the metal detection module obtains the difference between the metal edge region and the target edge region, extracts seed points from the difference, and then performs region growing based on these seed points to detect metal in the medical image. This device can detect the presence of metal in medical images, thereby avoiding additional doses to the patient and improving image quality.
[0094] The metal detection device provided in the embodiments of the present invention can execute the metal detection method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the method.
[0095] It is worth noting that in the embodiments of the metal detection device described above, the various units and modules are divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of the present invention.
[0096] Example 4
[0097] Figure 5 This is a schematic diagram of the structure of a device provided in Embodiment 4 of the present invention, as shown below. Figure 5 As shown, the device includes a memory 410, a processor 420, an input device 430, and an output device 440. The number of processors 420 in the device can be one or more. Figure 5Taking a processor 420 as an example; the memory 410, processor 420, input device 430, and output device 440 in the device can be connected via a bus or other means. Figure 5 For example, China and Israel are connected via bus 450.
[0098] The memory 410, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the metal detection method in this embodiment of the invention (e.g., the target edge region extraction module 310, the metal edge region determination module 320, and the metal detection module 330 in the metal detection device). The processor 420 executes various functional applications and data processing of the device by running the software programs, instructions, and modules stored in the memory 410, thereby realizing the aforementioned metal detection method.
[0099] The memory 410 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function; the data storage area may store data created based on the use of the device. Furthermore, the memory 410 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 410 may further include memory remotely located relative to the processor 420, which can be connected to the device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0100] Input device 430 can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function control of the device. Output device 440 may include display devices such as a display screen.
[0101] Example 5
[0102] Embodiment 5 of the present invention provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform a metal detection method, the method comprising:
[0103] Acquire medical images of the target object and extract the target edge region of at least one region of interest in the medical image;
[0104] Obtain the target neighborhood of each pixel in the medical image, and determine the metal edge region based on the gray value of each pixel in the target neighborhood;
[0105] The difference between the metal edge region and the target edge region is obtained, seed points are extracted from the difference, and region growth is performed based on the seed points to detect metal in medical images.
[0106] Of course, the computer-executable instructions provided in the embodiments of the present invention are not limited to the method operations described above, but can also perform related operations in the metal detection method provided in any embodiment of the present invention.
[0107] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. According to this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0108] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.
Claims
1. A metal detection method, characterized in that, include: Acquire a medical image of the target object and extract at least one target edge region of interest from the medical image; the target edge region is a metal boundary or the boundary of the target object; the medical image is an X-ray image; Obtain the target neighborhood of each pixel in the medical image, and determine the metal edge region based on the grayscale value of each pixel in the target neighborhood; The difference set between the metal edge region and the target edge region is obtained, wherein the pixels in the difference set belong to the metal edge region but not to the target edge region. Seed points are extracted from the difference set, and region growing is performed based on the seed points to detect metal in the medical image. After acquiring the first medical image, metals in the medical image were detected based on the above steps; In the early stages of medical image acquisition, when acquiring the second and subsequent medical images, the dosage is adjusted based on the grayscale values of areas other than metal in the medical images. In the post-processing stage of medical images, when processing the second and subsequent medical images, the grayscale value of the entire medical image is adjusted based on the grayscale value of the areas in the medical image other than metal.
2. The method according to claim 1, characterized in that, The method of performing region growing based on the seed points to detect metals in the medical image includes: Based on the seed point, a region is grown to obtain the current region growth result, and the visited region consisting of visited pixels during the region growth process. The target edge region is updated based on the difference between the target edge region and the access region, and the metal edge region is updated based on the difference between the metal edge region and the access region; The operation of obtaining the difference set between the metal edge region and the target edge region is repeated until the metal edge region or the target edge region meets the preset termination condition, and the growth results of each current region are used as the metal in the medical image.
3. The method according to claim 1, characterized in that, The method of performing region growing based on the seed points to detect metals in the medical image includes: Based on the seed points, region growth is performed to obtain the current region growth result, and the first grayscale mean value of each pixel in the current region growth result is calculated. Calculate the adaptive threshold of the metal edge region, and calculate the second grayscale mean of each pixel in the metal edge region that is less than the adaptive threshold; Based on the numerical relationship between the first grayscale mean and the second grayscale mean, it is determined whether the growth result of the current region is metal in the medical image.
4. The method according to claim 1, characterized in that, The region growth based on the seed point includes: Identify pixels within a preset neighborhood of the seed point that satisfy the preset region growth conditions, and update the seed point based on the pixels that satisfy the preset region growth conditions. Repeat the operation of determining the pixels within the preset neighborhood of the seed point that meet the preset region growth conditions until the pixels that meet the preset region growth conditions are empty.
5. The method according to claim 4, characterized in that, The step of determining the pixels within the preset neighborhood of the seed point that satisfy the preset region growth conditions includes: Pixels within a preset neighborhood of the seed point are taken as neighborhood points. Based on the structural similarity between the neighborhood points and the seed point, the intersection of the neighborhood points and the target edge region, and the grayscale similarity between the neighborhood points and the mean values of each seed point, pixels that meet the preset region growth conditions are selected from each of the neighborhood points.
6. The method according to claim 1, characterized in that, Determining the metal edge region based on the grayscale values of each pixel in the target neighborhood includes: Based on the grayscale variance of each pixel in the target neighborhood, metal edge regions are selected from the target neighborhood.
7. The method according to claim 1, characterized in that, After acquiring the medical images of the target object, the process further includes: The medical images are normalized, and the medical images are updated based on the processing results.
8. A metal detection device, characterized in that, include: The target edge region extraction module is used to acquire medical images of a target object and extract the target edge region of at least one region of interest in the medical image; the target edge region is a metal boundary or a target object boundary; the medical image is an X-ray image; The metal edge region determination module is used to obtain the target neighborhood of each pixel in the medical image and determine the metal edge region based on the gray value of each pixel in the target neighborhood. A metal detection module is used to obtain the difference set between the metal edge region and the target edge region, wherein the pixels in the difference set belong to the metal edge region but not to the target edge region, seed points are extracted from the difference set, and region growth is performed based on the seed points to detect metal in the medical image. After acquiring the first medical image, metals in the medical image were detected based on the above steps; In the early stages of medical image acquisition, when acquiring the second and subsequent medical images, the dosage is adjusted based on the grayscale values of areas other than metal in the medical images. In the post-processing stage of medical images, when processing the second and subsequent medical images, the grayscale value of the entire medical image is adjusted based on the grayscale value of the areas in the medical image other than metal.
9. A device, characterized in that, The device includes: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the metal detection method as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the metal detection method as described in any one of claims 1-7.
Citation Information
Patent Citations
Abdominal organ segmentation method based on secondary three-dimensional region growth
CN101576997B
Method and device for determining direction of coronal view of brain image
CN103793905A
Method and apparatus for metal artifact elimination in a medical image
US20150117740A1
X-ray computed tomography (CT) metal artifact processing method
CN103106675A
Automatic segmentation method of knee joint cartilage image
CN103440665A