Bleeding area detection method, device and storage medium based on medical imaging
By identifying collinear edge points at the ventricle edge in brain medical images and performing parabolic fit, the problem of accurate and efficient cerebral hemorrhage recognition in the prior art is solved, and automated cerebral hemorrhage detection is realized, improving the recognition accuracy and efficiency.
Patent Information
- Application Number
- CN202111556341.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-17
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2041-12-17
AI Technical Summary
There is a lack of effective automatic detection methods in the prior art to identify whether cerebral hemorrhage breaks into the ventricle, resulting in low recognition accuracy and efficiency. Relying on doctor experience, there is a high rate of missed diagnosis and inconsistency in the results.
By obtaining the ventricle edge in brain medical images, identifying the target collinear edge point, parabolic fitting is performed based on the pixel point position relationship and grayscale value, the bleeding area is determined, and the density difference between cerebrospinal fluid and blood and physiological characteristics are used to automatically identify the bleeding area.
It improves the accuracy and efficiency of identification of cerebral hemorrhage areas, reduces labor costs, and realizes automated detection of cerebral hemorrhage.
Smart Images

Figure CN114419084B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of medical imaging technology, and in particular to a method and device for detecting bleeding areas based on medical imaging, a storage medium, and a computer device. Background Art
[0002] Intracerebral hemorrhage (ICH) is one of the most common and intractable diseases in neurology and neurosurgery. It presents with an acute onset, severe course, and high mortality and disability rates. The one-month mortality rate for ICH is as high as 35-52%, and approximately 80% of surviving patients remain disabled after six months, making it one of the leading causes of death and disability in China. Whether the hemorrhage has broken into the ventricles is a key indicator of ICH severity. The ventricles are pathways for cerebrospinal fluid circulation. When a hematoma forms in the ventricles, which initially takes the form of a blood clot, it can obstruct the cerebrospinal fluid circulation and cause acute hydrocephalus, which in turn leads to symptoms of acute increased intracranial pressure. When intracranial pressure rises to a certain level, the patient may initially experience headaches, dizziness, and limb dysfunction, progressing to coma, unresponsiveness, and even death. Therefore, for ICH that has broken into the ventricles, early surgery is necessary to alleviate the symptoms of increased intracranial pressure and to provide external drainage for the hematoma within the ventricles.
[0003] Currently, there is no effective automated method for clinically detecting intraventricular hemorrhage, and screening is essentially done visually. While the human eye can easily identify obvious intraventricular hemorrhage, the rate of missed diagnosis is very high for cerebrospinal fluid hematocrit <= 12%, which lacks clear imaging. Identification results are subject to subjective factors, and different doctors may give different evaluations based on the same data. Even the same doctor may come to different conclusions based on the same data twice. Currently, the identification of intracerebral hemorrhage suffers from low efficiency and poor accuracy. Summary of the Invention
[0004] In view of this, the present application provides a medical imaging-based bleeding area detection method and device, storage medium, and computer equipment, which helps to realize the automatic identification of brain bleeding areas, improve the recognition accuracy and efficiency, and reduce labor costs.
[0005] According to one aspect of the present application, a method for detecting bleeding areas based on medical images is provided, comprising:
[0006] Acquiring a ventricle edge in a brain medical image, and identifying at least one group of target collinear edge points among the edge pixels constituting the ventricle edge;
[0007] Based on the positional relationship of the pixels in the brain medical image, obtaining the pixel points to be analyzed corresponding to each group of the target collinear edge points;
[0008] Parabola fitting is performed according to the grayscale values of each group of pixels to be analyzed, and the bleeding area is determined according to the parabola fitting result.
[0009] Optionally, determining the bleeding area according to the parabola fitting result specifically includes:
[0010] If the parabola fitting result corresponding to any group of pixels to be analyzed is a parabola opening downward, the area where the any group of pixels to be analyzed is located is determined as the bleeding area.
[0011] Optionally, after determining the area where any group of pixels to be analyzed are located as the bleeding area, the method further includes:
[0012] determining an average scan value of each pixel point in the bleeding area, and counting the number of bleeding pixels in the bleeding area whose scan values are greater than the average scan value;
[0013] The bleeding volume of the bleeding area is determined based on the number of bleeding pixels and a preset unit pixel space volume.
[0014] Optionally, the brain medical image includes multiple layers; after determining the hemorrhage volume of the hemorrhage area based on the number of hemorrhage pixels and a preset unit pixel spatial volume, the method further includes:
[0015] Based on the hemorrhage volume of each hemorrhage area corresponding to each layer of the brain medical image, the total hemorrhage volume corresponding to the brain medical image is calculated.
[0016] Optionally, obtaining the pixel points to be analyzed corresponding to each group of the target collinear edge points based on the positional relationship of the pixel points in the brain medical image specifically includes:
[0017] The length of the line segment formed by the target collinear edge points is the length of the rectangular area, the preset width is the width of the rectangular area, the rectangular area below the target collinear edge points is obtained, and the pixel points contained in the rectangular area are the pixel points to be analyzed.
[0018] Optionally, performing parabola fitting according to the grayscale values of each group of pixels to be analyzed specifically includes:
[0019] Each row of pixels in the rectangular area is used as a sample to be clustered for binary clustering, wherein the first row of pixels and the last row of pixels are used as the starting points of the binary clustering, and the first row of pixels is the row of pixels in the rectangular area that is closest to the target collinear edge point;
[0020] Based on the two cluster centers obtained after the bipartite clustering, a first grayscale value to be fitted and a second grayscale value to be fitted are determined respectively;
[0021] Performing parabola fitting on the first grayscale value to be fitted and the second grayscale value to be fitted corresponding to each group of the pixel points to be analyzed, respectively, to obtain a first parabola and a second parabola for each group of the target collinear edge points;
[0022] Correspondingly, if the parabola fitting result corresponding to any group of pixels to be analyzed is a parabola opening downward, determining the area where the any group of pixels to be analyzed is located as the bleeding area specifically includes:
[0023] If the opening of the first parabola and / or the second parabola corresponding to any group of pixels to be analyzed is downward, the area where the any group of pixels to be analyzed is located is determined as the bleeding area.
[0024] Optionally, obtaining the ventricular margin in the brain medical image specifically includes:
[0025] Acquire a multi-layer brain medical image, remove pixels in each layer of the brain medical image having a scan value greater than a preset skull scan value, and obtain a multi-layer brain tissue mask;
[0026] Extracting pixels whose scan values are less than a preset cerebrospinal fluid segmentation threshold in each layer of the brain tissue mask to obtain the ventricle region of each layer;
[0027] The three-dimensional maximum connected domain is extracted based on the multiple layers of the ventricular regions to obtain the target ventricular region of each layer, and the edge of the target ventricular region of each layer is identified as the ventricular edge.
[0028] Optionally, before extracting the three-dimensional maximum connected domain based on the multiple layers of the ventricular regions, the method further includes:
[0029] Based on the lines connecting each edge pixel point and the center point of the ventricular region of each layer, and according to the preset sulcus-gyrus ratio, determine the sulcus-gyrus removal edge points on each line;
[0030] The edge points of the sulci and gyri of each layer are removed, and the outer layer of the ventricular area is removed.
[0031] Optionally, the identifying at least one group of target collinear edge points corresponding to the ventricular edge based on the edge pixel points constituting the ventricular edge specifically includes:
[0032] identifying at least one group of collinear edge points corresponding to the ventricular edge based on edge pixel points constituting the ventricular edge;
[0033] The length of the line segments formed by each group of the collinear edge points is counted respectively, and the collinear edge points whose line segment lengths are greater than a preset length threshold are obtained as the target collinear edge points.
[0034] Optionally, after identifying at least one group of collinear edge points corresponding to the ventricular edge, the method further includes:
[0035] The angle between the straight line on which each group of collinear edge points are located and the horizontal axis of the brain medical image is determined, and collinear edge points whose angle exceeds a preset angle threshold are deleted.
[0036] According to another aspect of the present application, a bleeding area detection device based on medical imaging is provided, comprising:
[0037] A ventricular edge acquisition module is used to obtain the ventricular edge in brain medical images;
[0038] a target edge recognition module, configured to recognize at least one group of target collinear edge points among the edge pixels constituting the ventricle edge;
[0039] A pixel point analysis module, configured to obtain the pixel points to be analyzed corresponding to each group of target collinear edge points based on the positional relationship of the pixel points in the brain medical image;
[0040] The bleeding analysis module is used to perform parabola fitting according to the grayscale values of each group of pixels to be analyzed, and determine the bleeding area according to the parabola fitting results.
[0041] Optionally, the bleeding analysis module is further configured to: if a parabola fitting result corresponding to any group of pixels to be analyzed is a parabola opening downward, determine the area where the any group of pixels to be analyzed is located as the bleeding area.
[0042] Optionally, the device further comprises:
[0043] The bleeding volume calculation module is used to determine the average scan value of each pixel point in the bleeding area, count the number of bleeding pixels in the bleeding area whose scan value is greater than the average scan value; and determine the bleeding volume of the bleeding area based on the number of bleeding pixels and a preset unit pixel space volume.
[0044] Optionally, the brain medical image includes multiple layers; the bleeding volume calculation module is further used to calculate the total bleeding volume corresponding to the brain medical image based on the bleeding volume of each bleeding area corresponding to each layer of the brain medical image.
[0045] Optionally, the pixel point analysis module is specifically used to: take the length of the line segment formed by the target collinear edge points as the length of the rectangular area, the preset width as the width of the rectangular area, obtain the rectangular area below the target collinear edge points, and the pixel points contained in the rectangular area are the pixel points to be analyzed.
[0046] Optionally, the bleeding analysis module is further configured to:
[0047] Each row of pixels in the rectangular area is used as a sample to be clustered for binary clustering, wherein the first row of pixels and the last row of pixels are used as the starting points of the binary clustering, and the first row of pixels is the row of pixels in the rectangular area that is closest to the target collinear edge point;
[0048] Based on the two cluster centers obtained after the bipartite clustering, a first grayscale value to be fitted and a second grayscale value to be fitted are determined respectively;
[0049] Performing parabola fitting on the first grayscale value to be fitted and the second grayscale value to be fitted corresponding to each group of the pixel points to be analyzed, respectively, to obtain a first parabola and a second parabola for each group of the target collinear edge points;
[0050] If the opening of the first parabola and / or the second parabola corresponding to any group of pixels to be analyzed is downward, the area where the any group of pixels to be analyzed is located is determined as the bleeding area.
[0051] Optionally, the ventricular edge acquisition module is specifically configured to:
[0052] Acquire a multi-layer brain medical image, remove pixels in each layer of the brain medical image having a scan value greater than a preset skull scan value, and obtain a multi-layer brain tissue mask;
[0053] Extracting pixels whose scan values are less than a preset cerebrospinal fluid segmentation threshold in each layer of the brain tissue mask to obtain the ventricle region of each layer;
[0054] The three-dimensional maximum connected domain is extracted based on the multiple layers of the ventricular regions to obtain the target ventricular region of each layer, and the edge of the target ventricular region of each layer is identified as the ventricular edge.
[0055] Optionally, the ventricular edge acquisition module is further configured to:
[0056] Before extracting the three-dimensional maximum connected domain based on the multiple layers of the ventricular region, the sulcus and gyrus edge points on each line are determined based on the line connecting each edge pixel point and the center point of the region in each layer of the ventricular region according to a preset sulcus and gyrus ratio; based on the sulcus and gyrus edge points of each layer, the outer layer of the ventricular region is eliminated.
[0057] Optionally, the target edge recognition module is specifically configured to:
[0058] Based on the edge pixel points that constitute the ventricular edge, at least one group of collinear edge points corresponding to the ventricular edge is identified; the length of the line segment formed by each group of the collinear edge points is counted respectively, and the collinear edge points whose line segment length is greater than a preset length threshold are obtained as the target collinear edge points.
[0059] Optionally, the target edge recognition module is further used to: after identifying at least one group of collinear edge points corresponding to the ventricular edge, determine the angle between the straight line on which each group of collinear edge points is located and the horizontal axis of the brain medical image, and delete the collinear edge points whose angle exceeds a preset angle threshold.
[0060] According to another aspect of the present application, a storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the above-mentioned bleeding area detection method based on medical images is implemented.
[0061] According to another aspect of the present application, a computer device is provided, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the above-mentioned medical image-based bleeding area detection method when executing the program.
[0062] By means of the above technical solution, the present application provides a method and device for detecting bleeding areas based on medical images, a storage medium, and a computer device. Based on the edge pixel points corresponding to the edge of the ventricle in the brain medical image, multiple groups of target collinear edge points that can form a straight line are identified. Furthermore, based on the physiological characteristics that cerebrospinal fluid and blood present a straight dividing line, and blood is located below the dividing line, the pixel points to be analyzed that match the target collinear edge points are obtained, a parabola is fitted based on the grayscale value of the pixel points to be analyzed, and the bleeding area is determined according to the parabola fitting result. The embodiment of the present application solves the problem in the prior art that the human eye can only rely on the doctor's experience to identify the condition of cerebral bleeding, resulting in low recognition accuracy and efficiency, and helps to improve the recognition accuracy and efficiency of cerebral hemorrhage.
[0063] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] 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:
[0065] Figure 1 A schematic diagram of a process for detecting bleeding areas based on medical images provided in an embodiment of the present application is shown;
[0066] Figure 2 A schematic diagram of a process for detecting bleeding areas based on medical images provided in an embodiment of the present application is shown;
[0067] Figure 3 A schematic diagram of sulcus and gyrus elimination provided in an embodiment of the present application is shown;
[0068] Figure 4 A Hough transform straight line detection principle diagram in an embodiment of the present application is shown;
[0069] Figure 5 A schematic diagram of a rectangular area provided in an embodiment of the present application is shown;
[0070] Figure 6 A schematic diagram of a bipartite clustering starting point provided in an embodiment of the present application is shown;
[0071] Figure 7 A schematic diagram of a first cluster center and a second cluster center after clustering provided in an embodiment of the present application is shown;
[0072] Figure 8 A schematic structural diagram of a bleeding area detection device based on medical imaging provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0073] The present application will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that, unless there is a conflict, the embodiments and features in the embodiments of the present application can be combined with each other.
[0074] In this embodiment, a method for detecting bleeding areas based on medical images is provided. Figure 1 As shown, the method includes:
[0075] Step 101, obtaining a ventricle edge in a brain medical image, and identifying at least one group of target collinear edge points among the edge pixels constituting the ventricle edge;
[0076] The embodiment of the present application can identify whether the patient has cerebral hemorrhage by performing image analysis on the patient's brain medical image. Taking the brain medical image as a brain CT image as an example, the brain medical image can specifically be a plain scan CT tomographic image. In a specific application scenario, the brain medical image can be all scanning layer images that constitute a complete brain medical image, or it can be one or more scanning layer images that need to be analyzed. The embodiment of the present application is explained using the brain medical image as all scanning layer images as an example.
[0077] First, ventricle edge recognition is performed on each layer of brain medical images to determine the ventricle edge in each layer of brain medical images. Due to the different densities of red blood cells and cerebrospinal fluid, the blood that invades the ventricle settles downward when the human body lies down, and there is a physiological feature of a horizontal line in the occipital part of the ventricle. Therefore, the present application identifies the horizontal line feature presented by the ventricle edge to find the area where cerebral hemorrhage may exist for analysis. In this embodiment, after determining the ventricle edge, at least one group of target collinear edge points is found among the edge pixels that constitute the ventricle edge. Specifically, the edge pixels contained in the ventricle edge can be paired with each other, and the principle that two points form a straight line is used to determine the straight line formed by the two paired edge pixels, and the other edge pixels on this straight line are found, and all edge pixels on the same straight line are used as a group of target collinear edge points. At least one group of target collinear edge points among the edge pixels can also be obtained by Hough transform straight line detection.
[0078] Step 102, based on the positional relationship of the pixels in the brain medical image, obtaining the pixels to be analyzed corresponding to each group of the target collinear edge points;
[0079] Next, when the patient lies flat for a CT scan, blood will be below the dividing line between cerebrospinal fluid and blood due to different densities. Therefore, the image part at and below the dividing line is the suspected cerebral hemorrhage area. Based on the position relationship of the pixel points in the brain medical image, for each group of target collinear edge points, the pixel points to be analyzed in the area within a certain range below the target collinear edge points can be obtained.
[0080] Step 103 , performing parabola fitting according to the grayscale values of each group of pixels to be analyzed, and determining the bleeding area according to the parabola fitting result.
[0081] The physiological characteristics of hemorrhage are high red blood cell content in the middle part and gradually decreasing on both sides. The characteristics shown in the scanned image are high grayscale value in the middle part and gradually decreasing on both sides. Therefore, in order to realize the analysis of suspected cerebral hemorrhage areas, parabolic fitting can be performed based on the grayscale value of the pixel to be analyzed to determine whether the characteristics shown by the cerebrospinal fluid and red blood cells in the area are cerebral hemorrhage characteristics. Specifically, the pixel to be analyzed can be statistically analyzed to calculate the grayscale value to be fitted corresponding to the pixel to be analyzed. For example, the mean grayscale value of the pixel to be analyzed below a target collinear edge point can be used as the grayscale value to be fitted of the point, and the correspondence between the pixel position and the grayscale value to be fitted can be obtained respectively, so as to fit the distribution of pixels in the area using the grayscale value to be fitted.
[0082] Finally, a parabola is fitted for each group of pixels to be analyzed. Based on the opening direction of the fitted parabola, it is determined whether the area corresponding to the pixels to be analyzed shows a trend of high grayscale values in the middle and gradually decreasing values on both sides. If the opening direction of the parabola is downward, it can be confirmed that the area shows the above trend, and it is determined that the area where the group of pixels to be analyzed is located has cerebral hemorrhage, and the area is a hemorrhage area. If the opening direction of the parabola is upward, it is considered that there is no blood in the area. For the head medical image corresponding to each scanning layer, it can be considered that as long as at least one area in the head medical image of a scanning layer is identified to have blood, it is determined that there is cerebral hemorrhage; alternatively, it can be considered that cerebral hemorrhage is present when a certain number of areas with blood are identified, and there is no limitation here.
[0083] By applying the technical solution of this embodiment, based on the edge pixel points corresponding to the edge of the ventricle in the brain medical image, multiple groups of target collinear edge points that can form a straight line are identified. Furthermore, based on the physiological characteristics that cerebrospinal fluid and blood present a straight dividing line, and blood is located below the dividing line, the pixel points to be analyzed that match the target collinear edge points are obtained, and parabola fitting is performed based on the grayscale value of the pixel points to be analyzed. The bleeding area is determined based on the parabola fitting result. The embodiment of the present application solves the problem in the prior art that the human eye can only rely on the doctor's experience to identify the condition of cerebral hemorrhage, resulting in low recognition accuracy and efficiency, and helps to improve the recognition accuracy and efficiency of cerebral hemorrhage.
[0084] Furthermore, as a refinement and extension of the specific implementation of the above embodiment, in order to fully illustrate the specific implementation process of this embodiment, another bleeding area detection method based on medical images is provided, such as Figure 2 As shown, the method includes:
[0085] Step 201, obtaining the ventricle edge in the brain medical image;
[0086] Optionally, step 201 may be implemented by the following steps:
[0087] Step 201-1, obtaining a multi-layer brain medical image, removing pixels in each layer of the brain medical image whose scan value is greater than a preset skull scan value, to obtain a multi-layer brain tissue mask;
[0088] Step 201-2, extracting pixels whose scan values are less than a preset cerebrospinal fluid segmentation threshold in each layer of the brain tissue mask to obtain the ventricle region of each layer;
[0089] Step 201 - 3 : extracting the three-dimensional maximum connected domain based on the multiple layers of the ventricular regions to obtain the target ventricular region of each layer, and identifying the edge of the target ventricular region of each layer as the ventricular edge.
[0090] In this embodiment, after a patient undergoes a brain CT scan to obtain multiple brain medical images, the skull portion in each layer of the image can be removed. The CT scan value of the skull is generally between 150 and 1000, and the CT scan value of the brain tissue is usually less than 120. Therefore, the pixels whose CT scan value is greater than the preset skull scan value (which can be set to 120) are removed, and the brain tissue portion in the image is retained. Combined with three-dimensional morphological processing, a brain tissue mask for each scan layer is obtained. Furthermore, pixels whose CT scan values are less than a preset cerebrospinal fluid segmentation threshold are extracted from the brain tissue mask as the cerebrospinal fluid part. Specifically, the grayscale histogram in the brain tissue mask area can be statistically analyzed to extract the grayscale value corresponding to the second peak. The grayscale value is used as the preset cerebrospinal fluid segmentation threshold to achieve cerebrospinal fluid segmentation and obtain the whole brain ventricular area. Then, the core area of the whole brain ventricle is extracted. Specifically, for the ventricular area corresponding to each scanning layer, the three-dimensional maximum connected domain is extracted to eliminate the sulcus and gyrus part in the whole brain ventricular area to obtain the core lateral ventricle area, that is, the target ventricle area. Finally, the three-dimensional morphological method is used for edge extraction to obtain the ventricular edge of the core lateral ventricle.
[0091] In an embodiment of the present application, in order to improve the extraction accuracy of the core lateral ventricle, the sulcus and gyrus part can be roughly removed first. Optionally, before step 201-3, it can also include: based on the connection line between each edge pixel point and the center point of the region in each layer of the ventricular area, according to the preset sulcus and gyrus ratio, determining the sulcus and gyrus elimination edge points on each connection line; based on the sulcus and gyrus elimination edge points of each layer, the outer layer of the ventricular area is eliminated.
[0092] In this embodiment, the lateral ventricles are located in the central area of the brain, and the sulci are located in the peripheral area of the brain. Based on this characteristic, the sulci in the peripheral area can be removed. Figure 3 As shown, P2 is the center point of the ventricular area, and P2 is any point on the edge of the ventricular area. The straight line equation is established based on the two points P1 and P2. P1 is along the straight line. The sliding length is To P1', α represents the preset sulcus-gyrus ratio, This is the sulcus and gyrus area that needs to be removed.
[0093] Step 202 : Based on the edge pixels constituting the ventricular edge, identify at least one group of collinear edge points corresponding to the ventricular edge, wherein a straight line formed by each group of collinear edge points includes at least two edge pixels.
[0094] Step 203 : determining the angle between the straight line on which each group of collinear edge points are located and the horizontal axis of the brain medical image, and deleting collinear edge points whose angle exceeds a preset angle threshold.
[0095] In step 204 , the length of the line segments formed by each group of collinear edge points is counted respectively, and collinear edge points whose line segment lengths are greater than a preset length threshold are obtained as the target collinear edge points.
[0096] Among them, step 202 to step 203 can be implemented by the Hough transform line detection method, such as Figure 4 As shown, in any layer of brain medical image, with the lower left corner of the image as the origin (0, 0), for any straight line l on the edge of the ventricle i , expressed as (γ,θ), where γ is the vertical distance from the origin to the straight line, and θ is the angle between the vertical line and the x-axis. (γ,θ) can also represent the intersection of the vertical line and the straight line. Figure 5 As shown, the straight line passing through point Pi is (γ i ,θ i ), the straight line passing through point Pj is (γ j ,θ j ), the characteristics of a straight line are determined based on two points, so the straight line passing through these two points must have γ i =γ j ,θ i =θ j .
[0097] Applied to the above embodiment, all points on the edge of the ventricle can be traversed to detect the straight lines (γ, θ) passing through the edge points. Assuming that there are n straight lines passing through each edge point and there are N ventricle edge pixel points, N*n (γ, θ) can be found. Then, for all (γ, θ), a quantitative count is performed, that is, the number of (γ, θ) representing the same straight line is found. The larger the statistical value, the more collinear ventricle edge pixel points are on the straight line. The ventricle edge pixel points included in the same straight line are the above-mentioned collinear edge pixel points. Generally speaking, when the patient is lying flat, the boundary line between cerebrospinal fluid and blood should be a horizontal line, but in order to eliminate interference, the straight lines whose angles with the x-axis exceed the preset angle threshold can be deleted. Specifically, the straight line with θ∈(-6°, 6°) can be retained.
[0098] Furthermore, since the physiological structure of the ventricular contour is a smooth curved surface, and the cerebrospinal fluid and blood have different densities and will present straight line characteristics after separation, the horizontal line of the intersection of the cerebrospinal fluid and the hemorrhage is generally the longest line segment on the edge of the ventricle, and the length of the horizontal line of the intersection is usually above a certain length range. Therefore, in the embodiment of the present application, after determining each group of collinear edge points, the collinear edge points can be screened based on the length of the line segment formed by each group of collinear edge points to determine the target collinear edge point. Among them, the target collinear edge point can be a continuous segment of pixel points or multiple continuous segments of pixel points. For example, the collinear edge points that constitute the longest line segment can be selected as the target collinear edge point, or the collinear edge points that constitute a line segment greater than a preset length threshold can be selected as the target collinear edge point for subsequent analysis of the target collinear edge point. Specifically, the length of the line segment formed by a group of collinear edge points can be determined by counting the number of consecutive pixels in the group. If the number of adjacent pixels is greater than a preset number (the preset number matches the preset length threshold mentioned above, and the line segment formed by a continuous preset number of pixels is the preset length threshold), then these consecutive pixels in the group of collinear edge points are obtained and used as target collinear edge points. The line segment formed by the target collinear edge points is suspected to be the boundary between cerebrospinal fluid and blood. In order to improve recognition accuracy, collinear edge points whose line segment length is greater than the preset length threshold can be obtained as target collinear edge points to avoid problems of missed recognition and missed detection.
[0099] In step 205, the length of the line segment formed by the target collinear edge points is used as the length of the rectangular area, the preset width is used as the width of the rectangular area, and the rectangular area below the target collinear edge points is obtained. The pixel points contained in the rectangular area are the pixel points to be analyzed.
[0100] In this embodiment, in order to improve the efficiency of obtaining the pixels to be analyzed, the pixels within the rectangular area can be obtained as the pixels to be analyzed by selecting the rectangular area on the image. Specifically, the length of the line segment formed by the target collinear edge points can be used as the length of the rectangular area for selection, and the width of the rectangular area is a fixed preset width. After determining the line segment formed by the target collinear edge points, the line segment closest to the line segment below the line segment is used as a side of the rectangular area, and the rectangular area is placed below the side. The pixels contained in the rectangular area are the pixels to be analyzed, such as Figure 5 As shown in FIG, a rectangular area corresponding to a line segment formed by four target collinear edge points is selected in the image.
[0101] In step 206, each row of pixels in the rectangular area is treated as a sample to be clustered and binary clustering is performed, wherein the first row of pixels and the last row of pixels are used as starting points for binary clustering, and the first row of pixels is the row of pixels in the rectangular area that is closest to the target collinear edge point.
[0102] Step 207 : Based on the two cluster centers obtained after the bipartite clustering, respectively determine the first grayscale value to be fitted and the second grayscale value to be fitted.
[0103] In this embodiment, after determining the rectangular area of the target collinear edge points, for the convenience of description, a regional pixel matrix of M rows and N columns can be formed based on the pixel points in the rectangular area, where M is the preset width and N is the number of target collinear edge points. min (1, 1), (1, 2) ... (1, N) as the first cluster center, and the last row of pixels line max (M, 1), (M, 2) ... (M, N) are used as the second cluster centers, and each of the remaining rows of pixels is used as a sample to be clustered. For example, the second row of pixels (2, 1), (2, 2) ... (2, N) is used as a sample to be clustered, and the third row of pixels (3, 1), (3, 2) ... (3, N) is used as a sample to be clustered.
[0104] Next, the grayscale value of the pixel at the first cluster center and the grayscale value of the pixel at the second cluster center are used as the starting points of the two clusters, such as Figure 6 As shown in , it is a curve diagram of the first cluster starting point and the second cluster starting point. Perform binary clustering on the clustered samples to obtain two cluster centers, and obtain the grayscale values of the two cluster centers as the first grayscale value to be fitted and the second grayscale value to be fitted corresponding to the target collinear edge point. Figure 7 As shown, it is a curve diagram of the first cluster center and the second cluster center after clustering.
[0105] Step 208 : performing parabola fitting on the first grayscale value to be fitted and the second grayscale value to be fitted corresponding to each group of the pixel points to be analyzed, respectively, to obtain a first parabola and a second parabola for each group of the target collinear edge points.
[0106] Furthermore, the first grayscale value to be fitted is taken as the y value, the order of the pixel points in the matrix is taken as the x value, and the preset parabola expression y=a*x is used. 2 +b*x+c to fit the parabola to obtain the first parabola, and the second parabola is fitted in the same way.
[0107] Step 209: If the opening of the first parabola and / or the second parabola corresponding to any group of pixels to be analyzed is downward, the area where the any group of pixels to be analyzed is located is determined as the bleeding area.
[0108] In this embodiment, after parabola fitting, the opening direction of the parabola can be represented by a. If a is less than 0, it means that the parabola opens downward. Based on the physiological characteristics of the bleeding area, when the parabola opens downward, it can be considered that there is a bleeding area in the corresponding rectangular area. As long as one of the first parabola and the second parabola opens downward, it can be considered that there is cerebral hemorrhage, thereby realizing automatic detection of cerebral hemorrhage.
[0109] The embodiment of the present application can also realize the statistics of the amount of bleeding. Optionally, after step 209, the following steps may be further included:
[0110] S1, determining an average scan value of each pixel point in the bleeding area, and counting the number of bleeding pixels in the bleeding area whose scan values are greater than the average scan value;
[0111] S2: Determine the bleeding volume of the bleeding area based on the number of bleeding pixels and a preset unit pixel space volume.
[0112] In the above embodiment, a rectangular area corresponding to a downward-opening parabola is obtained, and the scan values of the pixels within the area are counted to determine the average scan value of the pixels within the area. Pixels with scan values greater than the average are considered to be bleeding pixels. The number of bleeding pixels within the area is counted, and the corresponding bleeding volume within the area is calculated based on the unit pixel space volume represented by each pixel.
[0113] Furthermore, the method may include: S3, calculating the total hemorrhage volume corresponding to the brain medical image based on the hemorrhage volume of each hemorrhage area corresponding to each layer of the brain medical image.
[0114] In this embodiment, the hemorrhage volume of each hemorrhage area in each layer of the brain medical image is counted, and the hemorrhage volumes are accumulated to calculate the total hemorrhage volume of the brain medical image, so as to realize automatic analysis of the hemorrhage amount of cerebral hemorrhage.
[0115] Further, as Figure 1 The specific implementation of the method, the embodiment of the present application provides a bleeding area detection device based on medical imaging, such as Figure 8 As shown, the device includes:
[0116] A ventricular edge acquisition module is used to obtain the ventricular edge in brain medical images;
[0117] a target edge recognition module, configured to recognize at least one group of target collinear edge points among the edge pixels constituting the ventricle edge;
[0118] A pixel point analysis module, configured to obtain the pixel points to be analyzed corresponding to each group of target collinear edge points based on the positional relationship of the pixel points in the brain medical image;
[0119] The bleeding analysis module is used to perform parabola fitting according to the grayscale values of each group of pixels to be analyzed, and determine the bleeding area according to the parabola fitting results.
[0120] Optionally, the bleeding analysis module is further configured to: if a parabola fitting result corresponding to any group of pixels to be analyzed is a parabola opening downward, determine the area where the any group of pixels to be analyzed is located as the bleeding area.
[0121] Optionally, the device further comprises:
[0122] The bleeding volume calculation module is used to determine the average scan value of each pixel point in the bleeding area, count the number of bleeding pixels in the bleeding area whose scan value is greater than the average scan value; and determine the bleeding volume of the bleeding area based on the number of bleeding pixels and a preset unit pixel space volume.
[0123] Optionally, the brain medical image includes multiple layers; the bleeding volume calculation module is further used to calculate the total bleeding volume corresponding to the brain medical image based on the bleeding volume of each bleeding area corresponding to each layer of the brain medical image.
[0124] Optionally, the pixel point analysis module is specifically used to: take the length of the line segment formed by the target collinear edge points as the length of the rectangular area, the preset width as the width of the rectangular area, obtain the rectangular area below the target collinear edge points, and the pixel points contained in the rectangular area are the pixel points to be analyzed.
[0125] Optionally, the bleeding analysis module is further configured to:
[0126] Each row of pixels in the rectangular area is used as a sample to be clustered for binary clustering, wherein the first row of pixels and the last row of pixels are used as the starting points of the binary clustering, and the first row of pixels is the row of pixels in the rectangular area that is closest to the target collinear edge point;
[0127] Based on the two cluster centers obtained after the bipartite clustering, a first grayscale value to be fitted and a second grayscale value to be fitted are determined respectively;
[0128] Performing parabola fitting on the first grayscale value to be fitted and the second grayscale value to be fitted corresponding to each group of the pixel points to be analyzed, respectively, to obtain a first parabola and a second parabola for each group of the target collinear edge points;
[0129] If the opening of the first parabola and / or the second parabola corresponding to any group of pixels to be analyzed is downward, the area where the any group of pixels to be analyzed is located is determined as the bleeding area.
[0130] Optionally, the ventricular edge acquisition module is specifically configured to:
[0131] Acquire a multi-layer brain medical image, remove pixels in each layer of the brain medical image having a scan value greater than a preset skull scan value, and obtain a multi-layer brain tissue mask;
[0132] Extracting pixels whose scan values are less than a preset cerebrospinal fluid segmentation threshold in each layer of the brain tissue mask to obtain the ventricle region of each layer;
[0133] The three-dimensional maximum connected domain is extracted based on the multiple layers of the ventricular regions to obtain the target ventricular region of each layer, and the edge of the target ventricular region of each layer is identified as the ventricular edge.
[0134] Optionally, the ventricular edge acquisition module is further configured to:
[0135] Before extracting the three-dimensional maximum connected domain based on the multiple layers of the ventricular region, the sulcus and gyrus edge points on each line are determined based on the line connecting each edge pixel point and the center point of the region in each layer of the ventricular region according to a preset sulcus and gyrus ratio; based on the sulcus and gyrus edge points of each layer, the outer layer of the ventricular region is eliminated.
[0136] Optionally, the target edge recognition module is specifically configured to:
[0137] Based on the edge pixel points that constitute the ventricular edge, at least one group of collinear edge points corresponding to the ventricular edge is identified; the length of the line segment formed by each group of the collinear edge points is counted respectively, and the collinear edge points whose line segment length is greater than a preset length threshold are obtained as the target collinear edge points.
[0138] Optionally, the target edge recognition module is further used to: after identifying at least one group of collinear edge points corresponding to the ventricular edge, determine the angle between the straight line on which each group of collinear edge points is located and the horizontal axis of the brain medical image, and delete the collinear edge points whose angle exceeds a preset angle threshold.
[0139] It should be noted that for other corresponding descriptions of the functional units involved in the medical imaging-based bleeding area detection device provided in the embodiment of the present application, please refer to Figures 1 to 2The corresponding description in the method will not be repeated here.
[0140] Based on the above Figures 1 to 2 The method shown in FIG. 1 is a method for performing the above-mentioned operation. Accordingly, the embodiment of the present application further provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned operation is performed. Figures 1 to 2 The bleeding area detection method based on medical images is shown.
[0141] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each implementation scenario of the present application.
[0142] Based on the above Figures 1 to 2 The method shown, and Figure 8 In order to achieve the above-mentioned purpose, the embodiment of the present application further provides a computer device, which can be a personal computer, a server, a network device, etc. The computer device includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-mentioned Figures 1 to 2 The bleeding area detection method based on medical images is shown.
[0143] Optionally, the computer device may further include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a Wi-Fi module, etc. The user interface may include a display, an input unit such as a keyboard, etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a Bluetooth interface, a Wi-Fi interface), etc.
[0144] Those skilled in the art will understand that the computer device structure provided in this embodiment does not constitute a limitation on the computer device, and may include more or fewer components, or a combination of certain components, or different component arrangements.
[0145] The storage medium may also include an operating system and a network communication module. An operating system is a program that manages and stores the hardware and software resources of a computer device, supporting the execution of information processing programs and other software and / or programs. The network communication module facilitates communication between components within the storage medium, as well as with other hardware and software within the physical device.
[0146] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by means of software plus the necessary general hardware platform, or by hardware based on edge pixel points corresponding to the edges of the ventricles in brain medical images, to identify multiple groups of target collinear edge points that can form a straight line. Furthermore, based on the physiological characteristics that cerebrospinal fluid and blood present a straight dividing line, and blood is located below the dividing line, the pixel points to be analyzed that match the target collinear edge points are obtained, parabola fitting is performed based on the grayscale value of the pixel points to be analyzed, and the bleeding area is determined according to the parabola fitting result. The embodiment of the present application solves the problem in the prior art that the human eye can only rely on the doctor's experience to identify the cerebral hemorrhage condition, resulting in low recognition accuracy and efficiency, and helps to improve the recognition accuracy and efficiency of cerebral hemorrhage.
[0147] Those skilled in the art will understand that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily required to implement the present application. Those skilled in the art will understand that the modules in the devices in the implementation scenario can be distributed in the devices of the implementation scenario according to the implementation scenario description, or can be changed accordingly and located in one or more devices different from the implementation scenario. The modules of the above-mentioned implementation scenario can be combined into one module, or can be further split into multiple sub-modules.
[0148] The serial numbers of the above application are for descriptive purposes only and do not represent the advantages or disadvantages of the implementation scenarios. The above disclosure only discloses several specific implementation scenarios of the present application, but the present application is not limited thereto. Any changes that can be conceived by those skilled in the art should fall within the scope of protection of the present application.
Claims
1. A method for detecting bleeding areas based on medical images, characterized in that: include: Acquiring a ventricle edge in a brain medical image, and identifying at least one group of target collinear edge points among the edge pixels constituting the ventricle edge; Based on the positional relationship of the pixels in the brain medical image, obtaining the pixel points to be analyzed corresponding to each group of the target collinear edge points; Parabola fitting is performed according to the grayscale values of each group of pixels to be analyzed, and the bleeding area is determined according to the parabola fitting result.
2. The method according to claim 1, characterized in that Determining the bleeding area according to the parabola fitting result specifically includes: If the parabola fitting result corresponding to any group of pixels to be analyzed is a parabola opening downward, the area where the any group of pixels to be analyzed is located is determined as the bleeding area.
3. The method according to claim 2, characterized in that After determining the area where any group of pixels to be analyzed is located as the bleeding area, the method further includes: determining an average scan value of each pixel point in the bleeding area, and counting the number of bleeding pixels in the bleeding area whose scan values are greater than the average scan value; The bleeding volume of the bleeding area is determined based on the number of bleeding pixels and a preset unit pixel space volume.
4. The method according to claim 3, characterized in that The brain medical image includes multiple layers; after determining the hemorrhage volume of the hemorrhage area based on the number of hemorrhage pixels and a preset unit pixel spatial volume, the method further includes: Based on the hemorrhage volume of each hemorrhage area corresponding to each layer of the brain medical image, the total hemorrhage volume corresponding to the brain medical image is calculated.
5. The method according to claim 2, characterized in that The step of obtaining the pixel points to be analyzed corresponding to each group of target collinear edge points based on the positional relationship of the pixel points in the brain medical image specifically includes: The length of the line segment formed by the target collinear edge points is the length of the rectangular area, the preset width is the width of the rectangular area, the rectangular area below the target collinear edge points is obtained, and the pixel points contained in the rectangular area are the pixel points to be analyzed.
6. The method according to claim 5, characterized in that The performing parabola fitting according to the grayscale values of each group of pixels to be analyzed specifically includes: Each row of pixels in the rectangular area is used as a sample to be clustered for binary clustering, wherein the first row of pixels and the last row of pixels are used as the starting points of the binary clustering, and the first row of pixels is the row of pixels in the rectangular area that is closest to the target collinear edge point; Based on the two cluster centers obtained after the bipartite clustering, a first grayscale value to be fitted and a second grayscale value to be fitted are determined respectively; Performing parabola fitting on the first grayscale value to be fitted and the second grayscale value to be fitted corresponding to each group of the pixel points to be analyzed, respectively, to obtain a first parabola and a second parabola for each group of the target collinear edge points; Correspondingly, if the parabola fitting result corresponding to any group of pixels to be analyzed is a parabola opening downward, determining the area where the any group of pixels to be analyzed is located as the bleeding area specifically includes: If the opening of the first parabola and / or the second parabola corresponding to any group of pixels to be analyzed is downward, the area where the any group of pixels to be analyzed is located is determined as the bleeding area.
7. The method according to any one of claims 1 to 6, characterized in that The obtaining of the ventricle edge in the brain medical image specifically includes: Acquire a multi-layer brain medical image, remove pixels in each layer of the brain medical image having a scan value greater than a preset skull scan value, and obtain a multi-layer brain tissue mask; Extracting pixels whose scan values are less than a preset cerebrospinal fluid segmentation threshold in each layer of the brain tissue mask to obtain the ventricle region of each layer; The three-dimensional maximum connected domain is extracted based on the multiple layers of the ventricular regions to obtain the target ventricular region of each layer, and the edge of the target ventricular region of each layer is identified as the ventricular edge.
8. The method according to claim 7, characterized in that Before extracting the three-dimensional maximum connected domain based on the multiple layers of the ventricular regions, the method further includes: Based on the lines connecting each edge pixel point and the center point of the ventricle area in each layer, and according to the preset sulcus-gyrus ratio, determine the sulcus-gyrus edge points to be removed on each line; The edge points of the sulci and gyri of each layer are removed, and the outer layer of the ventricular area is removed.
9. The method according to claim 7, characterized in that The step of identifying at least one group of target collinear edge points corresponding to the ventricular edge based on the edge pixel points constituting the ventricular edge specifically includes: identifying at least one group of collinear edge points corresponding to the ventricular edge based on edge pixel points constituting the ventricular edge; The length of the line segments formed by each group of the collinear edge points is counted respectively, and the collinear edge points whose line segment lengths are greater than a preset length threshold are obtained as the target collinear edge points.
10. The method according to claim 9, characterized in that After identifying at least one group of collinear edge points corresponding to the ventricle edge, the method further includes: The angle between the straight line on which each group of collinear edge points are located and the horizontal axis of the brain medical image is determined, and collinear edge points whose angle exceeds a preset angle threshold are deleted.
11. A bleeding area detection device based on medical imaging, characterized in that: include: A ventricular edge acquisition module is used to obtain the ventricular edge in brain medical images; a target edge recognition module, configured to recognize at least one group of target collinear edge points among the edge pixels constituting the ventricle edge; A pixel point analysis module, configured to obtain the pixel points to be analyzed corresponding to each group of target collinear edge points based on the positional relationship of the pixel points in the brain medical image; The bleeding analysis module is used to perform parabola fitting according to the grayscale values of each group of pixels to be analyzed, and determine the bleeding area according to the parabola fitting results.
12. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.
13. A computer device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 10 is implemented.
Citation Information
Patent Citations
Processing method of CT cerebral hemorrhage image
CN101238987A
Straight line detection method and straight line detection device
CN105069786A
Image edge point acquisition method and device
CN111968144A
Method, device and equipment for segmenting ventricular region in brain CT image
CN112529918A