Image processing method, device, equipment and storage medium
By extracting and correcting the preset lung area profile, the problem of error and long time in the prior art of lung lobe region division is solved, and rapid and accurate lung lobe region division is achieved, meeting the needs of quantitative analysis of clinical diseases.
Patent Information
- Application Number
- CN202010440116.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-05-22
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2040-05-22
AI Technical Summary
The existing methods of lobular area division are incorrect and have been too long, especially in the presence of adhesions or severe emphysema in the lungs, which cannot meet the needs of quantitative analysis of clinical diseases.
By acquiring the lesion lung images, extracting and correcting the lung areas based on the preset lung area profile, a clear and complete left and right lung images are obtained, and the area is divided based on these images, and the lung lobe division is used to achieve rapid and accurate division of lobular areas.
It improves the accuracy and speed of lobular area division, and can quickly meet the quantitative analysis needs of clinical diseases, especially in patients with lung adhesions or severe emphysema.
Smart Images

Figure CN111627026B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an image processing method, device, equipment and storage medium. Background Art
[0002] By extracting the lung lobes, we can determine the specific distribution of a disease in a certain lung lobe and conduct a quantitative analysis of the lung disease. At present, the lung lobe area is usually divided by mature automatic segmentation algorithms, such as the watershed algorithm. However, no matter what, the automatic segmentation algorithm has certain errors, and the current segmentation method takes too long to quickly divide the accurate lung lobe area. In particular, for patients with adhesions or severe emphysema in the lungs, the lung lobe segmentation method can no longer be used to segment lung images, which cannot meet the needs of quantitative disease analysis in clinical practice. Therefore, it is necessary to propose a new method for lung lobe area division. Summary of the invention
[0003] The main purpose of the present invention is to provide an image processing method, device, equipment and storage medium, aiming to improve the accuracy of lung lobe extraction.
[0004] To achieve the above object, in a first aspect, the present invention provides an image processing method, the image processing method comprising the following steps:
[0005] Acquire images of lung disease;
[0006] Extracting the lung region from the diseased lung image based on a preset lung region contour;
[0007] Based on the extracted lung region, a left lung image and a right lung image are obtained;
[0008] The left lung image is divided into regions based on the left lung volume of the left lung image, and the right lung image is divided into regions based on the right lung volume of the right lung image.
[0009] In a second aspect, the present invention further provides an image processing device, the device comprising:
[0010] An acquisition module, used for acquiring images of lung lesions;
[0011] An extraction module, used for extracting the lung region from the diseased lung image based on a preset lung region contour;
[0012] A determination module, used for obtaining a left lung image and a right lung image based on the extracted lung region;
[0013] A division module is used to divide the left lung image into regions based on the left lung volume of the left lung image, and to divide the right lung image into regions based on the right lung volume of the right lung image.
[0014] In a third aspect, the present invention further proposes an image processing device, comprising: a memory, a processor, and an image processing program stored in the memory and executable on the processor, wherein the image processing program implements the steps of the image processing method when executed by the processor.
[0015] In a fourth aspect, the present invention further proposes a storage medium having an image processing program stored thereon, and the image processing program implements the steps of the image processing method when executed by a processor.
[0016] The present invention provides an image processing method, device, equipment and storage medium. After acquiring a focus lung image, which is a lung image with unclear lobe fissures, the lung region of the focus lung image can be extracted based on a preset lung region contour; that is, the feature accuracy of the focus lung image can be improved and the lung image with unclear lobe fissures can be corrected to ensure that the lung region extraction is clear and complete. In addition, based on the extracted lung region, a left lung image and a right lung image are obtained, that is, the left lung image is divided into regions based on the left lung volume of the clear and complete left lung image, and the right lung image is divided into regions based on the right lung volume of the right lung image, without finely dividing the lung lobe, that is, the accuracy of the lung lobe region division can be improved, and the time of the lung lobe region division can be shortened, and an auxiliary effect can be provided for the quantitative analysis of lung diseases. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A flowchart of an image processing method according to an embodiment of the present invention is shown;
[0018] Figure 2 A flowchart of an image processing device according to an embodiment of the present invention is shown;
[0019] Figure 3 A schematic diagram showing the structure of an image processing device according to an embodiment of the present invention is shown;
[0020] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0021] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0022] It should be noted that the image processing device in the embodiment of the present invention may be a smart phone, a personal computer, a server or other device, and no specific limitation is made herein.
[0023] The execution subject of an image processing method provided in an embodiment of the present invention may be any image processing device, for example, the image processing method may be executed by a terminal device or a server, wherein the terminal device may be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. The server may be a local server or a cloud server. In some possible implementations, the image processing method may be implemented by a processor calling a computer-readable instruction stored in a memory.
[0024] Figure 1 is a flow chart of an image processing method according to an embodiment of the present invention. Figure 1 As shown, an image processing method includes: step S101: acquiring a focus lung image, and extracting lung regions from the focus lung image; step S102: obtaining a left lung image and a right lung image based on the extracted lung regions; step S103: dividing the left lung image into regions based on the left lung volume of the left lung image, and dividing the right lung image into regions based on the right lung volume of the right lung image; wherein the focus lung image is a lung image in which the fissures of the lung lobes are unclear and the boundary of the lung region is adhered to the inner wall of the chest cavity. This solves the problem that it is difficult to quantitatively evaluate the focus lung image.
[0025] Step S101: Acquire a lung disease image, and extract a lung region from the lung disease image.
[0026] In some possible implementations, the embodiments of the present invention can obtain lung images by taking CT (Computed Tomography), MRI (Magnetic Resonance Imaging), X-rays, etc.
[0027] It should be noted that a lung region extraction method according to an embodiment of the present invention, i.e., the method for obtaining a lung region image and extracting a lung region from the lung region image, comprises: step S201: obtaining a preset lung region contour; step S202: obtaining a lung region contour to be extracted according to the lung region image; step S203: correcting the lung region contour to be extracted using the preset lung region contour to obtain a corrected lung region contour; step S204: extracting a lung region from the lung region image according to the corrected lung region contour. This is to solve the problem that the area where the lung region boundary and the inner wall of the chest cavity are adhered cannot be completely and accurately extracted. The present invention only presets the lung region contour, then obtains the lung region contour to be extracted using the lung region image, then uses the preset lung region contour to correct the lung region contour to be extracted, and then uses the corrected lung region contour to extract a lung region from the lung region image, without relying on other feature extraction of traditional algorithms.
[0028] Step S201: Acquire a preset lung region contour.
[0029] In an embodiment of the present invention, the method for determining the preset lung region contour comprises: extracting the lung region contours of the diseased lung images of several healthy subjects respectively to obtain several lung region contours; fitting the several lung region contours to obtain the preset lung region contour. Among them, the fitting method can adopt the fitting method of the least squares method. The method for extracting the lung region contours of the diseased lung images of several healthy subjects can be the existing region growing method. In the present invention and the embodiments of the present invention, the size of the diseased lung images of several healthy subjects should be the same as the size of the diseased lung image.
[0030] In the embodiment of the present invention, the number of lesion lung images of healthy subjects is 1003 sets, and the lung region contours of the lesion lung images of the 1003 sets of healthy subjects are extracted using the region growing method to obtain 1003 sets of lung region contours. Then, the least squares fitting method is used to obtain a preset lung region contour, that is, a lung region contour model.
[0031] In the embodiment of the present invention, the focus lung image of a healthy subject is a focus lung image in which there is no adhesion between the lung boundary and the inner wall of the chest cavity, and a traditional method can be used to obtain the focus lung image of the lung region.
[0032] Step S202: obtaining the contour of the lung region to be extracted according to the diseased lung image.
[0033] In an embodiment of the present invention, the diseased lung image is a lung image of the lung region contour to be extracted. Similarly, the region growing method can be used to extract the lung region contour of the diseased lung image. However, the lung region contour to be extracted has an erroneous extraction contour at the adhesion, and the erroneous extraction contour is a concave area or a convex area of the lung region contour to be extracted. Therefore, it is necessary to use a preset lung region contour to correct the lung region contour to be extracted, and then use the corrected lung region contour to extract the lung region of the diseased lung image.
[0034] Step S203: Correcting the lung region contour to be extracted using the preset lung region contour to obtain a corrected lung region contour.
[0035] In the present invention, the method of correcting the lung area contour to be extracted by the preset lung area contour to obtain the corrected lung area contour includes: setting a plurality of points on the lung area contour to be extracted; scaling the preset lung area contour according to a set step size, and determining the erroneous extraction contour of the lung area contour to be extracted according to the contact between the scaled preset lung area contour and the plurality of points; correcting the lung area contour to be extracted by replacing the erroneous extraction contour to obtain the corrected lung area contour. Specifically, when the number of points contacted by the scaled preset lung area contour is greater than or equal to the set number, the scaled preset lung area contour can be used to replace the erroneous extraction contour, and the replaced lung area contour can be determined as the corrected lung area contour. Wherein, scaling the preset lung area contour according to the set step size only changes the size of the preset lung area contour, but does not change the shape of the preset lung area contour.
[0036] In an embodiment of the present invention, the preset lung region contour may be gradually reduced or gradually expanded. In the method of correcting the lung region contour to be extracted by the preset lung region contour to obtain the corrected lung region contour, before scaling the preset lung region contour according to the set step length, the first area of the preset lung region contour and the second area of the lung region contour to be extracted are calculated respectively, and when the first area is larger than the second area, the preset lung region contour is reduced; when the first area is smaller than the second area, the preset lung region contour is enlarged.
[0037] In an embodiment of the present invention, the number of the plurality of points is 1000, and the plurality of points are evenly distributed on the contour of the lung region to be extracted. The step length is set to 0.1 mm, and the set number can be 1 / 2 or more of the plurality of points. The number of the plurality of points, the set step length, and the set number can be set by those skilled in the art according to actual needs, and the present invention does not limit them.
[0038] In the present invention, the preset lung region contour is scaled according to a set step length, and when the number of points contacted by the scaled preset lung region contour is greater than or equal to the set number, the erroneous extraction contour of the lung region contour to be extracted is determined, and the erroneous extraction contour is replaced by the corresponding contour of the scaled preset lung region contour, and the replaced lung region contour to be extracted is the corrected lung region contour. The correct area of the lung region contour to be extracted is retained, and only the erroneous extraction contour of the lung region contour to be extracted is corrected.
[0039] In the present invention, the method for determining the erroneously extracted contour of the to-be-extracted lung region contour comprises: when the scaled preset lung region contour contacts the several points, dividing the scaled preset lung region contour into several preset lung region contour line segments, and dividing the to-be-extracted lung region contour into several to-be-extracted lung region contour line segments; calculating the distance between the preset lung region contour line segments and the to-be-extracted lung region contour line segments having the same starting point and the same end point; and when the distance is greater than or equal to the set distance, determining that the to-be-extracted lung region contour line segments are the erroneously extracted contours.
[0040] In an embodiment of the present invention, the preset lung region contour line segment and the lung region contour line segment to be extracted having the same starting point and the same end point are approximated as straight lines, and the average distance of the two straight lines is calculated to obtain the distance between the preset lung region contour line segment and the lung region contour line segment to be extracted having the same starting point and the same end point. Specifically, the two straight lines are two non-parallel straight lines, and the calculation method is to take a number of contour line points on the lung region contour line segment to be extracted, and respectively calculate the line segment distances from the several contour line points to the preset lung region contour line segment, and the average value of all the line segment distances is the distance between the preset lung region contour line segment and the lung region contour line segment to be extracted having the same starting point and the same end point. When the distance is greater than or equal to the set distance, the lung region contour line segment to be extracted is the erroneously extracted contour.
[0041] In the embodiment of the present invention, the set distance may be 8 mm to 25 mm. Similarly, those skilled in the art may set the distance according to actual needs, and the present invention does not limit the set distance.
[0042] Step S204: extracting the lung region of the diseased lung image according to the corrected lung region contour.
[0043] Further, in the present invention, the preset lung area contour is a preset lung area contour of multiple layers of planes, and the lesion lung image is a lesion lung image of multiple layers of planes; the lung area contour to be extracted is corrected by using the preset lung area contour, and before obtaining the corrected lung area contour, it is determined whether the number of layers of the preset lung area contour is the same as the number of layers of the lesion lung image; if they are the same, lung area extraction is performed on the lesion lung image according to the corrected lung area contour; if they are different, the preset lung area contour or the lesion lung image is interpolated to obtain the preset lung area contour and the lesion lung image with the same number of layers; lung area extraction is performed on the lesion lung image according to the corrected lung area contour after interpolation, or lung area extraction is performed on the lesion lung image after interpolation according to the corrected lung area contour.
[0044] At the same time, the preset lung region contour corrects the lung region contour to be extracted, and the method for obtaining the corrected lung region contour is to correct the preset lung region contour of the multi-layer plane, and the obtained corrected lung region contour is the corrected lung region contour of the multi-layer plane. Lung region extraction is performed on the lesion lung image of the multi-layer plane respectively according to the corrected lung region contour of the multi-layer plane.
[0045] Furthermore, in the present invention, the preset lung area contour includes: a set left lung area contour and a set right lung area contour; the lung area contour to be extracted includes: a left lung area contour to be extracted and a right lung area contour to be extracted; the left lung area contour to be extracted is corrected using the set left lung area contour to obtain a corrected left lung area contour; the right lung area contour to be extracted is corrected using the set right lung area contour to obtain a corrected right lung area contour; lung area extraction is performed on the diseased lung image according to the corrected left lung area contour and the corrected right lung area contour.
[0046] In the embodiment of the present invention, the extraction method of setting the left lung region contour and the right lung region contour adopts the above region growing method. The method of obtaining the corrected left lung region contour and the corrected right lung region contour refers to the above detailed description.
[0047] In addition, the embodiment of the present invention can also obtain the lung area contour in the lung image by neural network processing. Please refer to the description of the subsequent embodiments for details.
[0048] Step S102: Based on the extracted lung region, a left lung image and a right lung image are obtained.
[0049] In an embodiment of the present invention, a left lung image and a right lung image are obtained based on the extracted lung region by using a PTK tool kit (pulmonary tool kit), which can be downloaded through the website https: / / github.com / tomdoel / pulmonarytoolkit.
[0050] Alternatively, in an embodiment of the present invention, the lung region contour obtained in step S101 can also be directly used to obtain the left lung image and the right lung image. The lung region contour can be expressed in a matrix or vector form, and the area enclosed by the lung region contour is the area of the left lung image and the area of the right lung image. The lung region contour may include a first label and a second label. The first label represents the area enclosed by the lung region contour, and the second label represents the area outside the lung region contour. For example, the first label may be 1, and the second label may be 0, but this is not a specific limitation of the present invention.
[0051] The left lung image can be obtained by multiplying the left lung region contour in the lung region contour and the image features of the lung image, and the right lung image can be obtained by multiplying the right lung region contour in the lung region contour and the image features of the lung image.
[0052] Step S103: performing region division on the left lung image based on the left lung volume of the left lung image, and performing region division on the right lung image based on the right lung volume of the right lung image.
[0053] It should be noted that a method for dividing lung regions in an embodiment of the present invention, that is, the method for dividing the left lung image based on the left lung volume of the left lung image, and the method for dividing the right lung image based on the right lung volume of the right lung image, includes: step S301: obtaining a first reference value, a second reference value and a third reference value; step S302: obtaining the right lung volume and the left lung volume using the lung image; step S303: dividing the right lung image of the lung image using the first reference value, the second reference value and the right lung volume to obtain a right lung divided image; step S304: dividing the left lung image of the lung image using the third reference value and the left lung volume to obtain a left lung divided image. This solves the problem that the current segmentation method takes too long and cannot be sufficient for rapid quantitative analysis of clinical diseases. In particular, it is of great significance for patients with adhesions or severe emphysema in the lungs who can no longer use the lobe segmentation method to segment lung images.
[0054] In the present invention, the lung image, the first reference value, and the second reference value are actually used to divide the right lung image into three areas, namely, the first area of the right lung, the second area of the right lung, and the third area of the right lung. Among them, the first area of the right lung is equivalent to the right upper lobe, the second area of the right lung is equivalent to the right middle lobe, and the third area of the right lung is equivalent to the right lower lobe. The lung image and the third reference value are used to divide the left lung image into two areas, namely, the first area of the left lung and the second area of the left lung. Among them, the first area of the left lung is equivalent to the upper lobe of the left lung, and the second area of the left lung is equivalent to the lower lobe of the left lung. Therefore, there is no need to achieve a fine division of the lung lobes, and the above method can quickly achieve rapid quantitative analysis of clinical diseases.
[0055] Step S301: Acquire a first reference value, a second reference value, and a third reference value.
[0056] In an embodiment of the present invention, the first reference value, the second reference value and the third reference value are preset threshold values. The first reference value, the second reference value and the third reference value are determined by a large number of lung images of healthy subjects, and pulmonary lobe segmentation is performed by a PTK toolkit. In the present invention, we collected 1003 sets of lung images of healthy subjects, and then automatically performed pulmonary lobe segmentation by the PTK toolkit to obtain a pulmonary lobe segmentation image, and then manually corrected the pulmonary lobe segmentation image by the PTK toolkit to obtain a corrected pulmonary lobe segmentation image to ensure the accuracy of pulmonary lobe segmentation.
[0057] In an embodiment of the present invention, the volume of the lung lobe can be calculated by performing a lung ventilation rapid magnetic resonance imaging scan on a healthy subject to obtain a hyperpolarized inert gas ventilation rapid magnetic resonance image (lung image) of the healthy subject's lung, and the voxels containing the inert gas signal in the hyperpolarized inert gas ventilation rapid magnetic resonance image are segmented to calculate the lung volume (left lung volume and right lung volume). The lung image is segmented into left and right lungs, and then the left lung volume and the right lung volume can be calculated. The lung lobe segmentation image or the corrected lung lobe segmentation image is obtained through the PTK toolkit, and then the volume of each lung lobe can be calculated. Alternatively, the lung volume calculation method in the lung measurement disclosed in the application number 201480034832.3 is used to complete the left and right lung segmentation or the lung lobe segmentation, and the left lung volume, the right lung volume and the volume of each lung lobe can also be calculated by the above method.
[0058] In the embodiment of the present invention, 1003 sets of lung images of healthy subjects are used to obtain 1003 sets of lung volume data (left lung volume and right lung volume), 1003 sets of left lung volume data, 1003 sets of right lung volume data, and 1003 sets of volume data of each lung lobe. That is, the number of lung images of healthy subjects is determined, and the lung volume data (left lung volume and right lung volume), left lung volume data, right lung volume data, and volume data of each lung lobe are obtained based on the number of lung images of healthy subjects.
[0059] In an embodiment of the present invention, the right lung image has three lobes, so only the first reference value and the second reference value are needed to complete the right lung segmentation image. For example, the first reference value and the second reference value are the average values of the volume data of any two lobes of the right lung lobes of 1003. That is, the first reference value and the second reference value are the average values of the volume data of any two lobes of the right lung lobes based on the number of lung images of the set healthy subjects.
[0060] In the embodiment of the present invention, the left lung image has two lobes, so only one reference value is needed, the third reference value. The third reference value can be the average value of the volume data of the left upper lobe or the left lower lobe of 1003. That is, the third reference value is the average value of the volume data of any one lobe of the left lung based on the number of lung images of the set healthy subject.
[0061] In an embodiment of the present invention, the lung image of a healthy subject is a lung image without lung disease and with clear lung fissures, and the lung lobe segmentation or correction can be performed manually or based on a PTK toolkit.
[0062] Step S302: using the lung image to obtain the right lung volume and the left lung volume.
[0063] In the present invention, before obtaining the right lung volume and the left lung volume using the lung image, the lung image is segmented to obtain the right lung and the left lung; and the right lung volume and the left lung volume are obtained using the right lung and the left lung, respectively.
[0064] In an embodiment of the present invention, the lung image can be directly processed by a neural network that performs image segmentation to obtain the left lung and right lung images in the lung image. For example, the lung image segmentation can be implemented by a U-net network to obtain the left lung image and the right lung image, wherein the left lung image and the right lung image can respectively represent the position of the left lung region and the position of the right lung region, and then the left lung image and the right lung image can be used to obtain the left lung volume and the right lung volume. The sum of the areas of the distribution areas segmented from each layer of the image in the lung image can be used as the corresponding volume. For example, the sum of the areas corresponding to the positions of the left lung regions in each layer of the left lung image is the left lung volume, and the sum of the areas corresponding to the positions of the right lung regions in each layer of the right lung image is the right lung volume.
[0065] Alternatively, in other embodiments, the left lung volume and the right lung volume may be determined by a method for determining the lung region volume. The specific implementation method will be described in detail in the subsequent embodiments.
[0066] Step S303: dividing the right lung image of the lung image by using the first reference value, the second reference value and the right lung volume to obtain a right lung segmentation image.
[0067] In an embodiment of the present invention, the method of dividing the right lung image of the lung image using the first benchmark value, the second benchmark value and the right lung volume to obtain the right lung division image includes: dividing the right lung image of the lung image using the first benchmark value, the second benchmark value and the right lung volume. For example, the first benchmark value is the average value of the volume data of the right upper lobe of 1003, and the second benchmark value is the average value of the volume data of the right middle lobe of 1003. Starting from the upper side of the right lung image of the lung image, when the volume of the right lung image reaches the first benchmark value, it is considered to be the right upper lobe; continuing to calculate downward based on this as a benchmark, when the volume reaches the second benchmark value, it is considered to be the right middle lobe; the remaining part is the right lower lobe.
[0068] Step S304: dividing the left lung image of the lung image by using the third reference value and the left lung volume to obtain a left lung divided image.
[0069] In an embodiment of the present invention, the method of dividing the left lung image of the lung image using the third reference value and the left lung volume to obtain the left lung segmented image includes: dividing the left lung volume in the left lung image using the third reference value to obtain the left lung segmented image. For example, if the third reference value is the average value of the volume data of the left upper lobe of 1003, then the calculation starts from the upper side of the left lung image of the lung image, and when the volume of the left lung image reaches the third reference value, it is considered to be the left upper lobe of the lung; the remaining part is the left lower lobe of the lung.
[0070] In the present invention, taking into account the patient's age and the deterioration of lung disease, the method further includes correcting the first baseline value, the second baseline value and the third baseline value respectively to obtain a first corrected baseline value, a second corrected baseline value and a third corrected baseline value; using the first corrected baseline value and the second corrected baseline value to divide the right lung image of the lung image to obtain a right lung segmentation image; using the third corrected baseline value to divide the left lung image of the lung image to obtain a left lung segmentation image.
[0071] In the present invention, the method of correcting the first reference value, the second reference value and the third reference value respectively to obtain the first corrected reference value, the second corrected reference value and the third corrected reference value includes: acquiring the first reference volume, the second reference volume and the right lung volume and the left lung volume in the lung image; correcting the first reference value and the second reference value using the first reference volume and the right lung volume to obtain the first corrected reference value and the second corrected reference value respectively; and correcting the third reference value using the second reference volume and the left lung volume to obtain the third corrected reference value.
[0072] In the embodiment of the present invention, in the embodiment of obtaining the first reference value, the second reference value, and the third reference value in step 301, the first reference volume is obtained by taking an average value of 1003 right lung volume data. The second reference volume is obtained by taking an average value of 1003 left lung volume data. That is, the first reference volume is the average value of the right lung volume data based on the number of lung images of the set healthy subjects, and the second reference volume is the average value of the left lung volume data based on the number of lung images of the set healthy subjects.
[0073] In the present invention, the method of using the first reference volume and the right lung volume to correct the first reference value and the second reference value to obtain the first corrected reference value and the second corrected reference value, respectively, includes: calculating a first ratio of the first reference volume and the right lung volume; multiplying the first ratio by the first reference value and the second reference value, respectively, to obtain the first corrected reference value and the second corrected reference value.
[0074] For example, a first ratio of the first reference volume to the right lung volume is calculated: the first ratio obtained by dividing the right lung volume by the first reference volume is 0.9, and the first ratio 0.9 is multiplied by the first reference value and the second reference value to obtain the first correction reference value and the second correction reference value. Then, the right lung image of the lung image is divided using the above method to obtain a right lung division image.
[0075] In the present invention, the method of correcting the third reference value using the second reference volume and the left lung volume to obtain the third corrected reference value includes: calculating a second ratio of the second reference volume and the left lung volume; and multiplying the second ratio by the third reference value to obtain the third corrected reference value.
[0076] For example, the second ratio of the second reference volume to the left lung volume is calculated: the left lung volume is divided by the second reference volume, and the second ratio is 0.97, then the second ratio 0.97 is multiplied by the third correction reference value to obtain the first correction reference value and the third correction reference value. Then, the left lung image of the lung image is divided using the above method to obtain a left lung division image.
[0077] As described in the above embodiment, the embodiment of the present invention can also realize the extraction of lung area contour by neural network. The extraction process of lung area contour is described in detail below.
[0078] It should be noted that an embodiment of the present invention provides a method for extracting lung area contours, wherein the method for extracting lung area contours may include:
[0079] S10: Acquire image features of each layer of the lung image, wherein the lung image includes multiple layers of superimposed images;
[0080] In some possible implementations, the lung image may be obtained by photographing the lung image using CT (computed tomography), or the lung image may be received from other electronic devices or servers. The lung image may include multi-layer lung tomography (images), and the overall lung image may be formed by superimposing these multi-layer images.
[0081] In some possible implementations, when a lung image is obtained, image features of the lung image can be further extracted, wherein the pixel values corresponding to the pixel points in each layer of the lung image can be directly used as image features, or the image features of the image can be obtained by performing feature extraction processing on the image.
[0082] S20: performing feature optimization processing on the image features of each layer of images to obtain optimized features corresponding to each layer of images;
[0083] In some possible implementations, the image features of each layer of images can be respectively optimized by performing convolution processing on the image features of each layer of images. This optimization can increase more detailed feature information and improve the richness of features. Among them, by performing optimization processing on each layer of images, corresponding optimized features can be obtained respectively. Alternatively, the image features of adjacent layers of images can be connected to obtain connected features, and feature processing can be performed on the connected features so that the image features of adjacent layers of images can be fused with each other, and the feature accuracy can be improved. Then, the same features obtained by two convolution layers are respectively convolved, and the optimized features of each layer of images in the adjacent layers of images are correspondingly obtained.
[0084] S30: performing correction processing on the lung image by utilizing the correlation features between the optimized features of adjacent layer images in the lung image to obtain a corrected lung image;
[0085] In some possible implementations, after obtaining the optimized features of each layer of the lung image, the associated features between the optimized features of adjacent layers of the image can be further obtained, and the elements in the associated features represent the degree of association between the feature values at the same position in the optimized features of adjacent layers of the image. Using the associated features, correction processing of each layer of the lung image can be performed to improve the accuracy of the lung image. In the embodiment of the present invention, the associated features, image features, optimized features, and subsequent fusion features, residual features, and other features can all be represented in the form of vectors or matrices.
[0086] In some possible implementations, the obtained associated features can be used to perform feature fusion processing between optimized features of adjacent layer images to obtain fused features. Through this fusion processing, the image features of adjacent layer images can be effectively fused, which is beneficial to the correction of lung images. Among them, in the embodiment of the present invention, adjacent layer images refer to any layer image in the lung image and the next layer image of any layer image. In other embodiments, it can also be any layer image and the next n layers of images of any layer image, and n is an integer greater than or equal to 1 and less than or equal to 3. In other words, adjacent layers can represent two directly adjacent layers of images, or can also represent adjacent multiple layers of images, and the present invention does not make specific limitations on this.
[0087] In some possible implementations, when a fusion feature is obtained, the fusion feature can be used to perform image correction on any image in the adjacent layer images. For example, the fusion feature and the image feature of the image can be added to obtain a corrected image feature, and the image corresponding to the corrected image feature is the corrected image.
[0088] S40: Based on the corrected lung image, obtaining a lung region contour of the lung image, wherein the lung region contour includes at least one of a left lung region contour and a right lung region contour;
[0089] In an embodiment of the present invention, a corrected lung image can be obtained by superimposing the corrected images of each layer in the lung image. Alternatively, convolution processing can be performed on the corrected images of each layer in the lung image to further improve the image accuracy, and then the obtained image features are superimposed to obtain a corrected lung image. Among them, the lung image obtained in step S10 can be at least one of a left lung image, a right lung image or an entire lung image. Correspondingly, when the lung image is a left lung image, the obtained lung region contour is a left lung region contour, and when the lung image is a right lung image, the obtained lung region contour is a right lung region contour, and when the lung image is an overall lung image including the left lung and the right lung, the obtained lung region contour can include at least one of a left lung region contour and a right lung region contour.
[0090] By performing lung region segmentation on the corrected image, the corresponding lung region contour can be obtained. For example, the lung region can be detected by a convolutional neural network to obtain the lung region contour. Alternatively, the corrected lung image can be processed using a region growing method to obtain the lung region contour.
[0091] It should be noted here that the embodiments of the present invention can be implemented through a neural network or through an algorithm specified in this application. As long as it is included in the scope of the technical solution protected by this application, it can be regarded as an embodiment of the present invention.
[0092] Based on the above configuration, the embodiment of the present invention can obtain the correlation features between the optimized features of the image features of adjacent layers of images. When the above-mentioned optimized feature fusion process is performed through the correlation features, the feature information between the adjacent layers of images can be fused according to the correlation of different features at the same position in the correlation features, thereby improving the correction effect of the lung image by improving the detection accuracy of the lung area contour and the detection accuracy of the lung area volume.
[0093] The following is a detailed description of the method for determining the volume of a lung region according to an embodiment of the present invention in conjunction with the accompanying drawings. The embodiment of the present invention can first obtain the image features of each layer of the image in the lung image, wherein, as described in the above embodiment, the pixel values of the pixel points of each layer of the image in the lung image can be used as the corresponding image features, or the image features of the lung image can be extracted by a feature extraction neural network. The feature extraction neural network may include a residual network or a feature pyramid network, and the lung image is input into the feature extraction neural network to obtain the image features corresponding to the lung image, including the image features of each layer of the image. Alternatively, each layer of the image can be input into the feature extraction neural network separately to obtain the image features of each layer of the image. The image features can be expressed in the form of vectors or matrices, including the feature information of each pixel point of the corresponding image. The present invention does not specifically limit the form of the image features.
[0094] When the image features of each layer of images are obtained, the image features can be optimized to obtain corresponding optimized features. In some possible implementations, convolution processing can be directly performed on the image features of each layer of images to further improve the accuracy of the image features and enrich the detailed feature information to obtain corresponding optimized features. Alternatively, feature fusion can be performed using the image features of adjacent layers of images, and the fusion results can be used to optimize the image features.
[0095] In an embodiment of the present invention, the feature optimization processing is performed on the image features of each layer of images to obtain optimized features corresponding to each layer of images, including: performing multi-image feature fusion processing on adjacent layer images in the lung image to obtain fusion features corresponding to each layer of images in the adjacent layer images, wherein the adjacent layer images in the lung image include a first image arranged in order of increasing layer number, and at least one second image adjacent to the first image, and the fusion features of each image in the adjacent layer images are fused with feature information of any image in the adjacent layer images; and performing single image feature fusion processing on corresponding image features using the fusion features of each layer of images in the lung image to obtain optimized features of the image.
[0096] In the embodiment of the present invention, adjacent layer images may be defined as including a first image and at least one second image, wherein the second image is an image adjacent to the first image in the direction of increasing layer number, for example, the first image is the i-th layer image, the second image may be the i+1-th layer image, or may be the i+1-th to i+n-th images, where n is an integer greater than 1. In the embodiment of the present invention, n may be an integer less than 5, but is not specifically limited to the present invention. In the embodiment of the present invention, each layer of image may be sequentially determined as the first image in the order of the first to N-th layer images in the lung image, and the feature fusion and correction of the first image may be achieved by combining the features of the second image adjacent to the first image.
[0097] In the embodiment of the present invention, a first fused feature corresponding to the first image and a second fused feature corresponding to the second image can be obtained by multi-image feature fusion between the image features of the first image and the image features of the second image. The multi-image feature fusion process can be used to fuse the image features of the first image and the second image, so that the first fused feature and the second fused feature both include feature information of the first image and the second image. It should be noted that the first image can be any layer of the lung image.
[0098] Through the above configuration, a fusion feature corresponding to each layer of the image in the lung image can be obtained. The fusion feature may include feature information of the layer of image and feature information of images adjacent to the layer of image.
[0099] In some possible implementations, when the fusion features of each layer of images are obtained, the fusion features of the images can be used to perform single image feature fusion processing on the image features of the images. For example, when the first fusion feature of the first image and the second fusion feature of the second image are obtained, the first fusion feature can be used to perform single image feature fusion on the image features of the first image, and the second fusion feature can be used to perform single image feature fusion on the image features of the second image, and the first optimization feature and the second optimization feature can be obtained respectively.
[0100] Among them, through the single image feature fusion processing, the respective image features can be further strengthened on the basis of the fusion features corresponding to each layer. For example, on the basis of the first fusion feature of the first image and the second fusion feature of the second image, the respective image features can be further strengthened, so that the first optimized feature obtained not only has the image features of the first image but also fuses the feature information of the second image, and the second optimized feature obtained not only has the image features of the second image but also fuses the feature information of the first image.
[0101] The following is an explanation of the multi-image feature fusion and single image feature fusion of the embodiments of the present invention in conjunction with the accompanying drawings. Among them, the multi-image feature fusion processing is performed on the adjacent layer images in the lung image to obtain the fusion features corresponding to each layer of the adjacent layer images, including: connecting the image features of the adjacent layer images to obtain a first connection feature; using a first residual network to process the first connection feature to obtain a first residual feature; using at least two convolutional layers to perform convolution processing on the first residual feature respectively, and obtaining the corresponding fusion features of the adjacent layer images respectively.
[0102] In the embodiment of the present invention, when performing feature fusion of multiple images, the image features of each image in adjacent layers of images may be connected to obtain a first connection feature. For example, a connection operation may be performed through a connection function (concat) to simply fuse the feature information between adjacent layers of images.
[0103] When the first connection feature is obtained, the first connection feature can be further optimized. In an embodiment of the present invention, a residual network (first residual network) can be used to perform the feature optimization process. The first connection feature can be input into a first residual network (residual block) to perform feature optimization processing to obtain a first residual feature. Through the processing of the first residual network, the feature information in the first connection feature can be further fused and the accuracy of the feature information can be improved, that is, the first residual feature further accurately fuses the feature information in the first image and the second image. Among them, the first residual network can be any residual network structure, and the present invention does not specifically limit this.
[0104] In some possible implementations, when the first residual feature is obtained, different convolutional layers can be used to perform convolution processing on the first residual feature. For example, when the adjacent layers are the first image and the second image, two convolutional layers can be used to perform convolution processing on the first residual feature to obtain a first fusion feature of the first image and a second fusion feature of the second image. The two convolutional layers can be, but are not limited to, 1*1 convolution kernels. The first fusion feature includes feature information of the second image, and the second fusion feature also includes feature information of the first image, that is, the first fusion feature and the second fusion feature both include feature information of the two images.
[0105] Through the above configuration, the fusion of feature information of multiple images of each image in adjacent layer images can be achieved, and the correction accuracy of each layer image in the lung image can be improved by means of inter-layer information fusion.
[0106] In addition, the method of using the fusion features of each layer of images in the lung image to perform single image feature fusion processing on the corresponding image features to obtain the optimized features of the image includes: using the summation processing of the fusion features and image features of the image to obtain the summed features of the image; and using a second residual network to process the summed features of the image to obtain the optimized features of the image.
[0107] In some possible implementations, when the fusion features of each layer of images are obtained, the fusion features and the corresponding image features perform optimization processing of the image features. In this embodiment, the summed features can be obtained by first adding the fusion features and image features of the image. Then, the summed features are optimized using a residual network (a second residual network) to obtain the optimized features of the image. For example, for the first image feature of the first image, the optimization processing can be performed by adding the image features of the first image and the first fusion features. The addition can include the direct addition of the first fusion feature and the image features of the first image, or the weighted addition of the first fusion feature and the image features of the first image, that is, the first fusion feature and the image features of the first image are respectively multiplied by the corresponding weighting coefficients and then added, wherein the weighting coefficient can be a pre-set value or a value learned by the neural network, and the present invention does not specifically limit this.
[0108] Similarly, when the second fusion feature is obtained, the second fusion feature can be used to perform single image feature fusion processing of the second image. The embodiment of the present invention can perform the fusion processing by adding the image feature of the second image and the second fusion feature. The addition can include the direct addition of the second fusion feature and the image feature of the second image, and can also include the weighted addition of the second fusion feature and the image feature of the second image, that is, the second fusion feature and the image feature of the second image are respectively multiplied by the corresponding weighting coefficient and then added, wherein the weighting coefficient can be a pre-set value or a value learned by the neural network, and the present invention does not specifically limit this.
[0109] It should be noted here that the embodiment of the present invention does not specifically limit the time for performing the addition processing on the image features of the first image and the first fusion features, and the time for performing the addition processing on the image features of the second image and the second fusion features. The two can be performed separately or simultaneously.
[0110] Through the above-mentioned summation processing, the feature information of the original image can be further increased on the basis of the fused features. The fusion of single image features can achieve the retention of the feature information of a single layer image at each stage of the network, and then the feature information of a single layer image can be optimized based on the feature information between the optimized multi-layer images. In addition, the embodiment of the present invention can directly use the above-mentioned first summation feature and the second summation feature as the first optimized feature and the second optimized feature, and can also perform subsequent optimization processing to further improve the feature accuracy.
[0111] Through the above configuration, the optimized features of a single layer image in a lung image can be obtained. When the optimized features are obtained, the associated features between the optimized features can be used to perform feature optimization of the lung image.
[0112] In addition, in an embodiment of the present invention, the method of using the correlation features between the optimized features of adjacent layer images in the lung image to perform correction processing on the lung image to obtain a corrected lung image includes: obtaining the correlation features between the optimized features of adjacent layer images in the lung image; using the correlation features between the optimized features of the adjacent layer images to perform feature fusion processing on the optimized features respectively corresponding to the adjacent layer images to obtain optimized fusion features; using the optimized fusion features to correct the image features of any image in the adjacent layer images to obtain the corrected features of any image; using the corrected features respectively corresponding to each layer of the lung image to obtain a corrected lung image.
[0113] In the embodiment of the present invention, when the optimized features of each layer of the lung image are obtained, the corrected lung image can be obtained by using the correction features corresponding to each layer of the adjacent lung image.
[0114] In an embodiment of the present invention, when the optimized features of each layer image in the lung image are obtained, the associated features between the optimized features can be determined using the optimized features of each image in the layer image. For example, the associated features between the first optimized feature and the second optimized feature can be further obtained through the first optimized feature corresponding to the first image and the second optimized feature corresponding to the second image. The associated features can represent the degree of association between the feature information corresponding to the same position in the first optimized feature and the second optimized feature. The degree of association can reflect the changes in the first image and the second image for the same object. The same object here can include, for example, the boundary of the lung region. In an embodiment of the present invention, the scales of the images in the lung image can be the same, and the scales of the corresponding optimized features are also the same.
[0115] In addition, when the scales of the obtained first optimized feature and the second optimized feature, or the first fusion feature and the second fusion feature, the first sum feature and the second sum feature, the image feature of the first image and the image feature of the second image are different, the corresponding features can also be adjusted to the same scale, for example, by performing the scale adjustment operation through pooling processing.
[0116] In addition, the embodiment of the present invention can obtain the correlation features between the optimized features of each image in the adjacent layer image through the graph convolutional neural network. For example, the first optimized feature of the first image and the second optimized feature of the second image in the adjacent layer image can be input into the graph convolutional neural network, and the graph convolutional neural network can output the correlation features between the first optimized feature and the second optimized feature after processing, and the elements in the correlation features represent the correlation between the feature information at the same position in the first optimized feature and the second optimized feature.
[0117] In an embodiment of the present invention, before performing the correction operation of each layer of images, a fusion feature (optimized fusion feature) of the optimization features of each layer of images in the adjacent layer of images can also be obtained. For example, a fusion operation of the first optimization feature and the second optimization feature can be performed. Among them, the optimization features of the adjacent layer images can be connected, such as connecting the first optimization feature and the second optimization feature, and the first optimization feature and the second optimization feature can be connected in the channel direction. In an embodiment of the present invention, the connection process can be performed by the concat function to obtain the second connection feature. Then, the activation function can be used to activate the association features between the optimization features of the adjacent layer images, wherein the activation function can be a softmax function, and each correlation degree in the association feature can be used as an input parameter, and then the activation function is used to process each input parameter and output the processed association feature. Furthermore, the product between the activated association feature and the second connection feature can be used to obtain the optimized fusion feature.
[0118] When the optimized fusion features of the adjacent layer images are obtained, the optimized fusion features can be used to perform a correction operation on any image in the adjacent layer images. In particular, the embodiment of the present invention can perform image feature correction by adding the image features of the original image and the optimized fusion features to obtain the corrected image features, that is, the corrected image.
[0119] In addition, the image features and the optimized fusion features of the first image may be summed to obtain a corrected image feature, and then the corrected image of the lung image may be determined based on the corrected image feature. The summation process may be direct addition or weighted addition using a weighting coefficient, and the present invention does not specifically limit this. The corrected image feature may directly correspond to the pixel value of each pixel point of the image, and therefore the corrected image corresponding to the corrected image feature may be directly used. In addition, the corrected image feature may be further convolved to further fuse the feature information and improve the feature accuracy, and then the corrected lung image may be determined based on the features obtained by the convolution process.
[0120] The image correction process of the embodiment of the present invention can be used to achieve at least one of denoising, super-resolution and deblurring of each layer of the lung image, and the image quality can be improved to varying degrees through the corrected image.
[0121] In addition, it should be noted that, before performing the processing of adjacent layer images, the embodiments of the present invention can group the images in the lung image, such as two layers of images as one group, or n layers of images as one group. The above grouping can be performed on the images in the lung image in the order of the first to the Nth layer (the total number of layers of the lung image), and then the images in the same group can be used as the images of adjacent layers.
[0122] When the corrected lung image is obtained, a lung region detection operation, i.e., lung region segmentation processing, can be performed on the corrected lung image. The embodiment of the present invention can segment the lung region contour from the corrected lung image using a region growing method, wherein the region growing method can refer to the prior art means, which is not specifically described in the implementation of the present invention. Alternatively, the embodiment of the present invention can also input the corrected lung image into a convolutional neural network, and obtain the lung region contour through the output of the convolutional neural network. The convolutional neural network can be a U-net, but it is not a specific limitation of the present invention.
[0123] In addition, the neural networks involved in the above-mentioned embodiments of the present invention, such as feature extraction neural networks, residual networks, convolutional neural networks, etc., are all network structures that have been trained to achieve corresponding functions and can meet accuracy requirements. Technical personnel in this field can set different accuracy conditions according to needs, and the present invention does not make specific limitations on this.
[0124] Based on the above configuration, the embodiment of the present invention can realize the determination of the contour of the lung image area through the characteristic information of the inter-layer image in the lung image. This configuration can improve the accuracy of the characteristic information of the lung image and improve the accuracy of the lung area contour at the same time.
[0125] The corrected lung region contour obtained in the embodiment of the present invention can also be represented in the form of a matrix or vector, including a first label 1 and a second label 0, the first label represents the contour boundary and the image pixels within the contour boundary, and 0 represents other regions. By multiplying the corrected lung region contour and the image feature, the lung region in the lung image can be extracted.
[0126] In addition, when the lung region contour is obtained, the volume formed by the lung region can be determined using the obtained lung region road condition. As described in the above embodiment, the volume map of the lung region can be obtained by measuring the area of the region enclosed by the lung region contour of each layer of the image. In contrast to the process, the method for determining the lung region volume can also include:
[0127] S50: Obtain a lung region volume using the lung region contour, wherein the lung region volume includes at least one of a left lung volume and a right lung volume.
[0128] In some possible implementations, the volume of the lung region formed by the lung region contour may be determined as the lung region volume. The lung region volume may be determined according to the sum of the areas enclosed by the lung region contours of each layer. For example, the volume of the left lung region may be obtained according to the area of the area enclosed by the left lung region contour of each layer of the image, and the volume of the right lung region may be obtained according to the area of the area enclosed by the right lung region of each layer of the image.
[0129] In some possible implementations, the area corresponding to the lung region contour in each layer of the image can be used to obtain the lung region volume. Each layer of the image can be divided into a grid shape, and each grid is of a preset size, such as a square with a length and width of 1 mm. The size is not a specific limitation of the present invention. Generally, the size can be set smaller to improve the detection accuracy of the area. When the lung region contour passes through a certain grid, it can be determined whether the portion of the grid in the lung region exceeds half of the grid. If it exceeds, the area of the grid is determined as the area in the lung region. If it does not exceed, the grid is ignored. The area of the grid surrounded by the lung region contour can then be used to obtain the area surrounded by the lung region contour.
[0130] In addition, the embodiment of the present invention may also determine the area of the lung region contour by integrating the lung region contour.
[0131] Alternatively, in the embodiment of the present invention, linear fitting can be performed on the contour of each layer of lung region, such as performing curve fitting processing, so that the lung region contour is fitted into a standard shape, which can be a circle or a rectangle. The curve fitting method can include the least square method, but it is not specifically limited to the present invention.
[0132] Further, in the case where the area formed by the lung region contour of each layer of the image in the lung image is obtained, the sum of the areas formed by the lung region contour of each layer can be determined as the volume of the lung region. Similarly, in the case where the lung region contour is the left lung region contour, the left lung volume can be obtained, and in the case where the lung region contour is the right lung region contour, the right lung volume can be obtained. Further, the embodiment of the present invention can also be used to obtain the volume of each lobe region in the left lung and the right lung, and the lung region contour obtained at this time is the lobe region contour.
[0133] It should be noted here that when the left lung image and the right lung image are obtained by image segmentation, the left lung volume corresponding to the left lung image and the right lung volume corresponding to the right lung image can also be calculated by referring to the above method, which will not be repeated here.
[0134] Based on the above configuration, the lung area volume can be determined. Among them, by fusing the feature information in the multi-layer image, the extraction accuracy of the lung image contour is improved, thereby improving the detection accuracy of the lung area volume.
[0135] In addition, an embodiment of the present invention further provides an image processing device, referring to Figure 2 , the image processing device comprises:
[0136] An acquisition module 10 is used to acquire an image of the lung with a diseased focus;
[0137] An extraction module 20, configured to extract a lung region from the diseased lung image based on a preset lung region contour;
[0138] A determination module 30, for obtaining a left lung image and a right lung image based on the extracted lung region;
[0139] The division module 40 is used to divide the left lung image into regions based on the left lung volume of the left lung image, and to divide the right lung image into regions based on the right lung volume of the right lung image.
[0140] Furthermore, the device further comprises: a fitting module,
[0141] The extraction module 20 is further used to extract the lung region contours of the diseased lung images of several healthy subjects respectively to obtain several lung region contours;
[0142] The fitting module is used to fit the plurality of lung region contours to obtain a preset lung region contour.
[0143] The extraction module 20 comprises:
[0144] A determination unit, used for obtaining a contour of a lung region to be extracted according to the diseased lung image;
[0145] A correction unit, configured to correct the lung region contour to be extracted by using the preset lung region contour to obtain a corrected lung region contour;
[0146] An extraction unit is used to extract the lung region from the lung image according to the corrected lung region contour.
[0147] Furthermore, the correction unit is specifically used to set a number of points on the contour of the lung area to be extracted;
[0148] Scaling the preset lung region contour according to a set step size, and determining an erroneously extracted contour of the lung region contour to be extracted according to a contact condition between the scaled preset lung region contour and the plurality of points;
[0149] The erroneously extracted contour is replaced and the to-be-extracted lung region contour is corrected to obtain a corrected lung region contour.
[0150] The correction unit is specifically used to divide the scaled preset lung region contour into a plurality of preset lung region contour line segments and divide the to-be-extracted lung region contour into a plurality of to-be-extracted lung region contour line segments when the scaled preset lung region contour contacts the plurality of points;
[0151] Calculating the distance between the preset lung region contour line segment and the lung region contour line segment to be extracted that have the same starting point and the same end point;
[0152] When the distance is greater than or equal to the set distance, the contour line segment of the lung region to be extracted is the erroneously extracted contour.
[0153] It should be noted that the determination module 30 is specifically used to determine the left lung image by using the product of the left lung region contour in the extracted lung region and the image feature of the lesion lung image;
[0154] The right lung image is determined by using the product of the right lung region contour in the extracted lung region and the image feature of the diseased lung image.
[0155] The division module 40 is used to obtain a first reference value, a second reference value and a third reference value;
[0156] Using the diseased lung image, obtaining the right lung volume and the left lung volume;
[0157] Using the first reference value, the second reference value, and the right lung volume, the right lesion lung image of the lesion lung image is divided to obtain a right lung segmentation image;
[0158] The left lesion lung image of the lesion lung image is divided by using the third reference value and the left lung volume to obtain a left lung divided image.
[0159] Furthermore, the determination module 30 is also used to segment the diseased lung image to obtain a right lung and a left lung;
[0160] The right lung volume and the left lung volume are obtained using the right lung and the left lung, respectively.
[0161] like Figure 3 As shown, an embodiment of the present invention further provides an image processing device, which may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0162] Those skilled in the art will understand that Figure 3 The device structure shown in the figure does not constitute a limitation on the terminal device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0163] like Figure 3 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module and an image region extraction program. The operating system is a program that manages and controls the hardware and software resources of the device and supports the operation of the image region extraction program and other software or programs.
[0164] Figure 3In the device shown, the user interface 1003 is mainly used for data communication with the client; the network interface 1004 is mainly used for establishing a communication connection with the server; and the processor 1001 can be used to call the image processing program stored in the memory 1005, and the image processing program implements the steps of the image processing method when executed by the processor.
[0165] In addition, an embodiment of the present invention further provides a storage medium, on which an image processing program is stored, and when the image processing program is executed by the processor, the steps of the image processing method are implemented.
[0166] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. An image processing method, characterized in that: include: Extracting lung region contours of diseased lung images of several healthy subjects respectively to obtain several lung region contours; Fitting the plurality of lung region contours to obtain a preset lung region contour; Obtain the contour of the lung area to be extracted according to the diseased lung image; Correcting the lung region contour to be extracted using the preset lung region contour to obtain a corrected lung region contour; Extracting the lung region from the diseased lung image according to the corrected lung region contour; Based on the extracted lung region, a left lung image and a right lung image are obtained; The left lung image is divided into regions based on the left lung volume of the left lung image, and the right lung image is divided into regions based on the right lung volume of the right lung image.
2. The method according to claim 1, characterized in that The method of correcting the lung region contour to be extracted by using the preset lung region contour to obtain a corrected lung region contour includes: Setting a plurality of points on the contour of the lung region to be extracted; Scaling the preset lung region contour according to a set step size, and determining an erroneously extracted contour of the lung region contour to be extracted according to a contact condition between the scaled preset lung region contour and the plurality of points; The erroneously extracted contour is replaced and the to-be-extracted lung region contour is corrected to obtain a corrected lung region contour.
3. The method according to claim 2, characterized in that Determining the erroneously extracted contour of the to-be-extracted lung region contour according to the contact condition between the scaled preset lung region contour and the plurality of points comprises: When the scaled preset lung region contour contacts the plurality of points, the scaled preset lung region contour is divided into a plurality of preset lung region contour line segments, and the to-be-extracted lung region contour is divided into a plurality of to-be-extracted lung region contour line segments; Calculating the distance between the preset lung region contour line segment and the lung region contour line segment to be extracted having the same starting point and the same end point; When the distance is greater than or equal to the set distance, the contour line segment of the lung region to be extracted is the erroneously extracted contour.
4. The method according to claim 1, characterized in that: The step of obtaining a left lung image and a right lung image based on the extracted lung region includes: Determine a left lung image by using the product of the left lung region contour in the extracted lung region and the image feature of the lesion lung image; The right lung image is determined by using the product of the right lung region contour in the extracted lung region and the image feature of the diseased lung image.
5. The method according to claim 1, characterized in that The dividing the left lung image into regions based on the left lung volume of the left lung image, and the dividing the right lung image into regions based on the right lung volume of the right lung image, comprises: Obtaining a first reference value, a second reference value, and a third reference value; Using the diseased lung image, obtaining the right lung volume and the left lung volume; Using the first reference value, the second reference value, and the right lung volume, the right lesion lung image of the lesion lung image is divided to obtain a right lung segmentation image; The left lesion lung image of the lesion lung image is divided by using the third reference value and the left lung volume to obtain a left lung divided image.
6. The method according to claim 5, characterized in that Before obtaining the right lung volume and the left lung volume using the diseased lung image, the method further includes: Segmenting the diseased lung image to obtain a right lung and a left lung; The right lung volume and the left lung volume are obtained using the right lung and the left lung, respectively.
7. An image processing device, characterized in that: include: An extraction module is used to extract lung region contours of diseased lung images of a number of healthy subjects respectively to obtain a number of lung region contours; A fitting module, used for fitting the plurality of lung region contours to obtain a preset lung region contour; The extraction module is also used to obtain the contour of the lung area to be extracted according to the diseased lung image; The extraction module is further used to correct the lung region contour to be extracted using the preset lung region contour to obtain a corrected lung region contour; The extraction module is further used to extract the lung region from the diseased lung image according to the corrected lung region contour; the extraction module is further used to extract the lung region from the diseased lung image based on a preset lung region contour; A determination module, used for obtaining a left lung image and a right lung image based on the extracted lung region; A division module is used to divide the left lung image into regions based on the left lung volume of the left lung image, and to divide the right lung image into regions based on the right lung volume of the right lung image.
8. An image processing device, characterized in that: The image processing device comprises: a memory, a processor, and an image processing program stored in the memory and executable on the processor, wherein the image processing program implements the steps of the image processing method according to any one of claims 1 to 6 when executed by the processor.
9. A storage medium, characterized in that: The storage medium stores an image processing program, and when the image processing program is executed by the processor, the steps of the image processing method according to any one of claims 1 to 6 are implemented.
