CN119540256A - Interactive fracture image segmentation method and system - Google Patents
Interactive fracture image segmentation method and system Download PDFInfo
- Publication number
- CN119540256A CN119540256A CN202411591560.9A CN202411591560A CN119540256A CN 119540256 A CN119540256 A CN 119540256A CN 202411591560 A CN202411591560 A CN 202411591560A CN 119540256 A CN119540256 A CN 119540256A
- Authority
- CN
- China
- Prior art keywords
- key
- gray
- region
- pixel
- threshold
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/187—Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10072—Tomographic images
- G06T2207/10081—Computed x-ray tomography [CT]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20092—Interactive image processing based on input by user
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
- Apparatus For Radiation Diagnosis (AREA)
Abstract
The invention relates to the field of image processing, in particular to a fracture image interactive segmentation method and system, comprising the steps of obtaining a CT image gray level image and key points; dividing a gray image according to distribution of key points and determining key areas, acquiring separation parameters according to distribution conditions of pixels which are larger than a gray threshold and smaller than the gray threshold in different gray and lower key areas, acquiring difference parameters according to differences between pixels which are larger than the gray threshold and neighbor pixels in different gray thresholds in the key areas, acquiring distribution parameters according to distances between positions of the key points in the key areas and the pixels which are larger than the threshold, acquiring an optimal segmentation threshold of each key area according to the parameters, and finally acquiring an optimal segmentation threshold of a non-key area according to the position relation between the optimal segmentation threshold of different key areas and the non-key areas. The invention ensures that the interactive segmentation is more accurate, the operation is simpler and the calculation cost is reduced.
Description
Technical Field
The invention relates to image processing, in particular to an interactive fracture image segmentation method and system.
Background
The interactive segmentation technology guides segmentation through user input, and can obtain more accurate segmentation performance. Compared with a full-automatic and full-manual segmentation method, the interactive image segmentation technology has certain advantages and wide application in the field of medical image segmentation due to the fact that accuracy and efficiency are considered, and for complex fracture images, such as the condition that a plurality of fracture parts or fracture lines and surrounding tissue boundaries are fuzzy, the interactive segmentation can correct and optimize an automatic segmentation result through marking information provided by a user.
The traditional fracture image interactive segmentation method is generally based on artificial circle segmentation areas and segments the circle segmentation areas according to a threshold segmentation algorithm for distinguishing fracture parts and surrounding tissues, but the threshold segmentation algorithm is influenced by pixel distribution of the segmentation areas, the artificial circle segmentation areas are complex and inaccurate in operation, when each segmentation area segments bones, error conditions are different, the influence of human tissues or noise pixel values can be caused, and the incomplete or excessive segmentation of the bones in the partial segmentation areas can possibly result in influence on segmentation effects.
Disclosure of Invention
The invention provides a fracture image interactive segmentation method and a fracture image interactive segmentation system, which aim to solve the existing problems that the traditional fracture image interactive segmentation method is complex in operation and inaccurate in segmentation.
The invention relates to a fracture image interactive segmentation method and a fracture image interactive segmentation system, which adopt the following technical scheme:
in a first aspect of the present invention, there is provided a fracture image interactive segmentation method comprising the steps of:
acquiring a CT image gray scale map of the fracture according to the interaction behavior;
Dividing a gray image according to distribution conditions of key points, acquiring a key region corresponding to each key point according to the distribution conditions of the key points in the gray image of different divided regions, acquiring a separation parameter of any gray threshold in each key region according to the distribution conditions of pixel values of pixels which are larger than the gray threshold in each key region and the distribution conditions of pixel values which are smaller than or equal to the gray threshold in any gray threshold, acquiring a difference parameter of the gray threshold according to the gray value difference degree of each pixel which is larger than the gray threshold in each key region and a neighborhood pixel in each gray threshold, acquiring a distribution parameter of the gray threshold according to the distance distribution conditions of each pixel which is larger than the gray threshold in each key region and the key point in the corresponding key region, and acquiring an optimal segmentation threshold of each key region according to the demand parameter, the difference parameter and the separation parameter of each gray threshold in each key region;
and acquiring the segmentation threshold value of each area without the key point according to the distance between each area without the key point and all the key areas and the optimal segmentation threshold value corresponding to the key area.
Further, the method for acquiring the key points of the CT image gray scale map according to the interaction behavior comprises the following specific steps:
The user subjectively selects any number of pixel points containing important image information in the gray image, and takes the pixel points as gray image key points.
Further, the gray level image is divided according to the distribution situation of the key points, and the key area corresponding to each key point is obtained according to the distribution situation of the key points in the gray level images of different areas after division, comprising the following specific methods:
The method comprises the steps of taking a midpoint of a gray image as an origin, taking a straight line in the horizontal direction of the gray image where the origin of the gray image is located as an abscissa, taking a straight line in the vertical direction of the origin of the gray image as an ordinate, dividing the image into four quadrants, taking the areas where the gray image is located of the four quadrants, recording the areas where the gray image is located of the four quadrants as a first-level area, judging whether the number of the key points in the gray image in each second-level area is larger than 1, continuing repeating the operation if the number of the key points in the gray image in each second-level area is larger than 1, iterating until the number of the key points in the gray image in each area is smaller than or equal to 1, stopping iterating when the number of the key points in the gray image in a certain-level area is larger than or equal to 1, recording the area containing the key points as the key area corresponding to the key points.
Further, according to the distribution of pixel values of the pixel points larger than the gray threshold in each key area and the distribution of pixel values of the pixel points smaller than or equal to the gray threshold under any gray threshold, the separation parameters of any gray threshold in each key area are obtained, which comprises the following specific steps:
Optionally, a gray threshold Q r is recorded as a gray threshold corresponding to the r-th key region, and the specific method for calculating the separation parameter of the gray threshold in the r-th key region is as follows:
Where Spe (Q r) represents the separation parameter of the gray threshold Q r in the r-th critical region, x r,i represents the pixel value of the pixel where the i-th pixel value is greater than the gray threshold Q r in the r-th critical region, Representing the average value of the pixel values of all the pixel points with the pixel values larger than the current gray threshold value Q r in the (r) th key area, y r,j represents the pixel value of the pixel point with the j-th pixel value smaller than or equal to the current gray threshold value Q r in the (r) th key area,The method comprises the steps of representing the pixel value of a pixel point with the j-th pixel value smaller than or equal to a current gray threshold Q r in r key areas, n r representing the number of pixel points with the pixel value larger than a gray threshold Q r corresponding to the pixel value of the r-th key area, m r representing the number of all pixel points corresponding to the r-th key area, Q r representing a gray threshold selected in the r-th key area, and calculating the separation parameter of each gray threshold in each key area according to the method.
Further, the method for obtaining the difference parameter of the gray threshold according to the gray value difference degree between each pixel point larger than the gray threshold and the neighboring pixel point in each key region comprises the following specific steps:
Dif (Q r) represents the difference parameter of the selected gray threshold value Q r in the r-th key region, m r represents the number of pixels in the r-th key region, z r,I represents the pixel value of the pixel whose I-th pixel value is greater than the selected threshold value in the r-th key region, E r,K(I+1) represents the pixel value of the next pixel adjacent to the sequence of pixel positions whose I-th pixel value is greater than the selected threshold value in the r-th key region, and the difference parameter of each gray threshold value in each key region is obtained according to the above method.
Further, the method for obtaining the distribution parameters of the gray threshold according to the distance distribution condition of each pixel point larger than the gray threshold and the key point in the corresponding key region under each gray threshold in each key region comprises the following steps:
Wherein Dpa (Q r) represents the distribution parameter of the gray threshold value Q r in the r-th key region, n r represents the number of pixels with pixel values larger than the gray threshold value Q r corresponding to the r-th key region, DE B(Qr) represents the distance between the pixel with the B-th pixel value larger than the gray threshold value Q r in the r-th key region and the key point of the key region, and the distribution parameter of each gray threshold value in each key region is obtained according to the method.
Further, the obtaining the optimal segmentation threshold value of each key region according to the requirement parameter, the difference parameter and the separation parameter of each gray threshold value in each key region comprises the following specific methods:
Firstly, according to the requirement parameters of each gray threshold in each key area, the difference parameters and the separation parameters acquire the performance parameters of different gray thresholds in each key area, and the specific method is as follows:
Opt(Qr)=Spe(Qr)×Dif(Qr)×Dpa(Qr)
Where Opt (Q r) represents the performance parameter of the gray threshold Q r in the r-th critical region, spe (Q r) represents the separation parameter of the gray threshold Q r in the r-th critical region, dif (Q r) represents the difference parameter of the selected gray threshold Q r in the r-th critical region, and Dpa (Q r) represents the distribution parameter of the gray threshold Q r in the r-th critical region, and the performance parameter of each gray threshold in each critical region can be obtained according to the above method;
And calculating performance parameters of different gray thresholds in each key region, wherein the range of the gray threshold is more than or equal to 1 and less than or equal to 255, and selecting the gray threshold corresponding to the minimum performance parameter calculated by each gray threshold in each key region as the optimal segmentation threshold of the key region.
Further, the method for obtaining the segmentation threshold of each region without the key point according to the distance between each region without the key point and all the key regions and the optimal segmentation threshold corresponding to the key region includes the following specific steps:
Acquiring the position of a central pixel point of each area without a key point and the positions of central pixel points of all key areas, and respectively calculating the distance between the central pixel point of each area without the key point and the central pixel point of all the key areas; the optimal segmentation threshold calculation method for each region without key points is as follows:
Wherein H l represents the optimal segmentation threshold of the first region without the key point, B represents the number of key points, D l,N represents the distance between the central pixel point of the first region without the key point and the central pixel point of the N key region, D l,M represents the distance between the central pixel point of the first region without the key point and the central pixel point of the M key region, G N represents the optimal segmentation threshold of the N key region, and the optimal segmentation threshold of each region without the key point is obtained according to the method
In a second aspect of the present invention, there is provided a fracture image interactive segmentation system, the system comprising a data acquisition module, a data calculation module and a data synthesis module, wherein:
The data acquisition module is used for acquiring a fracture CT image gray scale map, and acquiring key points of the CT image gray scale map according to the interaction behavior;
The data calculation module is used for dividing the gray image according to the distribution condition of key points, acquiring a key region corresponding to each key point according to the distribution condition of the key points in the gray image of different regions after division, acquiring a distribution parameter of the gray threshold according to the distribution condition of pixel values of pixels which are larger than the gray threshold in each key region and the distribution condition of pixel values which are smaller than or equal to the gray threshold in any gray threshold in each key region, acquiring a separation parameter of any gray threshold in each key region according to the gray value difference degree of each pixel which is larger than the gray threshold in each key region and a neighborhood pixel in each gray threshold in each key region, acquiring a distribution parameter of the gray threshold according to the distance distribution condition of each pixel which is larger than the gray threshold in each key region and the corresponding key point in each key region, and acquiring an optimal segmentation threshold in each key region according to the demand parameter, the difference parameter and the separation parameter of each gray threshold in each key region;
And the data synthesis module is used for acquiring the segmentation threshold value of each area without the key point according to the distance between each area without the key point and all the key areas and the optimal segmentation threshold value corresponding to the key area.
In a third aspect of the present invention, a computer-readable storage medium stores a computer program, wherein the computer program when executed by a processor implements the steps of the above-described fracture image interactive segmentation method.
In a fourth aspect of the present invention, a computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the steps of the above-mentioned interactive segmentation method for fracture images are implemented when the processor executes the computer program.
The technical scheme of the invention has the advantages that the operation difficulty can be reduced by manually selecting any number of key points to be segmented according to a doctor, subjective errors existing when segmented areas are selected are avoided, proper areas can be selected to be segmented by multiple thresholds according to the detail degree of a fracture image according to key point positions, the segmentation accuracy is improved, computer calculation force is saved, the pixel distribution characteristics of tissue areas and fracture areas are avoided according to the pixel value distribution condition of the pixel points which are larger than the gray threshold in each key area and the pixel value distribution condition of the pixel points which are smaller than or equal to the gray threshold in each key area, the separation parameters of any gray threshold in each key area are acquired, the preference of threshold is judged based on the pixel distribution property of a foreground and a background, the difference parameters of the gray threshold are acquired according to the gray value difference degree of each pixel point which is larger than the gray threshold and the neighborhood pixel point in each key area, the pixel distribution condition of the threshold is more important than the gray threshold in each key area is considered, the pixel distribution characteristics of the tissue areas and the fracture areas are prevented from noise influence when the tissue influence is severe, the difference parameters of the gray threshold are acquired according to the gray value difference degree of each key point which is larger than the gray threshold in each key area, the threshold is more important threshold is selected, the difference parameters are more accurate, the threshold image is acquired according to the difference parameters are acquired according to the difference between the difference parameters in the threshold of the threshold and the threshold in the threshold distribution conditions, and the threshold is better is acquired, acquiring the optimal threshold value of the key region, acquiring the segmentation threshold value of each region without the key point according to the distance between each region without the key point and all the key regions and the optimal segmentation threshold value corresponding to the key region, and selecting the optimal segmentation threshold value of the key region based on the position relation between the position of the non-key region and the position of the key region, so that the whole image segmentation is more complete and accurate.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of steps of an interactive segmentation method for fracture images according to the present invention;
FIG. 2 is a block diagram of an interactive segmentation system for fracture images according to the present invention;
Fig. 3 is a schematic view of a fracture image segmentation in accordance with the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the present invention to achieve the preset purpose, the following detailed description refers to specific embodiments, structures, features and effects of a fracture image interactive segmentation method and system according to the present invention with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" means that the embodiments are not necessarily the same. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
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.
The invention provides a fracture image interactive segmentation method and a fracture image interactive segmentation system specific scheme by combining a drawing.
Referring to fig. 1, there is shown a flow chart of steps of a fracture image interactive segmentation method according to a first aspect of the present invention, the method comprising the steps of:
Step S001, acquiring a fracture CT image gray scale map, and acquiring key points of the CT image gray scale map according to the interaction behavior.
It should be noted that the CT image segmentation needs to be converted into a gray image, because the gray image has only one channel, and the color image has three channels, which respectively represent three colors of red, green and blue. In image segmentation, we need to classify the images according to the difference of pixel values, but the pixel value of the gray image has only one value, so that the calculation and the processing are convenient. In addition, the gray level image can also reduce the image data amount and improve the operation efficiency of the algorithm. Therefore, the color image needs to be converted into a grayscale image before CT image segmentation is performed.
Specifically, the specific method for acquiring the gray level map of the fracture CT image is as follows:
And (3) acquiring a CT image of the fracture area of the rectangular patient by using a CT scanner, and closing three channels of the CT image to acquire a CT image gray scale image.
It should be further noted that, in the conventional threshold segmentation method, segmentation is performed based on a fixed threshold of pixel values of pixels of a gray level image, but tissues such as bones, soft tissues, air and the like in a fracture CT image have similar pixel values, so that accurate segmentation is difficult to be performed through a single threshold. In addition, noise and artifacts are often present in fracture CT images, which also affect the accuracy of conventional thresholding. Therefore, in most cases, in order to ensure the accuracy of the segmentation result, a doctor needs to manually select a segmentation region, but the traditional interactive segmentation method needs to manually select the shape and the region of the image to be segmented, which is time-consuming, labor-consuming and easy to cause subjective errors, and especially for complex fracture CT images, more expertise and experience are needed to accurately segment, so that the invention adopts a novel interactive mode to simplify the interactive segmentation operation and improve the segmentation accuracy.
Specifically, the specific method for acquiring the gray image key points according to the interaction behavior is as follows:
The user subjectively selects any number of pixel points containing important image information in the gray image, and takes the pixel points as gray image key points.
It should be noted that, pixels of important image information selected by different users for different gray-scale images may be different.
Step S002 is to divide the gray image according to the distribution condition of the key points, obtain the key area corresponding to each key point according to the distribution condition of the key points in the gray image of different areas after division, obtain the distribution parameter of the gray threshold according to the distribution condition of the pixel value of the pixel point which is larger than the gray threshold in each key area and the distribution condition of the pixel value which is smaller than or equal to the gray threshold in any key area, obtain the separation parameter of any gray threshold in each key area according to the gray value difference degree of each pixel point which is larger than the gray threshold in each key area and the neighborhood pixel point, obtain the distribution parameter of the gray threshold according to the distance distribution condition of each pixel point which is larger than the gray threshold in each key area and the corresponding key point in each key area, and obtain the optimal division threshold of each key area according to the demand parameter, the difference parameter and the separation parameter of each gray threshold in each key area.
It should be noted that, the key region refers to an image region with important skeleton outline and complex tissue distribution in the gray level map, and manual selection of the key region can reduce operation difficulty of a doctor, reduce operation steps of the doctor, and avoid inaccurate segmentation caused by subjective errors when the doctor circles the segmented region.
It should be further noted that, the key region refers to an image region including an important skeleton outline in the gray level map, if several key regions selected by a doctor are relatively close, it is indicated that the skeleton CT gray level images where these key regions are located include important image information, a single gray level threshold is used as an image segmentation threshold to perform threshold segmentation on these key regions, so that important image details may be lost, and for the selected point with a relatively long distance from the key region, it is indicated that the image of the region where this selected point is located is easily identified and distinguished or does not include important image details, if multiple thresholds are used to perform threshold segmentation on the region where this selected point is located, the segmented regions corresponding to the thresholds and different thresholds cannot be determined, and excessive segmentation may be performed on the skeleton image, so that more noise points may be generated, which is not beneficial to the judgment of the overall skeleton outline.
It should be further noted that, for the region with the denser key region selection point, the multi-threshold is selected to segment the image so as to ensure that more details can be kept during image segmentation, and for the region with the thinner key region selection point, the single-threshold is selected to segment the image so as to save the computer power and avoid the influence of image noise on the segmentation effect of the image.
Specifically, the gray level image is divided according to the distribution condition of the positions of the key points, and the key region corresponding to each key point is obtained according to the distribution condition of the key points in the gray level image of different divided regions, and the specific method is as follows:
The method comprises the steps of taking a midpoint of a gray image as an origin, taking a straight line in the horizontal direction of the gray image where the origin of the gray image is located as an abscissa, taking a straight line in the vertical direction of the origin of the gray image as an ordinate, dividing the image into four quadrants, taking the areas where the gray image is located of the four quadrants, recording the areas where the gray image is located of the four quadrants as a first-level area, judging whether the number of the key points in the gray image in each second-level area is larger than 1, continuing repeating the operation if the number of the key points in the gray image in each second-level area is larger than 1, iterating until the number of the key points in the gray image in each area is smaller than or equal to 1, stopping iterating when the number of the key points in the gray image in a certain-level area is larger than or equal to 1, recording the area containing the key points as the key area corresponding to the key points.
It should be noted that, please refer to fig. 3, which shows each region of the image after the final partitioning, in fig. 3, circles represent key points, boxes represent positions and sizes of each region of the image after the final partitioning, minimum regions where the circles are located represent sizes and positions of the key regions, fig. 3 illustrates that the image is only divided into three levels of regions at most, and the number and the sizes of the levels of the specific equally divided regions are calculated according to specific implementation conditions.
It is further noted that when the key points are denser, the key area is smaller, at this time, when the gray level image of the key area is subjected to threshold segmentation, more image details can be reserved to ensure the accuracy of the segmented image, and when only one key point or no key point exists in the gray level image of the fracture CT image, the image is clearer, and the image does not need to be partitioned.
It should be noted that, since the bone distribution or the tissue distribution of different key regions is different, it is necessary to select different gray thresholds for each key region to divide the image, and the dividing effect of the different gray thresholds on the key regions is different, if the degree of dispersion of the pixel values of all the pixel points larger than the gray threshold in the key region corresponding to the gray threshold is smaller and the degree of dispersion of the pixel values of all the pixel points smaller than or equal to the gray threshold is smaller under a certain gray threshold, it is described that the threshold is more effective to divide the pixel points into two different categories, that is, the difference between the two categories is larger.
Specifically, according to the pixel value distribution condition of the pixel points larger than the gray threshold in each key area and the pixel value distribution condition of the pixel points smaller than or equal to the gray threshold under any gray threshold, the separation parameter of any gray threshold in each key area is obtained, and the specific method is as follows:
Optionally, a gray threshold Q r is recorded as a gray threshold corresponding to the r-th key region, and the specific method for calculating the separation parameter of the gray threshold in the r-th key region is as follows:
Where Spe (Q r) represents the separation parameter of the gray threshold Q r in the r-th critical region, x r,i represents the pixel value of the pixel where the i-th pixel value is greater than the gray threshold Q r in the r-th critical region, Representing the average value of the pixel values of all the pixel points with the pixel values larger than the current gray threshold value Q r in the (r) th key area, y r,j represents the pixel value of the pixel point with the j-th pixel value smaller than or equal to the current gray threshold value Q r in the (r) th key area,The method comprises the steps of representing the pixel value of a pixel point with the j-th pixel value smaller than or equal to a current gray threshold Q r in r key areas, n r representing the number of pixel points with the pixel value larger than a gray threshold Q r corresponding to the pixel value of the r-th key area, m r representing the number of all pixel points corresponding to the r-th key area, Q r representing a gray threshold selected in the r-th key area, and calculating the separation parameter of each gray threshold in each key area according to the method.
It should be noted that, when the gray threshold value is increased or decreased, the separation parameter corresponding to the current key region will be affected, and the smaller the separation parameter is, the more the threshold value can effectively divide the pixel points into two different categories, and the smaller the probability that the pixel points are divided into the foreground or the background by mistake is, the more accurate the fracture image segmentation is.
It should be further noted that, in the method, the image is subjected to threshold segmentation only based on the pixel values of the pixels, when the difference between the foreground region and the background region is large, the segmentation effect is good, but when the key region is severely affected by the tissue, the pixel values of the pixels of the foreground and the background are relatively close, and the segmentation effect is poor. Therefore, the difference parameters of the gray threshold value are obtained according to the difference degree of the pixel value of each pixel in the key area and the pixel value of the neighborhood pixel, because the tissue belongs to noise in the CT image, if the influence degree of the noise on the CT image is larger, the difference degree of the pixel and the neighborhood pixel is larger, if the selected threshold value is more accurate, the noise influence can be avoided to a certain extent, and because the pixel value of the tissue area is slightly lower than the pixel value of the skeleton area, the difference degree of the pixel value of the pixel with the pixel value larger than the selected threshold value and the pixel value of the neighborhood pixel is smaller.
Specifically, the method for obtaining the difference parameter of the gray threshold according to the gray value difference degree between each pixel point larger than the gray threshold and the neighborhood pixel point in each gray threshold in each key area is as follows:
Scanning pixel points in each key area in a serpentine scanning mode, traversing a pixel point position sequence in each key area, recording the number and the position sequence of the pixel points with pixel values larger than a selected threshold value in each key area, and calculating a difference parameter specific formula of the selected threshold value as follows:
Dif (Q r) represents the difference parameter of the selected gray threshold value Q r in the r-th key region, m r represents the number of pixels in the r-th key region, z r,I represents the pixel value of the pixel whose I-th pixel value is greater than the selected threshold value in the r-th key region, E r,K(I+1) represents the pixel value of the next pixel adjacent to the sequence of pixel positions whose I-th pixel value is greater than the selected threshold value in the r-th key region, and the difference parameter of each gray threshold value in each key region is obtained according to the above method.
The smaller the difference parameter of the key region, the smaller the noise level of the foreground divided according to the selected threshold, and the more accurate the divided bone image.
It should be further noted that, the above method only processes the key area, and does not consider the pixel distribution situation of the key points, because the key points and the vicinity of the key points may include important image information, the probability that the pixel points closer to the key points contain important information is greater, the above steps may misclassify the pixel points near the key points containing important image information into the background, so that the segmented image loses important image information, so that the step needs to determine whether the threshold value is accurate according to the distance distribution situation between the foreground pixel points and the key points by the selected threshold value, and the more important information of the retained image under the threshold value is illustrated, and the better the segmentation effect is.
Specifically, the specific method for obtaining the distribution parameters of the gray threshold according to the distance distribution condition of each pixel point larger than the gray threshold and the key point in the corresponding key region under each gray threshold in each key region is as follows:
Wherein Dpa (Q r) represents the distribution parameter of the gray threshold value Q r in the r-th key region, n r represents the number of pixels with pixel values larger than the gray threshold value Q r corresponding to the r-th key region, DE B(Qr) represents the distance between the pixel with the B-th pixel value larger than the gray threshold value Q r in the r-th key region and the key point of the key region, and the distribution parameter of each gray threshold value in each key region is obtained according to the method.
When the distribution parameters are smaller, the number of divided foreground pixels in the key region near the key point is larger, and the more concentrated the foreground pixels are near the key point, the more important information of the image can be reserved under the threshold, and the better the dividing effect is.
It should be further noted that, the above process obtains the requirement parameter, the difference parameter and the separation parameter of each gray threshold in each key region, and the optimal segmentation threshold of each key region may be obtained by combining the above parameters.
Specifically, according to the requirement parameter, the difference parameter and the separation parameter of each gray threshold in each key region, the specific method for obtaining the optimal segmentation threshold of each key region is as follows:
Firstly, according to the requirement parameters of each gray threshold in each key area, the difference parameters and the separation parameters acquire the performance parameters of different gray thresholds in each key area, and the specific method is as follows:
Opt(Qr)=Spe(Qr)×Dif(Qr)×Dpa(Qr)
Where Opt (Q r) represents the performance parameter of the gray threshold Q r in the r-th critical area, spe (Q r) represents the separation parameter of the gray threshold Q r in the r-th critical area, dif (Q r) represents the difference parameter of the selected gray threshold Q r in the r-th critical area, and Dpa (Q r) represents the distribution parameter of the gray threshold Qr in the r-th critical area, and the performance parameter of each gray threshold in each critical area can be obtained according to the method described above;
And calculating performance parameters of different gray thresholds in each key region, wherein the range of the gray threshold is more than or equal to 1 and less than or equal to 255, and selecting the gray threshold corresponding to the minimum performance parameter calculated by each gray threshold in each key region as the optimal segmentation threshold of the key region.
It should be noted that, the above steps illustrate that the smaller the separation parameter is, the smaller the difference parameter is, and the more appropriate the threshold selection of the key region is when the distribution parameter is smaller, so the smaller the performance parameter is, the better the corresponding gray threshold has the effect of dividing the key region.
And step S003, obtaining the segmentation threshold value of each area without the key point according to the distance between each area without the key point and all the key areas and the optimal segmentation threshold value corresponding to the key area.
It should be noted that, for other areas where no key point exists, in order to ensure that the segmented image is relatively complete, the position distribution of each key area and the optimal segmentation threshold corresponding to the key area need to be combined, so as to obtain the segmentation threshold of the image area where no key point exists.
Specifically, the specific method for acquiring the segmentation threshold value of each region without the key point according to the distance between each region without the key point and all the key regions and the optimal segmentation threshold value corresponding to the key region is as follows:
Acquiring the position of a central pixel point of each area without a key point and the positions of central pixel points of all key areas, and respectively calculating the distance between the central pixel point of each area without the key point and the central pixel point of all the key areas; the optimal segmentation threshold calculation method for each region without key points is as follows:
Wherein H l represents the optimal segmentation threshold of the first region without the key point, B represents the number of the key points, D l,N represents the distance between the central pixel point of the first region without the key point and the central pixel point of the N key region, D l,M represents the distance between the central pixel point of the first region without the key point and the central pixel point of the M key region, G N represents the optimal segmentation threshold of the N key region, and the optimal segmentation threshold of each region without the key point is obtained according to the method.
In this embodiment, the number of key points is 5, and in other embodiments, the number of key points is determined according to the specific implementation, and the closer the key region is to the region where the key point does not exist, the closer the noise influence degree and the gray level change regularity are to the region, so that the optimal segmentation threshold is closer to the threshold of the surrounding key region for the region where the key point does not exist.
So far, the optimal segmentation threshold values of all the key areas and the optimal segmentation threshold values of all the areas without the key points are obtained.
Referring to fig. 2, there is shown a block diagram of a fracture image interactive segmentation system according to a second aspect of the present invention, the system comprising:
The data acquisition module is used for acquiring a fracture CT image gray scale map, and acquiring key points of the CT image gray scale map according to the interaction behavior;
The data calculation module is used for dividing the gray image according to the distribution condition of key points, acquiring a key region corresponding to each key point according to the distribution condition of the key points in the gray image of different regions after division, acquiring a distribution parameter of the gray threshold according to the distribution condition of pixel values of pixels which are larger than the gray threshold in each key region and the distribution condition of pixel values which are smaller than or equal to the gray threshold in any gray threshold in each key region, acquiring a separation parameter of any gray threshold in each key region according to the gray value difference degree of each pixel which is larger than the gray threshold in each key region and a neighborhood pixel in each gray threshold in each key region, acquiring a distribution parameter of the gray threshold according to the distance distribution condition of each pixel which is larger than the gray threshold in each key region and the corresponding key point in each key region, and acquiring an optimal segmentation threshold in each key region according to the demand parameter, the difference parameter and the separation parameter of each gray threshold in each key region;
And the data synthesis module is used for acquiring the segmentation threshold value of each area without the key point according to the distance between each area without the key point and all the key areas and the optimal segmentation threshold value corresponding to the key area.
A third object 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, where the steps of the above-mentioned interactive segmentation method for fracture images are implemented when the processor executes the computer program.
A fourth object of an embodiment of the present invention is to provide a computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of the above-described fracture image interactive segmentation method.
The embodiment can reduce operation difficulty by manually selecting any number of key points to be segmented according to doctors, avoid subjective errors existing when segmented areas are selected, obtain key area partitions according to key point positions, select proper areas according to detail degrees of fracture images, segment different areas by multiple thresholds, improve segmentation accuracy, save computer computing power, obtain separation parameters of any gray threshold value according to pixel value distribution conditions of pixel points larger than the gray threshold value in each key area and pixel value distribution conditions of pixel points smaller than or equal to the gray threshold value in each key area, obtain separation parameters of any gray threshold value in each key area, judge the preference of threshold values based on pixel distribution properties of foreground and background, obtain difference parameters of gray threshold values according to gray value difference degrees of each pixel point larger than the gray threshold value and the neighborhood pixel point in each key area, consider pixel distribution characteristics of the tissue areas and fracture areas when the key areas are seriously affected by tissues, avoid noise influence, obtain separation parameters of the pixel points larger than the gray threshold value in each key area according to the difference degrees of the gray threshold value in each key area, obtain the difference parameters of the pixel point larger than the gray threshold value in each key area, obtain the difference parameters of the key threshold value according to the difference parameters of the key threshold value in each key area, and the difference parameters of the threshold value are more accurate image is obtained according to the difference parameters of the threshold value, acquiring the optimal threshold value of the key region, acquiring the segmentation threshold value of each region without the key point according to the distance between each region without the key point and all the key regions and the optimal segmentation threshold value corresponding to the key region, and selecting the optimal segmentation threshold value of the key region based on the position relation between the position of the non-key region and the position of the key region, so that the whole image segmentation is more complete and accurate.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Finally, it should be noted that the above embodiments are only for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the above embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the specific embodiments of the present invention without departing from the spirit and scope of the present invention, and any modifications and equivalents are intended to be included in the scope of the claims of the present invention.
Claims (10)
1. An interactive segmentation method for fracture images is characterized by comprising the following steps:
acquiring a CT image gray scale map of the fracture according to the interaction behavior;
Dividing a gray image according to distribution conditions of key points, acquiring a key region corresponding to each key point according to the distribution conditions of the key points in the gray image of different divided regions, acquiring a separation parameter of any gray threshold in each key region according to the distribution conditions of pixel values of pixels which are larger than the gray threshold in each key region and the distribution conditions of pixel values which are smaller than or equal to the gray threshold in any gray threshold, acquiring a difference parameter of the gray threshold according to the gray value difference degree of each pixel which is larger than the gray threshold in each key region and a neighborhood pixel in each gray threshold, acquiring a distribution parameter of the gray threshold according to the distance distribution conditions of each pixel which is larger than the gray threshold in each key region and the key point in the corresponding key region, and acquiring an optimal segmentation threshold of each key region according to the demand parameter, the difference parameter and the separation parameter of each gray threshold in each key region;
and acquiring the segmentation threshold value of each area without the key point according to the distance between each area without the key point and all the key areas and the optimal segmentation threshold value corresponding to the key area.
2. The method for interactively segmenting the fracture image according to claim 1, wherein the method for acquiring the key points of the gray scale map of the CT image according to the interactive behavior comprises the following specific steps:
The user subjectively selects any number of pixel points containing important image information in the gray image, and takes the pixel points as gray image key points.
3. The method for interactively segmenting the fracture image according to claim 1, wherein the gray image is partitioned according to the distribution condition of the key points, and the key region corresponding to each key point is obtained according to the distribution condition of the key points in the gray image of different partitioned regions, comprises the following specific steps:
The method comprises the steps of taking a midpoint of a gray image as an origin, taking a straight line in the horizontal direction of the gray image where the origin of the gray image is located as an abscissa, taking a straight line in the vertical direction of the origin of the gray image as an ordinate, dividing the image into four quadrants, taking the areas where the gray image is located of the four quadrants, recording the areas where the gray image is located of the four quadrants as a first-level area, judging whether the number of the key points in the gray image in each second-level area is larger than 1, continuing repeating the operation if the number of the key points in the gray image in each second-level area is larger than 1, iterating until the number of the key points in the gray image in each area is smaller than or equal to 1, stopping iterating when the number of the key points in the gray image in a certain-level area is larger than or equal to 1, recording the area containing the key points as the key area corresponding to the key points.
4. The method for interactively segmenting the fracture image according to claim 1, wherein the obtaining the separation parameter of any gray threshold value in each key region according to the distribution condition of the pixel values of the pixel points larger than the gray threshold value in each key region and the distribution condition of the pixel values of the pixel points smaller than or equal to the gray threshold value comprises the following specific steps:
Optionally, a gray threshold Q r is recorded as a gray threshold corresponding to the r-th key region, and the specific method for calculating the separation parameter of the gray threshold in the r-th key region is as follows:
Where Spe (Q r) represents the separation parameter of the gray threshold Q r in the r-th critical region, x r,i represents the pixel value of the pixel where the i-th pixel value is greater than the gray threshold Q r in the r-th critical region, Representing the average value of the pixel values of all the pixel points with the pixel values larger than the current gray threshold value Q r in the (r) th key area, y r,j represents the pixel value of the pixel point with the j-th pixel value smaller than or equal to the current gray threshold value Q r in the (r) th key area,The method comprises the steps of representing the pixel value of a pixel point with the j-th pixel value smaller than or equal to a current gray threshold Q r in r key areas, n r representing the number of pixel points with the pixel value larger than a gray threshold Q r corresponding to the pixel value of the r-th key area, m r representing the number of all pixel points corresponding to the r-th key area, Q r representing a gray threshold selected in the r-th key area, and calculating the separation parameter of each gray threshold in each key area according to the method.
5. The method for interactively segmenting the fracture image according to claim 1, wherein the obtaining the difference parameter of the gray threshold according to the gray value difference degree between each pixel point which is larger than the gray threshold and the neighborhood pixel point under each gray threshold in each key region comprises the following specific steps:
Dif (Q r) represents the difference parameter of the selected gray threshold value Q r in the r-th key region, m r represents the number of pixels in the r-th key region, z r,I represents the pixel value of the pixel whose I-th pixel value is greater than the selected threshold value in the r-th key region, E r,K(I+1) represents the pixel value of the next pixel adjacent to the sequence of pixel positions whose I-th pixel value is greater than the selected threshold value in the r-th key region, and the difference parameter of each gray threshold value in each key region is obtained according to the above method.
6. The method for interactively segmenting the fracture image according to claim 1, wherein the obtaining the distribution parameters of the gray threshold according to the distance distribution condition of each pixel point which is larger than the gray threshold and the key point in the corresponding key region under each gray threshold in each key region comprises the following steps:
Wherein Dpa (Q r) represents the distribution parameter of the gray threshold value Q r in the r-th key region, n r represents the number of pixels with pixel values larger than the gray threshold value Q r corresponding to the r-th key region, DE B(Qr) represents the distance between the pixel with the B-th pixel value larger than the gray threshold value Q r in the r-th key region and the key point of the key region, and the distribution parameter of each gray threshold value in each key region is obtained according to the method.
7. The interactive segmentation method of fracture images according to claim 1, wherein the obtaining the optimal segmentation threshold of each key region according to the requirement parameter, the difference parameter and the separation parameter of each gray threshold in each key region comprises the following specific steps:
Firstly, according to the requirement parameters of each gray threshold in each key area, the difference parameters and the separation parameters acquire the performance parameters of different gray thresholds in each key area, and the specific method is as follows:
Opt(Qr)=Spe(Qr)×Dif(Qr)×DPa(Qr)
Where Opt (Q r) represents the performance parameter of the gray threshold Q r in the r-th critical region, spe (Q r) represents the separation parameter of the gray threshold Q r in the r-th critical region, dif (Q r) represents the difference parameter of the selected gray threshold Q r in the r-th critical region, and Dpa (Q r) represents the distribution parameter of the gray threshold Q r in the r-th critical region, and the performance parameter of each gray threshold in each critical region can be obtained according to the above method;
And calculating performance parameters of different gray thresholds in each key region, wherein the range of the gray threshold is more than or equal to 1 and less than or equal to 255, and selecting the gray threshold corresponding to the minimum performance parameter calculated by each gray threshold in each key region as the optimal segmentation threshold of the key region.
8. The interactive segmentation method of a fracture image according to claim 1, wherein the obtaining the segmentation threshold of each region without a key point according to the distance between each region without a key point and all the key regions and the optimal segmentation threshold corresponding to the key region comprises the following specific steps:
Acquiring the position of a central pixel point of each area without a key point and the positions of central pixel points of all key areas, and respectively calculating the distance between the central pixel point of each area without the key point and the central pixel point of all the key areas; the optimal segmentation threshold calculation method for each region without key points is as follows:
Wherein H l represents the optimal segmentation threshold of the first region without the key point, B represents the number of the key points, D l,N represents the distance between the central pixel point of the first region without the key point and the central pixel point of the N key region, D l,M represents the distance between the central pixel point of the first region without the key point and the central pixel point of the M key region, G N represents the optimal segmentation threshold of the N key region, and the optimal segmentation threshold of each region without the key point is obtained according to the method.
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 the processor implements the steps of a fracture image interactive segmentation method according to any one of claims 1 to 8 when the computer program is executed.
10. An interactive fracture image segmentation system, which is characterized by comprising the following modules:
The data acquisition module is used for acquiring a fracture CT image gray scale map, and acquiring key points of the CT image gray scale map according to the interaction behavior;
The data calculation module is used for dividing the gray image according to the distribution condition of key points, acquiring a key region corresponding to each key point according to the distribution condition of the key points in the gray image of different regions after division, acquiring a distribution parameter of the gray threshold according to the distribution condition of pixel values of pixels which are larger than the gray threshold in each key region and the distribution condition of pixel values which are smaller than or equal to the gray threshold in any gray threshold in each key region, acquiring a separation parameter of any gray threshold in each key region according to the gray value difference degree of each pixel which is larger than the gray threshold in each key region and a neighborhood pixel in each gray threshold in each key region, acquiring a distribution parameter of the gray threshold according to the distance distribution condition of each pixel which is larger than the gray threshold in each key region and the corresponding key point in each key region, and acquiring an optimal segmentation threshold in each key region according to the demand parameter, the difference parameter and the separation parameter of each gray threshold in each key region;
And the data synthesis module is used for acquiring the segmentation threshold value of each area without the key point according to the distance between each area without the key point and all the key areas and the optimal segmentation threshold value corresponding to the key area.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202411591560.9A CN119540256A (en) | 2024-11-08 | 2024-11-08 | Interactive fracture image segmentation method and system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202411591560.9A CN119540256A (en) | 2024-11-08 | 2024-11-08 | Interactive fracture image segmentation method and system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN119540256A true CN119540256A (en) | 2025-02-28 |
Family
ID=94703895
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202411591560.9A Pending CN119540256A (en) | 2024-11-08 | 2024-11-08 | Interactive fracture image segmentation method and system |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN119540256A (en) |
-
2024
- 2024-11-08 CN CN202411591560.9A patent/CN119540256A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN109934812B (en) | Image processing method, image processing apparatus, server, and storage medium | |
| US9595111B2 (en) | Region-growing algorithm | |
| CN113920109B (en) | Medical image recognition model training method, recognition method, device and equipment | |
| JP6853419B2 (en) | Information processing equipment, information processing methods, computer programs | |
| CN116109663B (en) | Segmentation method of gastric CT image based on multi-threshold segmentation | |
| CN115311277B (en) | Pit defect identification method for stainless steel product | |
| WO2020038312A1 (en) | Multi-channel tongue body edge detection device and method, and storage medium | |
| CN113592783A (en) | Method and device for accurately quantifying basic indexes of cells in corneal confocal image | |
| CN112052854B (en) | A reversible information hiding method for medical images that achieves adaptive contrast enhancement | |
| CN116805316B (en) | Degradable plastic processing quality detection method based on image enhancement | |
| CN116228804A (en) | Mineral resource identification method based on image segmentation | |
| CN119048534A (en) | Method and system for dividing tumor peripheral region based on ultrasonic image | |
| CN111915620A (en) | CT rib segmentation method and device | |
| CN108830874A (en) | A kind of number pathology full slice Image blank region automatic division method | |
| CN111513743A (en) | Fracture detection method and device | |
| CN111047603A (en) | A Hybrid Segmentation Algorithm of Aerial Image Based on Novel Markov Random Field and Region Merging | |
| CN119342359B (en) | Dynamic white balance adjustment method and system for hysteroscope visual field optimization | |
| CN111861984B (en) | Method and device for determining lung region, computer equipment and storage medium | |
| CN119540256A (en) | Interactive fracture image segmentation method and system | |
| CN118314039A (en) | A spine CT image enhancement method and system | |
| CN109949906B (en) | Pathological section image processing and model training method and equipment | |
| CN117036311A (en) | Mammary gland segmentation method, system and medium based on progressive growth learning | |
| CN113989269B (en) | Traditional Chinese medicine tongue image tooth trace automatic detection method based on convolutional neural network multi-scale feature fusion | |
| CN112927225A (en) | Wisdom tooth growth state auxiliary detection system based on artificial intelligence | |
| CN120070287B (en) | Endoscopic image color correction method, device, equipment and storage medium |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |