A human body contour sketching algorithm system based on CT images
The human body contour delineation algorithm system based on CT images solves the problem of recognizing patient posture, position, and body contour in CT images. By adopting morphological operations and differentiation strategies, it achieves efficient and accurate human body contour delineation, improving the accuracy and completeness of the delineation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HAICHUANG FUTURE (HANGZHOU) MEDICAL TECH CO LTD
- Filing Date
- 2025-12-25
- Publication Date
- 2026-05-08
AI Technical Summary
Existing technologies struggle to accurately identify a patient's posture, position, and body contour in CT images. In particular, the similarity between the bed board and body tissues in CT images, as well as the influence of the localized body membranes, limits the performance of traditional and deep learning algorithms. Furthermore, the collection of overall body label data is complex and time-consuming.
A human body contour delineation algorithm system based on CT images is adopted, including a preprocessing module, a body membrane removal module, a body position information extraction module, a local area filling module, and a bed board removal module. Through morphological operations and differential strategies, the human body contour is accurately delineated, bed board interference is eliminated, and efficient filling and removal are achieved.
It significantly improves the accuracy and completeness of human body contour drawing, especially the drawing effect of the nose, ears and weak chest wall areas. It effectively removes the interference of the bed board on the mask and improves the accuracy and efficiency of drawing.
Smart Images

Figure CN121414737B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical technology, and more specifically to a human body contour delineation algorithm system based on CT images. Background Technology
[0002] During radiotherapy, precise segmentation of the whole body in CT images clearly defines the patient's body boundaries. This step is crucial for accurate radiotherapy planning, ensuring that radiation is precisely directed to the intended area and effectively preventing radiation from spreading to other non-target parts of the body. Furthermore, whole-body segmentation technology helps identify the patient's posture, position, and body contours, providing solid support for precise positioning during treatment.
[0003] Currently, body region segmentation algorithms are mainly divided into two categories: traditional image segmentation algorithms and deep learning-based image segmentation algorithms. In traditional image segmentation algorithms, whether thresholding, region segmentation, or edge-based segmentation methods, they all heavily rely on the significant difference between the foreground region (i.e., the whole body region) and the background region. However, in actual CT images, the grayscale and texture of the CT scanner bed often resemble body tissue. Furthermore, issues such as the positioning membrane used during radiotherapy and potential incomplete body contours further complicate the process. Figure 1 As shown, these factors all affect the performance of traditional algorithms to varying degrees.
[0004] Similarly, deep learning-based image segmentation algorithms also face challenges in handling different scanning positions, patient posture differences, and bed-body contact conditions. To address these complexities, a large amount of training data with precise labels is typically required. However, compared to the labeled data for organs at risk or target areas in radiotherapy scenarios, the collection of whole-body labels is more complex and time-consuming due to its broader scope and greater detail, posing a significant challenge to data collection.
[0005] Therefore, accurately identifying a patient's posture, position, and body contour in CT images is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0006] In view of this, the present invention provides a human body contour delineation algorithm system based on CT images to solve the problems existing in the background technology.
[0007] To achieve the above objectives, the present invention adopts the following technical solution:
[0008] A human body contour delineation algorithm system based on CT images, comprising:
[0009] The preprocessing module converts CT image data to the RAS human coordinate system; it then uses a threshold segmentation method to segment the converted CT image data to obtain basic body mask data.
[0010] The body membrane removal module removes the body membrane and mechanical structure contour lines from the basic body mask data through morphological opening operations.
[0011] The body position information extraction module reads the scanned body position data from the head information, determines whether it is a prone or supine position, and clarifies the position of the bed board relative to the human body.
[0012] The local area filling module uses a differentiated strategy based on the scanned body position to fill in the missing areas of the body.
[0013] The bed board removal module removes bed board interference from the filled body area.
[0014] The global area fill module performs global hole filling on the body area after removing bed board interference, resulting in a complete human body contour drawing.
[0015] Preferably, the preprocessing module uses the standardized functions built into the SimpleITK library to perform coordinate system transformation on the CT image data.
[0016] Preferably, the optimal threshold for threshold segmentation in the morphological opening operation is determined using the Otsu method in the body membrane removal module.
[0017] Preferably, the differentiated filling strategy in the local area filling module is as follows: for prone position data, an opening operation with a kernel size of 5 is first used to remove bed board interference, and then the front of the body is filled; for supine position data, the front of the body is filled directly.
[0018] Preferably, the filling specifically includes using a kernel of size 9 to expand the front half of the body area, filling the blank part of the closed area with a flood filling algorithm, and then using a kernel of size 9 to perform an erosion operation to restore the original outline size.
[0019] Preferably, the bed board removal module performs bed board removal operations on supine position data, and the bed boards are divided into non-stubborn bed boards and stubborn bed boards.
[0020] Preferably, for the non-stubborn bed plate, after the structure is separated from the body region by the corrosion operation with a kernel of 7, a two-dimensional connected domain screening is performed, followed by the operation of retaining the three-dimensional maximum connected domain, and finally the expansion operation with a kernel of 7 is performed to restore the original mask size.
[0021] Preferably, for the stubborn bed plate, a scan is performed from the bed plate side towards the body region in each CT image layer, and the mask pixel change ratio r of each row is recorded. The change ratios of each row are sorted to obtain a sequence R. After removing the first 5% and the last 5% to reduce the influence of outliers, the average value is taken to obtain the average mask pixel change of the bed plate side in that CT image layer. , the results With the maximum value in the sequence If the difference exceeds twice the size of the bed board, it is considered a stubborn boundary between the bed board and the body, and the bed board is removed. Otherwise, if there is no bed board, no treatment is required.
[0022] ;
[0023] ;
[0024] in, This represents the number of mask pixels in the previous row of the current CT image. This represents the number of mask pixels in the current layer of the CT image.
[0025] As can be seen from the above technical solution, compared with the prior art, this invention discloses a human contour delineation algorithm system based on CT images, which can accurately handle the delineation needs of body regions under various positions. It not only effectively solves the problem of missing areas such as the nose, ears, and weak chest wall during the delineation process, but also cleverly eliminates the interference caused by the bed board on the mask delineation of body regions, significantly improving the accuracy and completeness of the delineation; at the same time, it creatively introduces a highly efficient line scan detection algorithm. This algorithm can effectively identify and accurately remove stubborn bed board marks on the back in a supine position, thereby further improving the accuracy of the body region delineation results. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0027] Figure 1 This is a CT diagram illustrating an incomplete body contour of a bed board, body membrane, and body contour provided by the present invention.
[0028] Figure 2 The algorithm system flowchart provided by this invention;
[0029] Figure 3 This invention provides schematic diagrams of different human body coordinate systems.
[0030] Figure 4 A schematic diagram of the preliminary mask data provided for this invention;
[0031] Figure 5 The image shows the effect of removing the body membrane provided by this invention;
[0032] Figure 6 This is a schematic diagram of the scanning position provided by the present invention;
[0033] Figure 7 This is a schematic diagram of a partial supplementary module provided by the present invention;
[0034] Figure 8 This is a schematic diagram of the local filling effect provided by the present invention;
[0035] Figure 9 This is a schematic diagram of the bed board type provided by the present invention;
[0036] Figure 10 A schematic diagram of the bed board removal module provided by the present invention;
[0037] Figure 11 This is a schematic diagram of the line scan detection algorithm provided by the present invention;
[0038] Figure 12 This is a schematic diagram illustrating the final effect of the present invention. Detailed Implementation
[0039] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0040] This invention discloses a human body contour delineation algorithm system based on CT images, comprising:
[0041] The preprocessing module converts CT image data to the RAS human coordinate system; it then uses a threshold segmentation method to segment the converted CT image data to obtain basic body mask data.
[0042] The body membrane removal module removes the body membrane and mechanical structure contour lines from the basic body mask data through morphological opening operations.
[0043] The body position information extraction module reads the scanned body position data from the head information, determines whether it is a prone or supine position, and clarifies the position of the bed board relative to the human body.
[0044] The local area filling module uses a differentiated strategy based on the scanned body position to fill in the missing areas of the body.
[0045] The bed board removal module removes bed board interference from the filled body area.
[0046] The global area fill module performs global hole filling on the body area after removing bed board interference, resulting in a complete human body contour drawing.
[0047] For details of the algorithm proposed in this invention, please refer to [link / reference]. Figure 2 As shown. First, all images have undergone coordinate system standardization and have been uniformly transformed to the "RAS" human coordinate system, that is, the positive X-axis points to the right side of the human body, the positive Y-axis points to the front of the human body, and the positive Z-axis points to the top of the head.
[0048] Subsequently, in the second step, we used a thresholding method to segment the CT images to obtain preliminary body mask data.
[0049] The third step involves using morphological image processing techniques to effectively remove the body membrane and avoid its potential interference with subsequent processes.
[0050] The fourth step is to extract human body position data from the Dicom data header information. By determining whether the position is prone or supine, the position of the bed board relative to the human body is determined, providing a positional basis for subsequent steps and implementing differentiated operations.
[0051] The fifth step involves entering the contour enhancement module to fill in specific areas of the image. This addresses mask loss issues in areas like the nasal cavity, oral cavity, and ears caused by threshold segmentation in some cases, ensuring the integrity of the body mask. Finally, bed board detection is performed on the mask, and it is precisely removed.
[0052] Coordinate system standardization: During the acquisition of patient CT data, due to different application requirements, the resulting image data is often presented based on different human coordinate systems, such as... Figure 3 Clearly illustrated. The left side of the image shows the LPS human coordinate system, where the positive X-axis points to the left and the positive Y-axis points towards the back of the body; in contrast, the right side shows the RAS human coordinate system, which has the opposite orientation. To ensure accurate human contour filling and bed board removal in subsequent image processing steps, coordinate system standardization is crucial. In the coordinate system standardization module, we utilize the built-in standardization functions of the SimpleITK library to uniformly transform the input CT data to the RAS human coordinate system, thereby achieving data standardization and uniformity.
[0053] Thresholding Segmentation: In this module, we used thresholding segmentation to perform preliminary segmentation on the coordinate-standardized CT image, thereby obtaining a basic mask image. The selected threshold was carefully determined using the Otsu method, which automatically finds the optimal threshold based on image grayscale to maximize the difference between the foreground and background. However, since this algorithm is not the core focus of this patent, it will not be elaborated upon here. Figure 4 As shown, the initially generated mask image has several shortcomings, specifically, the image is relatively messy, the body membrane is incomplete, the outline is blurred, and there are significant problems such as adhesion of the bed board. Therefore, further processing measures are needed to optimize the results.
[0054] Body membrane removal module: Preliminary observation of the body membrane state in the mask data clearly shows that the body membrane adheres tightly to the surface of the body region and exhibits fine, linear features. Given this characteristic, this module calculates that the number of horizontal and vertical pixels of the fine linear body membrane in the preliminary mask image is concentrated at 2 pixels, while the small structures in the body region are much larger than 2 pixels. Therefore, a small-sized circular template with a radius of 3 is used to ensure the removal of the fine linear structures without affecting the body region. Morphological opening operations (i.e., erosion followed by dilation of the mask data) are then performed to effectively eliminate the influence of the body membrane. Figure 5 As shown, this treatment not only successfully removed the body membrane, but also removed the lines of the mechanical structure outline, with remarkable results.
[0055] Body Position Information Extraction: Subsequent processing of missing body mask areas (such as the nose and ears) and bed board removal can lead to inter-regional interference. Simply put, filling in the small grooves in the mask using morphological manipulation to supplement missing areas can result in an overly tight connection between the bed board area and the body, affecting subsequent bed board removal. To address this issue, this module reads the patient's scan position (supine or prone) from the DICOM file to clarify the bed board's location within the body. Figure 6 As shown, the image is adaptively filled with missing areas and the bed board is removed from the body based on the position of the bed board on the body.
[0056] Localized Area Filling Module: Initial observations revealed that missing areas primarily occur in the front of the body, specifically the nose, mouth, ears, and the vulnerable chest wall area. In the prone position, large areas of the bed board typically do not obstruct the view. It's worth noting that the bed board is positioned in front of the body in the prone position, but behind in the supine position. Therefore, in the design of the localized area filling module, we adopted differentiated treatment strategies for the prone and supine positions, such as... Figure 7As shown. For prone position data, we first use an opening operation with a kernel size of 5 to remove minor interference from the bed board, and then perform supplementation on the front of the body. For supine position data, supplementation is performed directly. Based on detailed prior observations, this invention uses a kernel of size 9 to dilate the anterior half of the body region in each CT image layer, aiming to enhance the fine structure of the missing areas until they reach a closed state. Subsequently, using the floodfill algorithm in OpenCV, we fill the blank parts within the closed area. After filling, an erosion operation with the same size of 9 is used to restore the filled area to its original outline size. The filling effect in the supine position is shown below. Figure 8 As shown, it can be clearly seen that the missing areas in the nasal cavity and ear have been perfectly filled.
[0057] Bed board removal module: In the prone position data, the bed board was effectively removed using the local filling module, while in the supine position data, the bed board remained adhered to the body mask. This invention categorizes bed board adhesion into two main types, such as... Figure 9 As shown: Non-stubborn bed boards and stubborn bed boards.
[0058] Non-stubborn bed plates are connected to the body region by fine structures, while stubborn bed plates have larger connection structures to the body. For non-stubborn bed plates, this invention uses a kernel-7 erosion operation to detach the fine structures from the body region, followed by two-dimensional connectivity filtering, then preservation of the largest three-dimensional connectivity, and finally a kernel-7 dilation operation to restore the original mask size. Simultaneously, for stubborn bed plates, this invention innovatively proposes a line scan detection algorithm, which will be described in detail below. Simply put, it records the change in the number of mask pixels in each row compared to the previous row. When the rate of change of the number of mask pixels in a row exceeds twice the average rate of change in that layer of CT image, it is identified as the connection point between the stubborn bed plate and the human body region, thus achieving effective removal of the stubborn bed plate. All the above operations only process the posterior side of the body region in the supine position data. The overall flowchart of the bed plate removal module is as follows: Figure 10 As shown.
[0059] Line scan detection algorithms such as Figure 11 As shown, in each CT image layer, scanning is performed from the bedside towards the body region, and the mask pixel change ratio r for each row is recorded. r is calculated as follows. The change ratios for each row are sorted to obtain a sequence R. After removing the first and last 5% to reduce the influence of outliers, the average value is taken to obtain the average mask pixel change on the bedside side of that CT image layer. , the results With the maximum value in the sequence If the difference exceeds twice the size of the bed board, it is considered a stubborn boundary between the bed board and the body, and the bed board is removed. Otherwise, if there is no bed board, no treatment is required.
[0060] ;
[0061] ;
[0062] in, This represents the number of mask pixels in the previous row of the current CT image. This represents the number of mask pixels in the current layer of the CT image. Cavity filling: After removing the body membrane, filling local areas, and removing the bed slab, global cavity filling is performed on the body region to ensure cavities such as those in lung cavities. The final effect is as follows. Figure 12 As shown.
[0063] Dicom data consists of two parts: header metadata, which stores non-image-related key information and is not directly presented as CT images; and image data, which directly stores the CT images generated by the CT scan.
[0064] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.
[0065] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A human body contour delineation algorithm system based on CT images, characterized in that, include: The preprocessing module converts CT image data to the RAS human coordinate system; The threshold segmentation method was used to segment the converted CT image data to obtain basic body mask data; The body membrane removal module removes the body membrane and mechanical structure contour lines from the basic body mask data through morphological opening operations. The body position information extraction module reads the scanned body position data from the head information, determines whether it is a prone or supine position, and clarifies the position of the bed board relative to the human body. The local area filling module uses a differentiated strategy based on the scanned body position to fill in the missing areas of the body. The bed board removal module removes bed board interference from the filled body area. The bed board removal module performs bed board removal operations on supine position data, and the bed boards are divided into non-stubborn bed boards and stubborn bed boards; For the non-stubborn bed plate, after the structure is separated from the body region by the erosion operation with a kernel of 7, two-dimensional connected domain screening is performed, followed by the operation of retaining the three-dimensional maximum connected domain, and finally the expansion operation with a kernel of 7 is performed to restore the original mask size. For the stubborn bed slab, a scan is performed from the bed slab side towards the body region in each CT image layer. The mask pixel change ratio r of each row is recorded. The change ratios of each row are sorted to obtain a sequence R. After removing the first 5% and last 5% to reduce the influence of outliers, the average value is taken to obtain the average mask pixel change of the bed slab side in that CT image layer. , the results With the maximum value in the sequence If the difference exceeds twice the size of the bed board, it is considered a stubborn boundary between the bed board and the body, and the bed board is removed. Otherwise, if there is no bed board, no treatment is required. ; ; in, This represents the number of mask pixels in the previous row of the current CT image. This represents the number of mask pixels in the current layer of the CT image. The global area fill module performs global hole filling on the body area after removing bed board interference, resulting in a complete human body contour drawing.
2. The human body contour delineation algorithm system based on CT images according to claim 1, characterized in that, The preprocessing module uses the built-in normalization functions of the SimpleITK library to perform coordinate system transformation on the CT image data.
3. The human body contour delineation algorithm system based on CT images according to claim 1, characterized in that, The optimal threshold for threshold segmentation in the morphological opening operation is determined using the Otsu method in the body membrane removal module.
4. The human body contour delineation algorithm system based on CT images according to claim 1, characterized in that, The differentiated filling strategy in the local area filling module is as follows: for prone position data, an opening operation with a kernel size of 5 is first used to remove bed board interference, and then the front of the body is filled; for supine position data, the front of the body is filled directly.
5. The human body contour delineation algorithm system based on CT images according to claim 4, characterized in that, The filling process specifically includes using a kernel of size 9 to expand the front half of the body area, filling the blank parts of the closed area with a flood filling algorithm, and then using a kernel of size 9 to perform an erosion operation to restore the original outline size.
Citation Information
Patent Citations
CT image processing method and device, electronic equipment and storage medium
CN118657708A