Intelligent skull defect area segmentation method based on medical image

By constructing windows in skull CT images and combining the difference evaluation of grayscale histogram and skeleton line angle, combined with adaptive threshold segmentation and grayscale change index, and optimizing template matching algorithm, the skull defect area is accurately located, solving the problem of misjudging osteoporosis in the existing technology, and realizing more accurate defect segmentation and personalized surgical planning.

CN121259005AActive Publication Date: 2026-01-02XIAN NEURODOME MEDICAL TECHNOLOGY CO LTD

Patent Information

Application Number
CN202511836515.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-08
Publication Date
2026-01-02
Estimated Expiration
2045-12-08

AI Technical Summary

Technical Problem

Existing template-matching-based methods for segmenting skull defects cannot accurately define abnormal areas at the pathological level and are prone to misidentifying osteoporosis as defect areas, affecting the accuracy of personalized implant design and the safety of surgical planning.

Method used

By constructing a window centered on each pixel and combining the Bach distance of the grayscale histogram with the angle of the skeleton line, a difference evaluation index is obtained. By combining OTU adaptive threshold segmentation and grayscale change index, suspected skull defect areas are screened out, and region growth segmentation is performed to optimize the traditional template matching algorithm.

Benefits of technology

It improves the segmentation accuracy of skull defect areas in skull CT images, reduces misdiagnosis of osteoporosis, provides reliable defect segmentation reference, and provides accurate anatomical reference for personalized implant design and surgical planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121259005A_ABST
    Figure CN121259005A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, in particular to a skull defect area intelligent segmentation method based on a medical image. The method comprises the following steps: acquiring a to-be-analyzed image and a template image of the brain; constructing a window by taking each pixel point as a center; obtaining a difference evaluation index of two windows with the same positions of the to-be-analyzed image and the template image; acquiring a skeleton line in the template image, acquiring pixel points corresponding to the pixel points in the template image on the skeleton line, and then obtaining included angles of the pixel points in the to-be-analyzed image; acquiring a neighborhood window of each window of the to-be-analyzed image, and judging whether each window is an initial abnormal window or not; judging whether each initial abnormal window is a suspected skull defect window or not; judging whether the suspected skull defect window is an abnormal window or not according to the gray level change condition of the pixel points in the suspected skull defect window; and segmenting the to-be-analyzed image according to the abnormal window to obtain a skull defect area. According to the method, the craniocerebral defect area can be effectively segmented.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, in particular to a skull defect region intelligent segmentation method based on medical images. BACKGROUND

[0002] The skull, as an important bone structure for protecting the brain, its integrity and airtightness are the key physical barriers to ensure the normal operation of the central nervous system. A complete skull can maintain a stable intracranial environment and effectively buffer external impact. However, skull abnormalities caused by trauma, surgery or disease can destroy this airtightness, not only making the brain lose local protection, but also possibly causing intracranial content dynamics disorder, leading to complications such as "flap depression" or "brain bulge", which seriously affects the patient's neurological function and quality of life. Therefore, accurate segmentation and evaluation of the skull abnormal region is a prerequisite for individualized skull repair planning, implant design and surgical outcome evaluation. At present, the template matching-based algorithm is widely used for intelligent segmentation of skull abnormal regions in medical images. The core of this method is to use the accurate three-dimensional spatial registration and pixel-level comparison between the healthy skull template and the patient's skull, and finally identify and segment the abnormal region by calculating the morphological and gray level difference between the two, so as to provide accurate anatomical reference for subsequent repair surgery.

[0003] The existing skull defect segmentation method based on template matching can effectively identify the abnormal region with density or shape difference from the standard template, but has obvious clinical limitations: it can only complete the preliminary positioning of the abnormal region, and cannot accurately define the pathology of these abnormalities. Moreover, in actual clinical practice, skull defect is a kind of abnormality, and the osteoporosis characteristics of individual patients due to local bone density sparseness are easily misjudged as defect regions on the image due to the decrease in density. This misjudgment directly leads to the exaggeration of the defect range, which seriously affects the accuracy of subsequent individualized implant design and the safety of surgical planning. SUMMARY

[0004] In order to solve the above technical problems, the purpose of the present application is to provide a skull defect region intelligent segmentation method based on medical images, and the technical solution adopted is as follows:

[0005] An embodiment of the present application provides a skull defect region intelligent segmentation method based on medical images, which comprises:

[0006] Collecting skull CT images and preprocessing to obtain images to be analyzed; using the skull CT images of each healthy person to obtain template images;

[0007] respectively taking each pixel point as a center to construct a window; obtaining a difference evaluation index of two windows in the image to be analyzed according to the similarity of the pixel points in one window of the image to be analyzed and the window in the template image which has the same position as the window.

[0008] extracting the skeleton pixel points in the template image and performing linear fitting to obtain a skeleton line; obtaining a pixel point on the skeleton line corresponding to the minimum value in the distance between a pixel point in the template image and each pixel point on each skeleton line as the corresponding pixel point of the pixel point; making a tangent of the skeleton line through the corresponding pixel point of each pixel point, and taking the included angle between each tangent and the horizontal direction as the included angle of each pixel point in the image to be analyzed which has the same position as the template image.

[0009] obtaining the neighborhood windows of each window in the image to be analyzed according to the included angles of each pixel point in the image to be analyzed; judging whether one window in the image to be analyzed is an initial abnormal window according to the difference evaluation indexes of the window, the neighborhood windows of the window and the window in the template image which has the same position as the window.

[0010] judging whether the initial abnormal window is a suspected skull defect window according to the gray difference of the pixel points in the initial abnormal window and the window in the template image which has the same position as the window; judging whether the suspected skull defect window is an abnormal window according to the gray change of the pixel points in the suspected skull defect window; segmenting the image to be analyzed according to the abnormal window to obtain a skull defect region.

[0011] Preferably, the difference evaluation index of two windows in the image to be analyzed is obtained according to the similarity of the pixel points in one window of the image to be analyzed and the window in the template image which has the same position as the window, and the difference evaluation index comprises:

[0012] quantizing the gray levels into B bins, counting the gray distribution of the pixel points in one window of the image to be analyzed to obtain a gray histogram of the window; calculating the Bhattacharyya distance of the gray histograms of two windows as the difference evaluation index of the two windows according to the frequency of the pixel points of each gray level in the gray histogram of one window of the image to be analyzed and the gray histogram of the window in the template image which has the same position as the window.

[0013] Preferably, the neighborhood windows of each window in the image to be analyzed are obtained according to the included angles of each pixel point in the image to be analyzed, and the method comprises:

[0014] For a window in the image to be analyzed, a half of a difference value between a size of the window and the first preset value is obtained as a basic neighborhood pixel step; a horizontal coordinate and a vertical coordinate of a pixel point located at a center of the window in the image to be analyzed are recorded as a center point horizontal coordinate and a center point vertical coordinate respectively; a sine value and a cosine value of an angle of the pixel point located at the center of the window are recorded as a center point sine value and a center point cosine value respectively; when the angle of the pixel point located at the center of the window is greater than or equal to 90 degrees, a left side neighborhood horizontal coordinate is obtained by subtracting a product of the basic neighborhood pixel step and the center point cosine value from the center point horizontal coordinate, a left side neighborhood vertical coordinate is obtained by adding a product of the basic neighborhood pixel step and the center point sine value to the center point vertical coordinate, and the left side neighborhood horizontal coordinate and the left side neighborhood vertical coordinate form a center point of a left side neighborhood window; a right side neighborhood horizontal coordinate is obtained by adding a product of the basic neighborhood pixel step and the center point cosine value to the center point horizontal coordinate, a right side neighborhood vertical coordinate is obtained by subtracting a product of the basic neighborhood pixel step and the center point sine value from the center point vertical coordinate, and the right side neighborhood horizontal coordinate and the right side neighborhood vertical coordinate form a center point of a right side neighborhood window.

[0015] When the angle of the pixel point located at the center of the window is less than 90 degrees, a left side neighborhood horizontal coordinate is obtained by subtracting a product of the basic neighborhood pixel step and the center point cosine value from the center point horizontal coordinate, a left side neighborhood vertical coordinate is obtained by subtracting a product of the basic neighborhood pixel step and the center point sine value from the center point vertical coordinate, and the left side neighborhood horizontal coordinate and the left side neighborhood vertical coordinate form a center point of a left side neighborhood window; a right side neighborhood horizontal coordinate is obtained by adding a product of the basic neighborhood pixel step and the center point cosine value to the center point horizontal coordinate, a right side neighborhood vertical coordinate is obtained by adding a product of the basic neighborhood pixel step and the center point sine value to the center point vertical coordinate, and the right side neighborhood horizontal coordinate and the right side neighborhood vertical coordinate form a center point of a right side neighborhood window.

[0016] The left side neighborhood window and the right side neighborhood window are neighborhood windows of the window and have the same size as the window.

[0017] Preferably, whether the window is an initial abnormal window is judged according to a difference evaluation index of the window in the image to be analyzed, a difference evaluation index of a neighborhood window of the window and a difference evaluation index of a window at a same position in a template image, comprising:

[0018] A difference evaluation index of a left side neighborhood window of the window in the image to be analyzed, a difference evaluation index of a right side neighborhood window of the window and a difference evaluation index of a window at a same position in a template image are obtained, and a mean value of the difference evaluation indexes corresponding to the left side neighborhood window and the right side neighborhood window is obtained as a neighborhood average difference evaluation index; a difference evaluation index of the window in the image to be analyzed is multiplied by the neighborhood average difference evaluation index and normalized to obtain a local matching score of the window.

[0019] When the local matching score of the window is greater than a first discrimination threshold, the window is an initial abnormal window.

[0020] Preferably, judging whether the initial abnormal window is a suspected skull defect window according to the gray level difference of the pixels in the initial abnormal window and the pixels in the window with the same position in the template image, comprises:

[0021] The OSTU adaptive threshold segmentation algorithm is used to automatically determine the best segmentation threshold by maximizing the inter-class variance, and the pixels in an initial abnormal window are divided into two categories, foreground pixels and background pixels. Similarly, the foreground pixels and background pixels in the window with the same position as the initial abnormal window in the template image are obtained. The pixel difference of the initial abnormal window is obtained by subtracting the number of foreground pixels in the initial abnormal window from the number of foreground pixels in the window with the same position as the initial abnormal window in the template image and normalizing. When the pixel difference of an initial abnormal window is greater than a second discrimination threshold, the initial abnormal window is a suspected skull defect window.

[0022] Preferably, judging whether the suspected skull defect window is an abnormal window according to the gray level variation of the pixels in the suspected skull defect window, comprises:

[0023] The coefficient of variation of the gray level values of the pixels in a suspected skull defect window is obtained and normalized to obtain a first gray level feature. The average of the gradient amplitudes of the pixels in the suspected skull defect window is obtained and normalized to obtain a second gray level feature. The first gray level feature and the second gray level feature are weighted and summed to obtain a gray level variation index of the suspected skull defect window.

[0024] When the gray level variation index of the suspected skull defect window is greater than a third discrimination threshold, the suspected skull defect window is an abnormal window.

[0025] Preferably, segmenting the image to be analyzed according to the abnormal window to obtain a skull defect region, comprises:

[0026] The area covered by each abnormal window in the image to be analyzed is recorded as an area to be analyzed; the area in the template image having the same position as each area to be analyzed in the image to be analyzed is recorded as a template area; edge detection is performed on the template area to obtain a healthy skull edge; the healthy skull edge in each template area is respectively mapped into the area to be analyzed having the same position as the template area to obtain the healthy skull edge in each area to be analyzed; the pixel point having the smallest gray value in the healthy skull edge in each template area is respectively mapped into the area to be analyzed having the same position as the template area as an initial seed point of each area to be analyzed; region growing is performed in each area to be analyzed based on the healthy skull edge and the initial seed point in each area to be analyzed to obtain a skull defect area in each area to be analyzed, and the healthy skull edge in each area to be analyzed is taken as a growth stop condition of the region growing.

[0027] The embodiment of the present application has at least the following beneficial effects: the present application collects a skull CT image and pre-processes to obtain an image to be analyzed, and then based on the skull CT image of a healthy population; then a window is constructed with each pixel point as the center; the difference evaluation index of two windows in the image to be analyzed is obtained according to the similarity of the pixel points in one window of the image to be analyzed and the window in the template image having the same position as the window; further, the skeleton pixel points in the template image are extracted and linear fitting is performed to obtain a skeleton line, and then the corresponding pixel point of one pixel point in the template image on the skeleton line is obtained; the tangent of the skeleton line is made through the corresponding pixel point of each pixel point, and the included angle between each tangent and the horizontal direction is taken as the included angle of each pixel point in the image to be analyzed having the same position as the template image; the neighborhood window of each window in the image to be analyzed is obtained according to the included angle of each pixel point in the image to be analyzed; whether the window is an initial abnormal window is judged according to the difference evaluation index of one window, the neighborhood window of the window and the window in the template image having the same position as the window, and the traditional template matching algorithm is optimized in combination with the growth extension direction of the skull, so that the initial abnormal window located on the skull is accurately positioned.

[0028] Finally, whether the initial abnormal window is a suspected skull defect window is judged according to the gray difference of the pixel points in the initial abnormal window and the window in the template image having the same position as the window, and whether the suspected skull defect window is an abnormal window is judged according to the gray change of the pixel points in the suspected skull defect window, so that the window containing the skull defect is further determined from the abnormal condition of the pixel points in the window, and then the image to be analyzed is segmented according to the abnormal window to obtain a skull defect area, which provides a reliable reference for the final defect segmentation positioning and improves the accuracy of the skull defect area segmentation in the skull CT image. BRIEF DESCRIPTION OF DRAWINGS

[0029] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings in the following description only constitute some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.

[0030] Figure 1 A method flow chart of a skull defect region intelligent segmentation method based on medical images provided by the embodiments of the present application;

[0031] Figure 2 A first schematic diagram of a neighborhood window of a skull defect region intelligent segmentation method based on medical images provided by the embodiments of the present application;

[0032] Figure 3 A second schematic diagram of a neighborhood window of a skull defect region intelligent segmentation method based on medical images provided by the embodiments of the present application. DETAILED DESCRIPTION

[0033] In order to further illustrate the technical means and effects adopted by the present application to achieve the predetermined object, the specific embodiments, structure, features and effects of a skull defect region intelligent segmentation method based on medical images according to the present application are described in detail as follows in combination with the drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures or characteristics in one or more embodiments can be combined in any suitable form.

[0034] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs.

[0035] The specific scheme of a skull defect region intelligent segmentation method based on medical images provided by the present application is described in detail below in combination with the drawings.

[0036] Embodiment: The main application scenario of the present application is: the present application optimizes the traditional template matching algorithm by combining the growth extension direction of the skull, so as to accurately position the abnormal area on the skull, and further extract the suspected skull defect region and distinguish the real osteoporosis skull from the real skull defect, thereby providing a reliable reference for the positioning of the final defect segmentation.

[0037] Please refer to Figure 1 which shows a method flow chart of a skull defect region intelligent segmentation method based on medical images provided by the embodiments of the present application, and the method comprises the following steps:

[0038] Step S1, collect the skull CT image and pre-process to obtain the image to be analyzed; use the skull CT image of each person in the healthy population to obtain a template image.

[0039] First, the skull CT image of the patient is collected using a clinical standard CT scanner, and the scanning range covers the whole skull region from the top of the skull to the bottom of the skull, ensuring that the possible defect area is completely included. Further, the collected skull CT image is pre-processed to obtain the image to be analyzed, and the pre-processing includes filtering denoising and geometric correction.

[0040] Specifically, the original skull CT image is denoised by median filtering, which effectively suppresses image noise while preserving the sharp edges of the skull structure; median filtering can effectively suppress salt and pepper noise and random noise, while preserving the sharpness of the skull edges, preventing noise from being misjudged as an abnormal area in template matching, and improving the robustness of segmentation. When performing geometric correction, based on the device calibration parameters, the geometric distortion and scanning offset of the image are corrected to ensure the spatial position accuracy of the skull anatomical structure and avoid segmentation errors caused by distortion. Geometric correction eliminates device-related spatial distortion, ensures accurate anatomical alignment of the patient image and the healthy template, reduces segmentation deviation caused by registration error, and lays the foundation for template matching.

[0041] Finally, the skull CT images of the healthy population are also needed to obtain the template image as a reference. Specifically, the skull CT images of each person in the healthy population are obtained, and the healthy population usually has about 20 to 30 people, and then the skull CT images of each person in the healthy population are rigidly registered and pixel-level averaged to generate a representative average healthy skull template as a template image. The template image can capture the typical features of a healthy skull (a healthy skull boundary usually presents smooth, continuous and has a specific anatomical morphology), and effectively reduces the influence of individual random variation.

[0042] Step S2, construct a window centered on each pixel point; obtain the difference evaluation index of the two windows in the image to be analyzed according to the similarity of the pixel points in the window of the image to be analyzed and the window with the same position in the template image.

[0043] Traditional template matching methods can identify abnormal areas of the skull, but it is difficult to effectively distinguish between inwardly concave bone defects and outwardly bulging abnormal hyperplasia of structural lesions. To solve this problem, the application establishes a suspected defect area positioning mechanism based on anatomical features, so the basic method of template matching needs to be designed first.

[0044] Specifically, a window is constructed with each pixel point as the center, and the size of the window is set to N*N. The selection of N usually needs to balance the calculation efficiency and the ability to capture details (a too small window may lose global features, and a too large window may reduce local sensitivity). The present application gives a reference value N=7, aiming to balance the calculation efficiency and coverage density. In actual application, it should be fine-tuned according to the resolution and scene of the CT image. N is set to an odd number to ensure that the center point coordinates can be effectively obtained, facilitating accurate positioning.

[0045] Thus, the windows with the same position in the to-be-analyzed image and the template image can be obtained, and then analyzed. The to-be-analyzed image of the patient is accurately aligned to the spatial coordinate system of the template image using a rigid registration algorithm.

[0046] Then, the difference evaluation index of the two windows in the to-be-analyzed image is obtained according to the similarity of the pixel points in one window of the to-be-analyzed image and the window with the same position in the template image.

[0047] Specifically, the gray level is quantized into B bins, the gray distribution of the pixel points in one window of the to-be-analyzed image is counted to obtain the gray histogram of the window, and the Bhattacharyya distance of the gray histograms of the two windows is calculated according to the frequency of the pixel points of each gray level in the gray histogram of one window of the to-be-analyzed image and the gray histogram of the window with the same position in the template image, as the difference evaluation index of the two windows. The first preset value is 1, and preferably, the value of B in the present application is 16.

[0048] Here, the Bhattacharyya distance of the two gray histograms is calculated by the frequency of the pixel points of each gray level in the gray histograms of the two windows, and the Bhattacharyya distance is used to measure the similarity between the two windows. The greater the value of the Bhattacharyya distance (difference evaluation index), the farther the distance between the window in the to-be-analyzed image and the template density distribution, the lower the similarity, which is more in line with the characteristics of the abnormal region of the skull. The smaller the value, the closer the distance between the window in the to-be-analyzed image and the template density distribution, the higher the similarity, which is more in line with the characteristics of the healthy region of the skull. Using the Bhattacharyya distance can effectively capture the gray distribution difference, avoid relying on a single gray value, and improve the sensitivity to density changes.

[0049] Thus, the difference evaluation index of any two windows with the same position in the to-be-analyzed image and the template image can be obtained.

[0050] Step S3, extracting the skeleton pixel points in the template image and performing linear fitting to obtain the skeleton lines; obtaining the pixel point on the skeleton line corresponding to the minimum value of the distance between each pixel point in the template image and each pixel point on the skeleton line as the corresponding pixel point of the pixel point; making a tangent line of the skeleton line through the corresponding pixel point of each pixel point, and taking the included angle between each tangent line and the horizontal direction as the included angle of each pixel point in the to-be-analyzed image with the same position in the template image.

[0051] The above step obtains the difference evaluation index of any two positions of the same window in the template image and the image to be analyzed, but only simple template matching is considered, and the real growth direction of the skull is not considered, so the neighborhood similarity analysis combined with the real growth direction of the skull is needed to preliminarily identify the abnormal region of the skull.

[0052] Therefore, in the template image, all the skeleton pixels of the skull skeleton are obtained by the Zhang-Suen skeleton extraction algorithm, linear fitting is performed on all the skeleton pixels in the template image, a plurality of fitting curves are obtained, and each fitting curve is used as a skeleton line. The acquisition of the skeleton line is prior art and will not be described in detail here. Therefore, all the skeleton lines in the template image can be obtained.

[0053] Then, the nearest skeleton line of each pixel point in the template image needs to be found, which can represent the skull growth direction of the pixel point. Specifically, for a pixel point in the template image, the distance between the pixel point and each pixel point on each skeleton line is obtained, the pixel point on the skeleton line corresponding to the smallest distance is taken as the corresponding pixel point of the pixel point, and further, the tangent line of the skeleton line passing through the corresponding pixel point of the pixel point is drawn, and the angle between the tangent line and the horizontal direction is the corresponding angle of the pixel point. Therefore, the corresponding angle of each pixel point in the template image can be obtained.

[0054] Next, the corresponding angle of each pixel point in the template image is taken as the angle of each pixel point in the template image with the same position in the template image. The angle can represent the theoretical skull growth direction of each pixel position.

[0055] Step S4, according to the angle of each pixel point in the image to be analyzed, the neighborhood window of each window in the image to be analyzed is obtained; according to the difference evaluation index of a window, the neighborhood window of the window and the window with the same position in the template image, it is judged whether the window is an initial abnormal window.

[0056] The above step obtains the angle of each pixel point in the image to be analyzed, and thus the neighborhood window of each window in the image to be analyzed is obtained according to the angle of each pixel point in the image to be analyzed.

[0057] Specifically, for a window in the image to be analyzed, a half of a difference value between a size of the window and a first preset value is obtained as a basic neighborhood pixel step; a horizontal coordinate and a vertical coordinate of a pixel point located at a center of the window in the image to be analyzed are recorded as a center point horizontal coordinate and a center point vertical coordinate respectively; a sine value and a cosine value of an included angle of the pixel point located at the center of the window are recorded as a center point sine value and a center point cosine value respectively; when the included angle of the pixel point located at the center of the window is greater than or equal to 90 degrees, a left side neighborhood horizontal coordinate is obtained by subtracting a product of the basic neighborhood pixel step and the center point cosine value from the center point horizontal coordinate, a left side neighborhood vertical coordinate is obtained by adding a product of the basic neighborhood pixel step and the center point sine value to the center point vertical coordinate, and the left side neighborhood horizontal coordinate and the left side neighborhood vertical coordinate form a center point of a left side neighborhood window; a right side neighborhood horizontal coordinate is obtained by adding a product of the basic neighborhood pixel step and the center point cosine value to the center point horizontal coordinate, a right side neighborhood vertical coordinate is obtained by subtracting a product of the basic neighborhood pixel step and the center point sine value from the center point vertical coordinate, and the right side neighborhood horizontal coordinate and the right side neighborhood vertical coordinate form a center point of a right side neighborhood window.

[0058] When the included angle of the pixel point located at the center of the window is less than 90 degrees, a left side neighborhood horizontal coordinate is obtained by subtracting a product of the basic neighborhood pixel step and the center point cosine value from the center point horizontal coordinate, a left side neighborhood vertical coordinate is obtained by subtracting a product of the basic neighborhood pixel step and the center point sine value from the center point vertical coordinate, and the left side neighborhood horizontal coordinate and the left side neighborhood vertical coordinate form a center point of a left side neighborhood window; a right side neighborhood horizontal coordinate is obtained by adding a product of the basic neighborhood pixel step and the center point cosine value to the center point horizontal coordinate, a right side neighborhood vertical coordinate is obtained by adding a product of the basic neighborhood pixel step and the center point sine value to the center point vertical coordinate, and the right side neighborhood horizontal coordinate and the right side neighborhood vertical coordinate form a center point of a right side neighborhood window.

[0059] The left side neighborhood window and the right side neighborhood window are neighborhood windows of the window and have the same size as the window.

[0060] For example, the horizontal coordinate and the vertical coordinate of the pixel point located at the center of the window in the image to be analyzed are x and y respectively, and the included angle is θ; when the included angle is greater than or equal to 90 degrees, the coordinates of the center point of the left side neighborhood window of the window are (x-k·cosθ, y+k·sinθ), and the coordinates of the center point of the right side neighborhood window of the window are (x+k·cosθ, y-k·sinθ), as shown in FIG. 1. Figure 2As shown in the figure, 1 is a tangent line, 2 is a window in the image to be analyzed, 3 and 4 are the right and left neighborhood windows of the window respectively; when the included angle is less than 90 degrees, the coordinates of the center point of the left neighborhood window of the window are (x-k*cosθ, y-k*sinθ), and the coordinates of the center point of the right neighborhood window of the window are (x+k*cosθ, y+k*sinθ), as shown in Figure 3 As shown in the figure, 5 is a tangent line, 6 is a window in the image to be analyzed, 7 and 8 are the left and right neighborhood windows of the window respectively.

[0061] sinθ and cosθ are the center point sine value and the center point cosine value respectively, k is the basic neighborhood pixel step, k=(N-1) / 2, which ensures that the neighborhood and the current window are continuous in the anatomical space, avoids the interference of irrelevant regions, and focuses on detecting the skull extension path. The coordinates of the center points of the left and right neighborhood windows are obtained by using the included angle, which aims to overcome the orientation deviation caused by the skeleton pixel points deviating from the fitting curve, so as to ensure that the neighborhood windows are distributed along the skull anatomical path. Thus, the neighborhood windows (left and right neighborhood windows) of each window in the window to be analyzed can be obtained.

[0062] Then, whether the window is an initial abnormal window is determined according to the difference evaluation index of the window in the image to be analyzed, the neighborhood windows of the window and the window at the same position in the template image.

[0063] Specifically, the difference evaluation indexes of the left and right neighborhood windows of a window in the image to be analyzed and the window at the same position in the template image are obtained, and the average of the difference evaluation indexes corresponding to the left and right neighborhood windows is obtained to obtain the neighborhood average difference evaluation index; the difference evaluation index of the window and the window at the same position in the template image is multiplied by the neighborhood average difference evaluation index and normalized to obtain the local matching score of the window.

[0064] The product of the difference evaluation index corresponding to a window in the image to be analyzed and the average difference evaluation index of its neighborhood is calculated, which constitutes a spatial context 'and' logic, that is, only when the window and its neighborhood region both show low similarity, a very low score will be obtained, highlighting the abnormal region. By combining the neighborhood information, the robustness of the anomaly detection is significantly enhanced, the sensitivity to isolated noise is reduced, and the recognition accuracy of the real abnormal region is improved.

[0065] Finally, a first discrimination threshold is set, when the local matching score of a window in the image to be analyzed is greater than the first discrimination threshold, the window is an initial abnormal window, when the local matching score of the window is less than or equal to the first discrimination threshold, the window is a skull health window. The reference value of the first discrimination threshold is 0.7, a higher threshold is set to prioritize specificity, that is, to reduce the misjudgment of healthy tissue as abnormal as much as possible, and the implementer can adjust the first discrimination threshold according to the actual clinical application.

[0066] Thus, the initial abnormal window in the image to be analyzed can be obtained.

[0067] Step S5, judging whether the initial abnormal window is a suspected skull defect window according to the gray level difference of the pixel points in the initial abnormal window and the window in the template image with the same position; judging whether the suspected skull defect window is an abnormal window according to the gray level change of the pixel points in the suspected skull defect window; and segmenting the image to be analyzed according to the abnormal window to obtain a skull defect region.

[0068] After obtaining the screened initial abnormal window, an adaptive segmentation method based on gray level distribution characteristics is used to extract bone pixel points. Since the gray level distribution in a single analysis window naturally presents the double-peak distribution characteristics of bone and background soft tissue, the OSTU adaptive threshold segmentation algorithm can be used to process the pixel points in the initial abnormal window and the window in the template image with the same position. Further, whether the initial abnormal window is a suspected skull defect window is judged according to the gray level difference of the pixel points in the initial abnormal window and the window in the template image with the same position.

[0069] Specifically, the OSTU adaptive threshold segmentation algorithm automatically determines the best segmentation threshold by maximizing the inter-class variance, and divides the pixel points in an initial abnormal window into two categories, foreground pixel points and background pixel points. Similarly, the foreground pixel points and background pixel points in the window in the template image with the same position as the initial abnormal window are obtained. The number of foreground pixel points in the window in the template image with the same position as the initial abnormal window is subtracted from the number of foreground pixel points in the initial abnormal window to obtain the pixel difference of the initial abnormal window. Among them, the pixel points of the high gray value bone in the window are marked as foreground, and the pixel points of the low gray value non-bone are marked as background.

[0070] The calculation model of the pixel difference is specifically:

[0071] ,

[0072] Wherein F represents the pixel difference of an initial abnormal window, is the number of foreground pixel points in the window in the template image with the same position as the initial abnormal window, F is the core index for quantifying the difference between the initial abnormal window and the healthy skull template in the number of foreground pixels. Its core role is to accurately distinguish the two core types of skull abnormalities, inwardly concave skull defects and outwardly bulging other abnormalities, through the comparison of the number of foreground pixels, to provide objective judgment basis for subsequent suspected defect screening. When F tends to 1, it means that the number of foreground pixels in the initial abnormal window is much less than the healthy template. This phenomenon corresponds to the anatomical feature of the skull inwardly concaving. The defect area lacks bone structure, there is no complete skull tissue in the boundary, only soft tissue or cavity, and the number of foreground pixels is significantly reduced, which is consistent with the core morphology of skull defects. When F tends to 0, it means that the number of foreground pixels in the initial abnormal window is greater than the healthy template. This phenomenon corresponds to the anatomical feature of the skull outwardly bulging, such as brain bulging, hyperostosis and other abnormalities, which will cause the local tissue to exceed the boundary of the healthy skull, and the number of pixels will increase, which is completely opposite to the morphology of the defect.

[0073] Therefore, the second discrimination threshold is set. When the pixel difference of an initial abnormal window is greater than the second discrimination threshold, the initial abnormal window is a suspected skull defect window; when the pixel difference of an initial abnormal window is less than or equal to the second discrimination threshold, the initial abnormal window is an other skull abnormal window; the reference value of the second discrimination threshold given by the scheme is 0.5, taking the intermediate value as the initial threshold, which embodies a balance strategy, and can be fine-tuned according to actual clinical needs in actual application. Thus, the suspected skull defect window can be obtained.

[0074] After obtaining the suspected skull defect window, the traditional method is difficult to distinguish the real defect with structure loss from the osteoporosis area with only density reduction. It is necessary to construct a gray level change index by fusing the gray level distribution feature and the edge gradient feature, to make a clear contrast between the osteoporosis area with uniform density and gentle edge and the real defect area with uneven density and sharp edge, so as to realize accurate distinction between the two.

[0075] According to the gray level change of the pixel points in the suspected skull defect window, it is judged whether the suspected skull defect window is an abnormal window. Specifically, the coefficient of variation of the gray level values of the pixel points in the suspected skull defect window is obtained and normalized to obtain a first gray level feature; the average value of the gradient amplitude of the pixel points in the suspected skull defect window is obtained and normalized to obtain a second gray level feature; and the first gray level feature and the second gray level feature are weighted and summed to obtain a gray level change index of the suspected skull defect window.

[0076] The calculation model of the gray level change index is specifically:

[0077] ,

[0078] wherein, a gray level variation index of a suspected skull defect window; and respectively, the ratio of the two is the coefficient of variation of the gray level value in the suspected skull defect window, the osteoporosis region has a relatively uniform distribution of gray level values due to the reduction of bone trabeculae but the structure is preserved, the coefficient of variation of the gray level value is small, the real defect region is often exposed to soft tissue or air due to the loss of bone mass, the gray level value drops sharply and is unevenly distributed, and the coefficient of variation of the gray level value is large, is the first gray level feature; however, in actual CT images, the defect region may be filled with substances such as blood or tissue, resulting in uniform gray levels, while the osteoporosis region still exhibits a higher coefficient of variation of the gray level value due to uneven bone density, so the coefficient of variation needs to be comprehensively judged in combination with gradient information, represents the gradient amplitude of the i-th pixel point in the suspected skull defect window, which refers to the gradient amplitude of the gray level value, which can be calculated by a Sobel operator, is the average gradient amplitude, which quantifies the sharpness of the edge, and the real defect boundary has a clear junction with healthy bone tissue, so the gradient mean value is high, while the density of the osteoporosis region changes slowly, so the gradient mean value is low, is the second gray level feature;

[0079] α is a weight parameter for balancing the contribution degree of the gray level distribution feature and the gradient change feature, and the reference value α = 0.5 is given in the present application, which can be adjusted according to the data distribution in actual application. The gray level variation index combines the gray level distribution feature and the gradient change feature: when the gray level variation index tends to 1, it indicates that the suspected skull defect window has both uneven gray level distribution and relatively sharp edges, so the confidence of the real skull defect is high; when the gray level variation index tends to 0, it indicates that the suspected skull defect window has both uniform gray level distribution and relatively flat edges, so the confidence of the real skull defect is low, which is more consistent with the interference characteristics of osteoporosis.

[0080] A third discrimination threshold is set, when the gray level variation index of the suspected skull defect window is greater than the third discrimination threshold, the suspected skull defect window is an abnormal window, that is, a real skull defect window; when the gray level variation index of the suspected skull defect window is less than or equal to the third discrimination threshold, the suspected skull defect window is determined to be a healthy skull window of osteoporosis; the reference value of the third discrimination threshold is set to 0.7 in the present application, a higher threshold is set to ensure high confidence and strictly select real defects to reduce misjudgment of osteoporosis, which can be fine-tuned according to specific requirements in actual application.

[0081] All the abnormal windows (real skull defect windows) in the image to be analyzed are obtained, and a region growing algorithm is performed in the area covered by all the abnormal windows to obtain the skull defect region.

[0082] Specifically, the area covered by each abnormal window in the image to be analyzed is recorded as an analysis area; the area in the template image with the same position as each analysis area in the image to be analyzed is recorded as a template area; edge detection is performed on the template area to obtain a healthy skull edge; the healthy skull edge in each template area is respectively mapped to the analysis area with the same position as the template area to obtain a healthy skull edge in each analysis area; the pixel point with the smallest gray value in the healthy skull edge in each template area is respectively mapped to the analysis area with the same position as the template area as an initial seed point of the analysis area; and region growing is performed in each analysis area based on the healthy skull edge and the initial seed point in the analysis area to obtain a skull defect region in each analysis area, and the healthy skull edge in each analysis area is taken as a growth stop condition of the region growing.

[0083] In addition, it should be noted that the core growth criterion of the region growing is the gray similarity between pixel points, and after the region growing, post-operation is still needed, morphological operation is performed on the result obtained by the region growing to realize boundary smoothing and hole filling, and the morphological representation of the skull defect region is optimized. On this basis, the area, position, and perimeter of the skull defect region are calculated as quantitative indexes, data support is provided for clinical evaluation of the defect severity and individual implant design, and finally the optimized skull defect region is saved as a binary image mask, which can be used for subsequent three-dimensional reconstruction and surgical planning.

[0084] In summary, the application optimizes the traditional template matching algorithm by combining the growth extension direction of the skull, thereby accurately positioning the initial abnormal window on the skull, further extracting the suspected skull defect window, and distinguishing the real skull from the real skull defect, thereby providing a reliable reference for the positioning of the final defect segmentation.

[0085] It should be noted that the above-mentioned embodiment order of the application is only for description, and does not represent the advantages and disadvantages of the embodiments. The above describes a specific embodiment of the present application. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multi-task processing and parallel processing are also possible or can be advantageous.

[0086] Each embodiment in the present application is described in a progressive manner, and the same or similar parts of each embodiment can be referred to each other. Each embodiment focuses on the differences from other embodiments.

[0087] The above merely describes preferred embodiments of the present application, and is not used to limit the present application, any modification, equivalent replacement, improvement, etc. made within the principle of the present application shall be included in the protection scope of the present application.

Claims

1. An intelligent segmentation method for skull defect regions based on medical images, characterized in that, The method includes: Acquire skull CT images and preprocess them to obtain images to be analyzed; obtain template images using skull CT images of each healthy individual; A window is constructed centered on each pixel. Based on the similarity of pixels within a window in the image to be analyzed and a window in the template image at the same position, a difference evaluation index is obtained between these two windows. This includes: quantizing gray levels into B bins, statistically analyzing the gray-level distribution of pixels within a window in the image to be analyzed, and obtaining the gray-level histogram of that window; calculating the Bach distance between the gray-level histograms of the two windows based on the frequency of pixel occurrence at each gray level in the gray-level histograms of the window in the image to be analyzed and the gray-level histograms of the window at the same position in the template image, which serves as the difference evaluation index between the two windows. Extract skeleton pixels from the template image and perform linear fitting to obtain skeleton lines; obtain the pixel on the skeleton line corresponding to the minimum distance between a pixel in the template image and each pixel on each skeleton line as the corresponding pixel of that pixel; draw tangents to the skeleton lines through the corresponding pixels of each pixel, and take the angle between each tangent and the horizontal direction as the angle between each pixel in the image to be analyzed and the pixel in the same position in the template image. The neighboring windows of each window in the image to be analyzed are obtained according to the included angle of each pixel in the image to be analyzed; the difference evaluation index between a window in the image to be analyzed, its neighboring windows and windows in the same position in the template image is used to determine whether the window is an initial abnormal window; Determine whether the initial abnormal window is a suspected skull defect window based on the grayscale difference of pixels within a window located in the same position as the template image; determine whether the suspected skull defect window is an abnormal window based on the grayscale changes of pixels within the suspected skull defect window; and segment the image to be analyzed based on the abnormal window to obtain the skull defect region.

2. The intelligent segmentation method for skull defect regions based on medical images according to claim 1, characterized in that, The step of obtaining the neighborhood windows of each window in the image to be analyzed based on the included angles of each pixel in the image to be analyzed includes: For a window in the image to be analyzed, half the difference between the window size and a first preset value is used as the basic neighborhood pixel step size. The x-coordinate and y-coordinate of the pixel located at the center of a window in the image to be analyzed are recorded as the x-coordinate and y-coordinate of the center point, respectively. The sine and cosine values ​​of the angle between the pixels located at the center of the window are recorded as the sine and cosine values ​​of the center point, respectively. When the angle between the pixels located at the center of the window is greater than or equal to 90 degrees, the basic neighborhood pixel step size and the cosine value of the center point are subtracted from the x-coordinate of the center point. The product of the values ​​yields the x-coordinate of the left neighborhood. The y-coordinate of the left neighborhood is obtained by adding the product of the basic neighborhood pixel step size and the sine value of the center point to the y-coordinate of the center point. The x-coordinate of the left neighborhood and the y-coordinate of the left neighborhood form the center point of the left neighborhood window. The x-coordinate of the right neighborhood is obtained by adding the product of the basic neighborhood pixel step size and the cosine value of the center point to the x-coordinate of the center point. The y-coordinate of the right neighborhood is obtained by subtracting the product of the basic neighborhood pixel step size and the sine value of the center point from the y-coordinate of the center point. The x-coordinate of the right neighborhood and the y-coordinate of the right neighborhood form the center point of the right neighborhood window. When the angle between the center pixel in the window is less than 90 degrees, the left neighborhood x-coordinate is obtained by subtracting the product of the basic neighborhood pixel step size and the center point cosine value from the center point x-coordinate. The left neighborhood y-coordinate is obtained by subtracting the product of the basic neighborhood pixel step size and the center point sine value from the center point y-coordinate. The left neighborhood x-coordinate and the left neighborhood y-coordinate together form the center point of the left neighborhood window. The right neighborhood x-coordinate is obtained by adding the product of the basic neighborhood pixel step size and the center point cosine value to the center point x-coordinate. The right neighborhood y-coordinate is obtained by adding the product of the basic neighborhood pixel step size and the center point sine value to the center point y-coordinate. The right neighborhood x-coordinate and the right neighborhood y-coordinate together form the center point of the right neighborhood window. The left and right neighboring windows are the neighboring windows of this window, and they are the same size as this window.

3. The intelligent segmentation method for skull defect regions based on medical images according to claim 1, characterized in that, The step of determining whether a window is an initial anomalous window based on the difference evaluation index between a window in the image to be analyzed, its neighboring windows, and windows in the same position in the template image includes: Obtain the difference evaluation indices of the left and right neighboring windows of a window in the image to be analyzed, and the windows at the same positions in the template image. Then, calculate the average difference evaluation index of the difference evaluation indices corresponding to the left and right neighboring windows to obtain the neighborhood average difference evaluation index. Multiply the difference evaluation index of the window with the neighborhood average difference evaluation index and normalize it to obtain the local matching score of the window. When the local matching score of the window is greater than the first discrimination threshold, the window is an initial abnormal window.

4. The intelligent segmentation method for skull defect regions based on medical images according to claim 1, characterized in that, The step of determining whether an initial abnormal window is a suspected skull defect window based on the grayscale difference of pixels within an initial abnormal window and a window at the same position in the template image includes: The OSTU adaptive threshold segmentation algorithm automatically determines the optimal segmentation threshold by maximizing the inter-class variance, dividing the pixels within an initial anomaly window into two categories: foreground pixels and background pixels. Similarly, foreground and background pixels in windows in the template image that are at the same position as the initial anomaly window are obtained. The pixel difference of the initial anomaly window is obtained by subtracting the number of foreground pixels in the initial anomaly window from the number of foreground pixels in the windows in the template image that are at the same position as the initial anomaly window and normalizing the result. When the pixel difference of an initial anomaly window is greater than a second discrimination threshold, the initial anomaly window is considered a suspected skull defect window.

5. The intelligent segmentation method for skull defect regions based on medical images according to claim 1, characterized in that, The step of determining whether a suspected skull defect window is an abnormal window based on the grayscale changes of pixels within the suspected skull defect window includes: The first grayscale feature is obtained by obtaining the coefficient of variation of the grayscale values ​​of each pixel in a suspected skull defect window and normalizing it; the second grayscale feature is obtained by obtaining the average gradient magnitude of each pixel in the suspected skull defect window and normalizing it; the grayscale change index of the suspected skull defect window is obtained by weighted summation of the first grayscale feature and the second grayscale feature. When the grayscale change index of the suspected skull defect window is greater than the third discrimination threshold, the suspected skull defect window is an abnormal window.

6. The intelligent segmentation method for skull defect regions based on medical images according to claim 1, characterized in that, The step of segmenting the image to be analyzed based on the abnormal window to obtain the skull defect region includes: The regions covered by each abnormal window in the image to be analyzed are denoted as the regions to be analyzed. Regions in the template image that are in the same position as the regions to be analyzed in the image to be analyzed are denoted as template regions. Edge detection is performed on the template regions to obtain the edges of healthy skulls. The edges of healthy skulls in each template region are mapped to the regions to be analyzed that are in the same position as the template regions, resulting in the edges of healthy skulls in each region to be analyzed. The pixels with the smallest gray values ​​within the edges of healthy skulls in each template region are mapped to the regions to be analyzed that are in the same position as the template regions, serving as the initial seed points for each region to be analyzed. Based on the edges of healthy skulls and the initial seed points in each region to be analyzed, region growth is performed in each region to obtain the skull defect regions in each region to be analyzed. The edges of healthy skulls in each region to be analyzed serve as the growth stopping condition for region growth.

Citation Information

Patent Citations

  • Intracranial hematoma region segmentation method based on CT image

    CN116485814A

  • Skull defect reconstruction method and device, storage medium and electronic device

    CN118469866A

  • Computer-aided plastic surgery aided navigation method and system

    CN120298437A

  • Method, device, equipment, product and storage medium for identifying skull defect by constructing characteristic spectrum through nuclear magnetic image

    CN120953270A

  • Hole protection cap detection method and apparatus, computer device and storage medium

    WO2021000524A1

Cited By

  • Simulation method and device for craniocerebral growth and storage medium

    CN122046812A