Cervical X-ray film segmentation identification method for obtaining precise treatment plans for bone injuries
By calculating the image performance value and edge pattern of pixel points in cervical vertebra X-ray films, screening characteristic pixel points and performing cluster segmentation, the problem of low accuracy of cervical vertebra X-ray film segmentation is solved, and the accuracy of cervical lesions is improved.
Patent Information
- Application Number
- CN202510437111.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-09
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2045-04-09
AI Technical Summary
The existing method is used to segment the cervical X-ray of patients with bone injuries, and the accuracy of the segmentation results is low, which affects the subsequent doctor's analysis of the lesions.
By analyzing the grayscale difference and grayscale values between each pixel point and the neighboring pixel point in the cervical vertebra X-ray, the image performance value, edge feature value and edge regularity degree were calculated, the characteristic pixel points were screened, and the location importance was divided, and K-means clustering and U-Net neural network were used for segmentation.
It improves the accuracy of the division results of different areas of the cervical spine X-ray, helps doctors to more accurately identify cervical spondylosis, improves the difficulty in distinguishing the edges of the intervertebral space, and supports subsequent medical diagnosis.
Smart Images

Figure CN119941741B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and particularly to a method for segmenting and identifying cervical X-ray films for obtaining accurate treatment plans for bone injuries. Background Art
[0002] Cervical spine lesions are a common type of spinal disease, occurring in people of different age groups, and gradually showing a trend of becoming younger in recent years. It has become a global health problem. At present, the common clinical diagnosis method for cervical spondylosis is X-ray imaging, which has the characteristics of wide application range, low cost, and low radiation dose to the human body, and is suitable for the routine physical examinations of most patients. This diagnostic method can better help patients check the cervical spine sequence, curvature, skeletal development status of the vertebral body and appendages, and whether there are morphological variations such as fractures, dislocations, and subluxations.
[0003] An X-ray film is essentially a two-dimensional image, which compresses the three-dimensional cervical spine structure into a plane display, which may cause the overlap of anatomical structures at different levels. The boundary between the cervical vertebrae and the intervertebral space is often not clear enough. Direct segmentation of the cervical X-ray films of bone injury patients by existing methods will result in low segmentation accuracy, affecting the accuracy of the subsequent analysis results of lesions by doctors. Summary of the Invention
[0004] In order to solve the problem that the existing methods have low accuracy in segmenting different regions of cervical X-ray films of bone injury patients, the purpose of the present invention is to provide a method for segmenting and identifying cervical X-ray films for obtaining accurate treatment plans for bone injuries, and the specific technical solutions adopted are as follows:
[0005] The present invention provides a method for segmenting and identifying cervical X-ray films for obtaining accurate treatment plans for bone injuries, and the method includes the following steps:
[0006] Obtain the cervical X-ray film of a bone injury patient;
[0007] According to the gray-scale difference between each pixel point and its neighboring pixel points and the gray-scale value of each pixel point in the cervical X-ray film, obtain the image performance value of each pixel point; according to the position distribution of each pixel point on each class horizontal edge line and the image performance value, obtain the edge feature value of each pixel point on each class horizontal edge line; according to the gray-scale difference between each pixel point on each class horizontal edge line and its surrounding pixel points and the edge feature value, obtain the edge regularity degree of the corresponding pixel point;
[0008] Screen the feature pixel points based on the degree of edge regularity; determine the importance degree of each pixel point by combining the difference in the degree of edge regularity between each feature pixel point and its adjacent pixel points, the degree of edge regularity of each feature pixel point, the relative position distribution of each feature pixel point and the class longitudinal edge line, and the image performance value of each pixel point; wherein, the class horizontal edge line and the class longitudinal edge line are determined according to the inclination degree of the non-closed edge line;
[0009] Divide all pixel points using all the importance degrees of positions to obtain the target area.
[0010] Preferably, obtaining the image performance value of each pixel point according to the gray-scale difference between each pixel point and its neighborhood pixel points and the gray-scale value of each pixel point in the cervical spine X-ray film includes:
[0011] Obtain the image performance value of the candidate pixel point according to the gray-scale difference between the candidate pixel point and all pixel points in its neighborhood and the gray-scale value of the candidate pixel point, and both the gray-scale difference between the candidate pixel point and all pixel points in its neighborhood and the gray-scale value of the candidate pixel point are positively correlated with the image performance value;
[0012] The candidate pixel point is any pixel point in the cervical spine X-ray film.
[0013] Preferably, the obtaining of the class horizontal edge line and the class longitudinal edge line includes:
[0014] Calculate the absolute value of the average value of the slopes of all pixel points on each non-closed edge line in the cervical spine X-ray film of the bone injury patient, and record it as the inclination index of each non-closed edge line;
[0015] Determine the non-closed edge line with an inclination index less than the preset slope threshold as the class horizontal edge line, and determine the non-closed edge line with an inclination index greater than or equal to the preset slope threshold as the class longitudinal edge line.
[0016] Preferably, obtaining the edge feature value of each pixel point on each class horizontal edge line according to the position distribution of each pixel point on each class horizontal edge line and the image performance value includes:
[0017] For each class longitudinal edge line, draw a perpendicular line through the midpoint of each class longitudinal edge line;
[0018] Calculate the difference between the minimum value of the distances between the pixel point to be analyzed and all the perpendicular lines and half of the length of the horizontal edge line where the pixel point to be analyzed is located, and record it as the length difference;
[0019] Based on the image performance value of the pixel to be analyzed and the length difference, an edge feature value of the pixel to be analyzed is obtained. There is a positive correlation between the image performance value of the pixel to be analyzed and the edge feature value, and a negative correlation between the length difference and the edge feature value;
[0020] The pixel to be analyzed is any pixel on any horizontal edge line of any type.
[0021] Preferably, obtaining the edge regularity degree of the corresponding pixel based on the gray - level difference between each pixel on each horizontal edge line of each type and its surrounding pixels and the edge feature value includes:
[0022] Calculate the average value of the differences between the gray - level values of the pixel to be analyzed and its adjacent pixels on the line where the pixel to be analyzed is located, and denote it as the gray - level average difference of the pixel to be analyzed;
[0023] Based on the edge feature value of the pixel to be analyzed and the gray - level average difference, obtain the edge regularity degree of the pixel to be analyzed. There is a positive correlation between the edge feature value and the edge regularity degree, and a negative correlation between the gray - level average difference and the edge regularity degree.
[0024] Preferably, screening the characteristic pixels based on the edge regularity degree includes: determining the pixels with an edge regularity degree greater than a preset regularity threshold as characteristic pixels.
[0025] Preferably, combining the difference in the edge regularity degree between each characteristic pixel and its adjacent pixels, the edge regularity degree of each characteristic pixel, the relative position distribution of each characteristic pixel and the vertical edge line of each type, and the image performance value of each pixel to determine the position importance degree of each pixel includes:
[0026] Denote the line connecting the to - be - evaluated characteristic pixel and the nearest endpoint of the nearest vertical edge line of its type as the reference line segment of the to - be - evaluated characteristic pixel; obtain the rotation angle that rotates counter - clockwise from the horizontal right - hand direction to the horizontal edge line where the to - be - evaluated characteristic pixel is located. If the rotation angle is less than 90 degrees, let the angle feature value of the to - be - evaluated characteristic pixel be - 1; if the rotation angle is greater than or equal to 90 degrees, let the angle feature value of the to - be - evaluated characteristic pixel be 1;
[0027] Based on the difference in the edge regularity degree between the to - be - evaluated characteristic pixel and its adjacent pixels, the edge regularity degree of the to - be - evaluated characteristic pixel, and the angle feature value, obtain the position importance factor of the to - be - evaluated characteristic pixel; the to - be - evaluated characteristic pixel is any characteristic pixel;
[0028] Let the position importance factor of the pixels other than the characteristic pixels be 0;
[0029] Determine the position importance degree of each pixel point by combining the position importance factor and the image performance value of each pixel point.
[0030] Preferably, the determining the position importance degree of each pixel point by combining the position importance factor and the image performance value of each pixel point includes:
[0031] Determine the sum of the position importance factor and the image performance value of each pixel point as the position importance degree of each pixel point.
[0032] Preferably, the dividing all pixel points by using all position importance degrees to obtain the target area includes:
[0033] Cluster all pixel points based on the position importance degrees of all pixel points in the cervical X-ray film of the bone injury patient, and extract the target area based on the clustering result.
[0034] The present invention has at least the following beneficial effects:
[0035] The present invention first analyzes the image performance characteristics of each pixel point according to the gray difference between each pixel point and its neighboring pixel points and the gray value of each pixel point in the cervical X-ray film to obtain the image performance value. Then, considering the distribution of the cervical vertebra, the edge regularity degree of the pixel points is evaluated according to the position distribution of each pixel point on each class of horizontal edge lines and the gray difference between each pixel point on each class of horizontal edge lines and its surrounding pixel points. Furthermore, multiple characteristic pixel points are screened out. Then, according to the different change characteristics on the edge of each vertebral body of the cervical vertebra, the distribution change of the pixel points around the intervertebral space is obtained, so as to evaluate the importance degree of the positions where the pixel points at different positions are located. Furthermore, all pixel points are divided into multiple different areas based on the position importance degree, which is convenient for extracting the target area. The method provided by the present invention realizes the effective segmentation of the vertebral body area in the image, improves the situation that the edge between the intervertebral spaces is difficult to distinguish or unclear, improves the accuracy of the division results of different areas, provides support for subsequent medical diagnosis, and helps doctors identify cervical spine lesions. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0037] Figure 1 It is a flowchart of a method for segmenting and identifying a cervical X-ray film for obtaining a precise treatment plan for bone injury according to an embodiment of the present invention;
[0038] Figure 2 The structural block diagram of a cervical X-ray film segmentation and identification system for obtaining an accurate osteopathy treatment plan provided by an embodiment of the present invention. Detailed implementation manners
[0039] In order to further elaborate on the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following, in combination with the accompanying drawings and preferred embodiments, details the cervical X-ray film segmentation and identification method for obtaining an accurate osteopathy treatment plan according to the present invention as follows.
[0040] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present invention belongs.
[0041] The following specifically describes the specific solution of the cervical X-ray film segmentation and identification method provided by the present invention in combination with the accompanying drawings.
[0042] Embodiment of the cervical X-ray film segmentation and identification method for obtaining an accurate osteopathy treatment plan:
[0043] The specific scenario targeted by this embodiment is: when detecting the cervical vertebra of an osteopathy patient, in order to improve the accuracy of the detection result, it is necessary to extract important regions from the entire cervical X-ray film of the osteopathy patient to assist the doctor in accurate detection.
[0044] This embodiment proposes a cervical X-ray film segmentation and identification method for obtaining an accurate osteopathy treatment plan. As Figure 1 shown, the cervical X-ray film segmentation and identification method for obtaining an accurate osteopathy treatment plan of this embodiment includes the following steps:
[0045] Step S1, obtain the cervical X-ray film of the osteopathy patient.
[0046] First, collect the cervical X-ray film of the osteopathy patient. Specifically, adjust the appropriate body position of the osteopathy patient according to the required angle to ensure that the collected cervical X-ray film of the osteopathy patient can clearly show the cervical vertebra structure. During the shooting process, use an X-ray machine to generate an image, and the radiology technician adjusts parameters such as the exposure time and angle according to the need. Usually, digital X-ray equipment is used, and the image is directly stored as an electronic file. In digital X-ray equipment, the imaging data will be converted into digital signals by a detector to generate an electronic image, that is, the cervical X-ray film of the osteopathy patient is obtained.
[0047] So far, this embodiment has obtained the cervical X-ray film of the osteopathy patient.
[0048] Step S2: Based on the gray - level differences between each pixel point and its neighboring pixel points in the cervical spine X - ray film and the gray - level value of each pixel point, obtain the image performance value of each pixel point; based on the position distribution of each pixel point on each quasi - horizontal edge line and the image performance value, obtain the edge feature value of each pixel point on each quasi - horizontal edge line; based on the gray - level differences between each pixel point on each quasi - horizontal edge line and its surrounding pixel points and the edge feature value, obtain the degree of edge regularity of the corresponding pixel point.
[0049] In the X - ray film of the cervical spine, it contains different types of tissues, including bones, soft tissues, and intervertebral discs. The cervical spine structure is mainly composed of multiple vertebral bodies, which are arranged together to form the specific anatomical structure of the cervical spine. Due to its physiological characteristics, the density and composition of each tissue are different, resulting in obvious gray - level differences in the X - ray film. The vertebral bodies of the cervical spine are mainly composed of bone tissue, which is a high - density tissue. In the X - ray film, due to its high calcium content and density, bones usually appear as obvious high - density white shadows in the image, and these shadows present clear vertebral body boundaries. Relatively speaking, the display ability of soft tissues is poor, and they usually appear as low - density shadows or are almost invisible in the X - ray film. For example, muscles, ligaments, and intervertebral discs are mainly composed of water and organic substances, and their density is much lower than that of the vertebral bodies, so they appear as darker areas in the X - ray image. In the captured image, the intervertebral discs and the surrounding soft tissues are areas of lower density, usually shown as gray or darker areas. These density differences have different manifestations in different image areas, so first analyze the performance characteristics of each pixel point in the image.
[0050] Specifically, use the Canny edge detection algorithm to detect the cervical spine X - ray film of the bone injury patient, and obtain all the edge lines and edge pixel points in the cervical spine X - ray film of the bone injury patient. The Canny edge detection algorithm is a prior art and will not be elaborated here.
[0051] Next, this embodiment takes any edge pixel point in the cervical spine X - ray film of the bone injury patient as an example for illustration, and the method provided in this embodiment can be used to process other edge pixel points in the cervical spine X - ray film of the bone injury patient.
[0052] Specifically, denote any edge pixel point in the cervical spine X - ray film of the bone injury patient as a candidate pixel point. Based on the gray - level differences between the candidate pixel point and all pixel points in its neighborhood and the gray - level value of the candidate pixel point, obtain the image performance value of the candidate pixel point. The gray - level differences between the candidate pixel point and all pixel points in its neighborhood and the gray - level value of the candidate pixel point are all positively correlated with the image performance value.
[0053] Among them, the positive correlation relationship means that the dependent variable increases as the independent variable increases, and the dependent variable decreases as the independent variable decreases. It can be an additive relationship, a multiplicative relationship, etc., which is determined by the actual application.
[0054] In this embodiment, a specific calculation formula for the image performance value is given. The image performance value of the i-th pixel point in the cervical spine X-ray film of an osteoporotic patient can be expressed as:
[0055]
[0056] Among them, represents the image performance value of the i-th pixel point in the cervical spine X-ray film of an osteoporotic patient, represents the gray value of the i-th pixel point, represents the gray value of the j-th pixel point in the neighborhood of the i-th pixel point, represents the gray value when the number of pixel points with the same gray level in the cervical spine X-ray film of an osteoporotic patient is the largest and the gray value is the largest at the same time. n represents the number of pixel points in the neighborhood of the i-th pixel point, represents the absolute value symbol, and norm( ) represents the normalization function, represents a preset first adjustment parameter.
[0057] In this embodiment, a preset first adjustment parameter is introduced into the calculation formula of the image performance value to prevent the denominator from being 0. In this embodiment, the preset first adjustment parameter is 0.01. In specific applications, the implementer can set it according to specific circumstances. In this embodiment, the size of the neighborhood is an eight-neighborhood. In specific applications, the implementer can set it according to specific circumstances.
[0058] represents the gray difference between the i-th pixel point and its surrounding pixel points. The larger the difference, the greater the degree of change of the pixel point in the image, and it may be a pixel point on the edge of the vertebral body. represents the difference between the i-th pixel point and most of the pixel points with higher gray values in the image. The smaller this value, the closer the gray value of the i-th pixel point is to these pixel points, and the more important part of the image it is, that is, the larger the image performance value.
[0059] Since the edges of the vertebral bodies in the cervical spine are more obvious in the vertical direction, after edge detection, a relatively clear and complete edge in the vertical direction of each vertebral body can be obtained, and the overall shape and distribution of each cervical vertebra can be observed. The distribution of the correct edge of each vertebral body for each edge point can be analyzed through the relationship between the edges connected to each edge.
[0060] Based on the above features, calculate the absolute value of the average of the slopes of all pixel points on each non-closed edge line in the cervical spine X-ray film of the bone injury patient, which is denoted as the inclination index of each non-closed edge line; determine the non-closed edge lines with an inclination index less than the preset slope threshold as class horizontal edge lines, and the non-closed edge lines with an inclination index greater than or equal to the preset slope threshold. In this embodiment, the preset slope threshold is 1. In specific applications, the implementer can set it according to the specific situation.
[0061] For each class longitudinal edge line, draw a perpendicular line through the midpoint of each class longitudinal edge line.
[0062] Denote any pixel point on any class horizontal edge line as the pixel point to be analyzed, calculate the difference between the minimum value of the distances between the pixel point to be analyzed and all perpendicular lines and half of the length of the horizontal edge line where the pixel point to be analyzed is located, which is denoted as the length difference; obtain the edge feature value of the pixel point to be analyzed according to the image performance value of the pixel point to be analyzed and the length difference. The image performance value of the pixel point to be analyzed has a positive correlation with the edge feature value, and the length difference has a negative correlation with the edge feature value.
[0063] Among them, the positive correlation means that the dependent variable will increase as the independent variable increases, and the dependent variable will decrease as the independent variable decreases. It can be an additive relationship, a multiplicative relationship, etc., which is determined by the actual application; the negative correlation means that the dependent variable will decrease as the independent variable increases, and the dependent variable will increase as the independent variable decreases. It can be a subtractive relationship, a divisive relationship, etc., which is determined by the actual application.
[0064] In this embodiment, a specific calculation formula for the edge feature value is given. The edge feature value of the u-th pixel point on the t-th class horizontal edge line can be expressed as:
[0065]
[0066] Among them, represents the edge feature value of the u-th pixel point on the t-th class horizontal edge line, represents the image performance value of the u-th pixel point on the t-th class horizontal edge line, represents the minimum value of the distances between the u-th pixel point on the t-th class horizontal edge line and all perpendicular lines, represents the total number of pixel points on the t-th class horizontal edge line, represents half of the total number of pixel points on the t-th class horizontal edge line, represents the preset second adjustment parameter.
[0067] In this embodiment, a preset second adjustment is introduced into the calculation formula of the edge feature value to prevent the denominator from being 0. In this embodiment, the preset second adjustment parameter is 0.01. In specific applications, the implementer can set it according to specific circumstances.
[0068] The larger the image representation value of the u-th pixel on the t-th class horizontal edge line, the more likely it is that this pixel is a pixel on the vertebral body edge; under normal circumstances, the distance of the pixel located on the vertebral body edge from the vertical line should be close to half of the length of the vertical edge, while the pixels located inside the vertebral body or other positions will not be close. Therefore the smaller the value of, the more likely it is a feature point located on the vertebral body edge, that is, the larger the edge feature value.
[0069] Under normal circumstances, the X-ray image of the vertebral body shows a clear rectangular or oval contour formed by two upper and lower horizontal edges connected to the longitudinal edge, representing the shape of the vertebral body. However, the imaging characteristics of the X-ray film may cause multiple horizontal edges connected to the longitudinal edge to appear in the image, resulting in blurred and irregular images. This situation may be due to factors such as shooting angle, equipment limitations, or patient position. Therefore, when analyzing cervical X-ray films, special attention needs to be paid to the structural changes and edges of the vertebral body edge.
[0070] In the X-ray image, the normal vertebral body edge usually shows that the gray value gradually changes from light to dark from the edge to the inside. In the direction towards the inside of the vertebral body, the change of the gray value is relatively gentle and uniform, showing the continuity and stability of the bone structure. In contrast, the change of the gray value at the intervertebral space and other edge parts is more irregular. At the intervertebral space, due to the presence of soft tissues or the nucleus pulposus, the absorption degree of X-rays is relatively low, and because the shape and position of the intervertebral disc may change, the distribution of the gray value may also show uneven characteristics, which makes these areas more likely to show blurred or irregular edges in the X-ray film.
[0071] Next, still taking the pixel to be analyzed as an example for illustration. Specifically, the average value of the differences between the gray values of the pixel to be analyzed and its adjacent pixels is calculated on the straight line where the pixel to be analyzed is located, and is denoted as the gray average difference of the pixel to be analyzed; according to the edge feature value of the pixel to be analyzed and the gray average difference, the edge regularity degree of the pixel to be analyzed is obtained. The edge feature value has a positive correlation with the edge regularity degree, and the gray average difference has a negative correlation with the edge regularity degree.
[0072] Among them, a positive correlation means that the dependent variable increases as the independent variable increases and decreases as the independent variable decreases. It can be an additive relationship, a multiplicative relationship, etc., which is determined by the actual application. A negative correlation means that the dependent variable decreases as the independent variable increases and increases as the independent variable decreases. It can be a subtractive relationship, a division relationship, etc., which is determined by the actual application.
[0073] In this embodiment, a specific calculation formula for the edge regularity degree is given. The edge regularity degree of the u-th pixel on the t-th class of horizontal edge lines can be expressed as:
[0074]
[0075] Among them, represents the edge regularity degree of the u-th pixel on the t-th class of horizontal edge lines, represents the edge feature value of the u-th pixel on the t-th class of horizontal edge lines, represents the average value of the differences between the gray values of the u-th pixel on the t-th class of horizontal edge lines and its adjacent pixels, represents a preset third adjustment parameter.
[0076] It should be noted that: in this embodiment, the method for obtaining the difference between the gray values of two pixels is: taking the absolute value of the difference between the gray values of these two pixels as the difference between the gray values of these two pixels.
[0077] Introducing a preset third adjustment parameter in the calculation formula of the edge regularity degree is to prevent the denominator from being 0. In this embodiment, the preset third adjustment parameter is 0.1. In specific applications, the implementer can set it according to the specific situation. When the edge feature value of the u-th pixel on the t-th class of horizontal edge lines is larger and the average value of the differences between the gray values of the u-th pixel and its adjacent pixels is smaller, it indicates that the change of the gray value presents a uniform feature, and the edge regularity degree of the u-th pixel is larger, and it is more likely to be an important edge of the vertebral body, that is, the larger the edge regularity degree.
[0078] By using the above method, the edge regularity degree of each pixel on each class of horizontal edge lines in the cervical spine X-ray film of the orthopedic injury patient can be obtained.
[0079] Step S3, screening feature pixels based on the edge regularity degree; combining the difference in the edge regularity degree between each feature pixel and its adjacent pixels, the edge regularity degree of each feature pixel, the relative position distribution of each feature pixel and the class of vertical edge lines, and the image performance value of each pixel, to determine the position importance of each pixel.
[0080] In an X-ray image, the vertebral body usually appears in a rectangular shape, and the edges around it gradually concave inward. This manifestation reflects the structural characteristics of the vertebral body bone. Therefore, when observing the edges near the intervertebral space, if there is a characteristic of concave inward towards the vertebral body, it indicates that this edge belongs to the edge of the current vertebral body, rather than a part of other vertebral bodies. This concave condition is consistent with the anatomical structure of a normal vertebral body. If the edges near the intervertebral space present a similar shape of concave inward towards the vertebral body, it indicates that the edge characteristics in this area conform to the morphological characteristics of the current vertebral body.
[0081] Pixels with an edge regularity degree greater than a preset regularity threshold are determined as characteristic pixels. In this embodiment, the preset regularity threshold is 0.65. In specific applications, the implementer can set it according to specific circumstances.
[0082] Next, take any characteristic pixel as an example for illustration. The methods provided in this embodiment can be used to process other characteristic pixels.
[0083] Specifically, denote any characteristic pixel as the to-be-evaluated characteristic pixel, and denote the line connecting the to-be-evaluated characteristic pixel and the nearest endpoint of the nearest class longitudinal edge line as the reference line segment of the to-be-evaluated characteristic pixel; obtain the rotation angle starting from the horizontal right direction and rotating counterclockwise to the class transverse edge line where the to-be-evaluated characteristic pixel is located. If the rotation angle is less than 90 degrees, it indicates that the pixel may not be concave inward towards the vertebral body and may be a pixel in the intervertebral space or on other edges on the other side of the vertebral body. Let the angle characteristic value of the to-be-evaluated characteristic pixel be -1; if the rotation angle is greater than or equal to 90 degrees, it indicates that the pixel is concave inward towards the cone body, and the possibility of it being the edge of the vertebral body is greater and the importance is higher. Let the angle characteristic value of the to-be-evaluated characteristic pixel be 1. According to the difference in the edge regularity degree between the to-be-evaluated characteristic pixel and its adjacent pixels, the edge regularity degree of the to-be-evaluated characteristic pixel, and the angle characteristic value, obtain the position importance factor of the to-be-evaluated characteristic pixel.
[0084] In this embodiment, a specific calculation formula for the position importance factor is given. The position importance factor of the v-th characteristic pixel can be expressed as:
[0085]
[0086] Where, represents the position importance factor of the v-th characteristic pixel, represents the angle characteristic value of the v-th characteristic pixel, represents the edge regularity degree of the v-th characteristic pixel, represents the edge regularity degree of the adjacent pixels of the v-th characteristic pixel, The symbol | | represents the absolute value, and exp( ) represents the exponential function with the natural constant as the base.
[0087] It represents the difference between the edge regularity degree of the v-th characteristic pixel point and that of its adjacent pixel points. The smaller this value is, the smaller the difference in the edge regularity degree between the two pixel points, the more likely the two pixel points belong to the same continuous edge, and the greater the accuracy of the position. The larger the value of is, the higher the accuracy of the position when the v-th characteristic pixel point is inside the vertebral body, and at the same time, the greater the edge regularity degree, the greater the possibility that the v-th characteristic pixel point is the edge of the vertebral body, that is, the greater the position importance factor of the v-th characteristic pixel point. It should be noted that if there is more than one adjacent pixel point of the v-th characteristic pixel point, the average value of the edge regularity degrees of all adjacent pixel points is used as the edge regularity degree of the adjacent pixel points of the v-th characteristic pixel point.
[0088] By using the above method, the position importance factor of each characteristic pixel point can be obtained.
[0089] For the normal edges of the vertebral body, these regions usually carry key information to help doctors accurately identify the shape, boundary, and structural state of the vertebral body. The edges of the vertebral body are one of the most critical parts in the X-ray image. Any subtle morphological changes, edge irregularities, or bone abnormalities may be indications of potential diseases. Therefore, the pixel points on the normal edges of the vertebral body should be enhanced more strongly to make these edges clearer and more prominent in the image. By enhancing the contrast of the vertebral body edges, doctors can more precisely observe the morphological changes of the vertebral body. Especially when the vertebral body shows degenerative changes, fractures, or other abnormalities, this enhancement can help improve the diagnostic accuracy.
[0090] For the pixel points of the intervertebral space and other interfering edges, the degree of enhancement should be appropriately reduced. Due to the different tissue structures between the intervertebral space and the vertebral body, it usually appears as a relatively flat or blurred area, and the changes in its edges are relatively irregular. Excessive enhancement of the contrast in these regions may lead to more noise or artifacts in the image, which will instead interfere with the observation of the vertebral body structure. Therefore, in the intervertebral space and other regions that may carry interfering information, the degree of enhancement should be relatively low to avoid adding unnecessary details in the image and ensure that these regions do not affect the normal structural analysis of the vertebral body. In addition, for other interfering edges, such as false edges formed due to shooting angles, patient positions, equipment inaccuracies, etc., the enhancement also needs to be reduced. Excessive strengthening of these false or non-real edge information may lead to misdiagnosis and affect the correct understanding of the vertebral body and its surrounding structures.
[0091] Based on the above features, in this embodiment, the position importance factor of each pixel point in the cervical X-ray film of the bone injury patient except the characteristic pixel points is set to 0. Then, the sum of the position importance factor of each pixel point and its image performance value is determined as the position importance degree of each pixel point. The greater the position importance degree, the more important the position is and the more it needs to be enhanced.
[0092] So far, the position importance degree of each pixel point in the cervical X-ray film of the bone injury patient has been obtained.
[0093] Step S4: Use all the position importance degrees to divide all the pixel points to obtain the target area.
[0094] In this embodiment, the position importance degree of each pixel point in the cervical X-ray film of the bone injury patient is obtained in step S3. Next, all the pixel points will be clustered based on the position importance degree.
[0095] Specifically, based on the position importance degrees of all the pixel points in the cervical X-ray film of the bone injury patient, the K-means clustering algorithm is used to cluster all the pixel points in the cervical X-ray film of the bone injury patient to obtain multiple clusters. The pixel points in each cluster have similar and highly correlated features, representing important areas in the image. The K-means clustering algorithm is a prior art and will not be elaborated here.
[0096] After the clustering is completed, according to the divided different regions, histogram equalization is performed on each region respectively to enhance the contrast and ensure that the details of each region are clearer. Finally, the U-Net neural network is used to segment the image to extract the target area of the cervical X-ray film. The target area is the area that needs to be focused on, thereby assisting the doctor to analyze the morphology of each vertebral body and the condition of the intervertebral space, judge whether there are signs of intervertebral disc herniation or degeneration, observe whether there are bone spurs or other abnormal conditions on the edge of the vertebral body, and analyze the morphological changes of the vertebral body, including whether it shows deformation, deformity, etc. If it is observed that the edge of the vertebral body is deformed, it may indicate osteoporosis or other diseases.
[0097] In this embodiment, first, according to the gray - level difference between each pixel point and its neighboring pixel points in the cervical spine X - ray film and the gray - level value of each pixel point, the imaging performance characteristics of each pixel point are analyzed to obtain the imaging performance value. Then, considering the distribution of the cervical spine, based on the position distribution of each pixel point on each class of horizontal edge line and the gray - level difference between each pixel point on each class of horizontal edge line and its surrounding pixel points, the degree of edge regularity of the pixel points is evaluated. Furthermore, multiple characteristic pixel points are selected. Then, according to the different change characteristics on the edge of each vertebral body of the cervical spine, the distribution change of the pixel points around the intervertebral space is obtained, so as to evaluate the importance of the positions of pixel points at different positions. Furthermore, all pixel points are divided into multiple different regions based on the position importance, which is convenient for extracting the target region. The method provided in this embodiment realizes the effective segmentation of the vertebral body region in the image, improves the situation where the edges between intervertebral spaces are difficult to distinguish or are unclear, and improves the accuracy of the division results of different regions, providing support for subsequent medical diagnosis and helping doctors identify cervical spine lesions.
[0098] Embodiment of a cervical spine X - ray film segmentation and identification system for obtaining a precise treatment plan for bone injuries:
[0099] Refer to Figure 2 , which shows a structural block diagram of a cervical spine X - ray film segmentation and identification system for obtaining a precise treatment plan for bone injuries provided by an embodiment of the present invention. The system may include an image acquisition module, a first calculation module, a second calculation module, and a target region determination module.
[0100] Among them, the image acquisition module is used to acquire the cervical spine X - ray film of a bone injury patient;
[0101] The first calculation module is used to obtain the imaging performance value of each pixel point according to the gray - level difference between each pixel point and its neighboring pixel points in the cervical spine X - ray film and the gray - level value of each pixel point; obtain the edge feature value of each pixel point on each class of horizontal edge line according to the position distribution of each pixel point on each class of horizontal edge line and the imaging performance value; obtain the degree of edge regularity of the corresponding pixel point according to the gray - level difference between each pixel point on each class of horizontal edge line and its surrounding pixel points and the edge feature value;
[0102] The second calculation module is used to screen characteristic pixel points based on the degree of edge regularity; determine the position importance of each pixel point by combining the difference in the degree of edge regularity between each characteristic pixel point and its adjacent pixel points, the degree of edge regularity of each characteristic pixel point, the relative position distribution of each characteristic pixel point and the class of vertical edge line, and the imaging performance value of each pixel point; where the class of horizontal edge line and the class of vertical edge line are determined according to the inclination degree of the non - closed edge line;
[0103] A target area determination module, configured to divide all pixel points by using the importance degree of all positions, so as to obtain a target area.
[0104] It should be understood that Figure 2 The structural block diagram and modules of the cervical X-ray film segmentation identification system for obtaining an accurate bone injury treatment plan shown can be implemented in various ways. For example, in some embodiments, the system and its modules can be implemented through hardware, software, or a combination of software and hardware. Among them, the hardware part can be implemented by using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated designed hardware. Those skilled in the art can understand that the above methods and systems can be implemented by using computer-executable instructions and / or included in the processor control code. For example, such code is provided on a carrier medium such as a disk, CD, or DVD-ROM, a programmable memory such as a read-only memory (firmware), or a data carrier such as an optical or electronic signal carrier. The systems and modules in this specification can be implemented not only by hardware circuits such as very large scale integrated circuits or gate arrays, semiconductors such as logic chips and transistors, or programmable hardware devices such as field programmable gate arrays and programmable logic devices, but also by software executed by various types of processors, or by a combination of the above hardware circuits and software (for example, firmware).
[0105] For more details about the above-mentioned various modules, reference can be made to other parts of this specification, and details will not be elaborated here.
[0106] In other embodiments, a cervical X-ray film segmentation identification device for obtaining an accurate bone injury treatment plan is further provided, including a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, so that the device executes the above-mentioned cervical X-ray film segmentation identification method for obtaining an accurate bone injury treatment plan. The device can specifically be a chip, a component, or a module. The chip can include a connected processor and a memory; among them, the memory is used to store instructions, and when the processor calls and executes the instructions, the chip can execute the cervical X-ray film segmentation identification method provided in the above embodiments for obtaining an accurate bone injury treatment plan.
[0107] In other embodiments, a computer program product is further provided. When the computer program product runs on a computer, it enables the computer to execute the above-related steps to implement the cervical X-ray film segmentation identification method provided in the above embodiments for obtaining an accurate bone injury treatment plan.
[0108] In other embodiments, a computer-readable storage medium is further provided, in which computer program code is stored. When the computer program code runs on a computer, the computer is caused to execute the above-related method steps to implement the cervical X-ray image segmentation and identification method for obtaining a precise treatment plan for bone injuries provided in the above embodiments.
[0109] Among them, the provided system, electronic device, computer program product, and computer-readable storage medium are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be elaborated here.
[0110] It should be noted that the above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for segmenting and marking cervical X-ray films for obtaining precise treatment plans for bone injuries, characterized in that, The method includes the following steps: Obtain the cervical spine X-ray film of the bone injury patient; Based on the gray-scale difference between each pixel point and its neighboring pixel points in the cervical spine X-ray film and the gray-scale value of each pixel point, obtain the image performance value of each pixel point; based on the position distribution of each pixel point on each quasi-horizontal edge line and the image performance value, obtain the edge feature value of each pixel point on each quasi-horizontal edge line; based on the gray-scale difference between each pixel point on each quasi-horizontal edge line and its surrounding pixel points and the edge feature value, obtain the degree of edge regularity of the corresponding pixel point; Screen the feature pixel points based on the degree of edge regularity; combine the difference in the degree of edge regularity between each feature pixel point and its adjacent pixel points, the degree of edge regularity of each feature pixel point, the relative position distribution of each feature pixel point and the quasi-vertical edge line, and the image performance value of each pixel point to determine the importance degree of the position of each pixel point; wherein, the quasi-horizontal edge line and the quasi-vertical edge line are determined according to the inclination degree of the non-closed edge line; Use all the importance degrees of the positions to divide all the pixel points to obtain the target area; The obtaining of the quasi-horizontal edge line and the quasi-vertical edge line includes: Calculate the absolute value of the average value of the slopes of all pixel points on each non-closed edge line in the cervical spine X-ray film of the bone injury patient, and record it as the inclination index of each non-closed edge line; Determine the non-closed edge line with an inclination index less than the preset slope threshold as the quasi-horizontal edge line, and determine the non-closed edge line with an inclination index greater than or equal to the preset slope threshold as the quasi-vertical edge line.
2. The cervical X-ray film segmentation and identification method for obtaining an accurate treatment plan for bone injuries according to claim 1, characterized in that, The obtaining of the image performance value of each pixel point based on the gray-scale difference between each pixel point and its neighboring pixel points in the cervical spine X-ray film and the gray-scale value of each pixel point includes: Based on the gray-scale difference between the candidate pixel point and all pixel points in its neighborhood and the gray-scale value of the candidate pixel point, obtain the image performance value of the candidate pixel point, and both the gray-scale difference between the candidate pixel point and all pixel points in its neighborhood and the gray-scale value of the candidate pixel point are positively correlated with the image performance value; The candidate pixel point is any pixel point in the cervical spine X-ray film.
3. The cervical X-ray film segmentation and identification method for obtaining a precise treatment plan for bone injuries according to claim 1, wherein The obtaining of the edge feature value of each pixel point on each quasi-horizontal edge line based on the position distribution of each pixel point on each quasi-horizontal edge line and the image performance value includes: For each quasi-vertical edge line, draw a perpendicular line through the midpoint of each quasi-vertical edge line; Calculate the difference between the minimum value of the distances between the pixel point to be analyzed and all the perpendicular lines and half of the length of the horizontal edge line where the pixel point to be analyzed is located, and record it as the length difference; Based on the image performance value of the pixel point to be analyzed and the length difference, obtain the edge feature value of the pixel point to be analyzed, and the image performance value of the pixel point to be analyzed is positively correlated with the edge feature value, and the length difference is negatively correlated with the edge feature value; The pixel point to be analyzed is any pixel point on any quasi-horizontal edge line.
4. The cervical X-ray film segmentation and identification method for obtaining an accurate osteopathy treatment plan according to claim 3, wherein The obtaining of the degree of edge regularity of the corresponding pixel point based on the gray-scale difference between each pixel point on each quasi-horizontal edge line and its surrounding pixel points and the edge feature value includes: Calculate the average of the differences in grayscale values between the pixel to be analyzed and its adjacent pixels on the straight line where the pixel to be analyzed is located, and denote it as the average grayscale difference of the pixel to be analyzed. Based on the edge feature value of the pixel to be analyzed and the average grayscale difference, obtain the degree of edge regularity of the pixel to be analyzed. The edge feature value has a positive correlation with the degree of edge regularity, and the average grayscale difference has a negative correlation with the degree of edge regularity.
5. The cervical X-ray film segmentation and identification method for obtaining a precise treatment plan for bone injuries according to claim 1, wherein The screening of feature pixels based on the degree of edge regularity includes: determining pixels with an edge regularity degree greater than a preset regularity threshold as feature pixels.
6. The cervical X-ray film segmentation and identification method for obtaining an accurate osteopathy treatment plan according to claim 1, wherein Combining the difference in the degree of edge regularity between each feature pixel and its adjacent pixels, the degree of edge regularity of each feature pixel, the relative position distribution of each feature pixel and the class longitudinal edge line, and the image performance value of each pixel to determine the position importance of each pixel, including: Denote the line connecting the to-be-evaluated feature pixel and the nearest endpoint of the class longitudinal edge line closest to it as the reference line segment of the to-be-evaluated feature pixel; obtain the rotation angle that rotates counterclockwise from the horizontal right direction to the class horizontal edge line where the to-be-evaluated feature pixel is located. If the rotation angle is less than 90 degrees, let the angle feature value of the to-be-evaluated feature pixel be -1; if the rotation angle is greater than or equal to 90 degrees, let the angle feature value of the to-be-evaluated feature pixel be 1. Based on the difference in the degree of edge regularity between the to-be-evaluated feature pixel and its adjacent pixels, the degree of edge regularity of the to-be-evaluated feature pixel, and the angle feature value, obtain the position importance factor of the to-be-evaluated feature pixel; the to-be-evaluated feature pixel is any feature pixel. Let the position importance factor of pixels other than feature pixels be 0. Combine the position importance factor of each pixel and the image performance value to determine the position importance of each pixel.
7. The cervical X-ray film segmentation and identification method for obtaining an accurate treatment plan for bone injuries according to claim 6, characterized in that, The combining the position importance factor of each pixel and the image performance value to determine the position importance of each pixel includes: Determine the sum of the position importance factor of each pixel and its image performance value as the position importance of each pixel.
8. The cervical spine X-ray film segmentation and identification method for obtaining a precise treatment plan for bone injuries according to claim 1, characterized in that The using all position importances to divide all pixels to obtain the target area includes: Cluster all pixels based on the position importances of all pixels in the cervical X-ray film of an orthopedic patient, and extract the target area based on the clustering result.
9. The cervical X-ray film segmentation and identification method for obtaining a precise osteopathy treatment plan according to claim 8, characterized in that Use the K-means clustering algorithm to cluster all pixels in the cervical X-ray film of an orthopedic patient.
Citation Information
Patent Citations
Medical remote intelligent monitoring method and system
CN117156182A
Lumbar osteoporosis auxiliary detection method and system based on X-ray film
CN119151946A