A structure boundary optimization method and system for medical images
Patent Information
- Application Number
- CN202610556326.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-24
- Publication Date
- 2026-08-18
AI Technical Summary
[0004]本申请提出了一种面向医学图像的结构边界优化方法及系统,能够解决现有技术对医学图像中低对比度、较小的边界点定位不够精确的问题
Smart Images

Figure CN122597822A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of computer vision processing technology, specifically relating to a method and system for optimizing the structural boundaries of medical images. Background Technology
[0002] Cephalometrics is a common image processing technique that extracts key points and effective areas from X-ray images of the head to assess the health of head tissues. However, due to the complex internal structure and varying intensity conditions of X-ray images, especially the shadows on deep structures, a single exposure image cannot fully capture the details of all key areas. Highlights are prone to overexposure, while shadows lose detail, resulting in medical images that cannot provide accurate clinical diagnostic information.
[0003] Existing technologies typically employ manual comparison or general image fusion of multiple images acquired from the same viewpoint to locate key regions and their boundaries in medical images. However, this method is inefficient and lacks targeted optimization for anatomical structure boundaries, making it difficult to improve the clarity and accuracy of structural boundaries and failing to meet the medical field's demand for efficient and precise image analysis. Summary of the Invention
[0004] This application proposes a structural boundary optimization method and system for medical images, which can solve the problem that existing technologies are not accurate enough in locating low-contrast, small boundary points in medical images.
[0005] A first aspect of this application provides a structural boundary optimization method for medical images, the method comprising: The target anatomical structures in each set of head X-ray images are identified and segmented to obtain the existing semantic information of each set of head X-ray images; Based on the initial boundary coordinates of the target anatomical structure, the target anatomical structure is converted into several corresponding feature units, and the brightness feature value of each feature unit is calculated; wherein, the brightness feature value includes the average brightness value and the brightness gradient value; the initial boundary coordinates are obtained from the existing semantic information; Based on the brightness feature value, the correlation between the feature unit and multiple sets of head X-ray images is constructed, and the initial boundary coordinates are corrected based on the correlation to obtain the boundary coordinate points of the target anatomical structure. By fusing the boundary coordinate points, an optimized boundary for the target anatomical structure is generated.
[0006] The above scheme first performs preliminary boundary recognition on the acquired head X-ray images, extracting the existing semantic information of the target anatomical structure in each set of head X-ray images to obtain the initial boundary coordinates of the target anatomical structure. Then, a grid composed of feature units is constructed within the range of the initial boundary coordinates. By calculating brightness feature values, the contrast and brightness at each point in the initial boundary coordinates are calculated, providing a foundation for improving the recognition accuracy of low-contrast, small target area boundaries, effectively solving the problems of blurred anatomical structure boundaries and large individual differences in medical images. Then, by constructing the brightness variation relationship of the same target anatomical structure among multiple sets of head X-ray images, the head X-ray image with the clearest boundary points is found, thereby locating the most definitive boundary of the target anatomical structure, significantly improving the accuracy and robustness of boundary localization and solving the problem of insufficient information from a single image. The final optimized boundary generated is closer to the real anatomical structure.
[0007] In one possible implementation of the first aspect, the target anatomical structures in each set of head X-ray images are identified and segmented to obtain the existing semantic information of each set of head X-ray images, specifically: Stable feature points are extracted from each group of head X-ray images. Based on the preset affine transformation matrix and the stable feature points, each group of head X-ray images is aligned to the preset reference image coordinate system to obtain the image-registered head X-ray image. The head X-ray image after image registration is input into a preset deep learning model to identify and segment the target anatomical structure, thereby obtaining the existing semantic information.
[0008] The above scheme eliminates geometric distortion in images caused by differences in subject position and shooting angle through coordinate system transformation, enabling subsequent image segmentation to operate at a uniform spatial scale and avoiding segmentation deviations caused by registration errors. In the aligned images, the spatial positions of the same anatomical structure are highly consistent, and the deep learning model does not need to learn additional geometric deformation features, but can focus on the semantic features of the structure itself, thereby improving segmentation accuracy and efficiency.
[0009] In one possible implementation of the first aspect, the image-registered head X-ray image is input into a preset deep learning model to identify and segment the target anatomical structure, thereby obtaining the existing semantic information, specifically as follows: An attention gating mechanism is introduced into the deep learning model. During the downsampling stage of the deep learning model, the head X-ray image of the encoder interacts with the feature map of the corresponding layer of the decoder through the attention gating mechanism to calculate the attention coefficient of the head X-ray image of the encoder. Based on the attention coefficient, the regions in the head X-ray image related to the target anatomical structure are identified and segmented, and a probability map of each pixel belonging to the target anatomical structure is output to obtain the existing semantic information.
[0010] The above scheme calculates the attention coefficient to emphasize the region in the head X-ray image that is related to the target anatomical structure and suppresses irrelevant background information, so as to enable accurate identification and segmentation.
[0011] In one possible implementation of the first aspect, the head X-ray image is manually annotated, and the annotated objects include the anterior nasal spine and the chin point of the head.
[0012] In one possible implementation of the first aspect, based on the initial boundary coordinates of the target anatomical structure, the target anatomical structure is converted into a plurality of corresponding feature units, and the brightness feature value of each feature unit is calculated, specifically as follows: Based on the head X-ray image, feature points are sampled within the image range where the initial boundary coordinates are located to obtain the internal sampling points of the target anatomical structure; The internal sampling points are merged with the boundary points corresponding to the initial boundary coordinates. Based on the merging result, several triangular meshes covering the target anatomical structure are constructed, with each triangular mesh corresponding to one feature unit. The brightness feature value is obtained by calculating the average brightness value and brightness gradient value of each feature unit.
[0013] The above scheme constructs a triangular mesh that covers the target anatomical structure, with each mesh node precisely corresponding to a pixel position in the original image. By calculating the average brightness and brightness gradient value of each feature unit, the gray-level distribution features inside the structure are transformed into quantifiable unit attributes. This discretization significantly reduces the computational load compared to pixel-by-pixel processing.
[0014] In one possible implementation of the first aspect, before feature point sampling, the sampling strategy is adaptively adjusted according to the image content of the head X-ray image: dense sampling is performed in regions where the pixel gradient is greater than a first threshold, and sparse sampling is performed in regions where the pixel gradient is less than or equal to the first threshold.
[0015] In one possible implementation of the first aspect, the average brightness value and brightness gradient value of each of the feature units are calculated, specifically as follows: The head X-ray image is converted from the original RGB space to the HSV space to separate the luminance information from the color information; After spatial transformation of the head X-ray image, the values of all pixels in the V channel within the feature unit are extracted and arithmetically averaged to obtain the average brightness value of the feature unit; the gradient components of all pixels in the feature unit in the horizontal and vertical coordinate directions are calculated to obtain the corresponding gradient magnitudes; the average value of all the gradient magnitudes is calculated to obtain the brightness gradient value of the feature unit.
[0016] The above scheme first performs spatial transformation to separate brightness and color information, avoiding the influence of color differences on brightness and color. Then, it performs dense sampling in areas with high gradients and rich details, and sparse sampling in flat areas to better capture structural features, accurately characterize local deformations and brightness changes, and improve the accuracy of subsequent boundary recognition and matching.
[0017] In one possible implementation of the first aspect, based on the brightness feature value, a correlation relationship is constructed between the feature units and multiple sets of head X-ray images. The initial boundary coordinates are then corrected based on the correlation relationship to obtain the boundary coordinate points of the target anatomical structure. Specifically: Based on the spatial topological location of the feature unit, corresponding candidate units are retrieved from the feature units in other groups of head X-ray images. The correlation coefficient between the feature unit and each candidate unit on the average brightness is calculated, and the candidate unit with the largest correlation coefficient is taken as the associated unit of the feature unit. Wherein, the feature unit and the associated unit both belong to the same target anatomical structure; Obtain the second threshold number of feature units closest to the initial boundary coordinates; calculate the sum of the brightness gradient values of the second threshold number of feature units in each group of head X-ray images based on the associated units; and select the head X-ray image with the largest sum of brightness gradient values as the optimal image for the initial boundary coordinates. The initial boundary coordinates are corrected to the coordinates of the corresponding location points extracted from the optimal image to obtain the boundary coordinate points of the target anatomical structure.
[0018] The above scheme follows a certain pattern based on the variation of the average brightness of the same target anatomical structure under different images (i.e., under different exposure levels). Based on the spatial topological position of each feature unit, the image with the sharpest boundary and the highest contrast is selected as the optimal image from multiple sets of head X-ray images. This effectively avoids the problem of unclear boundaries in a single image caused by the subject's movement, insufficient exposure, or tissue overlap, and obtains the clearest boundary of the target anatomical structure.
[0019] In one possible implementation of the first aspect, the boundary coordinate points are fused to generate the optimized boundary of the target anatomical structure, specifically as follows: Set the weight coefficient of the boundary coordinate point based on the pixel gradient value of the boundary coordinate point; Based on the weighting coefficients, the boundary coordinate points are smoothed by weighted averaging, and the smoothed boundary coordinate points are superimposed on a preset background image to obtain an enhanced head image containing the optimized boundaries.
[0020] The above scheme uses adaptive weighted averaging to suppress jagged edges and burrs caused by noise or discrete sampling, resulting in smoother and more natural optimized boundaries. The smoothed boundary coordinates are superimposed on a preset background image. This enhanced image retains the anatomical background of the original image while highlighting the clear anatomical structure contours after multi-image joint optimization, facilitating direct observation and measurement by clinicians and improving the readability of medical images.
[0021] A second aspect of this application provides a structural boundary optimization system for medical images, the system comprising: a boundary information extraction module, a brightness feature value calculation module, a boundary coordinate correction module, and a boundary optimization module; Among them, the boundary information extraction module is used to identify and segment the target anatomical structure in each group of head X-ray images to obtain the existing semantic information of each group of head X-ray images. The brightness feature value calculation module is used to convert the target anatomical structure into several corresponding feature units based on the initial boundary coordinates of the target anatomical structure, and calculate the brightness feature value of each feature unit; wherein, the brightness feature value includes the average brightness value and the brightness gradient value; the initial boundary coordinates are obtained from the existing semantic information; The boundary coordinate correction module is used to construct the correlation between the feature units in multiple sets of head X-ray images based on the brightness feature values, and to correct the initial boundary coordinates based on the correlation to obtain the boundary coordinate points of the target anatomical structure. The boundary optimization module is used to fuse the boundary coordinate points to generate the optimized boundary of the target anatomical structure. Attached Figure Description
[0022] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0023] Figure 1 This is a schematic flowchart illustrating a structural boundary optimization method for medical images provided in one embodiment of this application; Figure 2This is a diagram illustrating the cephalometric extraction effect of a structural boundary optimization method for medical images provided in an embodiment of this application. Figure 3 This is a table of key anatomical point meanings for a structural boundary optimization method for medical images provided in one embodiment of this application; Figure 4 This is a structural diagram of a structural boundary optimization system for medical images provided in one embodiment of this application. Detailed Implementation
[0024] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0025] It should be understood that the step numbers used in the text are for ease of description only and are not intended to limit the order in which the steps are performed.
[0026] First Embodiment Current technologies typically involve manual comparison or general image fusion of multiple images acquired from the same viewpoint to obtain anatomical boundaries in head X-ray images. However, X-ray images have complex internal structures, and the shooting conditions vary, making boundary identification even more difficult in areas with low contrast. Furthermore, existing neural networks lack the ability to perceive features in medical images and have low accuracy in locating areas with blurred boundaries in medical images, thus failing to meet the needs of efficient and accurate image analysis in clinical practice.
[0027] To address the aforementioned issues, this application's embodiments introduce triangular mesh feature units and a dual feature value mechanism to achieve automatic association, optimization, and fusion of structural boundaries among multiple images, significantly improving the clarity and recognition accuracy of structural boundaries.
[0028] like Figure 1 As shown, to address the problem of insufficient accuracy in locating low-contrast, small boundary points in medical images in existing technologies, the first embodiment of this application provides a detailed flowchart of a structural boundary optimization method for medical images. This embodiment's structural boundary optimization method for medical images includes steps S1 to S4, detailed below: Step S1: Identify and segment the target anatomical structures in each group of head X-ray images to obtain the existing semantic information of each group of head X-ray images.
[0029] First, multiple sets of head X-ray images are acquired from the patient's head. Because the acquisition environment and conditions may vary, to eliminate environmental errors, the SIFT operator is used to extract stable feature points from each set of head X-ray images. Then, the optimal affine transformation matrix is calculated using the RANSAC algorithm. Based on the affine transformation matrix and the stable feature points, all head X-ray images are aligned to a preset reference image coordinate system to eliminate image misalignment caused by slight patient movement or camera shake, resulting in image-registered head X-ray images.
[0030] SIFT, short for Scale Invariant Feature Transform, is a scale-space-based feature description algorithm in computer vision, mainly used for image matching and pattern recognition. Stable feature points are stable, invariant local feature points in an image that remain unchanged during image scaling, rotation, and even affine transformations. RANSAC, short for Random Sample Consensus, is also known as the random sample consensus algorithm.
[0031] After image registration is completed, a deep learning model based on the YOLO architecture is used to identify and segment the preset target anatomical structure, extract the existing semantic information of each group of head X-ray images, and thus obtain the initial boundary coordinates of the target anatomical structure in each group of images.
[0032] In this embodiment, the input to the deep learning model is a registered head X-ray image, and the output is a probability map of each pixel belonging to the target anatomical structure. The registered head X-ray image is typically a single grayscale image or a brightness channel image.
[0033] Furthermore, in order to improve the model's sensitivity to low-contrast boundaries and feature selection ability, this embodiment of the application also introduces an attention gating mechanism into the deep learning model, specifically an attention gating mechanism is introduced into the shallow feature acquisition of the model.
[0034] Specifically, at each downsampling stage of the encoder path, the head X-ray image interacts with the feature map of the corresponding layer of the decoder through the attention gating mechanism. By calculating the attention coefficient of the head X-ray image of the encoder, the region in the head X-ray image related to the target anatomical structure is emphasized, and irrelevant background information is suppressed, thereby achieving more accurate recognition and segmentation.
[0035] Finally, the existing semantic information is obtained by using the probability map of each pixel belonging to the target anatomical structure output by the model.
[0036] To improve the deep learning model's adaptability to image changes in real clinical environments, this application uses a dataset with high-quality professional annotations. The head X-ray images are hundreds of images precisely annotated by doctors, and the annotation objects include the locations of key structures such as the anterior nasal spine and the mental point.
[0037] Furthermore, the training of the deep learning model also employs various data augmentation strategies, including elastic deformation to simulate tissue softness, random rotation and scaling to simulate different inspection angles, and brightness and contrast adjustment to simulate varying lighting conditions.
[0038] The initial boundary coordinates of the target anatomical structure in each group of head X-ray images are extracted from the existing semantic information.
[0039] Step S2: Based on the initial boundary coordinates of the target anatomical structure, the target anatomical structure is converted into several corresponding feature units, and the brightness feature value of each feature unit is calculated.
[0040] After obtaining the initial boundary coordinates of the target anatomical structure, it is necessary to construct a feature cell mesh within the boundary range. In this embodiment, the Deloni triangulation algorithm is used to systematically generate a triangular mesh covering the key area.
[0041] First, feature point sampling is performed within the structural boundary defined by the initial boundary coordinates, and this sampling is conducted on a head X-ray image. The sampling strategy can be adaptively adjusted according to the image content; for example, dense sampling can be performed in areas with high gradients and rich details, while sparse sampling can be performed in flat areas to better capture structural features. In this embodiment, dense sampling is performed in areas where the pixel gradient is greater than a first threshold, and sparse sampling is performed in areas where the pixel gradient is less than or equal to the first threshold.
[0042] The internal sampling points of the target anatomical structure obtained by sampling are merged with the boundary points corresponding to the initial boundary coordinates (which are actually the points of the structural boundary). Based on the merging result, several triangular meshes covering the target anatomical structure are constructed. Each triangular mesh corresponds to a feature unit for subsequent local feature analysis.
[0043] Specifically, the Deloni triangulation algorithm is used to triangulate the merged results, generating several regularly shaped, nearly equiangular triangular units, effectively avoiding computational errors caused by elongated triangles. Because the triangulation is performed based on the merged results, the triangular mesh covers the target anatomical structure and its interior.
[0044] Then, the average brightness value and brightness gradient value of each feature unit are calculated to obtain the brightness feature value of the feature unit.
[0045] Specifically, for each set of head X-ray images, they are first converted from the original RGB color space to HSV color space to separate luminance and color information, avoiding the influence of color differences on luminance and color. Then, for each feature unit, all pixels within its coverage area are extracted, the values of all pixels in the V channel are calculated, and their arithmetic mean is calculated, which is the average luminance of the feature unit. The average luminance reflects the overall brightness of the local area corresponding to the feature unit at a specific exposure level. Simultaneously, the Sobel operator is used to calculate the gradient components of each pixel in the horizontal and vertical axes, thereby obtaining its gradient magnitude. The average of all gradient magnitudes is calculated to obtain the luminance gradient value of the feature unit.
[0046] In a properly exposed head X-ray image, the tissue texture is clear and the edges are sharp, and its brightness gradient value is significantly higher than that of the same area in overexposed or underexposed images.
[0047] The above process is the process of calculating the dual feature values of the feature unit. After the above calculation is completed, the cross-image feature unit association is started to find the clearest and most accurate boundary coordinate points for the target anatomical structure.
[0048] Step S3: Based on the brightness feature value, construct the correlation relationship between the feature unit and multiple sets of head X-ray images, and correct the initial boundary coordinates according to the correlation relationship to obtain the boundary coordinate points of the target anatomical structure.
[0049] For any feature unit in any head X-ray image, a corresponding candidate unit is retrieved from the feature units in other groups of head X-ray images based on its spatial topological location. The correlation coefficient between the feature unit and each candidate unit on the average brightness is calculated, and the candidate unit with the largest correlation coefficient is taken as the associated unit of the feature unit.
[0050] Specifically, since unit matching is based on the spatial topological location, it actually matches feature units of the same target anatomical structure. Utilizing the characteristic that the average brightness change of the same target anatomical structure under different exposures follows a certain pattern, for a feature unit in a head X-ray image, several candidate units with similar locations are initially screened from feature units in other head X-ray images based on its spatial topological location within the entire grid. Subsequently, a first average brightness sequence of the feature unit across all head X-ray images is constructed, and a second average brightness sequence of each candidate unit across all head X-ray images is also constructed. The consistency of the brightness change trend between the feature unit and each of the candidate units is evaluated by calculating the Pearson correlation coefficient between the first and second average brightness sequences. Finally, the candidate unit with the highest Pearson correlation coefficient is selected as the associated unit of the feature unit.
[0051] After determining the associated units of all feature units, the initial boundary coordinates are corrected based on the associated units. First, the K feature units closest to the initial boundary coordinates are obtained. Then, the sum of the brightness gradient values of the K feature units and their corresponding associated units in all head X-ray images is calculated. The head X-ray image with the largest sum of brightness gradient values is selected as the optimal image for the initial boundary coordinates.
[0052] The sum of the brightness gradient values is the aggregate index of the overall clarity of each head X-ray image in this local area. The head X-ray image with the largest aggregate index is selected as the optimal image. The head X-ray image is the best source image that presents the clearest boundary points (i.e., the initial boundary coordinates) of the target anatomical structure. The coordinates of the boundary points are modified to the coordinates of the corresponding positions extracted from the optimal image, thereby obtaining the boundary coordinate points of the target anatomical structure.
[0053] To better demonstrate the boundary point extraction effect of the embodiments of this application, the following is provided: Figure 2 The image shown is a result of head shadow measurement and extraction. Figure 2 In the diagram, ANS is the anterior nasal spine, LO is the orbital lateral point, Ma is the mastoid point, Om is the nasal midpoint, Me is the chin point, Ag is the anterior mandibular notch, and Go is the mandibular angle point. For the specific meanings of these points, see [link to diagram]. Figure 3 A table of meanings for key anatomical points is provided.
[0054] Step S4: Merge the boundary coordinate points to generate the optimized boundary of the target anatomical structure.
[0055] The proposed boundary coordinate points are a new set of boundary points formed by stitching together the clearest boundary segments from different source images.
[0056] Before generating the optimized boundary of the target anatomical structure, a weighted average fusion strategy is used to smooth the boundary coordinate points. The weight coefficient of each boundary coordinate point can be determined by its own gradient value in the optimal image or the gradient value of its corresponding feature unit. Points with higher gradient values are considered to be more reliably located and are given higher weights during the smoothing process, thereby ensuring the natural continuity of the boundary while maintaining sharpness.
[0057] The smoothed boundary coordinates are superimposed on a preset background image to obtain an enhanced head image containing the optimized boundary.
[0058] The background image is an HDR background image with good overall visual effect generated by a traditional multi-exposure fusion algorithm. Each pixel in the background image is selected by fusion based on either the pixel value with the most moderate brightness or the largest gradient. The optimized boundary is then overlaid on the background image with a highlight color.
[0059] The final output of the enhanced head image is shown below. Figure 2 .
[0060] Implementing the embodiments of this application has the following beneficial effects: This application first performs preliminary boundary recognition on the acquired head X-ray images, extracting the existing semantic information of the target anatomical structure in each set of head X-ray images to obtain the initial boundary coordinates of the target anatomical structure. Then, a grid composed of feature units is constructed within the range of the initial boundary coordinates. The contrast and brightness at each point in the initial boundary coordinates are calculated by calculating brightness feature values, providing a foundation for improving the recognition accuracy of low-contrast, small target area boundaries, effectively solving the problems of blurred anatomical structure boundaries and large individual differences in medical images. Next, by constructing the brightness variation relationship of the same target anatomical structure across multiple sets of head X-ray images, the head X-ray image with the clearest boundary points is found, thereby locating the most definitive boundary of the target anatomical structure. This significantly improves the accuracy and robustness of boundary localization and solves the problem of insufficient information from a single image. The final optimized boundary more closely resembles the real anatomical structure.
[0061] Second Embodiment Furthermore, in order to implement the structural boundary optimization system for medical images corresponding to the above method embodiments, and to achieve the corresponding functions and technical effects, Figure 4 A structural boundary optimization system for medical images is provided. For ease of explanation, only the parts relevant to this embodiment are shown. The structural boundary optimization system for medical images provided in this application embodiment includes: The boundary information extraction module 201 is used to identify and segment the target anatomical structures in each group of head X-ray images to obtain the existing semantic information of each group of head X-ray images.
[0062] In this embodiment, multiple sets of head X-ray images are first acquired from the patient's head. Because the acquisition environment and conditions may vary, to eliminate errors caused by the environment, the SIFT operator is used to extract stable feature points from each set of head X-ray images. Then, the optimal affine transformation matrix is calculated using the RANSAC algorithm. Based on the affine transformation matrix and the stable feature points, all head X-ray images are aligned to a preset reference image coordinate system to eliminate image misalignment caused by slight patient movement or camera shake, resulting in image-registered head X-ray images.
[0063] SIFT, short for Scale Invariant Feature Transform, is a scale-space-based feature description algorithm in computer vision, mainly used for image matching and pattern recognition. Stable feature points are stable, invariant local feature points in an image that remain unchanged during image scaling, rotation, and even affine transformations. RANSAC, short for Random Sample Consensus, is also known as the random sample consensus algorithm.
[0064] After image registration is completed, a deep learning model based on the YOLO architecture is used to identify and segment the preset target anatomical structure, extract the existing semantic information of each group of head X-ray images, and thus obtain the initial boundary coordinates of the target anatomical structure in each group of images.
[0065] In this embodiment, the input to the deep learning model is a registered head X-ray image, and the output is a probability map of each pixel belonging to the target anatomical structure. The registered head X-ray image is typically a single grayscale image or a brightness channel image.
[0066] Furthermore, in order to improve the model's sensitivity to low-contrast boundaries and feature selection ability, this embodiment of the application also introduces an attention gating mechanism into the deep learning model, specifically an attention gating mechanism is introduced into the shallow feature acquisition of the model.
[0067] Specifically, at each downsampling stage of the encoder path, the head X-ray image interacts with the feature map of the corresponding layer of the decoder through the attention gating mechanism. By calculating the attention coefficient of the head X-ray image of the encoder, the region in the head X-ray image related to the target anatomical structure is emphasized, and irrelevant background information is suppressed, thereby achieving more accurate recognition and segmentation.
[0068] Finally, the existing semantic information is obtained by using the probability map of each pixel belonging to the target anatomical structure output by the model.
[0069] To improve the deep learning model's adaptability to image changes in real clinical environments, this application uses a dataset with high-quality professional annotations. The head X-ray images are hundreds of images precisely annotated by doctors, and the annotation objects include the locations of key structures such as the anterior nasal spine and the mental point.
[0070] Furthermore, the training of the deep learning model also employs various data augmentation strategies, including elastic deformation to simulate tissue softness, random rotation and scaling to simulate different inspection angles, and brightness and contrast adjustment to simulate varying lighting conditions.
[0071] The initial boundary coordinates of the target anatomical structure in each group of head X-ray images are extracted from the existing semantic information.
[0072] The brightness feature value calculation module 202 is used to convert the target anatomical structure into a number of corresponding feature units based on the initial boundary coordinates of the target anatomical structure, and calculate the brightness feature value of each feature unit; wherein, the brightness feature value includes the average brightness value and the brightness gradient value; the initial boundary coordinates are obtained from the existing semantic information.
[0073] In this embodiment, after obtaining the initial boundary coordinates of the target anatomical structure, it is necessary to construct a feature cell mesh within the boundary range. This embodiment uses the Deloni triangulation algorithm to systematically generate triangular meshes covering key areas.
[0074] First, feature point sampling is performed within the structural boundary defined by the initial boundary coordinates, and this sampling is conducted on a head X-ray image. The sampling strategy can be adaptively adjusted according to the image content; for example, dense sampling can be performed in areas with high gradients and rich details, while sparse sampling can be performed in flat areas to better capture structural features. In this embodiment, dense sampling is performed in areas where the pixel gradient is greater than a first threshold, and sparse sampling is performed in areas where the pixel gradient is less than or equal to the first threshold.
[0075] The internal sampling points of the target anatomical structure obtained by sampling are merged with the boundary points corresponding to the initial boundary coordinates (which are actually the points of the structural boundary). Based on the merging result, several triangular meshes covering the target anatomical structure are constructed. Each triangular mesh corresponds to a feature unit for subsequent local feature analysis.
[0076] Specifically, the Deloni triangulation algorithm is used to triangulate the merged results, generating several regularly shaped, nearly equiangular triangular units, effectively avoiding computational errors caused by elongated triangles. Because the triangulation is performed based on the merged results, the triangular mesh covers the target anatomical structure and its interior.
[0077] Then, the average brightness value and brightness gradient value of each feature unit are calculated to obtain the brightness feature value of the feature unit.
[0078] Specifically, for each set of head X-ray images, they are first converted from the original RGB color space to HSV color space to separate luminance and color information, avoiding the influence of color differences on luminance and color. Then, for each feature unit, all pixels within its coverage area are extracted, the values of all pixels in the V channel are calculated, and their arithmetic mean is calculated, which is the average luminance of the feature unit. The average luminance reflects the overall brightness of the local area corresponding to the feature unit at a specific exposure level. Simultaneously, the Sobel operator is used to calculate the gradient components of each pixel in the horizontal and vertical axes, thereby obtaining its gradient magnitude. The average of all gradient magnitudes is calculated to obtain the luminance gradient value of the feature unit.
[0079] In a properly exposed head X-ray image, the tissue texture is clear and the edges are sharp, and its brightness gradient value is significantly higher than that of the same area in overexposed or underexposed images.
[0080] The above process is the process of calculating the dual feature values of the feature unit. After the above calculation is completed, the cross-image feature unit association is started to find the clearest and most accurate boundary coordinate points for the target anatomical structure.
[0081] The boundary coordinate correction module 203 is used to construct the correlation relationship between the feature units in multiple sets of head X-ray images based on the brightness feature values, and to correct the initial boundary coordinates based on the correlation relationship to obtain the boundary coordinate points of the target anatomical structure.
[0082] In this embodiment of the application, for any feature unit in any head X-ray image, a corresponding candidate unit is retrieved from the feature units in other groups of head X-ray images based on its spatial topological location. The correlation coefficient between the feature unit and each candidate unit on the average brightness is calculated, and the candidate unit with the largest correlation coefficient is taken as the associated unit of the feature unit.
[0083] Specifically, since unit matching is based on the spatial topological location, it actually matches feature units of the same target anatomical structure. Utilizing the characteristic that the average brightness change of the same target anatomical structure under different exposures follows a certain pattern, for a feature unit in a head X-ray image, several candidate units with similar locations are initially screened from feature units in other head X-ray images based on its spatial topological location within the entire grid. Subsequently, a first average brightness sequence of the feature unit across all head X-ray images is constructed, and a second average brightness sequence of each candidate unit across all head X-ray images is also constructed. The consistency of the brightness change trend between the feature unit and each of the candidate units is evaluated by calculating the Pearson correlation coefficient between the first and second average brightness sequences. Finally, the candidate unit with the highest Pearson correlation coefficient is selected as the associated unit of the feature unit.
[0084] After determining the associated units of all feature units, the initial boundary coordinates are corrected based on the associated units. First, the K feature units closest to the initial boundary coordinates are obtained. Then, the sum of the brightness gradient values of the K feature units and their corresponding associated units in all head X-ray images is calculated. The head X-ray image with the largest sum of brightness gradient values is selected as the optimal image for the initial boundary coordinates.
[0085] The sum of the brightness gradient values is the aggregate index of the overall clarity of each head X-ray image in this local area. The head X-ray image with the largest aggregate index is selected as the optimal image. The head X-ray image is the best source image that presents the clearest boundary points (i.e., the initial boundary coordinates) of the target anatomical structure. The coordinates of the boundary points are modified to the coordinates of the corresponding positions extracted from the optimal image, thereby obtaining the boundary coordinate points of the target anatomical structure.
[0086] The boundary optimization module 204 is used to fuse the boundary coordinate points to generate the optimized boundary of the target anatomical structure.
[0087] The proposed boundary coordinate points are a new set of boundary points formed by stitching together the clearest boundary segments from different source images.
[0088] Before generating the optimized boundary of the target anatomical structure, a weighted average fusion strategy is used to smooth the boundary coordinate points. The weight coefficient of each boundary coordinate point can be determined by its own gradient value in the optimal image or the gradient value of its corresponding feature unit. Points with higher gradient values are considered to be more reliably located and are given higher weights during the smoothing process, thereby ensuring the natural continuity of the boundary while maintaining sharpness.
[0089] The smoothed boundary coordinates are superimposed on a preset background image to obtain an enhanced head image containing the optimized boundary.
[0090] The background image is an HDR background image with good overall visual effect generated by a traditional multi-exposure fusion algorithm. Each pixel in the background image is selected by fusion based on either the pixel value with the most moderate brightness or the largest gradient. The optimized boundary is then overlaid on the background image with a highlight color.
[0091] Implementing the embodiments of this application has the following beneficial effects: This application first performs preliminary boundary recognition on the acquired head X-ray images, extracting the existing semantic information of the target anatomical structure in each set of head X-ray images to obtain the initial boundary coordinates of the target anatomical structure. Then, a grid composed of feature units is constructed within the range of the initial boundary coordinates. The contrast and brightness at each point in the initial boundary coordinates are calculated by calculating brightness feature values, providing a foundation for improving the recognition accuracy of low-contrast, small target area boundaries, effectively solving the problems of blurred anatomical structure boundaries and large individual differences in medical images. Next, by constructing the brightness variation relationship of the same target anatomical structure across multiple sets of head X-ray images, the head X-ray image with the clearest boundary points is found, thereby locating the most definitive boundary of the target anatomical structure. This significantly improves the accuracy and robustness of boundary localization and solves the problem of insufficient information from a single image. The final optimized boundary more closely resembles the real anatomical structure.
[0092] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of this application. It should be understood that the above descriptions are merely specific embodiments of this application and are not intended to limit the scope of protection of this application. In particular, it should be noted that any modifications, equivalent substitutions, or improvements made by those skilled in the art within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A structural boundary optimization method for medical images, characterized in that, include: The target anatomical structures in each set of head X-ray images are identified and segmented to obtain the existing semantic information of each set of head X-ray images; Based on the initial boundary coordinates of the target anatomical structure, the target anatomical structure is converted into several corresponding feature units, and the brightness feature value of each feature unit is calculated; wherein, the brightness feature value includes the average brightness value and the brightness gradient value; the initial boundary coordinates are obtained from the existing semantic information; Based on the brightness feature value, the correlation between the feature unit and multiple sets of head X-ray images is constructed, and the initial boundary coordinates are corrected based on the correlation to obtain the boundary coordinate points of the target anatomical structure. By fusing the boundary coordinate points, an optimized boundary for the target anatomical structure is generated.
2. The structural boundary optimization method for medical images according to claim 1, characterized in that, The process of identifying and segmenting the target anatomical structures in each group of head X-ray images to obtain the existing semantic information of each group of head X-ray images specifically involves: Stable feature points are extracted from each group of head X-ray images. Based on the preset affine transformation matrix and the stable feature points, each group of head X-ray images is aligned to the preset reference image coordinate system to obtain the image-registered head X-ray image. The head X-ray image after image registration is input into a preset deep learning model to identify and segment the target anatomical structure, thereby obtaining the existing semantic information.
3. The structural boundary optimization method for medical images according to claim 2, characterized in that, The process involves inputting the image-registered head X-ray image into a preset deep learning model to identify and segment the target anatomical structure, thereby obtaining the existing semantic information. Specifically, this process includes: An attention gating mechanism is introduced into the deep learning model. During the downsampling stage of the deep learning model, the head X-ray image of the encoder interacts with the feature map of the corresponding layer of the decoder through the attention gating mechanism to calculate the attention coefficient of the head X-ray image of the encoder. Based on the attention coefficient, the regions in the head X-ray image related to the target anatomical structure are identified and segmented, and a probability map of each pixel belonging to the target anatomical structure is output to obtain the existing semantic information.
4. The structural boundary optimization method for medical images according to claim 1, characterized in that, The head X-ray images were manually annotated, and the anterior nasal spine and chin points were annotated.
5. The structural boundary optimization method for medical images according to claim 1, characterized in that, Based on the initial boundary coordinates of the target anatomical structure, the target anatomical structure is converted into several corresponding feature units, and the brightness feature value of each feature unit is calculated, specifically as follows: Based on the head X-ray image, feature points are sampled within the image range where the initial boundary coordinates are located to obtain the internal sampling points of the target anatomical structure; The internal sampling points are merged with the boundary points corresponding to the initial boundary coordinates. Based on the merging result, several triangular meshes covering the target anatomical structure are constructed, with each triangular mesh corresponding to one feature unit. The brightness feature value is obtained by calculating the average brightness value and brightness gradient value of each feature unit.
6. The structural boundary optimization method for medical images according to claim 5, characterized in that, Before feature point sampling, the sampling strategy is adaptively adjusted based on the image content of the head X-ray image: dense sampling is performed in regions where the pixel gradient is greater than the first threshold, and sparse sampling is performed in regions where the pixel gradient is less than or equal to the first threshold.
7. The structural boundary optimization method for medical images according to claim 5, characterized in that, The calculation of the average brightness and brightness gradient value of each feature unit is specifically as follows: The head X-ray image is converted from the original RGB space to the HSV space to separate the luminance information from the color information; After spatial transformation of the head X-ray image, the values of all pixels in the V channel within the feature unit are extracted and arithmetically averaged to obtain the average brightness value of the feature unit; the gradient components of all pixels in the feature unit in the horizontal and vertical coordinate directions are calculated to obtain the corresponding gradient magnitudes; the average value of all the gradient magnitudes is calculated to obtain the brightness gradient value of the feature unit.
8. The structural boundary optimization method for medical images according to claim 1, characterized in that, The step involves constructing the correlation between the feature units and multiple sets of head X-ray images based on the brightness feature values, and correcting the initial boundary coordinates based on the correlation to obtain the boundary coordinate points of the target anatomical structure. Specifically: Based on the spatial topological location of the feature unit, corresponding candidate units are retrieved from the feature units in other groups of head X-ray images. The correlation coefficient between the feature unit and each candidate unit on the average brightness is calculated, and the candidate unit with the largest correlation coefficient is taken as the associated unit of the feature unit. Wherein, the feature unit and the associated unit both belong to the same target anatomical structure; Obtain the second threshold number of feature units closest to the initial boundary coordinates; calculate the sum of the brightness gradient values of the second threshold number of feature units in each group of head X-ray images based on the associated units; and select the head X-ray image with the largest sum of brightness gradient values as the optimal image for the initial boundary coordinates. The initial boundary coordinates are corrected to the coordinates of the corresponding location points extracted from the optimal image to obtain the boundary coordinate points of the target anatomical structure.
9. The structural boundary optimization method for medical images according to claim 1, characterized in that, The process of fusing the boundary coordinate points to generate the optimized boundary of the target anatomical structure is specifically as follows: Set the weight coefficient of the boundary coordinate point based on the pixel gradient value of the boundary coordinate point; Based on the weighting coefficients, the boundary coordinate points are smoothed by weighted averaging, and the smoothed boundary coordinate points are superimposed on a preset background image to obtain an enhanced head image containing the optimized boundaries.
10. A structural boundary optimization system for medical images, characterized in that, include: The module includes a boundary information extraction module, a brightness feature value calculation module, a boundary coordinate correction module, and a boundary optimization module. Among them, the boundary information extraction module is used to identify and segment the target anatomical structure in each group of head X-ray images to obtain the existing semantic information of each group of head X-ray images. The brightness feature value calculation module is used to convert the target anatomical structure into several corresponding feature units based on the initial boundary coordinates of the target anatomical structure, and calculate the brightness feature value of each feature unit; wherein, the brightness feature value includes the average brightness value and the brightness gradient value; the initial boundary coordinates are obtained from the existing semantic information; The boundary coordinate correction module is used to construct the correlation between the feature units in multiple sets of head X-ray images based on the brightness feature values, and to correct the initial boundary coordinates based on the correlation to obtain the boundary coordinate points of the target anatomical structure. The boundary optimization module is used to fuse the boundary coordinate points to generate the optimized boundary of the target anatomical structure.