Detailed Description
In order to make the objects, features and advantages of the present invention more apparent and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
As shown in fig. 1, a method for vertebral endplate segmentation in an embodiment of the present application includes:
step 101, obtaining a vertebral body image;
in one application scenario, step 101 may be represented as: obtaining a vertebral body image through a Magnetic Resonance Imaging (MRI) technology, wherein the obtained vertebral body image is an MRI image. The following describes the MRI technique: the MRI technique is a technique for acquiring an image of the internal structure of the human body through a magnetic field, and has the advantage of being non-invasive, so that a patient can be well protected while being examined. In this embodiment, the image of the vertebral body may be acquired by MRI technique.
In another application scenario, a vertebral body image may also be obtained by CT. Alternatively, the image of the vertebral body to be segmented may be acquired (e.g., imported) from an existing vertebral body image database, which is not limited herein.
Since the original image obtained by the CT technique or the MRI technique may include a plurality of vertebral bodies, and not all the vertebral bodies need to be subjected to vertebral body endplate segmentation, in step 101, a vertebral body region to be segmented may be extracted from the original image obtained by the CT technique or the MRI technique to obtain a vertebral body image including the vertebral body to be segmented (i.e., the above-mentioned vertebral body image).
Further, the acquired vertebral body image may be calibrated, for example, the direction of the vertebral body in the vertebral body image is calibrated, so that the central axis direction of the vertebral body is perpendicular to the z axis, and the plane of the vertebral body endplate is parallel to the xy axis plane, wherein the spatial rectangular coordinate system where the xy axis plane and the z axis are located may refer to a standard spatial rectangular coordinate system, in which the x axis represents the horizontal axis, the y axis represents the longitudinal axis, and the z axis represents the vertical axis. It should be understood that after the acquired vertebral body image is calibrated, the vertebral body image input in step 102 is the calibrated vertebral body image, that is, step 102 is to process the calibrated vertebral body image.
102, performing morphological processing on the vertebral body image based on the structural elements to obtain a morphological image;
wherein the structural elements are pre-constructed based on the structural characteristics of the vertebral endplates. In the embodiment of the application, the three-dimensional structural characteristics of the vertebral body end plate can be simulated in advance to construct a three-dimensional structural element. For example, a disc-shaped structural element can be constructed by simulating the three-dimensional structural features of the vertebral endplates, and the mathematical form of the disc-shaped structural element is a structural element with a radius of 8 volume (volume, that is, voxel unit) and a thickness of 1 volume.
Optionally, step 102 includes: for the vertebral body image, performing image corrosion treatment for N times based on the structural elements to obtain a corrosion image; and executing N times of image expansion processing on the corrosion image based on the structural elements to obtain a morphological image. Wherein N is not less than 2. For example, if the N is 3, in step 102, the image erosion processing is performed on the vertebral body image input in step 102 based on the pre-constructed structural element to obtain an erosion image 1, then the image erosion processing is performed on the erosion image 1 again based on the structural element to obtain an erosion image 2, then the image erosion processing is performed on the erosion image 3 for the third time based on the structural element to obtain an erosion image 3, at this time, the image erosion operation in the morphological processing is completed, and the image expansion operation is performed. In the image expansion operation, the erosion image 3 is subjected to image expansion processing based on the structural elements to obtain an expanded image 1, the expanded image 1 is subjected to image expansion processing based on the structural elements to obtain an expanded image 2, and the expanded image 3 is subjected to image expansion processing based on the structural elements to obtain an expanded image 3, wherein the expanded image 3 is the morphological image.
Of course, the step 102 may also perform morphological processing on the vertebral body image in other manners, which is not limited herein.
Optionally, in order to improve the morphological processing efficiency, only the region of interest may be processed, and after the vertebral body image is acquired in step 101 and before step 102, the following steps may be further included: determining a region of interest in the vertebral body image (or the calibrated vertebral body image) acquired in step 101, and performing image segmentation on the region of interest to obtain a segmented image of the region of interest. Step 102 is embodied as: and performing morphological processing on the segmented image of the region of interest based on the structural elements to obtain a morphological image. In fact, the determination Of the Region Of Interest in the vertebral body image may be implemented based on a Region Of Interest (ROI) detection technology, that is, the Region Of Interest in the vertebral body image (or the calibrated vertebral body image) acquired in step 101 is determined based on the ROI detection technology.
103, determining a target area based on a similarity algorithm;
in an embodiment of the present invention, the target region is a region similar to the morphological image in the vertebral body image.
Optionally, the pyramid image and the morphological image are used as feature vectors, a matrix inner product function of the two feature vectors is used as a similarity function to calculate similarity values of pixel points corresponding to the morphological image in the pyramid image, the pixel points with the similarity values higher than a preset similarity threshold are determined as similarity points (that is, the similarity values are subjected to threshold segmentation based on the preset similarity threshold to determine the similarity points), and an area formed by the similarity points is determined as the target area.
Of course, in step 103, the cone image and the morphology image may also be used as feature vectors, and other functions (e.g., inner product, ratio, mean square error, cosine similarity, etc.) of the two feature vectors, which may embody correlation, may be used as similarity functions to calculate similarity values of the pixel points in the cone image corresponding to the morphology image, determine the pixel points with the similarity values higher than a preset similarity threshold as similarity points (i.e., perform threshold segmentation on the similarity values based on the preset similarity threshold to determine the similarity points), and determine the region formed by the similarity points as the target region.
Optionally, after the target area is determined, the gray value of the pixel point in the target area may be enhanced.
104, segmenting a vertebral endplate of the vertebral body image based on the target area;
after the target region is determined in step 103, the vertebral endplate of the vertebral body image can be segmented by using an image segmentation algorithm (for example, a threshold segmentation algorithm, a watershed algorithm, a region growing algorithm, a grow-cut algorithm, etc.) based on the target region, so as to separate the vertebral endplate from the background in the vertebral body image.
Specifically, after the target region is determined in step 103, the target region may be used as a mask, and a vertebral endplate and a background in the vertebral body image are separated through the mask, so as to separate the vertebral endplate and the background in the vertebral body image.
Therefore, the method and the device for segmenting the vertebral end plate can effectively improve the efficiency of segmenting the vertebral end plate compared with the traditional method for manually segmenting by medical staff or medical experts.
In this embodiment, the region of interest is extracted from the vertebral body image first, so as to save the time consumed by morphological processing and improve the segmentation efficiency of the vertebral body endplate. As shown in fig. 2-a, the vertebral endplate segmentation method in the embodiments of the present application includes:
step 201, obtaining a vertebral body image;
specifically, step 201 may refer to the description in step 101 shown in fig. 1, and is not described herein again.
Step 202, determining a region of interest in the vertebral body image;
wherein the region of interest includes an image region where the vertebral endplates are located.
The above-mentioned determination of the region of interest in the image of the vertebral body may be performed based on an ROI detection technique, i.e. the region of interest in the image of the vertebral body (the image of the vertebral body acquired in step 201 or the calibrated image of the vertebral body as mentioned in the embodiment shown in fig. 1) is determined based on the ROI detection technique.
Step 203, performing image segmentation on the region of interest to obtain a segmented image of the region of interest;
in step 203, based on the region of interest determined in step 202, an image segmentation algorithm (e.g., a threshold segmentation algorithm, a watershed algorithm, a region growing algorithm, a grow-cut algorithm, etc.) may be used to segment the region of interest for the vertebral body image.
In one application scenario, as shown in fig. 2-b, step 203 may comprise:
step 2031, normalizing the gray value of each pixel point in the region of interest based on a normalization algorithm;
in step 2031, the gray level of each pixel point in the region of interest is normalized to the interval [0, 1] by a normalization algorithm (e.g., min-max algorithm).
Step 2032, generating a mask of the region of interest based on the result of the normalization process;
in step 2032, an image segmentation algorithm such as threshold segmentation and region growing may be used to further segment the mask of the region of interest based on the result of the normalization process in step 2031.
Step 2033, segmenting the region of interest of the vertebral body image based on the mask of the region of interest to obtain a segmented image of the region of interest;
after the mask of the interested region is obtained, the interested region of the cone image is further segmented through the mask, and a segmented image of the interested region is obtained.
Specifically, the segmenting the region of interest of the vertebral body image based on the mask of the region of interest may be: and setting the gray value of the pixel point outside the mask in the cone image as 0, and setting the gray value of the pixel point inside the mask in the cone image as 1. Alternatively, the segmenting the region of interest of the vertebral body image based on the mask of the region of interest may be: and setting the gray value of the pixel point outside the mask in the cone image as 0, and keeping the gray value of the pixel point inside the mask in the cone image.
Step 204, performing morphological processing on the segmentation image of the region of interest based on the structural elements to obtain a morphological image;
wherein the structural elements are pre-constructed based on the structural characteristics of the vertebral endplates. In the embodiment of the application, the three-dimensional structural characteristics of the vertebral body end plate can be simulated in advance to construct a three-dimensional structural element. For example, a disc-shaped structural element can be constructed by simulating the three-dimensional structural features of the vertebral endplates, and the mathematical form of the disc-shaped structural element is a structural element with a radius of 8 volume (volume, that is, voxel unit) and a thickness of 1 volume.
Optionally, step 204 includes: aiming at the segmentation image of the region of interest, carrying out image corrosion treatment for N times based on the structural elements to obtain a corrosion image; and executing N times of image expansion processing on the corrosion image based on the structural elements to obtain a morphological image. Wherein N is not less than 2. For example, if N is 3, in step 204, the segmented image input in step 204 is subjected to image erosion processing based on the pre-constructed structural elements to obtain an eroded image 1, then the eroded image 1 is subjected to image erosion processing again based on the structural elements to obtain an eroded image 2, then the eroded image 3 is subjected to image erosion processing for the third time based on the structural elements to obtain an eroded image 3, and at this time, the image erosion operation in the morphological processing is completed, and the image expansion operation is performed. In the image expansion operation, the erosion image 3 is subjected to image expansion processing based on the structural elements to obtain an expanded image 1, the expanded image 1 is subjected to image expansion processing based on the structural elements to obtain an expanded image 2, and the expanded image 3 is subjected to image expansion processing based on the structural elements to obtain an expanded image 3, wherein the expanded image 3 is the morphological image.
Of course, the step 204 may also perform morphological processing on the segmented image of the region of interest in other manners, which is not limited herein.
Step 205, determining a target area based on a similarity algorithm;
in an embodiment of the present invention, the target region is a region similar to the morphological image in the vertebral body image.
Optionally, the pyramid image and the morphological image are used as feature vectors, a matrix inner product function of the two feature vectors is used as a similarity function to calculate a similarity value of each pixel point in the pyramid image corresponding to the morphological image, the pixel points with the similarity values higher than a preset similarity threshold are determined as similarity points, and a region formed by the similarity points is determined as the target region.
Of course, in step 205, the pyramid image and the morphological image may also be used as feature vectors, and other functions (e.g., functions such as inner product, ratio, mean square deviation, cosine similarity) of the two feature vectors, which may embody correlation, may be used as similarity functions to calculate similarity values of the pixel points in the pyramid image corresponding to the morphological image, determine pixel points with similarity values higher than a preset similarity threshold as similarity points, and determine an area formed by the similarity points as the target area.
Optionally, after the target area is determined, the gray value of the pixel point in the target area may be enhanced.
Step 206, segmenting the vertebral body endplate of the vertebral body image based on the target area;
after the target region is determined in step 205, based on the target region, the vertebral endplate of the vertebral body image may be segmented by using an image segmentation algorithm (e.g., a threshold segmentation algorithm, a watershed algorithm, a region growing algorithm, a grow-cut algorithm, etc.), so as to separate the vertebral endplate from the background in the vertebral body image.
Specifically, after the target region is determined in step 205, the target region may be used as a mask, and the vertebral endplate and the background in the vertebral body image are separated through the mask, so as to separate the vertebral endplate and the background in the vertebral body image.
Therefore, the method and the device for segmenting the vertebral end plate can effectively improve the efficiency of segmenting the vertebral end plate compared with the traditional method for manually segmenting by medical staff or medical experts.
The vertebral endplate segmentation method is described below with reference to images at various stages during the vertebral endplate segmentation process. In this embodiment, the image of the vertebral body to be segmented may be as shown in FIG. 3-a. The image of the vertebral body can be obtained by extracting the region of the vertebral body to be segmented in an original image of the vertebral body (the original image can be obtained based on CT or MRI) and performing a calibration (calibration as described in step 101 of fig. 1). The image segmentation of the region of interest in the vertebral body image shown in fig. 3-a can obtain the segmented image of the region of interest shown in fig. 3-b, as can be seen from fig. 3-b, because the subchondral bone region of the vertebral body end plate is denser, has higher density than cancellous bone and is close to cortical bone, cortical bone is mixed in the segmented image. The morphological image shown in fig. 3-c can be obtained by performing morphological processing on the segmented image shown in fig. 3-b based on the pre-constructed structural elements. In the application, the structural element is a disc-shaped three-dimensional element, and specifically, the radius of the structural element is 8 volume, and the thickness of the structural element is 1 volume. The Similarity value of each pixel point corresponding to the morphological image in the pyramid image is calculated by using the morphological image (subsequently denoted by symbol M) and the pyramid image (subsequently denoted by symbol B) shown in fig. 3-a as feature vectors and using a matrix inner product function (for example, formula Similarity ═ M × B) of the two feature vectors as a Similarity function, and an image obtained based on the Similarity value may be as shown in fig. 3-d. By setting a similarity threshold (the similarity threshold set in the application scenario is 0.5), a target region (i.e., a region in the cone image similar to the morphological image) can be determined based on the similarity threshold, and by performing enhancement processing on the gray value of each pixel point in the target region, the target region image shown in fig. 3-e can be obtained. The vertebral endplate image shown in fig. 3-f can be obtained by segmenting the vertebral endplate of the vertebral body image shown in fig. 3-a based on the target area image shown in fig. 3-e, and the vertebral endplate segmentation operation of the vertebral body image shown in fig. 3-a is completed at this time.
FIG. 4 provides a vertebral endplate separation device according to an embodiment of the present application. As shown in FIG. 4, the vertebral endplate separation device may generally comprise: an acquisition unit 401, a morphology processing unit 402, a target region determination unit 403, and a segmentation unit 404.
The acquiring unit 401 is configured to acquire a vertebral body image;
the morphology processing unit 402 is configured to perform morphology processing on the vertebral body image based on a structural element to obtain a morphology image, where the structural element is pre-constructed based on a structural feature of a vertebral body endplate;
a target region determination unit 403 is configured to determine a target region based on a similarity algorithm, where the target region is a region similar to the morphological image in the vertebral body image;
the segmentation unit 404 is configured to segment vertebral endplates of the vertebral body image based on the target region.
Optionally, the vertebral endplate separation device in this embodiment of the present application further includes: and the region-of-interest determining unit is used for determining a region of interest in the vertebral body image, wherein the region of interest comprises an image area where vertebral body endplates are located. The segmentation unit 404 is further configured to: and performing image segmentation on the region of interest determined by the region of interest determining unit to obtain a segmented image of the region of interest. The morphology processing unit 402 is specifically configured to: and carrying out morphological processing on the segmentation image of the region of interest based on the structural elements to obtain a morphological image.
Optionally, the dividing unit 404 includes:
the normalization unit is used for normalizing the gray value of each pixel point in the region of interest determined by the region of interest determination unit based on a normalization algorithm;
a mask generating unit configured to generate a mask of the region of interest based on a result of the processing by the normalizing unit;
and the sub-segmentation unit is used for segmenting the interested region of the cone image based on the mask of the interested region to obtain a segmented image of the interested region.
Optionally, the sub-division unit is specifically configured to: setting the gray value of a pixel point outside the mask in the cone image as 0, and setting the gray value of a pixel point inside the mask in the cone image as 1; or setting the gray value of the pixel point outside the mask in the cone image as 0, and reserving the gray value of the pixel point inside the mask in the cone image.
Optionally, the structural element is a three-dimensional structural element. The target area determining unit 403 is specifically configured to: for each voxel in each connected domain in the morphological image, performing similarity calculation on the voxel and a pixel point at a corresponding position in the cone image based on a similarity calculation method to obtain a similarity value of each voxel in each connected domain in the morphological image; and performing threshold segmentation on the morphological image based on the similarity value of each voxel in each connected domain in the morphological image to obtain the target region.
Optionally, the morphology processing unit 402 is specifically configured to: executing N times of image erosion processing based on structural elements on the vertebral body image acquired by the acquisition unit 401 to obtain an erosion image, wherein N is not less than 2; and executing N times of image expansion processing on the corrosion image based on the structural elements to obtain a morphological image.
It should be noted that the vertebral endplate separation device can be used for implementing the vertebral endplate separation method provided by the above method embodiments. In the vertebral endplate segmentation device illustrated in fig. 4, the division of the functional modules is only an example, and in practical applications, the above functions may be distributed by different functional modules according to needs, such as configuration requirements of corresponding hardware or convenience in implementation of software, that is, the internal structure of the vertebral endplate segmentation device is divided into different functional modules to complete all or part of the above described functions. In practical applications, the corresponding functional modules in this embodiment may be implemented by corresponding hardware, or may be implemented by corresponding hardware executing corresponding software. The above description principles can be applied to various embodiments provided in the present specification, and are not described in detail below.
Therefore, in the embodiment of the application, the structural element is constructed in advance based on the structural feature of the vertebral end plate, the obtained vertebral image is subjected to morphological processing based on the structural element, then, the region (namely the target region) similar to the morphological image obtained after the morphological processing is determined from the vertebral image based on the similarity algorithm, and the vertebral end plate is segmented based on the target region, so that the automatic segmentation of the vertebral end plate in the vertebral image is realized.
An embodiment of the present invention provides a vertebral endplate segmentation apparatus, please refer to fig. 5, which includes:
a memory 51, a processor 52, and a computer program stored on the memory 51 and executable on the processor 52, wherein the processor 52, when executing the computer program, implements the vertebral endplate segmentation method described in the previous embodiments of the method.
Further, the vertebral body endplate separation device further comprises:
at least one input device 53 and at least one output device 54.
The memory 51, the processor 52, the input device 53, and the output device 54 are connected by a bus 55.
The input device 53 and the output device 54 may be antennas, among others.
The Memory 51 may be a high-speed Random Access Memory (RAM) Memory or a non-volatile Memory (non-volatile Memory), such as a disk Memory. The memory 51 is used for storing a set of executable program codes, and the processor 52 is coupled to the memory 51.
Further, the present application also provides a computer-readable storage medium, which may be disposed in the vertebral endplate segmentation device in the above embodiments, and the computer-readable storage medium may be the memory in the above embodiment shown in fig. 5. The computer-readable storage medium has stored thereon a computer program which, when executed by a processor, implements the power allocation method described in the aforementioned method embodiments. Further, the computer-readable storage medium may be various media that can store program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a RAM, a magnetic disk, or an optical disk.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and in actual implementation, there may be other divisions, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a readable storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned readable storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In view of the above description of the method, apparatus and computer-readable storage medium for vertebral endplate segmentation provided by the present application, those skilled in the art will appreciate that there are variations in the detailed description and applications of the method, apparatus and computer-readable storage medium according to the concepts of the embodiments of the present application.