Disclosure of Invention
The present invention aims to solve at least one of the technical problems existing in the prior art. Therefore, a first aspect of the embodiment of the present invention proposes a multi-dimensional image segmentation method; a second aspect provides a multi-dimensional image segmentation apparatus to perform a corresponding method.
According to an embodiment of the first aspect of the present invention, a multi-dimensional image segmentation method includes: selecting an original two-dimensional image from the multi-dimensional images; marking a plurality of key points on an original two-dimensional image; processing key points according to a preset segmentation algorithm to segment an original two-dimensional image; dividing the multi-dimensional image based on the divided original two-dimensional image and the position of the original two-dimensional image in the multi-dimensional image; selecting a two-dimensional image at the position of a non-original two-dimensional image from the segmented multi-dimensional images as an image to be compared, calculating the matching rate of the image to be compared and the marked two-dimensional image at the corresponding position, and outputting or not outputting a corresponding low matching area according to the matching rate; when a low matching area exists, a new original two-dimensional image is selected on the low matching area, and the segmentation of the multi-dimensional image, the acquisition of the image to be compared and the calculation of the matching rate are repeatedly executed until the matching rate meets the specified rule.
The technical effects of the embodiment of the invention at least comprise: cutting the two-dimensional image through the marked key points, cutting the multi-dimensional image according to the cut two-dimensional image, outputting an image to be compared according to the cut multi-dimensional image, outputting a new original two-dimensional image according to the matching rate of the image to be compared and the two-dimensional image, re-executing multi-dimensional image segmentation, image acquisition to be compared and matching rate calculation until the matching rate accords with a specified rule, and continuously updating the two-dimensional image and the multi-dimensional image until the multi-dimensional image cutting with reasonable precision is completed.
According to some embodiments of the invention, a multi-dimensional image segmentation method, the segmentation algorithm includes: growCut, graphCut, region growing method and geodesic segmentation method based on image content.
According to some embodiments of the invention, selecting a new original two-dimensional image comprises: marking a plurality of key points on the low matching area, and processing the key points by a preset segmentation algorithm to obtain a new original two-dimensional image.
The multi-dimensional image segmentation method according to some embodiments of the present invention specifically comprises: the multi-dimensional image is segmented based on the manner of image registration.
According to the multi-dimensional image segmentation method of some embodiments of the present invention, the matching rate is the matching rate of the image sub-region, and the image sub-region is smaller than or equal to the marked two-dimensional image of the corresponding position; correspondingly, if the matching rate is larger than the specified threshold value, outputting the corresponding image subarea to serve as a low matching area, otherwise, not outputting.
According to the multi-dimensional image segmentation method of some embodiments of the present invention, the multi-dimensional image segmentation method is performed based on a B/S architecture.
According to the multi-dimensional image segmentation method of some embodiments of the present invention, an original two-dimensional image is selected from the multi-dimensional image through a browser; marking a plurality of key points on an original two-dimensional image through a browser; when there is a low matching region, a number of key points are marked on the low matching region by a browser to form a new original two-dimensional image.
A multi-dimensional image segmentation method according to some embodiments of the present invention includes: dividing, by the server, the multi-dimensional image by an image registration method based on the divided original two-dimensional image and the position of the original two-dimensional image in the multi-dimensional image; selecting a two-dimensional image at the position of a non-original two-dimensional image from the segmented multi-dimensional images as an image to be compared, calculating the matching rate of the image to be compared and the marked two-dimensional image at the corresponding position, and outputting or not outputting a corresponding low matching area according to the matching rate.
According to the multi-dimensional image segmentation method of some embodiments of the invention, a server processes multi-dimensional images to obtain a set of corresponding two-dimensional images, and a browser displays the set of two-dimensional images and obtains marks of key points.
According to a second aspect of the present invention, a multi-dimensional image segmentation apparatus, adapted to the above multi-dimensional image segmentation method, includes: the image selecting module is used for selecting an original two-dimensional image from the multi-dimensional images; the point selecting module is used for marking a plurality of key points on the original two-dimensional image; the two-dimensional segmentation module is used for processing the key points according to a preset segmentation algorithm to segment the original two-dimensional image; the multi-dimensional segmentation module is used for segmenting the multi-dimensional image based on the segmented original two-dimensional image and the position of the original two-dimensional image in the multi-dimensional image; the comparison module is used for selecting a two-dimensional image at the position of the non-original two-dimensional image from the segmented multi-dimensional images, taking the two-dimensional image as an image to be compared, calculating the matching rate of the image to be compared and the marked two-dimensional image at the corresponding position, and outputting or not outputting a corresponding low matching area according to the matching rate; and the judging module is used for selecting a new original two-dimensional image on the low matching area when the low matching area exists, and repeatedly executing the segmentation of the multi-dimensional image, the acquisition of the image to be compared and the calculation of the matching rate until the matching rate meets the specified rule.
Detailed Description
Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are exemplary only for explaining the present scheme and are not to be construed as limiting the present scheme.
Example 1.
The multi-dimensional image segmentation method according to the embodiment of the present invention described with reference to fig. 1 includes:
s1, selecting an original two-dimensional image from a multi-dimensional image;
s2, marking a plurality of key points on the original two-dimensional image;
s3, processing key points according to a preset segmentation algorithm to segment the original two-dimensional image;
s4, dividing the multi-dimensional image based on the divided original two-dimensional image and the position of the original two-dimensional image in the multi-dimensional image;
s5, selecting a two-dimensional image at the position of a non-original two-dimensional image from the segmented multi-dimensional images, taking the two-dimensional image as an image to be compared, calculating the matching rate of the image to be compared and the marked two-dimensional image at the corresponding position, and outputting or not outputting a corresponding low matching area according to the matching rate;
s6, when the low matching area exists, selecting a new original two-dimensional image on the low matching area, and repeatedly executing the segmentation of the multi-dimensional image, the acquisition of the image to be compared and the calculation of the matching rate until the matching rate meets the specified rule.
The multi-dimensional image may be an internal image of an object acquired by ultrasonic detection or the like, the interior of the object including a plurality of different substances, and the corresponding formed internal image including a three-dimensional or more-dimensional image of the substances. Taking a medical image as an example, a human body (i.e., an object) includes a plurality of organs (i.e., substances), the corresponding organs form a three-dimensional organ map. From the definition of dimensions, a multi-dimensional organ map can also be formed.
The specific segmentation process comprises the following steps:
the multi-dimensional image (i.e., multi-dimensional volume data described below) is processed to obtain a set of two-dimensional images (the basic principle includes extending and separating the images in each dimension to obtain two-dimensional images of corresponding locations), from which a layer/sheet of two-dimensional images (i.e., the original two-dimensional images) is extracted.
The user clicks the two-dimensional image on the display through an electronic pen or a mouse to make the annotation. The labeling aims at setting seed points (i.e. key points) of image segmentation, and is used for dividing an area or describing a shape or describing a type of pixel points so as to form the appearance of a corresponding target (in a medical image, the target can be a certain organ).
The segmentation of the two-dimensional image is performed according to the setting of the key points by a preset image segmentation algorithm, the purpose of which is to make it possible to clearly describe the contour/shape/range of the object in a single two-dimensional image.
Multidimensional volume data includes, in addition to pixel information of each image itself, information of a position where each image is located; therefore, the segmentation result of other two-dimensional images adjacent to the position of the segmented two-dimensional image can be calculated through the segmented two-dimensional image and the corresponding position; the segmentation result (namely image fusion) of the whole multi-dimensional data can be obtained continuously through calculation, namely the multi-dimensional image segmentation is completed.
In any case, an algorithm for precisely estimating the segmentation result of the image in the vicinity accumulates errors as the estimation proceeds, and the image errors increase as the distance increases. Therefore, correction is required. I.e. from the multi-dimensional images that have been segmented, another two-dimensional image is selected, since the original two-dimensional image (i.e. the original two-dimensional image) itself is the basis for the drawing/segmentation and is not likely to be in error. Therefore, selecting a two-dimensional image which is already segmented from the position of the non-original two-dimensional image as an image to be compared; and then extracting a corresponding two-dimensional image, namely a marked two-dimensional image of the corresponding position, from the set of two-dimensional images according to the position of the image to be compared. And calculating the matching rate of the image to be compared and the marked two-dimensional image at the corresponding position, and outputting or not outputting a corresponding low matching area according to the matching rate, wherein the low matching area is a subarea with the matching rate lower than a threshold value.
When the low matching area exists, a user marks a plurality of key points on the low matching area to select a corresponding to-be-segmented target, reasonably cuts the segmented target to obtain a corresponding image area serving as a new original two-dimensional image, repeatedly performs segmentation of the multi-dimensional image, acquisition of the to-be-compared image and calculation of the matching rate, namely repeatedly performs steps S2 to S5 until the matching rate meets a specified rule. The object is to continuously compare the three-dimensional image segmentation result with the marked result by re-marking so that the segmentation result of the three-dimensional image approaches the target area infinitely.
The technical effects of the embodiment of the invention at least comprise: cutting the two-dimensional image through the marked key points, cutting the multi-dimensional image according to the cut two-dimensional image, outputting an image to be compared according to the cut multi-dimensional image, re-executing multi-dimensional image segmentation, image acquisition to be compared and matching rate calculation according to the matching rate of the image to be compared and the two-dimensional image until the matching rate accords with a specified rule, and continuously updating the two-dimensional image and the multi-dimensional image until the multi-dimensional image cutting with reasonable precision is completed.
According to some embodiments of the invention, a multi-dimensional image segmentation method, a segmentation algorithm of a two-dimensional image includes: growCut, graphCut, region growing method and geodesic segmentation method based on image content.
Marking a region of interest (namely a foreground) and a background by using brushes with different colors; the growing algorithm calculates the values of adjacent pixels according to the marked seed points (key points), and attributes the values to the foreground or the background, and the like, so that a two-dimensional segmentation result is obtained.
The principles of GraphCut, region growing method and geodesic segmentation method based on image content are similar, namely whether nearby points belong to the same class is estimated through marked key points.
The principle of multi-map segmentation is that a tissue structure to be segmented is mapped on a marked image through deformation parameters generated by registration through a preset template map and an existing target image, so that a multi-map segmentation result is obtained, and then map fusion is carried out on all segmentation results, so that the segmentation result of the tissue multi-dimensional image of interest is successfully segmented. Reasonable segmentation can be performed for objects with specific forms.
Specific cut multi-dimensional images include:
the I-th section is taken out at the I-th position of a certain coordinate axis in the three-dimensional (or higher-dimensional) image, and the corresponding two-dimensional section image is marked as I I . The segmentation result of the corresponding two-dimensional section image is marked as an image J I The method comprises the steps of carrying out a first treatment on the surface of the This J I In the image, the value of the pixel at the target object is 1, and the values of the remaining pixels are 0.
Handle pair I I Is divided by J I "diffusion" into the entire three-dimensional (or high-dimensional) volume data, i.e., to obtain I I+1 、I I+2 All I are also obtained by segmentation of the image after all I I-1 、I I-2 All of the images prior to I were segmented.
To achieve the above "diffusion", I is first of all I Registration to I I+1 The method comprises the steps of carrying out a first treatment on the surface of the Registration measures such as mean square error can be used for registration, and spline or vector fields can be used as nonlinear deformation. Obtaining optimal registration transformation coefficient/function T I+1 Thereafter, J is I By T I+1 Transforming to obtain J I+1 。J I+1 Is I I+1 Is a segmentation result of (a). I.e. the segmentation result is diffused from the I-th cut to the I +1 cut.
In a similar way, the segmentation can be further spread to I+2, I+3, I-1, I-2, cut planes, i.e. into the whole three-dimensional volume data. Segmentation of the entire population data (i.e., the multi-dimensional image) can thus be obtained.
According to the multi-dimensional image segmentation method of some embodiments of the present invention, the matching rate is the matching rate of the image sub-region, and the image sub-region is smaller than or equal to the marked two-dimensional image of the corresponding position; correspondingly, if the matching rate is larger than the specified threshold value, outputting the corresponding image subarea to serve as a low matching area, otherwise, not outputting.
According to the comparison of the registration results of the two-dimensional images, the difference value of the segmentation result and the marked original image can be obtained to determine the corresponding matching rate, the larger the difference is, the more inaccurate the registration is, and vice versa, the part (namely the subarea) with the large difference value is taken as the new original two-dimensional image.
The principle is that a two-dimensional image I is extracted
20 By a relation matrix
Registration to I
21 On, i.e
This matrix T can then be used to register other images, the corresponding mapping formula being
Sign->
Representing the mapping; however, is->
The similarity of this registration can be set as
If the registration is more accurate, the smaller the difference is, the larger the C value is, and the subarea with the small C value is taken as a part needing improvement, and a new two-dimensional image is extracted for marking/segmentation of a user.
In a two-dimensional segmented image, a large number of image sub-regions (simply referred to as sub-regions) are included, the sub-regions including a portion of the target image; the target images of different subareas (namely the segmentation results) are possibly consistent with or very close to the marked original two-dimensional image, so that the segmentation results are good; the method has the possibility of being very different from the marked original two-dimensional image, namely the segmentation effect is poor; if the whole sub-area is taken as a whole to compare the matching rate, some sub-areas with good segmentation effect can be readjusted in the subsequent re-segmentation, so that waste is caused. Therefore, only the sub-region with poor segmentation effect is extracted, and then the sub-region is re-marked and re-segmented, so that the extra consumption can be reduced, and the segmentation efficiency can be improved.
According to the multi-dimensional image segmentation method of some embodiments of the present invention, the multi-dimensional image segmentation method is performed based on a B/S architecture.
According to the multi-dimensional image segmentation method of some embodiments of the present invention, an original two-dimensional image is selected from the multi-dimensional image through a browser; marking a plurality of key points on an original two-dimensional image through a browser; when a low matching area exists, a plurality of key points are marked on the low matching area through a browser.
A multi-dimensional image segmentation method according to some embodiments of the present invention includes: dividing, by the server, the multi-dimensional image by an image registration method based on the divided original two-dimensional image and the position of the original two-dimensional image in the multi-dimensional image; selecting a two-dimensional image at the position of a non-original two-dimensional image from the segmented multi-dimensional images as an image to be compared, calculating the matching rate of the image to be compared and the marked two-dimensional image at the corresponding position, and outputting or not outputting a corresponding low matching area according to the matching rate.
Through the B/S architecture, i.e., the architecture mode of the browser and server. The image segmentation efficiency can be improved by different labor division of the browser and the server. Specifically, the hardware requirement of the client can be reduced through the browser, and the processing capability can be improved through the server.
Example 2.
The framework diagram of the multi-dimensional image segmentation process according to the embodiment of the present invention described with reference to fig. 2 includes:
2-dimensional end and Gao Weiduan, wherein user interaction occurs at the 2-dimensional end and segmentation and fusion of the high-dimensional image occurs at Gao Weiduan.
Firstly, three-dimensional data (namely, three-dimensional images) D10 to be segmented are stored on a server, multidimensional images are converted into a set of two-dimensional images, then one layer of the two-dimensional images is extracted, the corresponding two-dimensional image D20 (the two-dimensional image to be segmented, namely, the original two-dimensional image at the moment) is placed on an interactive interface (a computer interface) of a client side for a user to segment, and the user can see the two-dimensional image to be segmented by opening a webpage (a browser).
The user marks the region of interest using the object brush, draws several strokes (i.e., marks key points) outside the object with the background brush, and the web page renders the two-dimensional image segmentation result D40 in real time. The resulting two-dimensional image segmentation result D40 is then uploaded to a server. The registration algorithm at the server side segments the result D50 of the three-dimensional volume data (i.e. the segmented three-dimensional image). From the division result D50 of the three-dimensional image and the three-dimensional image D10 to be divided, a new two-dimensional image D20 (a new original two-dimensional image at this time) is extracted, which is used to represent a portion of the current three-dimensional image division result that needs improvement (i.e., a sub-region where the division effect is poor), thereby guiding the execution of the next three-dimensional image division.
The server side has the main function of storing data, extracting two-dimensional images to be segmented and automatically segmenting three-dimensional data. The two-dimensional segmentation algorithm of the client can utilize various common two-dimensional image labeling algorithms. For example, but not limited to, a growth interactive segmentation algorithm, which uses a framework of cellular automata, an automaton evolution model segmentation process. Each unit in the image is taken as a cell, the user uses brushes with different colors to specify partial foreground and background of the image, then some units have own labels, the points determine whether the adjacent points are infected with the same labels as the adjacent points according to the relationship between the adjacent points, and the algorithm automatically calculates the optimal segmentation by taking the input of the user as the constraint condition of segmentation.
At Gao Weiduan, the present system segments three-dimensional volume data using a multi-atlas based segmentation method. And storing the three-dimensional data to be segmented in a cloud, taking out one layer of two-dimensional image, placing the two-dimensional image on an interactive interface, marking the two-dimensional image as D20, and calculating a relation function T between the D20 and an adjacent layer D21. After the user makes marks, the boundary of the target area is outlined according to the mark calculation, and a segmentation result D40 of the two-dimensional image is obtained. And then uploading the D40 to the cloud, obtaining a segmentation result D41 of the adjacent layer according to the relation function T, and obtaining two-dimensional image segmentation results of other layers by analogy. Registering each annotated image to the target image and propagating the annotations into the target image as one of its segmentations accordingly; and then combining all the segmentations according to a certain rule to obtain a final segmentation result. And obtaining a segmentation result D50 of the D10 according to the three-dimensional image data D10 to be segmented, the two-dimensional image segmentation result D40 and the position D25 of the two-dimensional image in the three-dimensional image.
If a layer D20 'is again extracted according to D10 and the existing three-dimensional image segmentation result D50, the difference in matching rate between the two-dimensional images D20' and D40 can represent the position to be improved. The original D50 is replaced by a more 7-accurate segmentation result according to the three-dimensional image volume data D10 to be segmented, the two-dimensional image segmentation result D40, the position D25 of the two-dimensional image in the three-dimensional image and the existing three-dimensional image segmentation result D50. Repeating the above operation until a three-dimensional image segmentation result satisfying the doctor is finally obtained.
Wherein D10 is a three-dimensional image to be segmented;
step S10, extracting a specified/suitable two-dimensional image from the three-dimensional image D10 to be segmented. This extraction process, if performed for the first time, i.e. S10 is performed with no D50 data available yet, S10 depends only on D10. Whereas if after the first run, i.e. after D50 has been present, a two-dimensional image D20 is obtained with simultaneous reference to D10 and the current three-dimensional segmentation result D50. The two-dimensional image may represent a location in the current three-dimensional segmentation where improvement is desired.
D20 is a two-dimensional image extracted from the D10 three-dimensional image;
d25 is a parameter recording the position of D20 in D10;
step S30, the D20 is sent to the client.
Step S40, displaying the D20 in the browser of the client, and rapidly clicking (labeling) key points of the region to be segmented and key points of the background region in the D20 through an interactive interface by a user.
D30 is a record of several key points marked by the user in the target area and the background area.
And S50, calculating the accurate boundary of the target area in the D20 according to the labels of the D20 and the D30. I.e. segmentation of the object in D20.
D40 is the segmentation result of D20 obtained by the calculation of S50.
And step S60, automatically uploading the D40 to a cloud server.
In step S70, the updated segmentation of D10 is calculated from the two-dimensional segmentation result D40, the position information D25 in the three-dimensional image D10 in the two-dimensional image, the three-dimensional image data D10, and the existing segmentation result D50 of D10. If D50 is present, then existing D50 is replaced.
Example 3.
The multi-dimensional image segmentation apparatus according to the embodiment of the present invention described with reference to fig. 3 is adapted to the multi-dimensional image segmentation method according to the above embodiment, and includes: the image selecting module 1 is used for selecting an original two-dimensional image from the multi-dimensional images; the point selecting module 2 is used for marking a plurality of key points on the original two-dimensional image; the two-dimensional segmentation module 3 is used for processing the key points according to a preset segmentation algorithm to segment the original two-dimensional image; a multi-dimensional segmentation module 4 for segmenting the multi-dimensional image based on the segmented original two-dimensional image and the position of the original two-dimensional image in the multi-dimensional image; the comparison module 5 is used for selecting a two-dimensional image at the position of the non-original two-dimensional image from the segmented multi-dimensional images, taking the two-dimensional image as an image to be compared, calculating the matching rate of the image to be compared and the marked two-dimensional image at the corresponding position, and outputting or not outputting a corresponding low matching area according to the matching rate; and the judging module 6 is used for marking a plurality of key points on the low matching area to serve as a new original two-dimensional graph when the low matching area exists, and repeatedly executing the segmentation of the multi-dimensional image, the acquisition of the image to be compared and the calculation of the matching rate until the matching rate accords with the specified rule.
In the description of the present specification, reference to the terms "one embodiment," "some embodiments," "illustrative embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
In the description of the present specification, unless clearly defined otherwise, terms such as arrangement, installation, connection, etc. should be construed broadly, and the specific meaning of the terms in the present invention can be reasonably determined by those skilled in the art in combination with the specific contents of the technical scheme.
The embodiments of the present invention have been described in detail with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge of one of ordinary skill in the art without departing from the spirit of the present invention.
While embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that: many changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit thereof, the scope of which is defined by the claims and their equivalents.