Medical image segmentation method and device, computer device and storage medium

By acquiring the thresholded image of the medical image, determining the connected domain, and matching and fusing it with the standard template image marked with the ventricular region, the problem of inaccurate ventricle segmentation in brain DSC images is solved, and more accurate ventricular region segmentation is achieved.

CN117152189BActive Publication Date: 2025-10-10UNITED IMAGING RES INST OF INNOVATIVE MEDICAL EQUIP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311190148.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-14
Publication Date
2025-10-10
Estimated Expiration
2043-09-14

AI Technical Summary

Technical Problem

Existing technologies ignore the spatial position and shape information of the ventricles in brain DSC image segmentation, resulting in inaccurate image segmentation results.

Method used

By obtaining a thresholded image of a medical image, multiple connected domains are determined and a connected domain image is generated. The thresholded image is matched with a standard template image containing ventricular region markers to obtain an initial ventricular mask. Furthermore, each connected domain image is compared with the initial ventricular mask, and fused based on the comparison results. The connected domain image is selected to obtain a target ventricular mask.

Benefits of technology

The accuracy of image segmentation results is improved, the ventricle area is accurately segmented, and the problem of inaccurate segmentation caused by ignoring the spatial position and shape information of the ventricle is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117152189B_ABST
    Figure CN117152189B_ABST
Patent Text Reader

Abstract

The application relates to a medical image segmentation method and device, computer equipment and a storage medium, wherein the medical image segmentation method comprises the following steps: acquiring a threshold image of a medical image; determining a plurality of connected domains in the threshold image, and generating a connected domain image corresponding to each connected domain; matching the threshold image with a standard template image containing a ventricle region label to obtain an initial ventricle mask image; further, comparing each connected domain image with the initial ventricle mask image, and selecting the connected domain image for fusion based on the comparison result to obtain a target ventricle mask image, thereby solving the problem that the spatial position and shape information of the ventricle is ignored, resulting in inaccurate image segmentation results, and improving the accuracy of the image segmentation result.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

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

[0002] Dynamic Susceptibility Contrast (DSC) is a kind of magnetic resonance perfusion weighted imaging technology, which uses contrast agent enhanced images to better observe the dynamic changes of the contrast agent in organs or tissues, and is often applied to brain scanning. However, in the brain DSC image obtained by scanning, the ventricle region contains cerebrospinal fluid with similar parameter characteristics as the lesion region, so that the lesion position of the brain tissue cannot be determined according to the parameter value.

[0003] In order to solve the above problems, the prior art pre-processes the target image by Gaussian filtering, and performs image segmentation based on the gray information of different regions in the target image, but the above method ignores the spatial position and shape characteristics of the ventricle, resulting in inaccurate image segmentation results.

[0004] In view of the problem in the related art that the spatial position and shape information of the ventricle are ignored, resulting in inaccurate image segmentation results, no effective solution has been proposed so far. SUMMARY

[0005] A medical image segmentation method, device, computer device and storage medium are provided in the embodiment to solve the problem in the related art that the spatial position and shape information of the ventricle are ignored, resulting in inaccurate image segmentation results.

[0006] In a first aspect, a medical image segmentation method is provided in the embodiment, and the method comprises:

[0007] obtaining a threshold image of a medical image;

[0008] determining a plurality of connected domains in the threshold image, and generating a connected domain image corresponding to each connected domain;

[0009] matching the threshold image with a standard template image containing a ventricle region label to obtain an initial ventricle mask image;

[0010] comparing each connected domain image with the initial ventricle mask image, and selecting the connected domain images for fusion based on the comparison results to obtain a target ventricle mask image.

[0011] In some embodiments, the determination of the plurality of connected domains in the threshold image comprises:

[0012] performing contour detection on the thresholded image;

[0013] Based on the contour detection result, the thresholded image is segmented by a watershed algorithm to obtain the connected domains in the thresholded image.

[0014] In some embodiments, comparing each of the connected domain images with the initial ventricle mask, and selecting the connected domain images for fusion based on the comparison results to obtain a target ventricle mask, includes:

[0015] Comparing each of the connected domain images with the initial ventricle mask image, and determining, based on the comparison result, an overlapping portion of a connected domain in the connected domain image and the initial ventricle mask image;

[0016] Determining an area ratio between the overlapping portion and the corresponding connected domain;

[0017] When the area ratio is greater than a preset threshold, selecting the corresponding connected domain image as the image to be merged;

[0018] The images to be merged are fused to obtain the target ventricle mask.

[0019] In some embodiments, obtaining a thresholded image of the medical image includes:

[0020] When it is detected that the medical image is a single-phase image, performing Gaussian filtering on the medical image;

[0021] Threshold processing is performed on the medical image after filtering to obtain the thresholded image.

[0022] In some embodiments, obtaining a thresholded image of the medical image includes:

[0023] When it is detected that the medical image is a multi-phase image, fusing images of each phase in the medical image to obtain a corresponding fused image;

[0024] Gaussian filtering is performed on the fused image, and threshold processing is performed on the filtered fused image to obtain the thresholded image.

[0025] In some embodiments, generating a connected domain image corresponding to each connected domain includes:

[0026] Converting the thresholded image into a corresponding binary image;

[0027] Selecting a single connected domain as the target area each time;

[0028] In the binary image, the image area outside the target area is set as the background color to obtain the connected domain image corresponding to the connected domain.

[0029] In some embodiments, after matching the thresholded image with a standard template image containing ventricular region markers to obtain an initial ventricular mask, the method further includes:

[0030] performing median filtering on the initial ventricle mask image;

[0031] In the filtered initial ventricle mask image, Bezier curve fitting is performed on the edge of the initial ventricle mask image.

[0032] In a second aspect, a medical image segmentation device is provided in this embodiment, the device comprising: an acquisition module, a segmentation module, a matching module, and a fusion module;

[0033] The acquisition module is used to acquire a thresholded image of a medical image;

[0034] The segmentation module is configured to determine a plurality of connected domains in the thresholded image and generate a connected domain image corresponding to each of the connected domains;

[0035] The matching module is configured to match the thresholded image with a standard template image containing ventricular region markers to obtain an initial ventricular mask;

[0036] The fusion module is configured to compare each of the connected domain images with the initial ventricle mask image, and based on the comparison result, select the connected domain images for fusion to obtain a target ventricle mask image.

[0037] Compared with related technologies, the medical image segmentation method, apparatus, computer equipment and storage medium provided in this embodiment obtain a thresholded image of a medical image; determine multiple connected domains in the thresholded image, and generate a connected domain image corresponding to each connected domain; match the thresholded image with a standard template image containing ventricular area markers to obtain an initial ventricle mask; further, compare each connected domain image with the initial ventricle mask, and based on the comparison results, select the connected domain image for fusion to obtain a target ventricle mask, thereby solving the problem of ignoring the spatial position and shape information of the ventricles, resulting in inaccurate image segmentation results, and improving the accuracy of the image segmentation results.

[0038] The details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0040] Figure 1 This is a hardware structure block diagram of a terminal device for a color mapping method for a digital image provided by an embodiment of the present application;

[0041] Figure 2 is a flowchart of a medical image segmentation method provided by an embodiment of the present application;

[0042] Figure 3 This is a flowchart of a medical image segmentation method provided by an embodiment of the present application;

[0043] Figure 4 This is a flowchart of a medical image segmentation method provided by a preferred embodiment of the present application;

[0044] Figure 5 This is a structural block diagram of a medical image segmentation device provided in one embodiment of the present application.

[0045] In the figure: 102, processor; 104, memory; 106, transmission device; 108, input and output device; 10, acquisition module; 20, segmentation module; 30, matching module; 40, fusion module. DETAILED DESCRIPTION

[0046] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.

[0047] Unless otherwise defined, the technical terms or scientific terms involved in this application should have the general meaning understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "an", "a", "the", "these" and the like in this application do not indicate quantitative restrictions, and they can be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "plurality" involved in this application refers to two or more. "And / or" describes the relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, and B exists alone. Generally, the character " / " indicates that the related objects are in an "or" relationship. The terms "first," "second," "third," etc. used in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.

[0048] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 FIG. 1 is a block diagram of the hardware structure of the terminal of the medical image segmentation method of this embodiment. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown) a processor 102 and a memory 104 for storing data, wherein the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.

[0049] The memory 104 can be used to store computer programs, such as software programs and modules of application software, such as the computer program corresponding to the medical image segmentation method in this embodiment. The processor 102 executes the computer program stored in the memory 104 to perform various functional applications and data processing, thereby implementing the above-mentioned method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, and such remote memory may be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0050] The transmission device 106 is used to receive or send data via a network. The network may include a wireless network provided by the terminal's telecommunications provider. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0051] In this embodiment, a medical image segmentation method is provided. Figure 2 is a flow chart of the medical image segmentation method of this embodiment, as shown in FIG. Figure 2 As shown, the process includes the following steps:

[0052] Step S220: Acquire a thresholded image of the medical image.

[0053] Specifically, a brain scan is performed using DSC technology to obtain a DSC plain scan image of the brain as input information. The received medical image is preprocessed to detect whether it is a single-phase image or a multi-phase image. Based on the detection result, the image is converted into a corresponding thresholded image.

[0054] Among them, when it is detected that the medical image is a single-phase image, the medical image is subjected to Gaussian filtering, and the filtered image is subjected to threshold processing to obtain a thresholded image; when it is detected that the medical image is a multi-phase image, the images of each phase in the medical image are fused to obtain a corresponding fused image, the fused image is subjected to Gaussian filtering, and the filtered fused image is subjected to threshold processing to obtain a thresholded image.

[0055] It's important to note that when performing thresholding on an image, the pixels in the image are first divided into two categories based on a preset threshold: one category consists of pixels with grayscale values ​​above the threshold, and the other category consists of pixels with grayscale values ​​below or equal to the threshold. The grayscale values ​​of these two categories of pixels are then reset according to the requirements of different thresholding algorithms. Common thresholding algorithms include low-threshold zeroing and truncation thresholding. For example, low-threshold zeroing selects pixels with grayscale values ​​less than or equal to the threshold and sets their grayscale values ​​to 0, while pixels with grayscale values ​​greater than the threshold remain unchanged.

[0056] Based on this, by reasonably selecting the threshold processing algorithm and adjusting the threshold value according to actual needs, the grayscale values ​​that are too large or too small in the image can be filtered out to improve the accuracy of subsequent connected domain segmentation.

[0057] Step S240 , determining multiple connected domains in the thresholded image, and generating a connected domain image corresponding to each connected domain.

[0058] Specifically, a connected domain analysis is performed on the thresholded image to mark each connected domain in the thresholded image; the thresholded image is converted into a corresponding binary image, and a single connected domain is selected as the target area each time; in the binary image, the image area outside the target area is set as the background color to obtain a connected domain image corresponding to each connected domain.

[0059] Step S260 : Matching the thresholded image with a standard template image containing ventricle region markers to obtain an initial ventricle mask.

[0060] In this embodiment, a standard template image containing ventricular region markers and a brain DSC scan image are used as input information. The brain DSC scan image is used to segment multiple connected domains, and the standard template image is used to preliminarily determine the ventricular region in the thresholded image.

[0061] Specifically, a template matching algorithm is used to register the thresholded image with a standard template image containing ventricular region markers, and the regions aligned with the ventricular region markers in the registration result are retained as the initial ventricular mask. Template matching algorithms in this embodiment include, but are not limited to, similarity-based template matching algorithms, normalized correlation-based template matching algorithms, and feature point-based template matching algorithms.

[0062] Step S280 : Compare each connected domain image with the initial ventricle mask image, and based on the comparison result, select the connected domain image for fusion to obtain the target ventricle mask image.

[0063] Specifically, each connected domain image is compared with the initial ventricle mask image to obtain the degree of overlap of the connected domain in the connected domain image with the initial ventricle mask image, and the connected domain belonging to the ventricle region is selected according to the degree of overlap, so that the corresponding connected domain image is fused as a to-be-merged image to obtain the target ventricle mask image.

[0064] In the brain image scanned by using the DSC technology, the ventricle region contains cerebrospinal fluid similar to the parameter characteristics of the lesion region, so that the lesion position of the brain tissue cannot be determined according to the parameter value. In order to solve this problem, the prior art pre-processes the target image by using Gaussian filtering, and performs image segmentation based on the gray information of different regions in the target image, but the above method ignores the spatial position and shape characteristics of the ventricle, resulting in inaccurate image segmentation result. Compared with the prior art, the present application determines the ventricle region in the medical image as an initial ventricle mask image according to the standard template image containing a ventricle region label, and judges whether each connected domain belongs to the ventricle region based on the overlap relationship between the initial ventricle mask image and each connected domain in the medical image, so that the connected domains belonging to the ventricle region can be fused to obtain the final ventricle mask image, that is, the ventricle region is accurately segmented.

[0065] Through the embodiment, a threshold image of a medical image is obtained; a plurality of connected domains in the threshold image are determined, and a connected domain image corresponding to each connected domain is generated; the threshold image is matched with a standard template image containing a ventricle region label to obtain an initial ventricle mask image; further, each connected domain image is compared with the initial ventricle mask image, and based on the comparison result, a connected domain image is selected for fusion to obtain a target ventricle mask image, solving the problem of inaccurate image segmentation result caused by ignoring the spatial position and shape information of the ventricle, and realizing the improvement of the accuracy of the image segmentation result.

[0066] In some embodiments, determining the plurality of connected domains in the threshold image includes the following steps:

[0067] Step S241, performing contour detection on the threshold image;

[0068] Step S242, performing segmentation on the threshold image by using a watershed algorithm based on the contour detection result to obtain each connected domain in the threshold image.

[0069] Specifically, the contour detection algorithm is used to perform contour detection on the threshold image, and the obvious change between pixels is detected based on the gray value of each pixel in the image to determine the edge position and accurately depict the edge contour in the image. In the embodiment, the contour detection of the threshold image can use Canny operator, Sobel operator or Robert operator, etc.

[0070] Further, based on the contour information in the image, a watershed algorithm is used to segment the threshold image, and each connected domain in the threshold image is segmented, at this time the threshold image is converted into an image containing N connected domains.

[0071] Through the embodiment, the threshold image is subjected to contour detection, and based on the contour detection result, the threshold image is segmented by using the watershed algorithm, so that each connected domain in the image can be accurately divided.

[0072] In some embodiments, each connected domain image is compared with the initial ventricle mask image, and based on the comparison result, the connected domain image is selected for fusion to obtain the target ventricle mask image, including the following steps:

[0073] In step S261, each connected domain image is compared with the initial ventricle mask image, and based on the comparison result, the overlapping part between the connected domain in the connected domain image and the initial ventricle mask image is determined;

[0074] In step S262, the area ratio between the overlapping part and the corresponding connected domain is determined;

[0075] In step S263, when the area ratio is greater than a preset threshold, the corresponding connected domain image is selected as a to-be-merged image;

[0076] In step S264, each to-be-merged image is fused to obtain the target ventricle mask image.

[0077] In the embodiment, each connected domain image is compared with the initial ventricle mask image to determine the overlapping degree between the connected domain in each connected domain image and the initial ventricle mask image, and the connected domains meeting the conditions are selected for fusion according to the overlapping degree, and the specific expression is as follows:

[0078]

[0079] In the embodiment, the number of connected domains is N, and i∈[0, N] represents the i-th connected domain. In addition, the above formula represents that the overlapping part between the connected domain R1[i] in each connected domain image and the initial ventricle mask image R2 is determined according to the comparison result, and the area ratio R3[i] between the overlapping part and the corresponding connected domain is calculated. If the area ratio is less than or equal to a preset threshold, it indicates that the corresponding connected domain does not belong to the ventricle region; if the area ratio is greater than the preset threshold, the corresponding connected domain image is selected as a to-be-merged image.

[0080] Further, each to-be-merged image selected is fused, that is, the connected domains belonging to the ventricle region are taken as a set to obtain the target ventricle mask image.

[0081] Through this embodiment, each connected domain image is compared with the initial ventricle mask. Based on the comparison result, the overlapping part of the connected domain in the connected domain image and the initial ventricle mask is determined. Then, the area ratio between the overlapping part and the corresponding connected domain is determined. When the area ratio is greater than a preset threshold, the corresponding connected domain image is selected as the image to be merged. Finally, the images to be merged are fused to obtain the target ventricle mask, thereby accurately segmenting the ventricle area in the image.

[0082] In some embodiments, obtaining a thresholded image of a medical image includes the following steps:

[0083] Step S221, when it is detected that the medical image is a single-phase image, performing Gaussian filtering on the medical image;

[0084] Step S222 , performing threshold processing on the filtered medical image to obtain a thresholded image.

[0085] Specifically, after receiving an input medical image, the system detects whether the image is a single-phase image or a multi-phase image. If the image is a single-phase image, the system performs Gaussian filtering or other filtering algorithms, such as mean filtering or bilateral filtering, on the image to pre-remove some noise from the image. Furthermore, the filtered image is thresholded to obtain a thresholded image.

[0086] It should be noted that in the above threshold processing process, low threshold zero processing and truncation threshold processing are used in sequence to filter out excessively large or small grayscale values ​​in the image. Among them, low threshold zero processing refers to filtering out pixels with grayscale values ​​less than or equal to a first threshold and setting their grayscale values ​​to 0, while pixels with grayscale values ​​greater than the first threshold remain unchanged; truncation threshold processing refers to filtering out pixels with grayscale values ​​greater than a second threshold and setting their grayscale values ​​to the second threshold, while pixels with grayscale values ​​less than or equal to the second threshold remain unchanged.

[0087] Exemplarily, a grayscale histogram corresponding to the medical image after filtering is obtained, the grayscale value at the second peak in the grayscale histogram is taken as the first threshold, the image is subjected to low-threshold zero processing based on the first threshold, and pixels in the image with grayscale values ​​less than the first threshold are selected, and their grayscale values ​​are set to 0, and pixels with grayscale values ​​greater than the first threshold remain unchanged; on this basis, 0.8 times the maximum image grayscale value is taken as the second threshold, and the image is subjected to truncation thresholding processing based on the second threshold, and pixels in the image with grayscale values ​​greater than the second threshold are selected, and their grayscale values ​​are set to the second threshold, and pixels with grayscale values ​​less than or equal to the second threshold remain unchanged.

[0088] Through this embodiment, when it is detected that the medical image is a single-phase image, Gaussian filtering is performed on the medical image, and threshold processing is performed on the filtered medical image to obtain a thresholded image, so as to facilitate the subsequent accurate segmentation of each connected domain in the image and eliminate the influence of extreme grayscale values ​​on the image processing effect.

[0089] In some embodiments, obtaining a thresholded image of a medical image includes the following steps:

[0090] Step S221, when it is detected that the medical image is a multi-phase image, fusing the images of each phase in the medical image to obtain a corresponding fused image;

[0091] Step S222 , performing Gaussian filtering on the fused image, and performing threshold processing on the filtered fused image to obtain a thresholded image.

[0092] Specifically, after receiving an input medical image, the system detects whether the image is a single-phase image or a multi-phase image. If the image is a multi-phase image, the system extracts the pixel value at each pixel position in each phase of the image. The median of these pixel values ​​is used as the pixel value at that pixel position in the fused image. The output fused image has the same size and color space as the original medical image.

[0093] Furthermore, the fused image is subjected to Gaussian filtering or other filtering algorithms are executed on it to remove some noise in the image in advance, such as mean filtering, bilateral filtering, etc., and the filtered fused image is subjected to threshold processing to obtain a thresholded image.

[0094] It should be noted that the threshold processing method used in this embodiment is the same as that used for single-phase medical images, employing low-threshold zero processing and truncation thresholding, in sequence, to filter out excessively large or small grayscale values ​​in the image. Low-threshold zero processing involves filtering out pixels with grayscale values ​​less than or equal to a first threshold and setting their grayscale values ​​to 0, while pixels with grayscale values ​​greater than the first threshold remain unchanged. Truncation thresholding involves filtering out pixels with grayscale values ​​greater than a second threshold and setting their grayscale values ​​to the second threshold, while pixels with grayscale values ​​less than or equal to the second threshold remain unchanged.

[0095] Through this embodiment, when it is detected that the medical image is a multi-phase image, the images of each phase in the medical image are fused to obtain a corresponding fused image; the fused image is Gaussian filtered, and the filtered fused image is thresholded to obtain a thresholded image, so as to facilitate the subsequent accurate segmentation of each connected domain in the image and eliminate the influence of extreme grayscale values ​​on the image processing effect.

[0096] In some embodiments, generating a connected component image corresponding to each connected component includes the following steps:

[0097] Convert the thresholded image into the corresponding binary image;

[0098] Each time a single connected domain is selected as the target area;

[0099] In the binary image, the image area outside the target area is set as the background color to obtain the connected domain image corresponding to the connected domain.

[0100] Specifically, after determining N connected domains contained in the thresholded image, the thresholded image is converted into a corresponding binary image; wherein each connected domain is set as a foreground, and the area outside the connected domain in the image is set as a background.

[0101] Furthermore, a single connected domain is selected as the target region each time, and the image area outside the current target region is set to the background color in the binary image to obtain a connected domain image corresponding to each connected domain. In this embodiment, a total of N connected domain images are obtained, each of which contains a connected domain, and the relative position of each connected domain in the connected domain image is consistent with its relative position in the binary image.

[0102] Through this embodiment, the thresholded image is converted into a corresponding binary image, a single connected domain is selected as the target area each time, and the image area outside the target area is set as the background color in the binary image to obtain a connected domain image corresponding to each connected domain, which facilitates the subsequent independent judgment of whether each connected domain belongs to the ventricular area.

[0103] In some embodiments, after matching the thresholded image with a standard template image containing ventricular region markers to obtain an initial ventricular mask, the following steps are further included:

[0104] Step S291, performing median filtering on the initial ventricle mask image;

[0105] Step S292 : performing Bezier curve fitting on the edges of the initial ventricle mask image after the filtering process.

[0106] In this embodiment, a median filter algorithm is used to process the initial ventricle mask image to remove noise from the image. Specifically, a filter window of appropriate size is selected, typically a square or rectangular area. The filter window is applied to each pixel position in the initial ventricle mask image, that is, the filter window is traversed through each pixel in the mask image, each time with the filter window as the center. The pixel values ​​of all pixels within the current filter window are extracted and sorted by size. The median of the pixel values ​​is taken as the target pixel value based on the sort order and replaced with the pixel value at the center position of the current filter window. After the pixel values ​​are replaced by all pixels, the filtered initial ventricle mask image is output.

[0107] Furthermore, a Bezier curve is fitted to the edges of the filtered initial ventricle mask to achieve edge smoothing. First, an edge detection algorithm is used to determine the edge points in the initial ventricle mask, and each edge point is segmented into different segments based on its continuity and similarity. A Bezier curve is then fitted to each segmented edge point, and the curve shape is flexibly adjusted by selecting appropriate control points and curve degrees to generate smooth edges.

[0108] According to this embodiment, the median filtering process is performed on the initial ventricle mask image. In the filtered initial ventricle mask image, Bezier curve fitting is performed on the edge of the initial ventricle mask image to smooth the image edge.

[0109] Figure 3 FIG. 1 is a flow chart of the medical image segmentation method of this embodiment. Figure 3 As shown, the specific process of the medical image segmentation method includes the following steps:

[0110] A DSC image obtained by a brain scan is input S301, and a preprocessing operation is performed on the received DSC image to obtain a corresponding thresholded image S302; contour detection is performed on the thresholded image S303, and based on the contour detection result, the thresholded image is segmented using a watershed algorithm to obtain each connected domain in the thresholded image S304; the thresholded image is converted into a corresponding binary image, and a single connected domain is selected as the target area each time. In the binary image, the image area outside the target area is set to the background color to obtain a connected domain image corresponding to the connected domain S305.

[0111] Furthermore, a standard template image containing ventricular region markers is obtained S306, and the thresholded image is matched with the standard template image containing ventricular region markers to obtain an initial ventricular mask S307; each connected domain image is compared with the initial ventricular mask, and based on the comparison result, the overlapping part of the connected domain in the connected domain image and the initial ventricular mask is determined; the area ratio between the overlapping part and the corresponding connected domain is calculated, and it is determined whether the area ratio is greater than a preset threshold S308. When the area ratio is greater than the preset threshold, the corresponding connected domain image is selected as the image to be merged S309, and finally the images to be merged are fused to obtain the target ventricular mask S310.

[0112] The present embodiment is described and illustrated below through preferred embodiments.

[0113] Figure 4 is a flow chart of the medical image segmentation method of this preferred embodiment, as shown in FIG. Figure 4 As shown, the medical image segmentation method includes the following steps:

[0114] Step S410, obtaining a thresholded image of the medical image;

[0115] Step S420, performing contour detection on the thresholded image, and segmenting the thresholded image using a watershed algorithm based on the contour detection result to obtain connected components in the thresholded image;

[0116] Step S430, converting the thresholded image into a corresponding binary image;

[0117] Step S440 , each time selecting a single connected domain as a target region, and setting the image region outside the target region as a background color in the binary image, to obtain a connected domain image corresponding to the connected domain;

[0118] Step S450 , matching the thresholded image with a standard template image containing ventricular region markers to obtain an initial ventricular mask;

[0119] Step S460 , comparing each connected domain image with the initial ventricle mask, and determining an overlapping portion of the connected domain in the connected domain image and the initial ventricle mask based on the comparison result;

[0120] Step S470, determining the area ratio between the overlapping portion and the corresponding connected domain, and when the area ratio is greater than a preset threshold, selecting the corresponding connected domain image as the image to be merged;

[0121] Step S480: fuse the images to be merged to obtain a target ventricle mask.

[0122] Through this embodiment, a thresholded image of a medical image is obtained, contour detection is performed on the thresholded image, and based on the contour detection result, the thresholded image is segmented using a watershed algorithm to accurately divide each connected domain in the image; the thresholded image is converted into a corresponding binary image, a single connected domain is selected as a target area each time, and in the binary image, the image area outside the target area is set to a background color to obtain a connected domain image corresponding to the connected domain; further, the thresholded image is matched with a standard template image containing a ventricular region marker to obtain an initial ventricular mask map, so that it is possible to judge whether each connected domain belongs to the ventricular region based on the degree of overlap between the connected domain contained in each connected domain image and the initial ventricular mask map, and the connected domains belonging to the ventricular region are taken as a union to obtain a target ventricular mask map, thereby solving the problem of ignoring the spatial position and shape information of the ventricles, resulting in inaccurate image segmentation results, and achieving improved accuracy of the image segmentation results.

[0123] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0124] This embodiment also provides a medical image segmentation device for implementing the above-mentioned embodiments and preferred embodiments. Details already described will not be repeated. The terms "module," "unit," "subunit," etc. used below may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0125] Figure 5 is a structural block diagram of the medical image segmentation device of this embodiment, as shown in FIG. Figure 5 As shown, the device includes: an acquisition module 10, a segmentation module 20, a matching module 30 and a fusion module 40;

[0126] an acquisition module 10 for acquiring a thresholded image of a medical image;

[0127] a segmentation module 20 for determining a plurality of connected domains in the thresholded image and generating a connected domain image corresponding to each connected domain;

[0128] a matching module 30 for matching the thresholded image with a standard template image containing ventricular region markers to obtain an initial ventricular mask;

[0129] The fusion module 40 is configured to compare each connected domain image with the initial ventricle mask image, and select the connected domain images based on the comparison result to obtain the target ventricle mask image.

[0130] The device provided in the embodiment obtains a threshold image of the medical image; determines a plurality of connected domains in the threshold image, and generates a connected domain image corresponding to each connected domain; matches the threshold image with a standard template image containing a ventricle region label to obtain an initial ventricle mask image; further, compares each connected domain image with the initial ventricle mask image, and selects the connected domain images based on the comparison result to obtain a target ventricle mask image, thereby solving the problem that the spatial position and shape information of the ventricle is ignored, resulting in inaccurate image segmentation result, and improving the accuracy of the image segmentation result.

[0131] In some embodiments, the device further comprises a detection module configured to perform contour detection on the threshold image; and based on the contour detection result, perform watershed algorithm on the threshold image to obtain each connected domain in the threshold image. Figure 5 In some embodiments, the device further comprises a comparison module configured to compare each connected domain image with the initial ventricle mask image, and based on the comparison result, determine an overlapping part between the connected domain in the connected domain image and the initial ventricle mask image; determine an area ratio between the overlapping part and the corresponding connected domain; when the area ratio is greater than a preset threshold, select the corresponding connected domain image as a to-be-merged image; and fuse each to-be-merged image to obtain the target ventricle mask image.

[0132] Figure 5 In some embodiments, the device further comprises a comparison module configured to compare each connected domain image with the initial ventricle mask image, and based on the comparison result, determine an overlapping part between the connected domain in the connected domain image and the initial ventricle mask image; determine an area ratio between the overlapping part and the corresponding connected domain; when the area ratio is greater than a preset threshold, select the corresponding connected domain image as a to-be-merged image; and fuse each to-be-merged image to obtain the target ventricle mask image.

[0133] In some embodiments, the device further comprises a first preprocessing module configured to, when it is detected that the medical image is a single-phase image, perform Gaussian filtering on the medical image; and perform threshold processing on the filtered medical image to obtain the threshold image. Figure 5 In some embodiments, the device further comprises a first preprocessing module configured to, when it is detected that the medical image is a multi-phase image, fuse each phase image in the medical image to obtain a corresponding fused image; perform Gaussian filtering on the fused image, and perform threshold processing on the filtered fused image to obtain the threshold image.

[0134] Figure 5 In some embodiments, the device further comprises a first preprocessing module configured to, when it is detected that the medical image is a multi-phase image, fuse each phase image in the medical image to obtain a corresponding fused image; perform Gaussian filtering on the fused image, and perform threshold processing on the filtered fused image to obtain the threshold image.

[0135] In some embodiments, the device further comprises a first preprocessing module configured to, when it is detected that the medical image is a multi-phase image, fuse each phase image in the medical image to obtain a corresponding fused image; perform Gaussian filtering on the fused image, and perform threshold processing on the filtered fused image to obtain the threshold image. Figure 5 ​​On the basis of, the device also includes a conversion module for converting the thresholded image into a corresponding binary image; each time a single connected domain is selected as the target area; in the binary image, the image area outside the target area is set as the background color to obtain a connected domain image corresponding to the connected domain.

[0136] In some of these embodiments, Figure 5 On the basis of the above, the device further includes a smoothing module for performing median filtering on the initial ventricle mask image; in the initial ventricle mask image after the filtering process, Bezier curve fitting is performed on the edge of the initial ventricle mask image.

[0137] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0138] This embodiment further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0139] Optionally, the computer device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0140] It should be noted that, for specific examples in this embodiment, reference may be made to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.

[0141] In addition, in conjunction with the medical image segmentation method provided in the above embodiments, a storage medium may be provided in this embodiment to implement the method. The storage medium stores a computer program that, when executed by a processor, implements any one of the medical image segmentation methods in the above embodiments.

[0142] It should be understood that the specific embodiments described herein are only used to explain this application and are not used to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0143] Obviously, the accompanying drawings are merely examples or embodiments of the present application. A person skilled in the art can also apply the present application to other similar situations based on these drawings without inventive effort. Furthermore, it is understandable that, although the work involved in this development process may be complex and lengthy, certain design, manufacturing, or production changes based on the technical content disclosed in this application are merely routine technical means for a person skilled in the art and should not be considered to constitute a deficiency in the disclosure of the present application.

[0144] The term "embodiment" as used in this application refers to specific features, structures, or characteristics described in conjunction with the embodiment that can be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily mean that the embodiment is the same, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is understood, either explicitly or implicitly, by those skilled in the art that the embodiments described in this application can be combined with other embodiments when there is no conflict.

[0145] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of patent protection. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A medical image segmentation method, characterized in that: The method comprises: Obtaining a thresholded image of a medical image; determining a plurality of connected domains in the thresholded image, and generating a connected domain image corresponding to each of the connected domains; Matching the thresholded image with a standard template image containing ventricular region markers to obtain an initial ventricular mask; Comparing each of the connected domain images with the initial ventricle mask, and based on the comparison results, selecting the connected domain images for fusion to obtain a target ventricle mask; The method of comparing each of the connected domain images with the initial ventricle mask image and, based on the comparison result, selecting the connected domain images for fusion to obtain a target ventricle mask image includes: comparing each of the connected domain images with the initial ventricle mask image and, based on the comparison result, determining an overlapping portion of a connected domain in the connected domain image and the initial ventricle mask image; determining an area ratio between the overlapping portion and the corresponding connected domain; when the area ratio is greater than a preset threshold, selecting the corresponding connected domain image as an image to be merged; and fusing each of the images to be merged to obtain the target ventricle mask image.

2. The medical image segmentation method according to claim 1, characterized in that: The determining of a plurality of connected regions in the thresholded image comprises: performing contour detection on the thresholded image; Based on the contour detection result, the thresholded image is segmented by a watershed algorithm to obtain the connected domains in the thresholded image.

3. The medical image segmentation method according to claim 1, wherein: The step of obtaining a thresholded image of a medical image comprises: When it is detected that the medical image is a single-phase image, performing Gaussian filtering on the medical image; Threshold processing is performed on the medical image after filtering to obtain the thresholded image.

4. The medical image segmentation method according to claim 1, wherein: The step of obtaining a thresholded image of a medical image comprises: When it is detected that the medical image is a multi-phase image, fusing images of each phase in the medical image to obtain a corresponding fused image; Gaussian filtering is performed on the fused image, and threshold processing is performed on the filtered fused image to obtain the thresholded image.

5. The medical image segmentation method according to claim 1, wherein: Generating a connected domain image corresponding to each connected domain includes: Converting the thresholded image into a corresponding binary image; Selecting a single connected domain as the target area each time; In the binary image, the image area outside the target area is set as the background color to obtain the connected domain image corresponding to the connected domain.

6. The medical image segmentation method according to claim 1, characterized in that: After matching the thresholded image with a standard template image containing ventricular region markers to obtain an initial ventricular mask, the method further includes: performing median filtering on the initial ventricle mask image; In the filtered initial ventricle mask image, Bezier curve fitting is performed on the edge of the initial ventricle mask image.

7. A medical image segmentation device, characterized in that: The device includes: an acquisition module, a segmentation module, a matching module and a fusion module; The acquisition module is used to acquire a thresholded image of a medical image; The segmentation module is configured to determine a plurality of connected domains in the thresholded image and generate a connected domain image corresponding to each of the connected domains; The matching module is configured to match the thresholded image with a standard template image containing ventricular region markers to obtain an initial ventricular mask; The fusion module is configured to compare each of the connected domain images with the initial ventricle mask, and based on the comparison result, select the connected domain images for fusion to obtain a target ventricle mask; The fusion module is further configured to compare each of the connected domain images with the initial ventricle mask image, and based on the comparison result, determine the overlapping portion of the connected domain in the connected domain image and the initial ventricle mask image; determine the area ratio between the overlapping portion and the corresponding connected domain; when the area ratio is greater than a preset threshold, select the corresponding connected domain image as the image to be merged; and fuse each of the images to be merged to obtain the target ventricle mask image.

8. A computer device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the steps of the medical image segmentation method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the medical image segmentation method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Method, device and equipment for segmenting ventricular region in brain CT image

    CN112529918A

  • Real-time road surface detection method based on dome camera

    CN116052037A