Fracture image interactive segmentation method and system

By acquiring key points and dividing key areas in the fracture CT image and calculating the optimal segmentation threshold, the problems of complex operation and inaccurate segmentation in traditional methods are solved, and more efficient and accurate fracture image segmentation is achieved.

CN119540256APending Publication Date: 2025-02-28CHINESE PEOPLES ARMED POLICE FORCE SHAANXI PROVINCIAL CORPS HOSPITAL
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411591560.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The traditional interactive segmentation method of fracture images is complex in operation and inaccurate segmentation. Due to the limitations of artificial circle selection segmentation areas and threshold segmentation algorithms, it is easy to lead to incomplete or excessive segmentation of bone segmentation.

Method used

By obtaining the grayscale map of the fracture CT image and obtaining key points according to the interactive behavior, dividing key areas, calculating the optimal segmentation threshold for each key area, and obtaining the optimal segmentation threshold based on the distance relationship between the key area and the non-key area.

Benefits of technology

It reduces the difficulty of operation, avoids subjective errors, improves the accuracy and efficiency of segmentation, and ensures the complete and accurate segmentation of fracture images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119540256A_ABST
    Figure CN119540256A_ABST
Patent Text Reader

Abstract

The invention relates to the field of image processing, in particular to a fracture image interactive segmentation method and system, and the method comprises the steps: obtaining a CT image gray-scale map and key points; dividing the grayscale image according to the key point position distribution and determining a key area; obtaining a separation parameter according to distribution conditions of pixel points greater than a gray threshold and less than the gray threshold in the key area under different gray levels; obtaining a difference parameter according to the difference between a pixel point greater than a gray threshold in different gray thresholds in the key area and a neighborhood pixel point; obtaining a distribution parameter by combining the position of the key point in the key area and the distance between the pixel points greater than a threshold value; obtaining an optimal segmentation threshold value of each key region in combination with the parameters; and finally, obtaining the optimal segmentation threshold of the non-key region by combining the optimal segmentation threshold of different key regions and the position relationship of the non-key region. According to the method, interactive segmentation is more accurate, operation is simpler, and the computing power cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to image processing, and in particular to a fracture image interactive segmentation method and system. Background Art

[0002] Interactive segmentation technology guides segmentation through user input, which can obtain more accurate segmentation performance. Compared with fully automatic and fully manual segmentation methods, interactive image segmentation technology takes into account both accuracy and efficiency, and has certain advantages and wide applications in the field of medical image segmentation. For complex fracture images, such as those involving multiple fracture sites or blurred boundaries between fracture lines and surrounding tissues, interactive segmentation can correct and optimize automatic segmentation results through user-provided marking information.

[0003] Traditional interactive segmentation methods for fracture images are usually based on manually selecting the segmentation area and segmenting the selected area according to the threshold segmentation algorithm to distinguish the fracture site from the surrounding tissue; however, the threshold segmentation algorithm will be affected by the pixel distribution of the segmentation area, and the operation of manually selecting the segmentation area is relatively complicated and not accurate enough. The errors in segmenting bones in different segmentation areas are different and will be affected by human tissue or noise pixel values. This may cause incomplete or over-segmentation of bones in some segmentation areas, affecting the segmentation effect. Summary of the invention

[0004] The present invention provides a fracture image interactive segmentation method and system to solve the existing problem that the traditional fracture image interactive segmentation method is complex to operate and the segmentation is inaccurate.

[0005] The fracture image interactive segmentation method and system of the present invention adopts the following technical solutions:

[0006] In a first aspect, the present invention provides a method for interactively segmenting a fracture image, the method comprising the following steps:

[0007] Obtain a grayscale image of a fracture CT image; obtain key points of the grayscale image of the CT image according to the interactive behavior;

[0008] The grayscale image is divided according to the distribution of key point positions, and the key areas corresponding to each key point are obtained according to the distribution of key points in the grayscale images of different areas after division; the separation parameters of any grayscale threshold in each key area are obtained according to the distribution of pixel values ​​of pixels greater than the grayscale threshold and the distribution of pixel values ​​less than or equal to the grayscale threshold under any grayscale threshold; the difference parameters of the grayscale threshold are obtained according to the degree of difference in grayscale values ​​between each pixel greater than the grayscale threshold and the neighboring pixels under each grayscale threshold in each key area; the distribution parameters of the grayscale threshold are obtained according to the distribution of distances between each pixel greater than the grayscale threshold and the key points in the corresponding key area under each grayscale threshold in each key area; the optimal segmentation threshold of each key area is obtained according to the requirement parameters, difference parameters and separation parameters of each grayscale threshold in each key area;

[0009] The segmentation threshold of each area without key points is obtained according to the distance between each area without key points and all key areas and the optimal segmentation threshold corresponding to the key areas.

[0010] Furthermore, the method of obtaining the key points of the grayscale image of the CT image according to the interactive behavior includes the following specific methods:

[0011] The user subjectively selects any number of pixels containing important image information in the grayscale image and uses these pixels as the key points of the grayscale image.

[0012] Furthermore, the grayscale image is divided according to the distribution of key point positions, and the key area corresponding to each key point is obtained according to the distribution of key points in the grayscale images of different areas after division, including the specific method of:

[0013] Take the midpoint of the grayscale image as the origin, the horizontal straight line of the grayscale image where the origin of the grayscale image is located as the abscissa, and the vertical straight line where the origin of the grayscale image is located as the ordinate to divide the image into four quadrants. The areas where the grayscale images of the four quadrants obtained this time are located are recorded as primary areas; determine whether the number of key points of the grayscale image in each primary area is greater than 1. If the number of key points in the grayscale image in a certain level area is greater than 1, divide the grayscale image of the primary area into four quadrants in the same way, and record the areas where the four grayscale images obtained after the grayscale image of the primary area is divided as secondary areas. Determine whether the number of key points in the grayscale image in each secondary area is greater than 1. If the number of key points in the grayscale image in the secondary area is greater than 1, continue to repeat the above operation and iterate until the number of key points in the grayscale image of each area is less than or equal to 1 and stop the iteration. At this time, the area containing the key point is recorded as the key area corresponding to the key point.

[0014] Further, the separation parameter of any grayscale threshold in each key area is obtained according to the distribution of pixel values ​​of pixels greater than the grayscale threshold and the distribution of pixel values ​​of pixels less than or equal to the grayscale threshold under any grayscale threshold, including the specific method of:

[0015] Choose a gray threshold Q r , recorded as the grayscale threshold corresponding to the rth key area, the specific method for calculating the separation parameter of the grayscale threshold in the rth key area is as follows:

[0016]

[0017] In the formula, Spe(Q r ) represents the grayscale threshold Q in the rth key area r The separation parameter, x r,i Indicates that the i-th pixel value in the r-th key area is greater than the grayscale threshold Q r The pixel value of the pixel point, Indicates that all pixel values ​​in the rth key area are greater than the current grayscale threshold Q r The mean pixel value of the pixel point, y r,j Indicates that the jth pixel value in the rth key area is less than or equal to the current grayscale threshold Q r The pixel value of the pixel point, Indicates that the jth pixel value in the r key areas is less than or equal to the current grayscale threshold Q r The pixel value of the pixel point, n r Indicates that the pixel value corresponding to the rth key area is greater than the grayscale threshold Q r The number of pixels, m r Indicates the number of all pixels corresponding to the rth key area, Q r represents the grayscale threshold selected in the rth key area; the separation parameter of each grayscale threshold in each key area is calculated according to the above method.

[0018] Furthermore, the grayscale threshold difference parameter is obtained according to the grayscale value difference between each pixel point greater than the grayscale threshold and the neighboring pixel points under each grayscale threshold in each key area, including the specific method of:

[0019]

[0020] Dif(Q r ) represents the gray threshold Q selected in the rth key area r The difference parameter, m r represents the number of pixels in the rth key area, z r,I represents the pixel value of the pixel whose I-th pixel value in the r-th key area is greater than the selected threshold, Er,K(I+1) Represents the pixel value of the next pixel point adjacent to the pixel point position sequence whose I-th pixel value in the r-th key area is greater than the selected threshold, and obtains the difference parameter of each grayscale threshold in each key area according to the above method.

[0021] Furthermore, the method of obtaining the distribution parameter of the grayscale threshold according to the distribution of the distance between each pixel point greater than the grayscale threshold and the key point in the corresponding key area under each grayscale threshold in each key area includes:

[0022]

[0023] In the formula, Dpa(Q r ) represents the grayscale threshold Q in the rth key area r The distribution parameter, n r Indicates that the pixel value corresponding to the rth key area is greater than the grayscale threshold Q r The number of pixels, DE B (Q r ) indicates that the Bth pixel value in the rth key area is greater than the grayscale threshold Q r The pixel point and the distance from the key point of the key area; according to the above method, the distribution parameters of each gray threshold in each key area are obtained.

[0024] Furthermore, the specific method of obtaining the optimal segmentation threshold of each key area according to the requirement parameters, difference parameters and separation parameters of each gray threshold in each key area includes:

[0025] First, the performance parameters of different grayscale thresholds in each key area are obtained according to the required parameters, difference parameters and separation parameters of each grayscale threshold in each key area. The specific method is as follows:

[0026] Opt(Q r )=Spe(Q r )×Dif(Q r )×Dpa(Q r )

[0027] In the formula, Opt(Q r ) represents the grayscale threshold Q in the rth key area r Performance parameters, Spe(Q r ) represents the grayscale threshold Q in the rth key area r The separation parameter, Dif(Q r ) represents the gray threshold Q selected in the rth key area r The difference parameter, Dpa(Q r ) represents the grayscale threshold Q in the rth key area rThe distribution parameters of each gray threshold in each key area can be obtained according to the above method;

[0028] Calculate the performance parameters of different grayscale thresholds in each key area, where the value range of the grayscale threshold is greater than or equal to 1 and less than or equal to 255, and select the grayscale threshold corresponding to the minimum performance parameter calculated for each grayscale threshold in each key area as the optimal segmentation threshold of the key area.

[0029] Furthermore, the specific method of obtaining the segmentation threshold of each region without key points according to the distance between each region without key points and all key regions and the optimal segmentation threshold corresponding to the key regions includes:

[0030] Get the central pixel position of each area without key points and the central pixel position of all key areas, and calculate the distance between the central pixel of each area without key points and the central pixel of all key areas respectively; the optimal segmentation threshold calculation method for each area without key points is as follows:

[0031]

[0032] In the formula, H l represents the optimal segmentation threshold for the lth region without key points, B represents the number of key points, and D l,N Denotes the distance between the center pixel of the lth region without key points and the center pixel of the Nth key region, D l,M G represents the distance between the central pixel of the lth region without key points and the central pixel of the Mth key region, N Represents the optimal segmentation threshold of the Nth key area; according to the above method, the optimal segmentation threshold of each area without key points is obtained

[0033] A second aspect of the present invention provides a fracture image interactive segmentation system, the system comprising a data acquisition module, a data calculation module and a data integration module, wherein:

[0034] The data acquisition module is used to obtain the grayscale image of the fracture CT image; and obtain the key points of the grayscale image of the CT image according to the interactive behavior;

[0035] A data calculation module is used to divide the grayscale image according to the distribution of key point positions, and obtain the key area corresponding to each key point according to the distribution of key points in the grayscale images of different areas after division; obtain the separation parameter of any grayscale threshold in each key area according to the distribution of pixel values ​​of pixels greater than the grayscale threshold and the distribution of pixel values ​​less than or equal to the grayscale threshold under any grayscale threshold; obtain the difference parameter of the grayscale threshold according to the degree of difference in grayscale value between each pixel greater than the grayscale threshold and the neighboring pixel points under each grayscale threshold in each key area; obtain the distribution parameter of the grayscale threshold according to the distribution of distances between each pixel greater than the grayscale threshold and the key points in the corresponding key area under each grayscale threshold in each key area; obtain the optimal segmentation threshold of each key area according to the requirement parameters, difference parameters and separation parameters of each grayscale threshold in each key area;

[0036] The data integration module is used to obtain the segmentation threshold of each area without key points according to the distance between each area without key points and all key areas and the optimal segmentation threshold corresponding to the key areas.

[0037] A third aspect of the present invention is a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the above-mentioned method for interactive segmentation of fracture images.

[0038] A fourth aspect of the present invention is a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned method for interactive segmentation of fracture images when executing the computer program.

[0039] The beneficial effects of the technical solution of the present invention are as follows: according to the doctor's manual selection of any number of key points that need to be segmented, the difficulty of operation can be reduced, and subjective errors in circling and segmenting areas can be avoided; the key area partitions obtained according to the key point positions can be selected according to the degree of detail of the fracture image, and different areas can be segmented using multiple thresholds, thereby improving the accuracy of segmentation and saving computer computing power; according to the distribution of pixel values ​​of pixels greater than the grayscale threshold in each key area under any grayscale threshold, and the distribution of pixel values ​​of pixels less than or equal to the grayscale threshold, the separation parameters of any grayscale threshold in each key area are obtained, and the preference of the threshold is judged based on the pixel distribution properties of the foreground and background; according to the degree of difference in grayscale values ​​between each pixel point greater than the grayscale threshold and the neighboring pixel points under each grayscale threshold in each key area, the difference parameters of the grayscale threshold are obtained, taking into account that when the key area is seriously affected by tissue, The pixel distribution characteristics of tissue areas and fracture areas avoid the influence of noise; according to the distance distribution of each pixel point greater than the grayscale threshold and the key point in the corresponding key area under each grayscale threshold in each key area, the distribution parameters of the grayscale threshold are obtained, and the degree of retention of important information in the image is judged based on the selected position of the key point, so as to select a more accurate threshold; according to the required parameters, difference parameters and separation parameters of each grayscale threshold in each key area, the optimal segmentation threshold of each key area is obtained, and the optimal threshold of the key area is obtained by comprehensive consideration; the segmentation threshold of each area without key points is obtained according to the distance between each area without key points and all key areas and the optimal segmentation threshold corresponding to the key area, and the optimal segmentation threshold of the key area is selected for the non-key area based on the position relationship between the non-key area and the key area, so that the overall image segmentation is more complete and accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0041] Figure 1 A flowchart of the steps of an interactive fracture image segmentation method of the present invention;

[0042] Figure 2 is a structural block diagram of an interactive fracture image segmentation system of the present invention;

[0043] Figure 3 This is a schematic diagram of fracture image partitioning according to the present invention. DETAILED DESCRIPTION

[0044] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the method and system for interactive segmentation of fracture images proposed by the present invention, its specific implementation, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

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

[0046] The specific scheme of the method and system for interactive segmentation of fracture images provided by the present invention will be described in detail below with reference to the accompanying drawings.

[0047] See also Figure 1 , which shows the first object of the present invention, a flowchart of a method for interactive segmentation of fracture images, the method comprising the following steps:

[0048] Step S001: Obtain a grayscale image of a fracture CT image; and obtain key points of the grayscale image of the CT image according to the interactive behavior.

[0049] It should be noted that CT image segmentation needs to be converted into grayscale images first because grayscale images have only one channel, while color images have three channels, representing red, green, and blue. In image segmentation, we need to classify images based on different pixel values, and the pixel value of grayscale images has only one value, which is convenient for calculation and processing. In addition, grayscale images can also reduce the amount of image data and improve the efficiency of algorithm operation. Therefore, before performing CT image segmentation, color images need to be converted into grayscale images.

[0050] Specifically, the specific method for obtaining the grayscale image of the fracture CT image is as follows:

[0051] A CT scanner is used to obtain a CT image of a rectangular patient fracture area, and three channels of the CT image are closed to obtain a grayscale image of the CT image.

[0052] It should be further explained that the traditional threshold segmentation method is based on the fixed threshold of the pixel value of the grayscale image pixel point for segmentation, and the bones, soft tissues, air and other tissues in the fracture CT image have similar pixel values, which are difficult to accurately segment through a single threshold. In addition, there are usually noise and artifacts in the fracture CT image, and these factors will also affect the accuracy of the traditional threshold segmentation. Therefore, in most cases, in order to ensure the accuracy of the segmentation result, the doctor needs to manually select the segmentation area, but the traditional interactive segmentation method requires manual selection of the image shape and area to be segmented, which is time-consuming and labor-intensive and prone to subjective errors. Especially for complex fracture CT images, more professional knowledge and experience are required for accurate segmentation, so the present invention adopts a new interactive method to simplify the interactive segmentation operation and improve the segmentation accuracy.

[0053] Specifically, the specific method for obtaining the key points of the grayscale image according to the interactive behavior is as follows:

[0054] The user subjectively selects any number of pixels containing important image information in the grayscale image and uses these pixels as the key points of the grayscale image.

[0055] It should be noted that different users may select different pixels of important image information in different grayscale images.

[0056] Step S002: Divide the grayscale image according to the distribution of key point positions, and obtain the key area corresponding to each key point according to the distribution of key points in the grayscale images of different areas after division; obtain the separation parameter of any grayscale threshold in each key area according to the distribution of pixel values ​​of pixels greater than the grayscale threshold and the distribution of pixel values ​​less than or equal to the grayscale threshold in each key area under any grayscale threshold; obtain the difference parameter of the grayscale threshold according to the degree of difference in grayscale value between each pixel greater than the grayscale threshold and the neighboring pixel points under each grayscale threshold in each key area; obtain the distribution parameter of the grayscale threshold according to the distribution of distances between each pixel greater than the grayscale threshold and the key points in the corresponding key area under each grayscale threshold in each key area; obtain the optimal segmentation threshold of each key area according to the requirement parameters, difference parameters and separation parameters of each grayscale threshold in each key area.

[0057] It should be noted that the key area refers to the image area in the grayscale image that includes important bone contours and has complex tissue distribution. Manually selecting the key area can reduce the difficulty of the doctor's operation, reduce the doctor's operation steps, and avoid inaccurate segmentation caused by subjective errors when the doctor selects the segmentation area.

[0058] It should be further explained that the key area refers to the image area in the grayscale image that includes important bone contours. If the doctor's selected points in several key areas are relatively close, it means that the bone CT grayscale image where these key areas are located contains important image information. Using a single grayscale threshold as the image segmentation threshold to perform threshold segmentation on these key areas may lose important image details. For points that are far away from the key areas, it means that the image in the area where the points are located is easy to identify and distinguish or does not contain important image details. If multiple thresholds are used to perform threshold segmentation on the area where the points are located, it is impossible to determine the thresholds and the segmentation areas corresponding to different thresholds, and the bone image may be over-segmented, resulting in more noise points, which is not conducive to the judgment of the overall bone contour.

[0059] It should be further explained that, for areas where the key area selection points are densely populated, multiple thresholds are selected to segment the image to ensure that more details can be retained during image segmentation. For areas where the key area selection points are sparse, a single threshold is selected to segment the image to save computer computing power and avoid image noise affecting the image segmentation effect.

[0060] Specifically, the grayscale image is divided according to the distribution of key point positions, and the key area corresponding to each key point is obtained according to the distribution of key points in the grayscale images of different areas after division. The specific method is as follows:

[0061] Take the midpoint of the grayscale image as the origin, the horizontal straight line of the grayscale image where the origin of the grayscale image is located as the abscissa, and the vertical straight line where the origin of the grayscale image is located as the ordinate to divide the image into four quadrants. The areas where the grayscale images of the four quadrants obtained this time are located are recorded as primary areas; determine whether the number of key points of the grayscale image in each primary area is greater than 1. If the number of key points in the grayscale image in a certain level area is greater than 1, divide the grayscale image of the primary area into four quadrants in the same way, and record the areas where the four grayscale images obtained after the grayscale image of the primary area is divided as secondary areas. Determine whether the number of key points in the grayscale image in each secondary area is greater than 1. If the number of key points in the grayscale image in the secondary area is greater than 1, continue to repeat the above operation and iterate until the number of key points in the grayscale image of each area is less than or equal to 1 and stop the iteration. At this time, the area containing the key point is recorded as the key area corresponding to the key point.

[0062] Please note that Figure 3 , which shows the various regions of the image after the final partitioning, Figure 3 The circle in the middle represents the key point, the box represents the position and size of each image area after the final partition, and the smallest area where the circle is located represents the size and position of the key area. Figure 3 The schematic diagram divides the image into three levels of regions at most, and the specific number and size of the divided regions are calculated based on the specific implementation situation.

[0063] It should be further explained that when the key points are densely packed, the key area is relatively small. At this time, when the grayscale image of the key area is threshold segmented, more image details can be retained to ensure the accuracy of the segmented image; when there is only one key point or no key point in the grayscale image of the fracture CT image, it means that the image is relatively clear and there is no need to partition the image.

[0064] It should be noted that different key areas have different bone distribution or tissue distribution, so it is necessary to select different grayscale thresholds for each key area to segment the image. Different grayscale thresholds have different segmentation effects on key areas. If under a certain grayscale threshold, the discrete degree of the pixel values ​​of all pixels greater than the grayscale threshold in the key area corresponding to the grayscale threshold is smaller, and the discrete degree of the pixel values ​​of all pixels less than or equal to the grayscale threshold is smaller, it means that the threshold can effectively divide the pixels into two different categories, that is, the difference between the two categories is large.

[0065] Specifically, according to the distribution of pixel values ​​of pixels greater than the grayscale threshold in each key area under any grayscale threshold and the distribution of pixel values ​​of pixels less than or equal to the grayscale threshold, the separation parameters of any grayscale threshold in each key area are obtained. The specific method is as follows:

[0066] Choose a gray threshold Q r , recorded as the grayscale threshold corresponding to the rth key area, the specific method for calculating the separation parameter of the grayscale threshold in the rth key area is as follows:

[0067]

[0068] In the formula, Spe(Q r ) represents the grayscale threshold Q in the rth key area r The separation parameter, x r,i Indicates that the i-th pixel value in the r-th key area is greater than the grayscale threshold Q r The pixel value of the pixel point, Indicates that all pixel values ​​in the rth key area are greater than the current grayscale threshold Q r The mean pixel value of the pixel point, y r,j Indicates that the jth pixel value in the rth key area is less than or equal to the current grayscale threshold Q r The pixel value of the pixel point, Indicates that the jth pixel value in the r key areas is less than or equal to the current grayscale threshold Q r The pixel value of the pixel point, n r Indicates that the pixel value corresponding to the rth key area is greater than the grayscale threshold Q r The number of pixels, m rIndicates the number of all pixels corresponding to the rth key area, Q r represents the grayscale threshold selected in the rth key area; the separation parameter of each grayscale threshold in each key area is calculated according to the above method.

[0069] It should be noted that when the grayscale threshold becomes larger or smaller, it will affect the separation parameter corresponding to the current key area. The smaller the separation parameter, the more effective the threshold is in dividing the pixels into two different categories, the smaller the probability of the pixels being misclassified as foreground or background, and the more accurate the fracture image segmentation.

[0070] It should be further explained that the above method only performs threshold segmentation on the image based on the pixel value of the pixel point. When the difference between the foreground area and the background area is large, the segmentation effect is good, but when the key area is seriously affected by the tissue, the pixel values ​​of the foreground and background parts are close, and the segmentation effect is not good. Therefore, this step also needs to obtain the difference parameter of the grayscale threshold according to the degree of difference between the pixel value of each pixel point in the key area that is greater than the selected threshold and the pixel value of the neighboring pixel point, because the tissue is noise in the CT image. If the CT image is greatly affected by the noise, the difference between the pixel point and the neighboring pixel point will also be large. If the selected threshold is more accurate, the noise influence can be avoided to a certain extent, because the pixel value of the tissue area will be slightly lower than the pixel value of the bone area, and the pixel value difference between the pixel point with a pixel value greater than the selected threshold and the neighboring pixel point will also be small.

[0071] Specifically, according to the gray value difference between each pixel point greater than the gray value threshold and the neighboring pixel points under each gray value threshold in each key area, the method for obtaining the gray value threshold difference parameter is as follows:

[0072] Scan the pixels in each key area in a serpentine scanning manner and traverse the pixel position sequence in each key area, record the number and position sequence of pixels in each key area whose pixel values ​​are greater than the selected threshold, and calculate the difference parameter of the selected threshold. The specific formula is as follows:

[0073]

[0074] Dif(Q r ) represents the gray threshold Q selected in the rth key area r The difference parameter, m r represents the number of pixels in the rth key area, z r,I represents the pixel value of the pixel whose I-th pixel value in the r-th key area is greater than the selected threshold, E r,K(I+1) Represents the pixel value of the next pixel point adjacent to the pixel point position sequence whose I-th pixel value in the r-th key area is greater than the selected threshold, and obtains the difference parameter of each grayscale threshold in each key area according to the above method.

[0075] It should be noted that, when the difference parameter of the key area is smaller, it means that the noise level of the foreground obtained according to the selected threshold is smaller, and the segmented bone image is more accurate.

[0076] It should be further explained that the above method only processes the key area and does not consider the pixel distribution of the key points. Because the key points and the vicinity of the key points may contain important image information, the closer the pixels are to the key points, the greater the probability that they contain important information. The above steps may mistakenly classify the pixels near the key points that contain important image information as background, causing the segmented image to lose important image information. Therefore, this step needs to determine whether the threshold is accurate based on the distance distribution between the foreground pixels and the key points obtained according to the selected threshold. The more concentrated the foreground pixels are near the key points, the more important information of the image can be retained under the threshold, and the better the segmentation effect.

[0077] Specifically, according to the distribution of the distance between each pixel point greater than the grayscale threshold and the key point in the corresponding key area under each grayscale threshold in each key area, the specific method for obtaining the distribution parameter of the grayscale threshold is as follows:

[0078]

[0079] In the formula, Dpa(Q r ) represents the grayscale threshold Q in the rth key area r The distribution parameter, n r Indicates that the pixel value corresponding to the rth key area is greater than the grayscale threshold Q r The number of pixels, DE B (Q r ) indicates that the Bth pixel value in the rth key area is greater than the grayscale threshold Q r The pixel point and the distance from the key point of the key area; according to the above method, the distribution parameters of each gray threshold in each key area are obtained.

[0080] It should be noted that the smaller the distribution parameter is, the more pixels near the key points in the key area are classified as foreground under this threshold, and the more concentrated the foreground pixels are near the key points, the more important information of the image can be retained under this threshold, and the better the segmentation effect.

[0081] It should be further explained that the above process obtains the required parameters, difference parameters and separation parameters of each gray threshold in each key area, and the above parameters can be combined to obtain the optimal segmentation threshold of each key area.

[0082] Specifically, according to the required parameters, difference parameters and separation parameters of each gray threshold in each key area, the specific method for obtaining the optimal segmentation threshold of each key area is as follows:

[0083] First, the performance parameters of different grayscale thresholds in each key area are obtained according to the required parameters, difference parameters and separation parameters of each grayscale threshold in each key area. The specific method is as follows:

[0084] Opt(Q r )=Spe(Q r )×Dif(Q r )×Dpa(Q r )

[0085] In the formula, Opt(Q r ) represents the grayscale threshold Q in the rth key area r Performance parameters, Spe(Q r ) represents the grayscale threshold Q in the rth key area r The separation parameter, Dif(Q r ) represents the gray threshold Q selected in the rth key area r The difference parameter, Dpa(Q r ) represents the distribution parameter of the gray threshold Qr in the rth key area. According to the above method, the performance parameter of each gray threshold in each key area can be obtained;

[0086] Calculate the performance parameters of different grayscale thresholds in each key area, where the value range of the grayscale threshold is greater than or equal to 1 and less than or equal to 255, and select the grayscale threshold corresponding to the minimum performance parameter calculated for each grayscale threshold in each key area as the optimal segmentation threshold of the key area.

[0087] It should be noted that the above steps show that the smaller the separation parameter, the smaller the difference parameter, and the smaller the distribution parameter, the more appropriate the threshold selection of the key area is. Therefore, the smaller the performance parameter, the better the corresponding grayscale threshold for key area segmentation effect.

[0088] Step S003: Obtain the segmentation threshold of each region without key points according to the distance between each region without key points and all key regions and the optimal segmentation threshold corresponding to the key regions.

[0089] It should be noted that for other areas where no key points exist, in order to ensure that the segmented image is relatively complete, it is necessary to combine the position distribution of each key area and the optimal segmentation threshold corresponding to the key area to obtain the segmentation threshold of the image area where no key points exist.

[0090] Specifically, the segmentation threshold of each area without key points is obtained according to the distance between each area without key points and all key areas and the optimal segmentation threshold corresponding to the key areas. The specific method is as follows:

[0091] Get the central pixel position of each area without key points and the central pixel position of all key areas, and calculate the distance between the central pixel of each area without key points and the central pixel of all key areas respectively; the optimal segmentation threshold calculation method for each area without key points is as follows:

[0092]

[0093] In the formula, H l represents the optimal segmentation threshold for the lth region without key points, B represents the number of key points, and D l,N Denotes the distance between the center pixel of the lth region without key points and the center pixel of the Nth key region, D l,M G represents the distance between the central pixel of the lth region without key points and the central pixel of the Mth key region, N represents the optimal segmentation threshold of the Nth key area; according to the above method, the optimal segmentation threshold of each area without key points is obtained.

[0094] It should be noted that in this embodiment, the number of key points is 5, and the number of key points in other embodiments depends on the specific implementation situation. The closer the key area is to the area where there are no key points, the closer the noise influence and the regularity of grayscale changes in the key area are to the area. Therefore, for the area where there are no key points, the optimal segmentation threshold is closer to the threshold of the surrounding key areas.

[0095] At this point, the optimal segmentation thresholds for all key areas and the optimal segmentation thresholds for all areas without key points are obtained.

[0096] See also Figure 2 , which shows the second object of the present invention, a structural block diagram of a fracture image interactive segmentation system, the system includes the following modules:

[0097] The data acquisition module is used to obtain the grayscale image of the fracture CT image; and obtain the key points of the grayscale image of the CT image according to the interactive behavior;

[0098] A data calculation module is used to divide the grayscale image according to the distribution of key point positions, and obtain the key area corresponding to each key point according to the distribution of key points in the grayscale images of different areas after division; obtain the separation parameter of any grayscale threshold in each key area according to the distribution of pixel values ​​of pixels greater than the grayscale threshold and the distribution of pixel values ​​less than or equal to the grayscale threshold under any grayscale threshold; obtain the difference parameter of the grayscale threshold according to the degree of difference in grayscale value between each pixel greater than the grayscale threshold and the neighboring pixel points under each grayscale threshold in each key area; obtain the distribution parameter of the grayscale threshold according to the distribution of distances between each pixel greater than the grayscale threshold and the key points in the corresponding key area under each grayscale threshold in each key area; obtain the optimal segmentation threshold of each key area according to the requirement parameters, difference parameters and separation parameters of each grayscale threshold in each key area;

[0099] The data integration module is used to obtain the segmentation threshold of each area without key points according to the distance between each area without key points and all key areas and the optimal segmentation threshold corresponding to the key areas.

[0100] The third purpose of an embodiment of the present invention is to provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned method for interactive segmentation of fracture images when executing the computer program.

[0101] A fourth objective of an embodiment of the present invention is to provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned method for interactive segmentation of fracture images are implemented.

[0102] This embodiment can reduce the difficulty of operation by allowing the doctor to manually select any number of key points that need to be segmented, avoiding subjective errors in circling the segmented area; obtaining the key area partition according to the key point position can select the appropriate area according to the detail level of the fracture image, and use multiple thresholds to segment different areas, thereby improving the accuracy of segmentation and saving computer computing power; according to the distribution of pixel values ​​of pixels greater than the grayscale threshold in each key area under any grayscale threshold, and the distribution of pixel values ​​of pixels less than or equal to the grayscale threshold, obtain the separation parameters of any grayscale threshold in each key area, and judge the preferredness of the threshold based on the pixel distribution properties of the foreground and background; according to the degree of difference in grayscale values ​​between each pixel point greater than the grayscale threshold and the neighboring pixel points under each grayscale threshold in each key area, obtain the difference parameters of the grayscale threshold, taking into account that when the key area is seriously affected by the tissue, the tissue area and pixel distribution characteristics of the fracture area to avoid the influence of noise; according to the distance distribution of each pixel point greater than the grayscale threshold and the key point in the corresponding key area under each grayscale threshold in each key area, the distribution parameter of the grayscale threshold is obtained, and the degree of retention of important information in the image is judged based on the selected position of the key point, so as to select a more accurate threshold; according to the required parameters, difference parameters and separation parameters of each grayscale threshold in each key area, the optimal segmentation threshold of each key area is obtained, and the optimal threshold of the key area is obtained by comprehensive consideration; the segmentation threshold of each area without key points is obtained according to the distance between each area without key points and all key areas and the optimal segmentation threshold corresponding to the key area, based on the position relationship between the non-key area and the key area, the optimal segmentation threshold of the key area, the optimal threshold selection is performed on the non-key area, so that the overall image segmentation is more complete and accurate.

[0103] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0104] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0105] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0106] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0107] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A fracture image interactive segmentation method, characterized in that: The method comprises the following steps: Obtain a grayscale image of a fracture CT image; obtain key points of the grayscale image of the CT image according to the interactive behavior; The grayscale image is divided according to the distribution of key point positions, and the key areas corresponding to each key point are obtained according to the distribution of key points in the grayscale images of different areas after division; the separation parameters of any grayscale threshold in each key area are obtained according to the distribution of pixel values ​​of pixels greater than the grayscale threshold and the distribution of pixel values ​​less than or equal to the grayscale threshold under any grayscale threshold; the difference parameters of the grayscale threshold are obtained according to the degree of difference in grayscale values ​​between each pixel greater than the grayscale threshold and the neighboring pixels under each grayscale threshold in each key area; the distribution parameters of the grayscale threshold are obtained according to the distribution of distances between each pixel greater than the grayscale threshold and the key points in the corresponding key area under each grayscale threshold in each key area; the optimal segmentation threshold of each key area is obtained according to the requirement parameters, difference parameters and separation parameters of each grayscale threshold in each key area; The segmentation threshold of each area without key points is obtained according to the distance between each area without key points and all key areas and the optimal segmentation threshold corresponding to the key areas.

2. The method for interactive segmentation of fracture images according to claim 1, characterized in that: The specific method of obtaining the key points of the grayscale image of the CT image according to the interactive behavior includes: The user subjectively selects any number of pixels containing important image information in the grayscale image and uses these pixels as the key points of the grayscale image.

3. The method for interactive segmentation of fracture images according to claim 1, characterized in that: The grayscale image is divided according to the distribution of key point positions, and the key area corresponding to each key point is obtained according to the distribution of key points in the grayscale images of different areas after division, including the specific method of: Take the midpoint of the grayscale image as the origin, the horizontal straight line of the grayscale image where the origin of the grayscale image is located as the abscissa, and the vertical straight line where the origin of the grayscale image is located as the ordinate to divide the image into four quadrants. The areas where the grayscale images of the four quadrants obtained this time are located are recorded as primary areas; determine whether the number of key points of the grayscale image in each primary area is greater than 1. If the number of key points in the grayscale image in a certain level area is greater than 1, divide the grayscale image of the primary area into four quadrants in the same way, and record the areas where the four grayscale images obtained after the grayscale image of the primary area is divided as secondary areas. Determine whether the number of key points in the grayscale image in each secondary area is greater than 1. If the number of key points in the grayscale image in the secondary area is greater than 1, continue to repeat the above operation and iterate until the number of key points in the grayscale image of each area is less than or equal to 1 and stop the iteration. At this time, the area containing the key point is recorded as the key area corresponding to the key point.

4. The method for interactive segmentation of fracture images according to claim 1, characterized in that: The method of obtaining the separation parameter of any grayscale threshold in each key area according to the distribution of pixel values ​​of pixels greater than the grayscale threshold and the distribution of pixel values ​​of pixels less than or equal to the grayscale threshold under any grayscale threshold includes: Choose a gray threshold Q r , recorded as the grayscale threshold corresponding to the rth key area, the specific method for calculating the separation parameter of the grayscale threshold in the rth key area is as follows: In the formula, Spe(Q r ) represents the grayscale threshold Q in the rth key area r The separation parameter, x r,i Indicates that the i-th pixel value in the r-th key area is greater than the grayscale threshold Q r The pixel value of the pixel point, Indicates that all pixel values ​​in the rth key area are greater than the current grayscale threshold Q r The mean pixel value of the pixel point, y r,j Indicates that the jth pixel value in the rth key area is less than or equal to the current grayscale threshold Q r The pixel value of the pixel point, Indicates that the jth pixel value in the r key areas is less than or equal to the current grayscale threshold Q r The pixel value of the pixel point, n r Indicates that the pixel value corresponding to the rth key area is greater than the grayscale threshold Q r The number of pixels, m r Indicates the number of all pixels corresponding to the rth key area, Q r represents the grayscale threshold selected in the rth key area; the separation parameter of each grayscale threshold in each key area is calculated according to the above method.

5. The method for interactive segmentation of fracture images according to claim 1, characterized in that: The specific method of obtaining the grayscale threshold difference parameter according to the grayscale value difference between each pixel point greater than the grayscale threshold and the neighboring pixel points under each grayscale threshold in each key area includes: Dif(Q r ) represents the gray threshold Q selected in the rth key area r The difference parameter, m r represents the number of pixels in the rth key area, z r,I represents the pixel value of the pixel whose I-th pixel value in the r-th key area is greater than the selected threshold, E r,K(I+1) Represents the pixel value of the next pixel point adjacent to the pixel point position sequence whose I-th pixel value in the r-th key area is greater than the selected threshold, and obtains the difference parameter of each grayscale threshold in each key area according to the above method.

6. The method for interactive segmentation of fracture images according to claim 1, characterized in that: The method of obtaining the distribution parameter of the grayscale threshold according to the distribution of the distance between each pixel point greater than the grayscale threshold and the key point in the corresponding key area under each grayscale threshold in each key area includes: In the formula, Dpa(Q r ) represents the grayscale threshold Q in the rth key area r The distribution parameter, n r Indicates that the pixel value corresponding to the rth key area is greater than the grayscale threshold Q r The number of pixels, DE B (Q r ) indicates that the Bth pixel value in the rth key area is greater than the grayscale threshold Q r The pixel point and the distance from the key point of the key area; according to the above method, the distribution parameters of each gray threshold in each key area are obtained.

7. The method for interactive segmentation of fracture images according to claim 1, characterized in that: The specific method of obtaining the optimal segmentation threshold of each key area according to the requirement parameters, difference parameters and separation parameters of each gray threshold in each key area is as follows: First, the performance parameters of different grayscale thresholds in each key area are obtained according to the required parameters, difference parameters and separation parameters of each grayscale threshold in each key area. The specific method is as follows: Opt(Q r )=Spe(Q r )×Dif(Q r )×DPa(Q r ) In the formula, Opt(Q r ) represents the grayscale threshold Q in the rth key area r Performance parameters, Spe(Q r ) represents the grayscale threshold Q in the rth key area r The separation parameter, Dif(Q r ) represents the gray threshold Q selected in the rth key area r The difference parameter, Dpa(Q r ) represents the grayscale threshold Q in the rth key area r The distribution parameters of each gray threshold in each key area can be obtained according to the above method; Calculate the performance parameters of different grayscale thresholds in each key area, where the value range of the grayscale threshold is greater than or equal to 1 and less than or equal to 255, and select the grayscale threshold corresponding to the minimum performance parameter calculated for each grayscale threshold in each key area as the optimal segmentation threshold of the key area.

8. The method for interactive segmentation of fracture images according to claim 1, characterized in that: The specific method of obtaining the segmentation threshold of each region without key points according to the distance between each region without key points and all key regions and the optimal segmentation threshold corresponding to the key regions is as follows: Get the central pixel position of each area without key points and the central pixel position of all key areas, and calculate the distance between the central pixel of each area without key points and the central pixel of all key areas respectively; the optimal segmentation threshold calculation method for each area without key points is as follows: In the formula, H l represents the optimal segmentation threshold for the lth region without key points, B represents the number of key points, and D l,N Denotes the distance between the center pixel of the lth region without key points and the center pixel of the Nth key region, D l,M G represents the distance between the central pixel of the lth region without key points and the central pixel of the Mth key region, N represents the optimal segmentation threshold of the Nth key area; according to the above method, the optimal segmentation threshold of each area without key points is obtained.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method for interactive segmentation of fracture images as claimed in any one of claims 1 to 8 are implemented.

10. An interactive fracture image segmentation system, characterized in that: The system includes the following modules: The data acquisition module is used to obtain the grayscale image of the fracture CT image; and obtain the key points of the grayscale image of the CT image according to the interactive behavior; A data calculation module is used to divide the grayscale image according to the distribution of key point positions, and obtain the key area corresponding to each key point according to the distribution of key points in the grayscale images of different areas after division; obtain the separation parameter of any grayscale threshold in each key area according to the distribution of pixel values ​​of pixels greater than the grayscale threshold and the distribution of pixel values ​​less than or equal to the grayscale threshold under any grayscale threshold; obtain the difference parameter of the grayscale threshold according to the degree of difference in grayscale value between each pixel greater than the grayscale threshold and the neighboring pixel points under each grayscale threshold in each key area; obtain the distribution parameter of the grayscale threshold according to the distribution of distances between each pixel greater than the grayscale threshold and the key points in the corresponding key area under each grayscale threshold in each key area; obtain the optimal segmentation threshold of each key area according to the requirement parameters, difference parameters and separation parameters of each grayscale threshold in each key area; The data integration module is used to obtain the segmentation threshold of each area without key points according to the distance between each area without key points and all key areas and the optimal segmentation threshold corresponding to the key areas.