A method and system for calculating cranial cavity cross-sectional area in brain CT based on cranial CT features

CN123015647APending Publication Date: 2026-10-30HUAZHONG UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611211237.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-11
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

这种方法费时费力,增加了阅片负担,效率低下

Benefits of technology

(1)本发明提供了一种快速的、硬件无关的,从颅骨CT特征的脑部CT片中颅腔截面积的计算方法。通过脑部CT横断面获取以及颅骨轮廓的提取,结合颅骨的解剖学形态学特征,快速且高精度实现颅腔分割,将轮廓所包围的所有像素点记为掩膜一;构建脑部CT横断面图像的CT值到该脑部CT横断面图像灰度值的自适应映射关系,根据该映射关系,将掩膜一中符合颅骨CT特征的像素点记为掩膜二;对掩膜一与掩膜二执行差分运算,得到包含颅腔的差分掩膜;对差分掩膜执行连通域标记,统计各连通域的像素面积,选取面积最大的连通域作为颅腔主体区域,对颅腔主体区域提取外部轮廓,将外部轮廓作为颅腔边界,并对该轮廓内部进行填充,生成完整且闭合的颅腔掩膜;统计颅腔掩膜中的非零像素数量,即为CT横断面中以像素为单位的颅腔截面积。本发明无需进行繁琐的人工标注或计数,可显著提高颅腔截面积计算的效率,且在有血肿或气液混合病灶等区域干扰的情况下也有较好的稳定性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123015647A_ABST
    Figure CN123015647A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of medical image segmentation, and relates to a method and system for calculating the cranial cavity cross-sectional area in a brain CT image based on the CT features of the skull. The brain CT cross-sectional image is binarized and then closed operation is performed. The skull outline is extracted from the image after the closed operation based on the physiological features of the skull. All pixel points surrounded by the outline are recorded as mask one. An adaptive mapping relationship between the CT value and the gray value is established, and the pixel points in the mask one that meet the CT features of the skull are recorded as mask two. The main region of the cranial cavity is calculated, the external outline is extracted, the external outline is taken as the boundary of the cranial cavity, the inside of the outline is filled, and a complete and closed cranial cavity mask is generated. The number of non-zero pixels in the cranial cavity mask is counted, which is the cranial cavity cross-sectional area in the CT cross-section in units of pixels. The application can significantly improve the efficiency of calculating the cranial cavity cross-sectional area without complicated manual labeling or counting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of medical image segmentation technology, and more specifically, relates to a method and system for calculating the cross-sectional area of ​​the cranial cavity in brain CT images based on cranial CT features. Background Technology

[0002] In recent decades, medical imaging technology has profoundly changed the research paradigm of neuroscience. Leveraging advanced imaging techniques, researchers focus on comparing subtle differences in brain anatomy to uncover morphological features associated with intracranial diseases and injuries, thereby improving the accuracy of clinical diagnosis and the effectiveness of treatment. As the cornerstone of medical image analysis, medical image segmentation is the most crucial and critical step in achieving accurate analysis and subsequent diagnosis and treatment.

[0003] With advancements in computed tomography (CT) technology, CT images provide high-resolution, three-dimensional (3D) medical images that reflect the attenuation coefficients of internal tissues. Researchers and clinicians are increasingly focused on how to utilize this technology to accurately differentiate between bones, soft tissues, and the vascular system, thereby enabling effective identification of lesion areas, bleeding sites, and calcified tissues. These studies, based on pathological morphology and density changes, heavily rely on the precise processing of CT images. Medical image segmentation technology provides automated or semi-automated methods for extracting specific anatomical structures and lesion areas from multi-parameter CT images.

[0004] However, in the field of forensic identification, the imaging samples provided by the client are often pre-printed CT films or digital images, and DICOM format CT data files cannot be provided, making it impossible to obtain 3D CT images. Therefore, computer-aided segmentation technology for two-dimensional (2D) images is very important.

[0005] The traditional method for calculating the cross-sectional area of ​​the cranial cavity using CT scans mainly involves the evaluator observing the 2D tomographic images and estimating the area by plotting or measuring the major and minor axes on graph paper. This method is time-consuming, labor-intensive, increases the burden of image interpretation, and is inefficient. Summary of the Invention

[0006] In view of the above-mentioned defects or improvement needs of the prior art, the present invention provides a method and system for calculating the cross-sectional area of ​​the cranial cavity in brain CT images based on skull CT features, the purpose of which is to improve the calculation efficiency of the cross-sectional area of ​​the cranial cavity in brain CT images.

[0007] According to the present invention, a method for calculating the cross-sectional area of ​​the cranial cavity in a brain CT scan based on cranial CT features is provided, comprising: S1. Binarize the brain CT cross-sectional image and then perform a closing operation; extract the skull contour from the image after the closing operation based on the physiological characteristics of the skull. S2. Based on the skull contour, all pixels enclosed by the contour are designated as Mask 1; an adaptive mapping relationship between the CT values ​​and grayscale values ​​of each pixel in the normalized brain CT cross-sectional image is constructed, and pixels in Mask 1 that conform to the skull CT features are designated as Mask 2; a difference operation is performed on Mask 1 and Mask 2 to obtain a difference mask containing the cranial cavity; connected component labeling is performed on the difference mask, the pixel area of ​​each connected component is counted, the connected component with the largest area is selected as the main region of the cranial cavity, the outer contour is extracted from the main region of the cranial cavity, the outer contour is used as the boundary of the cranial cavity, and the interior of the contour is filled to generate a complete and closed cranial cavity mask; the number of non-zero pixels in the binarized pixels of the cranial cavity mask is counted, which is the cross-sectional area of ​​the cranial cavity in pixels in the CT cross-section.

[0008] Preferably, the process of constructing the adaptive mapping relationship specifically includes: Within a mask area, the grayscale values ​​of all valid pixels are extracted to construct a grayscale histogram; the grayscale histogram is smoothed; local maxima of the smoothed grayscale histogram are detected as candidate peaks, and a baseline peak is selected from the candidate peaks, i.e., the minimum peak value of the candidate peaks is taken as the grayscale value corresponding to air. The maximum peak value is taken as the gray value corresponding to bone. Establish a linear mapping relationship between grayscale values ​​and CT values: slope It is calculated using the following formula:

[0009] intercept It is calculated using the following formula:

[0010] CT value conversion is calculated using the following formula:

[0011] in: The CT value corresponding to bone density. The CT value corresponding to air. coordinates [ x,y The CT value corresponding to the pixel. coordinates [ x,y The gray value of a pixel in the normalized input image.

[0012] Preferably, the selection of the reference peak value specifically includes: Construct a histogram for the entire normalized grayscale image, and set... The gray levels of this grayscale histogram i The number of pixels, ; The grayscale histogram is smoothed:

[0013] in The gray levels of the smoothed grayscale histogram i The number of pixels, N The kernel length for smoothing; Traversing the smoothed histogram Detecting local maxima; Let the grayscale index set be {0,1,…,255}, for index... When the following three conditions are met, i Record the candidate peak set P: ,

[0014] Peak point Greater than its left neighbor and right neighbor And its magnitude exceeds the maximum value of the histogram. 3%; The gray value corresponding to the air The minimum value in set P, the gray value corresponding to the bone. The maximum value in the set P.

[0015] Preferably, the value of N is in the range of 3-7.

[0016] Preferably, before the binarization process, the brain CT cross-sectional image is further subjected to grayscale conversion and contrast enhancement.

[0017] Preferably, the grayscale conversion specifically involves linearly normalizing all channels of the brain CT cross-sectional image and mapping them to an 8-bit unsigned integer space; the pixels of the brain CT cross-sectional image are set to... Mapped pixels The calculation formula is as follows:

[0018] in, and These are the minimum and maximum gray values ​​in the cross-sectional image of the brain CT scan, respectively.

[0019] Preferably, the contrast enhancement is achieved by processing the grayscale image using a histogram equalization algorithm; the formula for this histogram equalization algorithm is:

[0020] in, Represents the first element in the grayscale image. grayscale value; This represents the output after equalization processing. grayscale value; This represents the total number of pixels in the grayscale image. This indicates that the grayscale value in the image after grayscale conversion is... The number of pixels, Represents grayscale level The probability density in the grayscale image L It is a constant.

[0021] Preferably, the connected component label is an eight-adjacent connected component label.

[0022] According to another aspect of the present invention, a system for calculating the cross-sectional area of ​​the cranial cavity in a brain CT scan based on cranial CT features is provided, comprising: Skull contour extraction module: used to binarize brain CT cross-sectional images and then perform a closing operation; extracts the skull contour from the closed image based on the physiological characteristics of the skull. The cranial cavity cross-sectional area calculation module is used to: 1. Denote all pixels enclosed by the skull contour as Mask 1; 2. Construct an adaptive mapping relationship between the CT values ​​and grayscale values ​​of each pixel in the normalized brain CT cross-sectional image; 3. Denote pixels in Mask 1 that conform to the skull CT features as Mask 2; 4. Perform a difference operation on Mask 1 and Mask 2 to obtain a difference mask containing the cranial cavity; 5. Perform connected component labeling on the difference mask, count the pixel area of ​​each connected component, select the connected component with the largest area as the main cranial cavity region, extract the outer contour of the main cranial cavity region, use the outer contour as the cranial cavity boundary, and fill the interior of the contour to generate a complete and closed cranial cavity mask; 6. Count the number of non-zero pixels in the binarized pixels of the cranial cavity mask, which is the cranial cavity cross-sectional area in pixels of the CT cross-section.

[0023] In summary, compared with the prior art, the above-described technical solutions conceived by this invention mainly possess the following technical advantages: (1) This invention provides a fast, hardware-independent method for calculating the cross-sectional area of ​​the cranial cavity from brain CT images with skull CT features. By acquiring the brain CT cross-section and extracting the skull contour, combined with the anatomical and morphological features of the skull, the cranial cavity is segmented quickly and with high precision. All pixels enclosed by the contour are recorded as mask one. An adaptive mapping relationship is constructed from the CT value of the brain CT cross-section image to the gray value of the brain CT cross-section image. According to this mapping relationship, the pixels in mask one that conform to the skull CT features are recorded as mask two. A difference operation is performed on mask one and mask two to obtain a difference mask containing the cranial cavity. Connected component labeling is performed on the difference mask, the pixel area of ​​each connected component is counted, the connected component with the largest area is selected as the main region of the cranial cavity, the outer contour of the main region of the cranial cavity is extracted, the outer contour is used as the boundary of the cranial cavity, and the interior of the contour is filled to generate a complete and closed cranial cavity mask. The number of non-zero pixels in the cranial cavity mask is counted, which is the cross-sectional area of ​​the cranial cavity in pixels in the CT cross-section. This invention eliminates the need for tedious manual labeling or counting, significantly improving the efficiency of cranial cavity cross-sectional area calculation, and exhibits good stability even in areas with interference such as hematoma or gas-fluid mixed lesions.

[0024] (2) This invention eliminates the dependence on original medical image electronic data in traditional methods. Input data can be obtained by simply taking pictures of CT films with digital images or using general photography equipment, which greatly reduces the threshold for data acquisition. It is particularly suitable for forensic identification and primary healthcare scenarios where original electronic data cannot be obtained.

[0025] (3) The image processing algorithm used in this invention has low computational complexity and high efficiency, and can run smoothly on ordinary computers and even mobile devices. At the same time, this invention fully considers the interference factors that may occur during the digital image acquisition process, such as uneven lighting and film quality differences, and combines the anatomical morphological characteristics of the skull to ensure the segmentation accuracy in non-standard shooting environments. Attached Figure Description

[0026] Figure 1 This is a technical roadmap of the method for calculating the cross-sectional area of ​​the cranial cavity in brain CT images based on cranial CT features, according to the present invention.

[0027] Figure 2 A flowchart for calculating the cross-sectional area of ​​the cranial cavity in a brain CT scan with interference from a small area of ​​hematoma.

[0028] Figure 3 This is a flowchart for calculating the cross-sectional area of ​​the cranial cavity in a brain CT scan with gas-liquid mixing interference.

[0029] Figure 4 This is a flowchart for calculating the cross-sectional area of ​​the cranial cavity in a brain CT scan with large-area hematoma interference. Detailed Implementation

[0030] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0031] Example 1 A method for calculating the cross-sectional area of ​​the cranial cavity in brain CT images based on skull CT features. Figure 1 This is a technical roadmap of the method for calculating the cross-sectional area of ​​the cranial cavity in brain CT images based on skull CT features, which includes the following steps: Step (1): Obtain digital images of brain CT scans. First, using any imaging device capable of capturing and saving digital images (including but not limited to scanners, cameras, and mobile phones with camera functions), digitize the CT scans under good imaging conditions, ensuring clear imaging without artifacts, trailing, glare, distortion, etc.; the image resolution and contrast should be sufficient to distinguish the skull edges. The scan area should cover the entire CT scan. Alternatively, existing CT digital images can be used directly.

[0032] Step (2): Manually select the CT cross-sectional images to be calculated. Since a CT scan contains multiple layers, this step involves manually cropping a specific, clinically significant CT slice from the scanned digital image, as specified by the evaluator or clinician. This operation aims to eliminate interference from CT scan edge information and other slices, providing a single target area for subsequent accurate calculations.

[0033] Step (3): Perform data preprocessing on the CT cross-sectional images to be calculated. To improve the accuracy of feature recognition by the computer, the segmented image is processed as follows: S1: Grayscale Conversion: To eliminate lighting differences caused by shooting from different devices, all channels of the original image are linearly normalized and mapped to an 8-bit unsigned integer (uint8) space. Let the original image have 100 pixels. Converted pixels The calculation formula is as follows:

[0034] in, and These are the minimum and maximum grayscale values ​​in the original image, respectively; this step ensures data consistency in subsequent processing. The image is then converted to grayscale.

[0035] S2: Contrast Enhancement: To enhance the contrast of CT images and make the separation of bone structures from the soft tissue background clearer, a histogram equalization algorithm is used to process the original image. This algorithm adjusts the gray-level histogram of the original image to an approximately uniform distribution through nonlinear transformation.

[0036]

[0037] in Represents the first in the original image grayscale value; This represents the output after equalization processing. grayscale value; Indicates the total number of pixels in the image. This indicates that the grayscale value in the original image is The number of pixels, Represents grayscale level Probability density in the original image; Through the above transformation function The densely distributed gray levels in the original image are stretched, while the sparsely distributed gray levels are compressed. This process makes the histogram of the processed image approximately uniformly distributed across the entire gray range, thereby maximizing the dynamic range of the image, significantly improving the detail clarity in low-contrast areas, and providing a higher quality data foundation for subsequent threshold segmentation.

[0038] Step (4): Use threshold segmentation to initially screen skulls and perform a closing operation on the results. Utilizing the distribution characteristics of the skull in high grayscale regions, a specific threshold is set for segmentation to extract high-brightness areas. The segmented area primarily consists of the skull, but may also include nasal bones, ethmoid sinuses, frontal sinuses, and other bone tissues. Subsequently, a closing operation (dilation followed by erosion) is performed on the binarized segmented result. This operation fills in any small cavities that may exist in the skull image and connects minor breaks caused by scanning or lesions, forming a continuous, closed ring-shaped region of the skull. The mathematical definition of this closing operation is as follows:

[0039] in, This represents the original binarized image that has been segmented. Represents the selected structural element; symbol This represents the dilation operator. This represents the erosion operator. This operation smooths image contours, fuses narrow discontinuities, and fills gaps smaller than the structuring element, thereby ensuring that the skull forms a continuous, closed ring-shaped region.

[0040] Step (5): Locate the skull outline Based on the image after the closing operation, the contour of the skull is extracted using a contour detection algorithm based on the physiological characteristics of the skull; the algorithm extracts the outer boundary of the skull by scanning the topological connectivity of pixels.

[0041] Step (6): Calculate the contour area and save it as a mask. Based on the outermost closed contour detected in step (5), the sum of all pixels enclosed by the contour is calculated to obtain the total area (in pixels), and a binary mask image is generated, which is denoted as mask one. At this time, mask one not only includes the cranial cavity, but also the pixel region of the skull itself.

[0042] Step (7): Adaptive HU value calibration and bone mask extraction based on skull CT features The core of this step lies in utilizing the characteristics of skull CT images to automatically identify the grayscale peaks corresponding to air and bone, thereby establishing an adaptive HU value conversion relationship and eliminating interference from other non-bone structures near the cranial cavity.

[0043] According to clinical medical data, the Hue value (HU) of air in CT images is approximately -1000, while that of dense bone is approximately +1000. However, due to differences in tube voltage, reconstruction algorithms, and window width and level settings among different CT devices, the same HU value may correspond to different grayscale values ​​in different images. Therefore, the system does not adopt a fixed grayscale-HU mapping relationship, but rather adaptively determines the grayscale reference for air and bone by analyzing the grayscale histogram distribution of the current image.

[0044] The specific process is as follows: S7.1 Extraction of Region of Interest Histogram Construct a histogram of the entire normalized grayscale image, setting a grayscale histogram with 256 levels. .

[0045] S7.2 Histogram Smoothing (Moving Average Filter) To eliminate local fluctuations caused by noise, the histogram is smoothed: Let the original grayscale histogram be...

[0046]

[0047] in The histogram after smoothing, at the boundaries ( i =0,1,254,255) Keep the original values, and the kernel length is 5.

[0048] S7.3 Peak Detection Traversing the smoothed histogram Detecting local maxima; let the grayscale index set be {0,1,…,255}, for index... When the following three conditions are met, i Record the candidate peak set P: ,

[0049] That is, the peak point must be greater than its left and right neighboring points, and its amplitude must exceed 3% of the maximum value of the histogram (amplitude threshold) to exclude false peaks formed by small fluctuations.

[0050] grayscale value corresponding to air The minimum value in set P, the gray value corresponding to bone. The maximum value in set P.

[0051] S7.4 Adaptive HU value linear calibration Based on the two detected benchmark peaks, a linear mapping relationship from grayscale values ​​to HU values ​​is established: Slope:

[0052] intercept:

[0053] HU value conversion:

[0054] coordinates [ x,y The gray value of a pixel in the normalized input image.

[0055] This adaptive calibration ensures that the HU values ​​for air and bone in the current image are anchored at -1000 and +1000, respectively, eliminating systematic biases caused by equipment differences.

[0056] S7.5 Bone mask extraction (mask secondary generation) Within the mask area, pixels with HU values ​​matching bone characteristics are selected to generate a binary mask: S7.6 Morphological Closure Operation Perform morphological closing operations on mask 2 to fill the tiny pores inside the bone region and smooth the boundaries: Mask 2 theoretically represents the area occupied by the osteoid region in the image after HU value calibration, eliminating interference from non-bone structures such as soft tissue and cerebrospinal fluid near the cranial cavity.

[0057] Step (8): Extraction and quantification of cranial cavity cross-sectional area This step aims to isolate the cranial cavity region from Mask 1 (skull + cranial cavity region) and calculate its cross-sectional area.

[0058] S8.1 Preliminary extraction of the cranial cavity region Perform a difference operation on mask one and mask two to obtain a preliminary difference mask that includes the cranial cavity and any possible non-bone spaces, i.e., retain the pixel area within the range of mask one that is not covered by mask two.

[0059] S8.2 Maximum Connectivity Component Filtering Eight-adjacent connected component labeling is performed on the initial differential mask, and the pixel area of ​​each connected component is calculated. The connected component with the largest area is selected as the main cranial cavity region. Small discrete regions caused by segmentation errors, noise, or vascular gaps are removed to obtain a refined cranial cavity mask.

[0060] S8.3 Contour Extraction and Filling The outer contour of the processed mask is extracted, the contour is selected as the boundary of the cranial cavity, and the interior of the contour is filled to generate a complete and closed binary mask of the cranial cavity.

[0061] S8.4 Calculation of Cranial Cavity Cross-sectional Area The number of non-zero pixels in the final binary mask of the cranial cavity is counted, which represents the cross-sectional area of ​​the cranial cavity in the CT scan (in pixels). This result eliminates the influence of skull thickness and morphology, enabling precise quantification of the cranial cavity space in the corresponding tomographic sections of a 2D image.

[0062] Example 2 This embodiment uses a brain CT scan image with interference from a small area of ​​hematoma as an example. The data comes from the CT scan carried by the patient. The scan image resolution is 4K. The required calculation section is selected as the input image, and the method for calculating the cross-sectional area of ​​the cranial cavity in a brain CT scan based on skull CT features in Embodiment 1 is executed. The intermediate result is shown in the figure. Figure 2 As shown, from left to right, the input image, mask one image, mask two image, and a schematic diagram of the cranial cavity area are displayed. Small hematomas appear as focal high-density shadows on CT images, higher than brain tissue; due to the influence of the CT window width and level, their grayscale is close to that of parts of the skull, such as... Figure 2As shown in the third image, a small number of hematoma pixels still meet the extraction conditions of Mask 2 after calibration and screening in step (7), and are incorporated into Mask 2. This method eliminates the influence of this misclassification through the cascade processing in step (8): After the difference operation in step (8) S8.1, the hematoma area incorporated into Mask 2 forms only an isolated cavity completely surrounded by the brain tissue area in the cranial cavity mask, without destroying the connectivity of the main cranial cavity area; S8.2 The maximum connected domain screening retains the main cranial cavity, and the hematoma cavity does not constitute independent connected domain competition; S8.3 The outer boundary contour of the main cranial cavity is extracted and the inside of the contour is filled as a whole. The cavity caused by the hematoma is completely filled back with the filling operation and re-included in the cranial cavity area. Therefore, even if the high-density lesion is misclassified into the bone mask in step (7), the cranial cavity space it occupies will not be lost from the final area, indicating that this method has the fault tolerance capability for local misclassification of Mask 2, and the measurement result of the cranial cavity cross-sectional area is not affected by small-area hematomas.

[0063] Example 3 This embodiment uses a brain CT scan image with gas-liquid mixing interference as an example. The data comes from the CT scan carried by the patient. The scan image resolution is 4K. The required calculation section is selected as the input image, and the method for calculating the cross-sectional area of ​​the cranial cavity in a brain CT scan based on skull CT features in Embodiment 1 is executed. The intermediate effect is shown in the figure below. Figure 3 As shown, from left to right, the input image, mask one image, mask two image, and a schematic diagram of the cranial cavity area are displayed. Intracranial pneumothorax is located in the upper left of the image, with a CT value of approximately -1000 HU, consistent with the background air outside the skull. This method eliminates this interference through the following mechanism: In step (7) S7.1, the air grayscale reference of the histogram of the entire image is taken from the effective peak of the lowest grayscale side. The CT value of intracranial pneumothorax is consistent with that of the background air, which only enhances the air peak and does not cause the air peak to be misaligned. The adaptive calibration in S7.4 remains stable when pneumothorax is present. In S7.5, the CT value of the pneumothorax area is much lower than the bone screening condition after calibration and is deterministically excluded from mask two—as shown in the image. Figure 3 As shown in the third image, the frontal bony ring adjacent to the pneumothorax is intact and clear, unaffected by the pneumothorax, and the interference is eliminated during the mask generation stage. In step (8), the pneumothorax region is located within the mask one area and does not belong to mask two. After the differential operation, it is a non-bone pixel along with the surrounding brain tissue region, naturally connected to each other, and together constitutes the main connected domain of the cranial cavity. It is retained after screening in S8.2 and fully included in the contour filling in S8.3. Since the pneumothorax is anatomically part of the cranial cavity contents, the space it occupies is included in the cross-sectional area of ​​the cranial cavity, which is in line with the clinical definition. The gas-fluid mixing interference does not affect the measurement results.

[0064] Example 4 This embodiment uses a brain CT scan image with large-area hematoma interference as an example. The data comes from the CT scan carried by the patient. The scan image resolution is 4K. The required calculation section is selected as the input image, and the method for calculating the cross-sectional area of ​​the cranial cavity in a brain CT scan based on skull CT features in Embodiment 1 is executed. The intermediate result is shown in the figure. Figure 4 As shown, from left to right, the input image, mask one image, mask two image, and a schematic diagram of the cranial cavity area are displayed. Large hematomas are large in volume and high in density, and often adhere to the inner table of the skull. In the fixed gray-scale threshold method, they are easily confused with the gray scale of the skull and are included in the bone area, resulting in a serious underestimation of the cranial cavity area. This method eliminates this interference through the following mechanism: Step (7) does not rely on the fixed gray-scale threshold, but instead adaptively calibrates the gray scale of the current image to the CT space through S7.1 to S7.4. The hematoma and bone are clearly distinguished in the CT space. No matter how the CT window width and window level change, the hematoma does not meet the CT value condition of bone in S7.5 and will not enter mask two. Even if the hematoma adheres to the inner table of the skull, the extraction of mask two is based only on the calibrated CT value and is not related to the spatial position. The skull contour remains intact. In step (8), the hematoma region is retained within the cranial cavity region after differential operation. After S8.3, the outer contour of the main body of the cranial cavity is filled as a whole, and the cranial cavity space occupied by the hematoma is fully included. It should be noted that if the hematoma causes a space-occupying effect that leads to compression and deformation of brain tissue, this method measures the actual cross-sectional area of ​​the cranial cavity (including the hematoma space-occupying area) of the cross-section, which conforms to the clinical definition of cranial cavity space quantification, and the measurement results are stable and reliable.

[0065] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for calculating the cross-sectional area of ​​the cranial cavity in brain CT images based on skull CT features, characterized in that, include: S1. Binarize the brain CT cross-sectional image and then perform a closing operation; Skull contours are extracted from images processed by closing operations based on the physiological characteristics of the skull. S2. Based on the skull contour, all pixels enclosed by the contour are designated as Mask 1; an adaptive mapping relationship between the CT value and gray value of each pixel in the normalized brain CT cross-sectional image is constructed, and pixels in Mask 1 that conform to the skull CT features are designated as Mask 2; a difference operation is performed on Mask 1 and Mask 2 to obtain a difference mask containing the cranial cavity. Connected component labeling is performed on the differential mask, the pixel area of ​​each connected component is counted, the connected component with the largest area is selected as the main cranial cavity region, the outer contour of the main cranial cavity region is extracted, the outer contour is used as the cranial cavity boundary, and the interior of the contour is filled to generate a complete and closed cranial cavity mask. The number of non-zero pixels in the binarized pixels of the cranial cavity mask is the cross-sectional area of ​​the cranial cavity in pixels in the CT cross section.

2. The method for calculating the cross-sectional area of ​​the cranial cavity in a brain CT scan based on skull CT features as described in claim 1, characterized in that, The construction of the adaptive mapping relationship specifically includes: Within a mask area, the grayscale values ​​of all valid pixels are extracted to construct a grayscale histogram; the grayscale histogram is smoothed; local maxima of the smoothed grayscale histogram are detected as candidate peaks, and a baseline peak is selected from the candidate peaks, i.e., the minimum peak value of the candidate peaks is taken as the grayscale value corresponding to air. The maximum peak value is taken as the gray value corresponding to bone. Establish a linear mapping relationship between CT values ​​and grayscale values: slope It is calculated using the following formula: intercept It is calculated using the following formula: CT value conversion is calculated using the following formula: in: The CT value corresponding to bone density. The CT value corresponding to air. coordinates [ x,y The CT value corresponding to the pixel. coordinates [ x,y The gray value of a pixel in the normalized input image.

3. The method for calculating the cross-sectional area of ​​the cranial cavity in a brain CT scan based on skull CT features as described in claim 2, characterized in that, The selection of the benchmark peak value specifically includes: Construct a histogram for the entire normalized grayscale image, and set... The gray levels of this grayscale histogram i The number of pixels, ; The grayscale histogram is smoothed: in The gray levels of the smoothed grayscale histogram i The number of pixels, N The kernel length for smoothing; Traversing the smoothed histogram Detecting local maxima; Let the grayscale index set be {0,1,…,255}, for index... When the following three conditions are met, i Record the candidate peak set P: , Peak point Greater than its left neighbor and right neighbor And its magnitude exceeds the maximum value of the histogram. 3%; The gray value corresponding to the air The minimum value in set P, the gray value corresponding to the bone. The maximum value in the set P.

4. The method for calculating the cross-sectional area of ​​the cranial cavity in a brain CT scan based on skull CT features as described in claim 3, characterized in that, The N The value range is 3-7.

5. The method for calculating the cross-sectional area of ​​the cranial cavity in a brain CT image based on skull CT features as described in claim 1, characterized in that, Before the binarization process, the brain CT cross-sectional image is further subjected to grayscale conversion and contrast enhancement.

6. The method for calculating the cross-sectional area of ​​the cranial cavity in a brain CT image based on skull CT features as described in claim 5, characterized in that, The grayscale conversion specifically involves linearly normalizing all channels of the brain CT cross-sectional image and mapping them to an 8-bit unsigned integer space; the pixel size of the brain CT cross-sectional image is set to... Mapped pixels The calculation formula is as follows: in, and These are the minimum and maximum gray values ​​in the cross-sectional image of the brain CT scan, respectively.

7. The method for calculating the cross-sectional area of ​​the cranial cavity in a brain CT image based on skull CT features as described in claim 6, characterized in that, The contrast enhancement is achieved by processing the grayscale image using a histogram equalization algorithm; the formula for this histogram equalization algorithm is as follows: in, Represents the first grayscale value in the image. grayscale value; This represents the output after equalization processing. grayscale value; This represents the total number of pixels in the grayscale image. This indicates that the grayscale value in the image after grayscale conversion is... The number of pixels, Represents grayscale level The probability density in the grayscale image L It is a constant.

8. The method for calculating the cross-sectional area of ​​the cranial cavity in a brain CT scan based on skull CT features as described in claim 1, characterized in that, The connected component is labeled as an eight-adjacent connected component.

9. A system for calculating the cross-sectional area of ​​the cranial cavity in brain CT images based on skull CT features, characterized in that, include: Skull contour extraction module: used to binarize brain CT cross-sectional images and then perform closing operations; Skull contours are extracted from images processed by closing operations based on the physiological characteristics of the skull. The cranial cavity cross-sectional area calculation module is used to:

1. Record all pixels enclosed by the skull contour as mask one; 2. Construct an adaptive mapping relationship between the CT value and gray value of each pixel in the normalized brain CT cross-sectional image; 3. Record the pixels in mask one that conform to the skull CT features as mask two; 4. Perform a difference operation on mask one and mask two to obtain a difference mask containing the cranial cavity. Connected component labeling is performed on the differential mask, the pixel area of ​​each connected component is counted, the connected component with the largest area is selected as the main cranial cavity region, the outer contour of the main cranial cavity region is extracted, the outer contour is used as the cranial cavity boundary, and the interior of the contour is filled to generate a complete and closed cranial cavity mask. The number of non-zero pixels in the binarized pixels of the cranial cavity mask is the cross-sectional area of ​​the cranial cavity in pixels in the CT cross section.