A method for measuring the curvature of cervical MRI images based on superpixel segmentation
Through super-pixel segmentation and clustering technology, combined with human-computer interaction, the traditional cervical spine curvature measurement problems of long time consumption and low repeatability are solved, semi-automatic measurement of cervical spine curvature is achieved, and the accuracy and efficiency of measurement are improved.
Patent Information
- Application Number
- CN202110864656.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-29
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2041-07-29
AI Technical Summary
Traditional cervical spine curvature measurement methods rely on manual operation, which is time-consuming, has poor consistency, low repeatability, and contains human errors.
A cervical spine MR image measurement method based on superpixel segmentation is adopted, including optimal layer selection, preprocessing, superpixel segmentation and merging, vertebral body segmentation and curvature measurement, and K-means clustering and DBSCAN clustering methods are used to reduce image complexity. degree, combined with human-computer interaction to improve measurement accuracy.
Semi-automatic measurement of cervical spine curvature is achieved, reducing the operating time of medical experts, improving the reliability and repeatability of measurement, and reducing human error.
Smart Images

Figure CN113822853B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of cervical curvature measurement, and in particular relates to a cervical vertebrae MR image curvature measurement method based on superpixel segmentation. Background Art
[0002] Quantitative measurement of the cervical spine is a practical means for the diagnosis and evaluation of clinical cervical spondylosis. As one of the important indicators for judging cervical diseases, cervical curvature is of great significance for the clinical treatment of cervical lesions. Most of the current cervical curvature measurement methods are based on medical image judgment, which mainly rely on the experience of medical experts and their manual operation ability. Manual measurement consumes a lot of precious time of medical experts and is prone to human errors. Even experienced medical experts find it difficult to measure cervical curvature reliably and repeatably. Summary of the invention
[0003] In view of the shortcomings of traditional manual measurement such as long time consumption, poor consistency and low repeatability, the present invention provides a method for measuring the curvature of cervical MR images based on superpixel segmentation, which can realize semi-automatic measurement of cervical curvature.
[0004] To achieve the above object, the technical solution adopted by the present invention is:
[0005] A method for measuring the curvature of cervical MRI images based on superpixel segmentation, characterized by comprising the following steps:
[0006] Step 1, optimal layer selection:
[0007] The cervical spine MR image corresponding to the optimal layer is determined by comparing the integrity of the spinal cord area in different layers;
[0008] Step 2, preprocessing:
[0009] Bilateral filtering is performed on the selected optimal image to remove noise and strong anisotropic interference in the MR image;
[0010] Step 3, superpixel segmentation:
[0011] K-means clustering is performed on multi-resolution images to merge pixels with similar positions and features into superpixels, completing image segmentation and reducing image complexity;
[0012] Step 4, superpixel merging:
[0013] Due to the limitation of the search range, the superpixels obtained in the previous step are often small areas. The DBSCAN clustering method is used to merge small superpixels to form new superpixel areas, and the new superpixel areas coincide with the vertebrae;
[0014] Step 5, vertebral body C2-C7 segmentation:
[0015] The doctor selects vertebrae C2-C7 from the superpixel merging results in step 4 for segmentation in a human-computer interactive manner;
[0016] Step 6, cervical curvature measurement:
[0017] Based on the vertebral segmentation results in step 5, the center of mass of each vertebra is calculated, and then the curvature is measured by using the method of measuring the cervical lordosis using the vertebral center of mass.
[0018] Preferably, the optimal layer selection in step 1 is to determine whether the central pixel point is a spinal cord candidate point by comparing the average longitudinal grayscale gradients in adjacent areas in the same layer, take the largest spinal cord area formed by the final spinal cord candidate point, and then take the layer corresponding to the maximum spinal cord area height of different layers as the optimal layer.
[0019] Preferably, the preprocessing in step 2 uses bilateral filtering to process the image in Lab color space, which can smooth the image while retaining the image edge and remove noise and strong anisotropic interference of the MR image.
[0020] Preferably, in step 3, the superpixel segmentation is performed, the number of superpixels k is initialized, a multi-resolution image is realized by using an image pyramid, cluster centers are allocated on the image that has been upsampled once, and the cluster center columns are sampled at a distance of N is the number of image pixels, and the row sampling distance Traverse the pixels in the upsampled image and calculate their color and position features with the cluster center, set the pixel corresponding to the smallest eigenvalue to the same class as the cluster center, then use the superpixel position feature and color feature average to update the position and color information of the cluster center respectively, remap the new cluster center to the original image, traverse the pixels in the original image and calculate their color and position features with the cluster center, set the pixel corresponding to the smallest eigenvalue to the same class as the cluster center, update the cluster center, and repeat the iteration. Performing initial clustering on the upsampled image can improve the initial clustering speed while better capturing the global properties of the image. The formula for characterizing the color and position of pixels and cluster centers is:
[0021]
[0022] Among them, i represents the cluster center, j represents the pixel point, and d c Indicates the color distance, d s represents the position distance, D represents the total distance between the pixel and the cluster center, L i 、a i , b i Represents the color feature of the cluster center, x i ,y iRepresents the location characteristics of the cluster center, L j 、a j , b j Represents the color characteristics of the pixel, x j ,y j represents the position feature of the pixel, and w represents the weighting factor between color and position differences.
[0023] Preferably, the superpixel merging in step 4 adopts the DBSCAN clustering method, and the unlabeled superpixels are set as seed superpixels in the order from left to right and from bottom to top of the image by default, and the color feature similarity between adjacent unlabeled superpixels and seed superpixels is calculated. If the feature value is less than the threshold, the superpixel is merged with the seed superpixel. Traverse all superpixels until all superpixels are marked. The new superpixel area formed by the merger will overlap with the vertebra. The calculation formula for characterizing the similarity of color features is:
[0024] D c =(L n -L m ) 2 +(a n -a m ) 2 +(b n -b m ) 2 (2)
[0025] Among them, m represents the seed superpixel, n represents the adjacent superpixel, and L m 、a m , b m represents the color feature of the seed superpixel, L n 、a n , b n Represents the color features of adjacent superpixels.
[0026] Compared with the prior art, the present invention has the following obvious outstanding substantive features and significant technological progress:
[0027] 1. The present invention determines the spinal cord area of a layer by comparing the average longitudinal grayscale gradients of adjacent areas, and then compares the heights of the spinal cord areas corresponding to different layers, and takes the layer with the maximum height as the optimal layer;
[0028] 2. The present invention uses bilateral filtering to preprocess the cervical MR images in the Lab color space, which can smooth the images while retaining the edges, and remove the noise and strong anisotropic interference of the MR images;
[0029] 3. The present invention uses an image pyramid to realize multi-resolution images, allocates cluster centers on the image that has been upsampled once, traverses the pixels in the upsampled image and calculates the color and position features between the pixels and the cluster centers, then updates the cluster centers, remaps the obtained new cluster centers to the original image, traverses the pixels in the original image and calculates the color and position features between the pixels and the cluster centers, updates the cluster centers, and repeats the iteration; initial clustering is performed on the image that has been upsampled once, which can improve the initial clustering speed while better capturing the global properties of the image;
[0030] 4. The present invention adopts the DBSCAN clustering method to merge small superpixels with similar color features to form a new superpixel area, uses human-computer interaction to segment vertebrae C2-C7, and uses the vertebral centroid measurement method to measure the cervical lordosis to measure the cervical curvature. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 is a flow chart of the method of the present invention.
[0032] Figure 2 It is a diagram of the spinal cord region extraction process under a certain layer of the method of the present invention.
[0033] Figure 3 It is a schematic diagram of the pretreatment results of the method of the present invention.
[0034] Figure 4 4 is a diagram of the vertebral segmentation process of the method of the present invention.
[0035] Figure 5 It is a schematic diagram of cervical curvature measurement of the method of the present invention. DETAILED DESCRIPTION
[0036] The present invention will be further described below in conjunction with the accompanying drawings and preferred embodiments:
[0037] Embodiment 1:
[0038] See also Figure 1 A method for measuring the curvature of cervical MRI images based on superpixel segmentation comprises the following steps:
[0039] Step 1, optimal layer selection:
[0040] The cervical spine MR image corresponding to the optimal layer is determined by comparing the integrity of the spinal cord area in different layers;
[0041] Step 2, preprocessing:
[0042] Bilateral filtering is performed on the selected optimal image to remove noise and strong anisotropic interference in the MR image;
[0043] Step 3, superpixel segmentation:
[0044] K-means clustering is performed on multi-resolution images to merge pixels with similar positions and features into superpixels, completing image segmentation and reducing image complexity;
[0045] Step 4, superpixel merging:
[0046] Due to the limitation of the search range, the superpixels obtained in the previous step are often small areas. The DBSCAN clustering method is used to merge small superpixels to form new superpixel areas, and the new superpixel areas coincide with the vertebrae;
[0047] Step 5, vertebral body C2-C7 segmentation:
[0048] The doctor selects vertebrae C2-C7 from the superpixel merging results in step 4 for segmentation in a human-computer interactive manner;
[0049] Step 6, cervical curvature measurement:
[0050] Based on the vertebral segmentation results in step 5, the center of mass of each vertebra is calculated, and then the curvature is measured by using the method of measuring the cervical lordosis using the vertebral center of mass.
[0051] The cervical vertebra MR image curvature measurement method based on superpixel segmentation in this embodiment can realize semi-automatic measurement of cervical vertebra curvature.
[0052] Embodiment 2:
[0053] This embodiment is basically the same as the first embodiment, except that:
[0054] The optimal layer selection in step 1 is to compare the average longitudinal grayscale gradients in adjacent areas within the same layer to determine whether the central pixel is a spinal cord candidate point, take the maximum spinal cord area formed by the final spinal cord candidate point, and then take the layer corresponding to the maximum spinal cord area height of different layers as the optimal layer.
[0055] The preprocessing in step 2 uses bilateral filtering to process the image in the Lab color space, smoothing the image while retaining the image edge, and removing noise and strong anisotropic interference of the MR image.
[0056] In step 3, the superpixel segmentation is performed, the number of superpixels k is initialized, and the multi-resolution image is realized by using the image pyramid. The cluster centers are allocated on the image that has been upsampled once, and the cluster center columns are sampled at a distance of N is the number of image pixels, and the row sampling distance Traverse the pixels in the upsampled image and calculate their color and position features with the cluster center, set the pixel corresponding to the smallest eigenvalue to the same class as the cluster center, then use the superpixel position feature and color feature average to update the position and color information of the cluster center respectively, remap the new cluster center to the original image, traverse the pixels in the original image and calculate their color and position features with the cluster center, set the pixel corresponding to the smallest eigenvalue to the same class as the cluster center, update the cluster center, and repeat the iteration; perform initial clustering on the upsampled image once, while improving the initial clustering speed, better capture the global properties of the image; the formula for characterizing the color and position of the pixel and cluster center is:
[0057]
[0058] Among them, i represents the cluster center, j represents the pixel point, and d c Indicates the color distance, d s represents the position distance, D represents the total distance between the pixel and the cluster center, L i 、a i , b i Represents the color feature of the cluster center, x i ,y i Represents the location characteristics of the cluster center, L j 、a j , b j Represents the color characteristics of the pixel, x j ,y j represents the position feature of the pixel, and w represents the weighting factor between color and position differences.
[0059] The superpixel merging in step 4 adopts the DBSCAN clustering method. By default, the unlabeled superpixels are set as seed superpixels in the order from left to right and from bottom to top of the image. The color feature similarity between the adjacent unlabeled superpixels and the seed superpixels is calculated. If the feature value is less than the threshold, the superpixel is merged with the seed superpixel. All superpixels are traversed until all superpixels are marked. The new superpixel area formed by the merger will overlap with the vertebrae. The calculation formula for characterizing the color feature similarity is:
[0060] D c =(L n -L m ) 2 +(a n -a m ) 2 +(b n -b m ) 2 (2)
[0061] Among them, m represents the seed superpixel, n represents the adjacent superpixel, and L m 、a m , b m represents the color feature of the seed superpixel, L n 、a n , b n Represents the color features of adjacent superpixels.
[0062] In this embodiment, the spinal cord area of the layer is determined by comparing the average longitudinal grayscale gradient of adjacent areas, and then the heights of the spinal cord areas corresponding to different layers are compared, and the layer with the maximum height is used as the optimal layer; in this embodiment, bilateral filtering is used to preprocess the cervical MR image in the Lab color space, which can smooth the image while retaining the edge, remove noise and strong anisotropic interference of the MR image; in this embodiment, an image pyramid is used to realize multi-resolution images, cluster centers are allocated on the image that is upsampled once, the pixels in the upsampled image are traversed and the color and position features of the pixels and the cluster centers are calculated, and then the cluster centers are updated, and the obtained new cluster centers are remapped to the original image, the pixels in the original image are traversed and the color and position features of the pixels and the cluster centers are calculated, the cluster centers are updated, and the iteration is repeated; initial clustering is performed on the image that is upsampled once, which can better capture the global properties of the image while improving the initial clustering speed; in this embodiment, the DBSCAN clustering method is used to merge small superpixels with similar color features to form a new superpixel area, and the vertebral bodies C2-C7 are segmented in a human-computer interactive manner, and the cervical curvature is measured using the vertebral body centroid measurement method of cervical lordosis.
[0063] Embodiment three:
[0064] This embodiment is basically the same as the above embodiment, with the following features:
[0065] This embodiment uses a group of cervical TI-MR images as the object, and the cervical curvature measurement method is as follows: Figure 1 As shown, a method for measuring the curvature of cervical MRI images based on superpixel segmentation includes the following steps:
[0066] Step 1, optimal layer selection:
[0067] See also Figure 2 (a) The longitudinal grayscale gradient averages in adjacent regions within the same layer are compared to determine whether the central pixel is a candidate spinal cord point. Figure 2 (b); Take the largest spinal cord area formed by the final spinal cord candidate points, see Figure 2 (c) Then, the layer corresponding to the maximum height of the spinal cord area in different layers is taken as the optimal layer;
[0068] Step 2, preprocessing:
[0069] The image is processed in Lab color space using bilateral filtering to smooth the image while preserving the image edge and remove noise and strong anisotropic interference in the MR image. Figure 3 As shown;
[0070] Step 3, superpixel segmentation:
[0071] Initialize the number of superpixels to 200, use image pyramid to realize multi-resolution image, assign cluster centers to the upsampled image once, traverse the pixels in the upsampled image and calculate their color and position features with the cluster centers, set the pixel corresponding to the smallest eigenvalue to the same class as the cluster center, then update the cluster center, remap the new cluster center to the original image, traverse the pixels in the original image and calculate their color and position features with the cluster centers, set the pixel corresponding to the smallest eigenvalue to the same class as the cluster center, update the cluster center, repeat the iteration, and complete the superpixel segmentation, see Figure 4 (a);
[0072] Step 4, superpixel merging:
[0073] The DBSCAN clustering method is used. By default, the unlabeled superpixels are set as seed superpixels in the order from left to right and from bottom to top of the image. The color feature similarity between the adjacent unlabeled superpixels and the seed superpixels is calculated. If the feature value is less than the threshold, the superpixel is merged with the seed superpixel. All superpixels are traversed until all superpixels are labeled; the new superpixel area formed by the merger will overlap with the vertebrae, such as Figure 4 (b)
[0074] Step 5, vertebral body C2-C7 segmentation:
[0075] The doctor selects vertebrae C2-C7 from the superpixel merging results in step 4 for segmentation in a human-computer interactive manner, such as Figure 4 (c)
[0076] Step 6, cervical curvature measurement:
[0077] Based on the vertebral segmentation results in step 5, the centroid of each vertebra is calculated, and then the curvature is measured by using the method of measuring the cervical lordosis using the centroid of the vertebra, see Figure 5 .
[0078] In view of the shortcomings of traditional manual measurement such as long time consumption, poor consistency and low repeatability, the present embodiment provides a method for measuring the curvature of cervical MR images based on superpixel segmentation, which can achieve semi-automatic measurement of the curvature of cervical vertebrae.
[0079] In summary, the above embodiment is a method for measuring the curvature of cervical MR images based on superpixel segmentation. The operation steps are: determine the candidate points of the spinal cord by comparing the average longitudinal grayscale gradients in adjacent areas, and determine the cervical MR image corresponding to the optimal layer according to the integrity of the spinal cord area; use bilateral filtering to remove noise and strong anisotropic interference in the MR image; use K-means clustering on multi-resolution images to merge pixels with similar positions and features to form superpixels, complete image segmentation, and reduce image complexity; use the DBSCAN clustering method to merge small superpixels to form new superpixel areas, and the new superpixel areas will overlap with the vertebrae; select vertebrae C2-C7 from the superpixel merging results in a human-computer interactive manner for segmentation; calculate the center of mass of each vertebra, and use the method of measuring the cervical lordosis by the center of mass of the vertebra to measure the curvature. The above embodiment realizes semi-automatic cervical curvature measurement of cervical MR images, which can greatly save the precious time of medical experts and improve their work efficiency.
[0080] The above describes the embodiments of the present invention in conjunction with the accompanying drawings, but the present invention is not limited to the above embodiments. Various changes can be made according to the purpose of the invention. Any changes, modifications, substitutions, combinations or simplifications made according to the spirit and principle of the technical solution of the present invention should be equivalent replacement methods. As long as they meet the purpose of the invention and do not deviate from the technical principles and inventive concepts of the present invention, they belong to the protection scope of the present invention.
Claims
1. A method for measuring the curvature of cervical MRI images based on superpixel segmentation. It is characterized in that The steps include: Step 1, optimal layer selection: The cervical spine MR image corresponding to the optimal layer is determined by comparing the integrity of the spinal cord area in different layers; Step 2, preprocessing: Bilateral filtering is performed on the selected optimal image to remove noise and strong anisotropic interference in the MR image; Step 3, superpixel segmentation: K-means clustering is performed on multi-resolution images to merge pixels with similar positions and features into superpixels, completing image segmentation and reducing image complexity; Step 4, superpixel merging: Due to the limitation of the search range, the superpixels obtained in the previous step are often small areas, so the DBSCAN clustering method is used to merge small superpixels to form new superpixel areas, and the new superpixel areas will overlap with the vertebrae; Step 5, vertebral body C2-C7 segmentation: The doctor selects vertebrae C2-C7 from the superpixel merging results in step 4 for segmentation in a human-computer interactive manner; Step 6, cervical curvature measurement: Based on the vertebral segmentation results in step 5, the center of mass of each vertebra is calculated, and then the curvature is measured by using the method of measuring the cervical lordosis using the vertebral center of mass.
2. According to the method for measuring the curvature of cervical MRI images based on superpixel segmentation according to claim 1, Features: The optimal layer selection in step 1 is to determine whether the central pixel is a spinal cord candidate point by comparing the average longitudinal grayscale gradients in adjacent areas in the same layer, take the maximum spinal cord area formed by the final spinal cord candidate point, and then take the layer corresponding to the maximum spinal cord area height of different layers as the optimal layer.
3. According to the method for measuring the curvature of cervical MRI images based on superpixel segmentation in claim 1, Features: The preprocessing in step 2 uses bilateral filtering to process the image in the Lab color space, which can smooth the image while retaining the image edge and remove noise and strong anisotropic interference of the MR image.
4. According to the method for measuring the curvature of cervical MRI images based on superpixel segmentation as claimed in claim 1, Features: In step 3, the superpixel segmentation is performed, the number of superpixels k is initialized, and the multi-resolution image is realized by using the image pyramid. The cluster centers are allocated on the image that has been upsampled once, and the cluster center columns are sampled at a distance of (N is the number of image pixels), row sampling distance Traverse the pixels in the upsampled image and calculate their color and position features with the cluster center, set the pixel corresponding to the minimum eigenvalue to the same class as the cluster center, then use the superpixel position feature and color feature average to update the position and color information of the cluster center respectively, remap the new cluster center to the original image, traverse the pixels in the original image and calculate their color and position features with the cluster center, set the pixel corresponding to the minimum eigenvalue to the same class as the cluster center, update the cluster center, and repeat the iteration; perform initial clustering on the upsampled image once, which can improve the initial clustering speed while better capturing the global properties of the image; the formula for characterizing the color and position of the pixel and cluster center is: Among them, i represents the cluster center, j represents the pixel point, and d c Indicates the color distance, d s represents the position distance, D represents the total distance between the pixel and the cluster center, L i 、a i , b i Represents the color feature of the cluster center, x i ,y i Represents the location characteristics of the cluster center, L j 、a j , b j Represents the color characteristics of the pixel, x j ,y j represents the position feature of the pixel, and w represents the weighting factor between color and position differences.
5. According to the method for measuring the curvature of cervical MRI images based on superpixel segmentation according to claim 1, Features: The superpixel merging in step 4 adopts the DBSCAN clustering method. By default, the unlabeled superpixels are set as seed superpixels in the order from left to right and from bottom to top of the image. The color feature similarity between the adjacent unlabeled superpixels and the seed superpixels is calculated. If the feature value is less than the threshold, the superpixel is merged with the seed superpixel. All superpixels are traversed until all superpixels are marked. The new superpixel area formed by the merger will overlap with the vertebrae. The calculation formula for characterizing the color feature similarity is: D c =(L n -L m ) 2 +(a n -a m ) 2 +(b n -b m ) 2 (2) Among them, m represents the seed superpixel, n represents the adjacent superpixel, and L m 、a m , b m represents the color feature of the seed superpixel, L n 、a n , b n Represents the color features of adjacent superpixels.
