A lung cancer image processing method, system and storage medium based on artificial intelligence

By extracting the detection target and junction area in the lung image and drawing the edge profile pattern, the misidentification problem caused by the same morphological areas in the lung image in the prior art is solved, and the accuracy and diagnostic efficiency of lesion recognition are improved.

CN118762023BActive Publication Date: 2024-11-22YUNNAN NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411249020.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-06
Publication Date
2024-11-22
Estimated Expiration
2044-09-06

AI Technical Summary

Technical Problem

In the prior art, when there are areas in the lung image with the same morphology as the target area, the wrong target area is easily extracted, resulting in low lesion recognition accuracy and diagnostic efficiency.

Method used

By obtaining the image data to be analyzed, the lung area image and the lung capsule contour are extracted, the target and specific structure are detected, and the distance between the target and the reference target is calculated. If the distance is less than or equal to the preset value, it is defined as the detection target and the reference target to be analyzed. The junction area is extracted, and the edge contour figure is drawn based on the contour edges and contact surface edges, and marked on the image data.

Benefits of technology

It improves the accuracy of detection target recognition and comprehensiveness of image analysis, helps doctors to intuitively observe the contact surface between the detection target and the reference target, reduce misdiagnosis, and improve diagnostic efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118762023B_ABST
    Figure CN118762023B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of medical image processing, and discloses a lung cancer image processing method, system and storage medium based on artificial intelligence, including: extracting lung region images and lung capsule contours from image data to be analyzed, extracting detection targets and specific structures from lung region images, calculating the distance between any detection target and any reference target, if the distance is less than or equal to a first preset value, defining any detection target as a detection target to be analyzed, defining any reference target as a reference target to be analyzed, extracting the boundary area between the detection target to be analyzed and the reference target to be analyzed, obtaining the contact surface edge line of the detection target to be analyzed and the reference target to be analyzed, drawing the edge contour graphic of the detection target to be analyzed based on the contour edge line of the detection target to be analyzed and the contact surface edge line, marking the analysis results on the image data to be analyzed and outputting them. The technical solution of the present invention can improve the accuracy and comprehensiveness of lesion recognition and improve diagnostic efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of medical image processing, and specifically relates to a lung cancer image processing method, system and storage medium based on artificial intelligence. Background Art

[0002] Lung cancer is one of the malignant tumors with the fastest growing incidence and mortality rate, and it poses the greatest threat to people's health and life. In the field of cancer diagnosis and treatment, medical images such as CT and MRI of patients are often analyzed to locate lesions and extract the characteristics of lesions. When making clinical judgments, the attending physician mainly makes manual judgments on medical images. This judgment method, which mainly relies on the personal ability and experience of the attending physician, has inconsistent judgment criteria due to the different experiences of different doctors, and is prone to misdiagnosis and missed diagnosis. Therefore, how to more accurately identify and segment lesions in medical images based on computer image analysis and processing technology has become an important research topic at present.

[0003] In the prior art, for example, Chinese patent CN116894833A discloses a primary lung cancer detection method and detection device, inputs a lung image, obtains a lung image data set, pre-processes the input lung image, inputs the pre-processed lung image data set into a lung cancer detection and recognition model, identifies and classifies the cancerous area and non-cancerous area in the cancerous image, obtains the recognition result and the classification result respectively, obtains the cancerous area and non-cancerous area in the lung image according to the recognition result, and performs three-dimensional display, obtains the user query instruction, and outputs the medical description feature according to the user query instruction and the recognition result. Another example is Chinese patent CN109544528A, which discloses a lung nodule image recognition method and device, receives a lung CT image, pre-processes the lung CT image, obtains a first lung CT image after pre-processing, extracts the morphological features of the lung nodules in the first lung CT image, imports the feature values ​​of the morphological features into a convolutional neural network for recognition, and obtains the recognition result of the lung nodules in the first lung CT image.

[0004] In the above-mentioned prior art, if there is an area with the same morphology as the target area in the lung image, the wrong target area will be extracted. Therefore, it is an urgent problem to provide a lung cancer image processing method, system and storage medium based on artificial intelligence to improve the accuracy and comprehensiveness of lesion recognition and improve diagnostic efficiency. Summary of the invention

[0005] In response to the above-mentioned technical problems, the present invention provides a lung cancer image processing method, system and storage medium based on artificial intelligence.

[0006] In a first aspect, the present invention provides a lung cancer image processing method based on artificial intelligence, the method comprising the following steps:

[0007] Step 1: acquiring image data to be analyzed, and extracting a lung region image and a lung capsule contour from the image data to be analyzed;

[0008] Step 2: extracting a detection target and a specific structure from the lung region image, wherein the detection target is a tumor image, and the specific structure is a structure in the lung region image that has the same or similar shape as the detection target;

[0009] Step 3, calculating the distance between any detection target and any reference target, if the distance is less than or equal to a first preset value, defining any detection target as a detection target to be analyzed, and defining any reference target as a reference target to be analyzed, wherein the reference target includes the lung capsule contour and specific structure;

[0010] Step 4: extracting the boundary area between the detection target to be analyzed and the reference target to be analyzed;

[0011] Step 5: Obtain the contact surface edge line of the detection target to be analyzed and the reference target to be analyzed, and draw the edge contour graphic of the detection target to be analyzed based on the contour edge line of the detection target to be analyzed and the contact surface edge line, wherein the contour edge line is the edge line of the portion of the detection target to be analyzed that is not in contact with the reference target to be analyzed;

[0012] Step 6: annotate the lung region image, lung capsule contour, specific structure, boundary region and edge contour graphics on the image data to be analyzed, and output the annotated image data to be analyzed to the terminal device.

[0013] Specifically, the image data to be analyzed are all scanned images obtained by scanning the patient with a detection device, and step 2 includes:

[0014] Step 21: input all lung region images into the first training model to obtain the region to be analyzed on each lung region image;

[0015] Step 22: establish a plane coordinate system for each lung region image, draw the contours of all regions to be analyzed, and obtain the contour coordinates of all regions to be analyzed;

[0016] Step 23, obtaining any region to be analyzed on any lung region image, obtaining a second region to be analyzed on a second lung region image that has an overlapping area with any region to be analyzed based on the contour coordinates of any region to be analyzed, and combining any region to be analyzed with the second region to be analyzed to generate a set of regions to be analyzed, wherein the second lung region image is a lung region image adjacent to any lung region image;

[0017] Step 24: input the set of regions to be analyzed into the second training model to determine whether the regions to be analyzed are specific structures. If so, extract the regions to be analyzed as specific structures; if not, extract the regions to be analyzed as detection targets.

[0018] Specifically, the first training model is a model obtained by training using a single first lung training image;

[0019] The second training model is a model obtained by training using N consecutive second lung training images, where N is a positive integer greater than or equal to 1.

[0020] Specifically, the scanning interval for acquiring the second lung training image is smaller than the scanning interval for acquiring the first lung training image.

[0021] Specifically, step 4 includes:

[0022] Step 41, obtaining all first-category pixel points of the contour edge, all second-category pixel points of the detection target to be analyzed inside the contour edge, and all third-category pixel points on the boundary line of the reference target to be analyzed, and setting the first-category pixel points on the contour edge as the first reference pixel points;

[0023] Step 42, obtaining the i-th first reference pixel point, initializing the count value c of the counter at the i-th first reference pixel point to 0, and determining whether there is a third-category pixel point in the neighborhood of the i-th first reference pixel point, if yes, proceeding to step 43, if no, proceeding to step 44, wherein i is a positive integer from 1 to I, and I is the total number of first reference pixels;

[0024] Step 43, setting the count value c of the counter at the i-th first reference pixel point to 0, if i is less than 1, setting i=i+1, and then returning to step 42;

[0025] Step 44, determining whether there is a fourth type pixel point satisfying the first preset condition in the neighborhood of the i-th first reference pixel point, if not, proceeding to step 45, if yes, proceeding to step 46;

[0026] Step 45, setting the count value c of the counter at the i-th first reference pixel point to -1, if i is less than 1, setting i=i+1, and then returning to step 42;

[0027] Step 46: Set the fourth-category pixel point that meets the first preset condition in the neighborhood of the i-th first reference pixel point as the second reference pixel point, c=c+1;

[0028] Step 47, obtaining any second reference pixel point, determining whether there is a fifth-category pixel point satisfying the second preset condition in the neighborhood of any second reference pixel point, if yes, setting c=c+1, setting the fifth-category pixel point satisfying the second preset condition as a new second reference pixel point, and then returning to step 47, if no, the search ends, and the c value at the end of the search is set to the pending count value of the counter at the i-th first reference pixel point, wherein the second preset condition is that the fifth-category pixel point does not belong to the third-category pixel point, and the fifth-category pixel point satisfies the first preset condition;

[0029] Step 48: After traversing all the second reference pixel points, set the minimum pending count value to the count value of the counter at the i-th first reference pixel point; if i is less than 1, set i=i+1, and return to step 42;

[0030] Step 49: After traversing all first reference pixel points on the contour edge line, an area consisting of pixel points whose count values ​​are greater than or equal to 0 is identified as a boundary area.

[0031] Specifically, the first preset condition is that the fourth type of pixel does not belong to the second type of pixel, and the brightness value of the fourth type of pixel is between the second preset value and the third preset value.

[0032] Specifically, in step 5, based on the contour edge line and the contact surface edge line of the detection target to be analyzed, drawing the edge contour graphic of the detection target to be analyzed includes:

[0033] Step 51, measuring a first physical quantity of the contour edge line and a second physical quantity of the contact surface edge line, wherein the first physical quantity and the second physical quantity are the same physical quantity to be referenced;

[0034] Step 52, determine whether the first physical quantity and the second physical quantity meet the third preset condition corresponding to the reference physical quantity. If so, adjust the contact surface edge line based on the contour edge line to obtain an edge contour graphic. If not, use the closed loop formed by the contour edge line and the contact surface edge line as the edge contour graphic.

[0035] Specifically, in step 52, adjusting the contact surface edge line based on the contour edge line includes:

[0036] respectively obtaining the curvatures of the contour edge at two end points intersecting with the contact surface edge, setting the curvature at any end point as the first curvature, and setting the curvature at the other end point as the second curvature;

[0037] Draw a first extension line of the contour edge line at any end point according to the first curvature, draw a second extension line of the contour edge line at the other end point according to the second curvature, and obtain an intersection point of the first extension line and the second extension line;

[0038] An edge contour graphic is obtained based on the contour edge line, the first extension line, the second extension line and the intersection point.

[0039] In a second aspect, the present invention also provides a lung cancer image processing system based on artificial intelligence, the system comprising: a first analysis module, a second analysis module, a judgment module, a region extraction module, a shape adjustment module and a labeling module;

[0040] A first analysis module is used to obtain image data to be analyzed, and extract a lung region image and a lung capsule contour from the image data to be analyzed;

[0041] A second analysis module is used to extract a detection target and a specific structure from the lung region image, wherein the detection target is a tumor image, and the specific structure is a structure in the lung region image that has the same or similar shape as the detection target;

[0042] A judgment module, used for calculating the distance between any detection target and any reference target, and if the distance is less than or equal to a first preset value, defining any detection target as a detection target to be analyzed, and defining any reference target as a reference target to be analyzed, wherein the reference target includes the lung capsule contour and a specific structure;

[0043] A region extraction module is used to extract the boundary region between the detection target to be analyzed and the reference target to be analyzed;

[0044] A shape adjustment module is used to obtain the contact surface edge line of the detection target to be analyzed and the reference target to be analyzed, and draw an edge contour graphic of the detection target to be analyzed based on the contour edge line and the contact surface edge line of the detection target to be analyzed, wherein the contour edge line is the edge line of the detection target to be analyzed other than the contact surface edge line;

[0045] The annotation module is used to annotate the lung area image, lung capsule contour, specific structure, boundary area and edge contour graphics on the image data to be analyzed, and output the annotated image data to be analyzed to the terminal device.

[0046] In a third aspect, the present invention provides a computer storage medium storing program instructions, wherein when the program instructions are executed, the device where the computer storage medium is located is controlled to execute any one of the above-mentioned artificial intelligence-based lung cancer image processing methods.

[0047] The present invention discloses a lung cancer image processing method, system and storage medium based on artificial intelligence. Compared with the prior art, the present invention has at least the following beneficial effects:

[0048] 1. The detection target and the specific structure with the same or similar shape as the detection target are extracted from the lung area image, thereby improving the accuracy of detection target recognition;

[0049] 2. Extracting the reference target to be analyzed that is close to the detection target, and further extracting the boundary area between the detection target and the reference target to be analyzed, so that the doctor can intuitively observe the contact surface between the detection target and the reference target to be analyzed, further consider the influence of the detection target on the reference target to be analyzed, and improve the comprehensiveness of image analysis;

[0050] 3. Based on the contour edge and contact surface edge of the target to be analyzed, the edge contour of the target to be analyzed is drawn, which helps doctors observe the edge contour of the target to be analyzed when it is not affected by other structures and grows freely, thereby improving diagnostic efficiency and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0052] Figure 1 A flowchart of a lung cancer image processing method based on artificial intelligence of the present invention;

[0053] Figure 2 A schematic diagram of detecting target extraction in an embodiment of the present invention;

[0054] Figure 3 A schematic diagram of a pulling area according to an embodiment of the present invention;

[0055] Figure 4 A schematic diagram of boundary area identification according to an embodiment of the present invention;

[0056] Figure 5 The figure is a schematic diagram of the structure of a lung cancer image processing system based on artificial intelligence of the present invention. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical scheme and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. Obviously, the specific embodiments described herein are only used to explain the present invention and are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work belong to the scope of protection of the present invention.

[0058] It should be noted that if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0059] Figure 1 FIG. 1 is a flow chart of an embodiment of a lung cancer image processing method based on artificial intelligence provided by the present invention, and the flow chart specifically includes the following steps:

[0060] Step 1: Obtain image data to be analyzed, and extract lung region images and lung capsule contours from the image data to be analyzed.

[0061] Preferably, the image data to be analyzed is preprocessed before being analyzed, and the preprocessing includes smoothing, noise reduction, enhancement and / or binarization.

[0062] After extracting the lung region image, the lung capsule contour is obtained. The lung capsule is a fibrous connective tissue membrane that wraps the lung surface.

[0063] Step 2: extracting a detection target and a specific structure from the lung region image, wherein the detection target is a tumor image, and the specific structure is a structure in the lung region image that has the same or similar shape as the detection target.

[0064] The plane image of the tumor image in the lung region image is generally presented as a circle. When there are specific structures in the lung region image that are presented as circles in other plane images, it is easy to confuse the detection target with the specific structure, resulting in misidentification. For example, the specific structure is the trachea and blood vessels in the lung.

[0065] Specifically, the image data to be analyzed are all scanned images obtained by scanning the patient with a detection device, and step 2 includes:

[0066] Step 21: input all lung region images into the first training model to obtain the region to be analyzed on each lung region image.

[0067] Step 22: establish a plane coordinate system for each lung region image, draw the contours of all regions to be analyzed, and obtain the contour coordinates of all regions to be analyzed.

[0068] Step 23: obtain any area to be analyzed on any lung area image, obtain a second area to be analyzed on the second lung area image that has an overlapping area with any area to be analyzed based on the contour coordinates of any area to be analyzed, and combine any area to be analyzed and the second area to be analyzed to generate a set of areas to be analyzed, wherein the second lung area image is a lung area image adjacent to any lung area image.

[0069] Step 24: input the set of regions to be analyzed into the second training model to determine whether the regions to be analyzed are specific structures. If so, extract the regions to be analyzed as specific structures; if not, extract the regions to be analyzed as detection targets.

[0070] Imaging examination is an important means of diagnosing and treating lung cancer. Commonly used medical imaging examination methods mainly include magnetic resonance imaging (MRI) and CT (Computed Tomography) scanning. Among them, CT images are obtained by computer tomography, and by performing a tomography scan on the entire lung, the CT images obtained can be as high as hundreds. The image data to be analyzed in the embodiment of the present invention are all CT images obtained by tomography of the entire lung. The analysis results are obtained by processing all CT images, thereby improving the accuracy of image analysis.

[0071] by Figure 2 Taking an example to illustrate an embodiment of the present invention, there are three lung region images p1, p2 and p3, p1 has regions a1 and b1 to be analyzed, p2 has regions a2 and b2 to be analyzed, p3 has regions a3 and b3 to be analyzed, the center point coordinates of a1, a2 and a3 are the same, a1, a2 and a3 are combined to generate a first set of regions to be analyzed, b1, b2 and b3 have the same center point coordinates, b1, b2 and b3 are combined to generate a second set of regions to be analyzed, and then the first set of regions to be analyzed and the second set of regions to be analyzed are respectively input into a second training model, and it can be judged that the shape of the structure generated by the combination of the regions to be analyzed (a1, a2 and a3) in the first set of regions to be analyzed is tubular, belonging to a specific structure, and the shape of the structure generated by the combination of the regions to be analyzed (b1, b2 and b3) in the second set of regions to be analyzed is elliptical or spherical, does not belong to a specific structure, and is a detection target.

[0072] The layer thickness of a CT image is the distance between the centers of two scanning planes. When different scanning devices perform tomographic scanning on the lungs, the scanning intervals are different, and the layer thickness of the CT image is also different. When the scanning interval is large, the layer thickness of the CT image is also large, which is not conducive to shape-based or three-dimensional model-based extraction of detection targets.

[0073] According to the technical solution of the present invention, the detection target can be accurately identified even if the scanning interval is large, thereby improving the extraction accuracy of the detection target.

[0074] Specifically, the first training model is a model obtained by training using a single first lung training image;

[0075] The second training model is a model obtained by training using N consecutive second lung training images, where N is a positive integer greater than or equal to 1.

[0076] The first lung training image is an image region of a preset size that is captured from a lung CT image and contains a detection target.

[0077] The second lung training image is an image region of a preset size captured from a lung CT image and containing a detection target or a specific structure.

[0078] The value of N is set according to the experience of those skilled in the art or according to the actual application scenario, and the embodiments of the present application do not limit this. Preferably, it is set according to the number of lung CT images containing the complete detection target. For example, if 5 lung CT images are combined to show the complete shape of the detection target, then the value of N is 5, and it can also be 6 or 7.

[0079] Specifically, the scanning interval for acquiring the second lung training image is smaller than the scanning interval for acquiring the first lung training image.

[0080] Using lung CT images acquired at smaller scanning intervals to train the second training model can improve the recognition accuracy of the second training model.

[0081] Step 3: Calculate the distance between any detection target and any reference target. If the distance is less than or equal to a first preset value, define any detection target as a detection target to be analyzed, and define any reference target as a reference target to be analyzed, wherein the reference target includes the lung capsule contour and specific structures.

[0082] The first preset value is set according to the experience of those skilled in the art or according to an actual application scenario, and the embodiments of the present application are not limited to this.

[0083] When the detection target is close to the reference target, it will cause traction on the reference target, generating a traction area, making the boundary between the two unclear and unable to be accurately distinguished. Therefore, when the distance between the detection target and the reference target is less than or equal to the first preset value, distinguishing the boundary area between the two can improve the efficiency and comprehensiveness of image analysis and improve diagnostic accuracy.

[0084] Step 4: extract the boundary area between the detection target to be analyzed and the reference target to be analyzed.

[0085] Specifically, step 4 includes:

[0086] Step 41, obtain all first-category pixel points of the contour edge line, all second-category pixel points of the target to be analyzed inside the contour edge line, and all third-category pixel points on the boundary line of the reference target to be analyzed, and set the first-category pixel points on the contour edge line as the first reference pixel points.

[0087] Step 42, obtain the i-th first reference pixel point, initialize the count value c of the counter at the i-th first reference pixel point to 0, and determine whether there is a third-type pixel point in the neighborhood of the i-th first reference pixel point. If so, proceed to step 43; if not, proceed to step 44, where i is a positive integer from 1 to I, and I is the total number of first reference pixels.

[0088] Step 43, set the count value c of the counter at the i-th first reference pixel point to 0; if i is less than 1, set i=i+1, and then return to step 42.

[0089] Step 44, determine whether there is a fourth-category pixel point that meets the first preset condition in the neighborhood of the i-th first reference pixel point, if not, proceed to step 45, if yes, proceed to step 46.

[0090] Step 45, set the count value c of the counter at the i-th first reference pixel point to -1; if i is less than 1, set i=i+1, and then return to step 42.

[0091] Step 46: Set the fourth-category pixel point that meets the first preset condition in the neighborhood of the i-th first reference pixel point as the second reference pixel point, c=c+1.

[0092] Step 47, obtain any second reference pixel point, determine whether there is a fifth-category pixel point that meets the second preset condition in the neighborhood of any second reference pixel point, if yes, set c=c+1, set the fifth-category pixel point that meets the second preset condition as the new second reference pixel point, and then return to step 47; if not, the search ends, and the c value at the end of the search is set to the pending count value of the counter at the i-th first reference pixel point, wherein the second preset condition is that the fifth-category pixel point does not belong to the third-category pixel point, and the fifth-category pixel point meets the first preset condition.

[0093] Step 48: After traversing all the second reference pixel points, set the minimum pending count value to the count value of the counter at the i-th first reference pixel point. If i is less than I, set i=i+1 and return to step 42.

[0094] Step 49: After traversing all first reference pixel points on the contour edge line, an area consisting of pixel points whose count values ​​are greater than or equal to 0 is identified as a boundary area.

[0095] Specifically, the first preset condition is that the fourth type of pixel does not belong to the second type of pixel, and the brightness value of the fourth type of pixel is between the second preset value and the third preset value.

[0096] The second preset value and the third preset value are set according to the experience of those skilled in the art or according to the actual application scenario, and the embodiment of the present application does not limit this. Preferably, the second preset value and the third preset value are the upper limit and lower limit of the brightness value of the traction area, and illustratively, the upper limit and lower limit can be obtained by actually measuring the brightness value of the traction area in several lung area images.

[0097] The pixel point on the contour edge line is taken as the first reference pixel point, and a search process is performed within the neighborhood of the first reference pixel point to identify the boundary area between the detection target to be analyzed and the reference target to be analyzed. When searching in plane space, the neighborhood is a four-neighborhood neighborhood, and when searching in three-dimensional space, the neighborhood is an eight-neighborhood neighborhood.

[0098] When there is a third-category pixel in the neighborhood of the first reference pixel, it means that the first reference pixel is adjacent to the boundary line of the reference target to be analyzed, and the count value c of the counter at the first reference pixel is set to 0; when the pixel in the neighborhood of the first reference pixel is located inside the target to be analyzed or the brightness value of the pixel is not between the second preset value and the third preset value, it means that the pixel is neither connected to the reference target to be analyzed nor belongs to the pulling area, and the count value c of the counter at the first reference pixel is set to -1; when there is a fourth-category pixel belonging to the pulling area that meets the first preset condition in the neighborhood of the first reference pixel, the fourth-category pixel is used as the second reference pixel, and then the fifth-category pixel that meets the second preset condition is searched in its neighborhood, and the count value is increased by 1 each time a search is performed. The search ends when there is a third-category pixel in the neighborhood of the second reference pixel or the number of searches reaches the search threshold, wherein when the number of searches reaches the search threshold and the search ends, the search threshold is used as the pending count value of the counter at the first reference pixel corresponding to the search path. Since there may be multiple new second reference points in each search, at the end of the search, any first reference pixel point will correspond to multiple pending count values. The minimum pending count value is the shortest path value from any first reference pixel point to the boundary line of the reference target to be analyzed. The minimum pending count value is set as the count value of the counter at any first reference pixel point.

[0099] by Figure 3 and Figure 4 The embodiment of the present invention is described as an example. Figure 3 In the figure, 1 is the detection target to be analyzed, 2 is the reference target to be analyzed, and 3 is the pulling area. Figure 4In the figure, c1-c7 are the first type of pixel points on the edge line of the target contour to be analyzed, and d1-d11 are the third type of pixel points on the edge line of the reference target to be analyzed.

[0100] Exemplarily, a first reference pixel c5 is obtained, and there are fifth-category pixels in the left and upper neighborhoods of the first reference pixel c5 (the pixel is located in the pulling area), and then the fifth-category pixel B in the upper neighborhood of the first reference pixel c5 is searched as the second reference pixel, and there are fifth-category pixels in the left and upper neighborhoods of the second reference pixel B, and then the fifth-category pixel in the upper neighborhood of the second reference pixel B is searched as a new second reference pixel, and there are third-category pixels in the neighborhood of the new second reference pixel, and the search is ended, and the search is performed twice, and the pending count value of the counter at the first reference pixel c5 corresponding to the search path is set to 2; The fifth-category pixel A in the left neighborhood of the first reference pixel c5 is searched as the second reference pixel. The fifth-category pixel exists in the left and upper neighborhoods of the second reference pixel A. The fifth-category pixel C in the left neighborhood of the second reference pixel A is searched as the new second reference pixel. The fifth-category pixel exists in the left and upper neighborhoods of the second reference pixel C. The fifth-category pixel in the left neighborhood of the second reference pixel C is searched as the new second reference pixel. The third-category pixel exists in the neighborhood of the new second reference pixel. The search is ended after 3 searches. The pending count value of the counter at the first reference pixel c5 corresponding to the search path is set to 3. In summary, the minimum pending count value of the counter at the first reference pixel c5 is 2, so the count value of the counter at the first reference pixel c5 is set to 2.

[0101] According to the technical solution of the present invention, when the detection target is close to the reference target, there is a pulling area, and the boundary between the two is not clear enough, the accuracy of edge line extraction of the detection target is improved.

[0102] Step 5: Obtain the contact surface edge line of the target to be analyzed and the reference target to be analyzed, and draw the edge contour graphic of the target to be analyzed based on the contour edge line and the contact surface edge line of the target to be analyzed, wherein the contour edge line is the edge line of the portion of the target to be analyzed that is not in contact with the reference target to be analyzed.

[0103] When the detection target is close to the reference target, the reference target will hinder the free growth of the detection target, and the shape of the detection target will be affected by the reference target. The edge line of the entire structure of the detection target to be analyzed includes the contour edge line and the contact surface edge line. The contour edge line is the edge line of the part of the detection target to be analyzed that does not contact the detection target to be analyzed.

[0104] According to the technical solution of the present invention, the shape of the detection target affected by the reference target is corrected, which facilitates the doctor to observe the detection target more intuitively and improves the scientificity and accuracy of the diagnosis.

[0105] Specifically, in step 5, based on the contour edge line and the contact surface edge line of the detection target to be analyzed, drawing the edge contour graphic of the detection target to be analyzed includes:

[0106] Step 51, measuring a first physical quantity of the contour edge line and a second physical quantity of the contact surface edge line, wherein the first physical quantity and the second physical quantity are the same physical quantity to be referenced;

[0107] Step 52, determine whether the first physical quantity and the second physical quantity meet the third preset condition corresponding to the reference physical quantity. If so, adjust the contact surface edge line based on the contour edge line to obtain an edge contour graphic. If not, use the closed loop formed by the contour edge line and the contact surface edge line as the edge contour graphic.

[0108] Exemplarily, the physical quantity to be referenced includes length, area, etc.

[0109] When the physical quantity to be referenced is an area, a first area value (i.e., a first physical quantity) of the curved surface of the entire structure of the detection target to be analyzed and a second area value (i.e., a second physical quantity) of the contact surface between the detection target to be analyzed and the reference target to be analyzed are obtained, and a second ratio of the first area value to the second area value is calculated. If the second ratio is greater than or equal to a preset area value, a third preset condition corresponding to the length is met.

[0110] When the physical quantity to be referenced is length, obtain a first length value (i.e., a first physical quantity) of the contour edge line of the detection target to be analyzed on the lung area image, and a second length value (i.e., a second physical quantity) between two end points of the contact surface between the detection target to be analyzed and the reference target to be analyzed on the above lung area image, and calculate a first ratio of the first length value to the second length value. If the first ratio is greater than or equal to a preset value of the length, a third preset condition corresponding to the length is met.

[0111] Specifically, in step 52, adjusting the contact surface edge line based on the contour edge line includes:

[0112] respectively obtaining the curvatures of the contour edge at two end points intersecting with the contact surface edge, setting the curvature at any end point as the first curvature, and setting the curvature at the other end point as the second curvature;

[0113] Draw a first extension line of the contour edge line at any end point according to the first curvature, draw a second extension line of the contour edge line at the other end point according to the second curvature, and obtain an intersection point of the first extension line and the second extension line;

[0114] An edge contour graphic is obtained based on the contour edge line, the first extension line, the second extension line and the intersection point.

[0115] Preferably, the symmetrical image of the contour edge line and the rotated image of the contour edge line may be used to adjust the contact surface edge line to obtain an edge contour graphic.

[0116] Exemplarily, when the symmetric image of the contour edge is used to adjust the contact surface edge to obtain the edge contour graphic, the center point of the contour edge is obtained, the contour edge is divided into two segments from the center point, and two points with maximum curvature on the two segments are respectively obtained, and the two points are connected to generate a symmetry axis, and the symmetric image of the line segment between the two points on the contour edge is obtained, and then the symmetric image and the line segment between the two points are merged with the symmetry axis as the center axis to generate the edge contour graphic.

[0117] Step 6: annotate the lung region image, lung capsule contour, specific structure, boundary region and edge contour graphics on the image data to be analyzed, and output the annotated image data to be analyzed to the terminal device.

[0118] Figure 5 FIG. 2 is a schematic diagram of a structure of an embodiment of a lung cancer image processing system based on artificial intelligence provided by the present invention. Figure 5 As shown, the system includes: a first analysis module 101 , a second analysis module 102 , a judgment module 103 , a region extraction module 104 , a shape adjustment module 105 and a labeling module 106 .

[0119] The first analysis module 101 is used to obtain image data to be analyzed, and extract the lung region image and lung capsule contour from the image data to be analyzed.

[0120] The second analysis module 102 is used to extract the detection target and the specific structure from the lung region image, wherein the detection target is a tumor image, and the specific structure is a structure in the lung region image that has the same or similar shape as the detection target.

[0121] The judgment module 103 is used to calculate the distance between any detection target and any reference target. If the distance is less than or equal to a first preset value, any detection target is defined as a detection target to be analyzed, and any reference target is defined as a reference target to be analyzed, wherein the reference target includes the lung capsule contour and specific structures.

[0122] The region extraction module 104 is used to extract the boundary region between the detection target to be analyzed and the reference target to be analyzed.

[0123] The shape adjustment module 105 is used to obtain the contact surface edge line of the detection target to be analyzed and the reference target to be analyzed, and draw the edge contour graphic of the detection target to be analyzed based on the contour edge line and the contact surface edge line of the detection target to be analyzed, wherein the contour edge line is the edge line belonging to the detection target to be analyzed outside the contact surface edge line.

[0124] The labeling module 106 is used to label the lung region image, lung capsule contour, specific structure, boundary region and edge contour graphics on the image data to be analyzed, and output the labeled image data to be analyzed to the terminal device.

[0125] According to another aspect of an embodiment of the present invention, a computer storage medium is provided, wherein the computer storage medium stores program instructions, wherein when the program instructions are executed, the device where the computer storage medium is located is controlled to execute any one of the above-mentioned artificial intelligence-based lung cancer image processing methods.

[0126] It should be understood that, although each step in the flow chart of each embodiment of the present invention is shown in sequence according to the indication of the arrow, these steps are not necessarily performed in sequence according to the order indicated by the arrow. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be performed in other orders. Moreover, at least a portion of the steps in each embodiment may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these sub-steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with at least a portion of other steps or sub-steps or stages of other steps.

[0127] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the above-mentioned program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0128] The above-mentioned embodiments only express the preferred implementation mode of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

Claims

1. A lung cancer image processing method based on artificial intelligence, characterized in that: The steps include: Step 1: acquiring image data to be analyzed, and extracting a lung region image and a lung capsule contour from the image data to be analyzed; Step 2: extracting a detection target and a specific structure from the lung region image, wherein the detection target is a tumor image, and the specific structure is a structure in the lung region image that has the same or similar shape as the detection target; Step 3, calculating the distance between any detection target and any reference target, and if the distance is less than or equal to a first preset value, defining any detection target as a detection target to be analyzed, and defining any reference target as a reference target to be analyzed, wherein the reference target includes the lung capsule contour and the specific structure; Step 4: extracting the boundary area between the detection target to be analyzed and the reference target to be analyzed; Step 5, obtaining the contact surface edge line of the detection target to be analyzed and the reference target to be analyzed, and drawing the edge contour graphic of the detection target to be analyzed based on the contour edge line of the detection target to be analyzed and the contact surface edge line, wherein the contour edge line is the edge line of the portion of the detection target to be analyzed that is not in contact with the reference target to be analyzed; Step 6: marking the lung region image, the lung capsule contour, the specific structure, the boundary region and the edge contour graphic on the image data to be analyzed, and outputting the marked image data to be analyzed to a terminal device; The image data to be analyzed are all scanned images obtained by scanning the patient with a detection device, and step 2 includes: Step 21: input all lung region images into the first training model to obtain the region to be analyzed on each lung region image; Step 22: establishing a plane coordinate system for each of the lung region images, drawing the contours of all the regions to be analyzed, and obtaining the contour coordinates of all the regions to be analyzed; Step 23, obtaining any region to be analyzed on any lung region image, obtaining a second region to be analyzed on a second lung region image that has an overlapping area with any of the regions to be analyzed based on the contour coordinates of any of the regions to be analyzed, and combining any of the regions to be analyzed and the second region to be analyzed to generate a set of regions to be analyzed, wherein the second lung region image is a lung region image adjacent to any of the lung region images; Step 24, inputting the set of regions to be analyzed into a second training model, determining whether the regions to be analyzed are the specific structures, if so, extracting the regions to be analyzed as the specific structures, if not, extracting the regions to be analyzed as the detection targets; The step 4 comprises: Step 41, respectively acquiring all first-category pixel points of the contour edge line, all second-category pixel points of the to-be-analyzed detection target inside the contour edge line, and all third-category pixel points on the boundary line of the to-be-analyzed reference target, and setting the first-category pixel points on the contour edge line as first reference pixel points; Step 42, obtaining the i-th first reference pixel point, initializing the count value c of the counter at the i-th first reference pixel point to 0, and determining whether there is the third type of pixel point in the neighborhood of the i-th first reference pixel point, if yes, proceeding to step 43, if not, proceeding to step 44, wherein i is a positive integer from 1 to I, and I is the total number of the first reference pixel points; Step 43, setting the count value c of the counter at the i-th first reference pixel point to 0, if i is less than 1, setting i=i+1, and then returning to step 42; Step 44, determining whether there is a fourth type pixel point satisfying the first preset condition in the neighborhood of the i-th first reference pixel point, if not, proceeding to step 45, if yes, proceeding to step 46; Step 45, setting the count value c of the counter at the i-th first reference pixel point to -1, if i is less than 1, setting i=i+1, and then returning to step 42; Step 46: Set the fourth-category pixel point that meets the first preset condition in the neighborhood of the i-th first reference pixel point as the second reference pixel point, c=c+1; Step 47, obtaining any second reference pixel point, determining whether there is a fifth-category pixel point satisfying the second preset condition in the neighborhood of any second reference pixel point, if yes, setting c=c+1, setting the fifth-category pixel point satisfying the second preset condition as a new second reference pixel point, and then returning to step 47, if no, the search ends, and setting the c value at the end of the search to the pending count value of the counter at the i-th first reference pixel point, wherein the second preset condition is that the fifth-category pixel point does not belong to the third-category pixel point, and the fifth-category pixel point satisfies the first preset condition; Step 48: After traversing all the second reference pixel points, set the minimum pending count value to be the count value of the counter at the i-th first reference pixel point; if i is less than 1, set i=i+1, and return to step 42; Step 49: After traversing all first reference pixel points on the contour edge line, an area consisting of pixel points whose count values ​​are greater than or equal to 0 is identified as the boundary area.

2. The method according to claim 1, characterized in that The first training model is a model obtained by training using a single first lung training image; The second training model is a model obtained by training using N consecutive second lung training images, where N is a positive integer greater than or equal to 1.

3. The method according to claim 2, characterized in that A scanning interval for acquiring the second lung training image is smaller than a scanning interval for acquiring the first lung training image.

4. The method according to claim 1, characterized in that: The first preset condition is that the fourth type of pixel does not belong to the second type of pixel, and the brightness value of the fourth type of pixel is between the second preset value and the third preset value.

5. The method according to claim 1, characterized in that In step 5, drawing the edge contour graphic of the detection target to be analyzed based on the contour edge line of the detection target to be analyzed and the contact surface edge line includes: Step 51, measuring a first physical quantity of the contour edgeline and a second physical quantity of the contact surface edgeline, wherein the first physical quantity and the second physical quantity are the same physical quantity to be referenced; Step 52, determine whether the first physical quantity and the second physical quantity satisfy the third preset condition corresponding to the reference physical quantity. If so, adjust the contact surface edge line based on the contour edge line to obtain the edge contour graphic. If not, use the closed loop formed by the contour edge line and the contact surface edge line as the edge contour graphic.

6. The method according to claim 5, characterized in that In step 52, adjusting the contact surface edge line based on the contour edge line includes: Respectively obtain the curvatures of the contour edgeline at two end points intersecting with the contact surface edgeline, set the curvature at any end point as a first curvature, and set the curvature at the other end point as a second curvature; Draw a first extension line of the contour edge line at any of the endpoints according to the first curvature, draw a second extension line of the contour edge line at the other endpoint according to the second curvature, and obtain an intersection point of the first extension line and the second extension line; The edge contour graphic is acquired based on the contour edge line, the first extension line, the second extension line, and the intersection point.

7. A lung cancer image processing system based on artificial intelligence, used to implement the method according to any one of claims 1 to 6, characterized in that: include: A first analysis module, a second analysis module, a judgment module, a region extraction module, a shape adjustment module and a labeling module; The first analysis module is used to obtain image data to be analyzed, and extract a lung region image and a lung capsule contour from the image data to be analyzed; The second analysis module is used to extract a detection target and a specific structure from the lung region image, wherein the detection target is a tumor image, and the specific structure is a structure in the lung region image that has the same or similar shape as the detection target; The judgment module is used to calculate the distance between any detection target and any reference target, and if the distance is less than or equal to a first preset value, define any detection target as a detection target to be analyzed, and define any reference target as a reference target to be analyzed, wherein the reference target includes the lung capsule contour and the specific structure; The region extraction module is used to extract the boundary region between the detection target to be analyzed and the reference target to be analyzed; The shape adjustment module is used to obtain the contact surface edge line of the detection target to be analyzed and the reference target to be analyzed, and draw the edge contour graphic of the detection target to be analyzed based on the contour edge line of the detection target to be analyzed and the contact surface edge line, wherein the contour edge line is the edge line belonging to the detection target to be analyzed outside the contact surface edge line; The labeling module is used to label the lung region image, the lung capsule contour, the specific structure, the boundary region and the edge contour graphic on the image data to be analyzed, and output the labeled image data to be analyzed to the terminal device; The image data to be analyzed are all scanned images obtained by scanning a patient with a detection device, and extracting detection targets and specific structures from the lung area image includes the following steps: Step 21: input all lung region images into the first training model to obtain the region to be analyzed on each lung region image; Step 22: establishing a plane coordinate system for each of the lung region images, drawing the contours of all the regions to be analyzed, and obtaining the contour coordinates of all the regions to be analyzed; Step 23, obtaining any region to be analyzed on any lung region image, obtaining a second region to be analyzed on a second lung region image that has an overlapping area with any of the regions to be analyzed based on the contour coordinates of any of the regions to be analyzed, and combining any of the regions to be analyzed and the second region to be analyzed to generate a set of regions to be analyzed, wherein the second lung region image is a lung region image adjacent to any of the lung region images; Step 24, inputting the set of regions to be analyzed into a second training model, determining whether the regions to be analyzed are the specific structures, if so, extracting the regions to be analyzed as the specific structures, if not, extracting the regions to be analyzed as the detection targets; The step of extracting the boundary area between the detection target to be analyzed and the reference target to be analyzed comprises the following steps: Step 41, respectively acquiring all first-category pixel points of the contour edge line, all second-category pixel points of the to-be-analyzed detection target inside the contour edge line, and all third-category pixel points on the boundary line of the to-be-analyzed reference target, and setting the first-category pixel points on the contour edge line as first reference pixel points; Step 42, obtaining the i-th first reference pixel point, initializing the count value c of the counter at the i-th first reference pixel point to 0, and determining whether there is the third type of pixel point in the neighborhood of the i-th first reference pixel point, if yes, proceeding to step 43, if not, proceeding to step 44, wherein i is a positive integer from 1 to I, and I is the total number of the first reference pixel points; Step 43, setting the count value c of the counter at the i-th first reference pixel point to 0, if i is less than 1, setting i=i+1, and then returning to step 42; Step 44, determining whether there is a fourth type pixel point satisfying the first preset condition in the neighborhood of the i-th first reference pixel point, if not, proceeding to step 45, if yes, proceeding to step 46; Step 45, setting the count value c of the counter at the i-th first reference pixel point to -1, if i is less than 1, setting i=i+1, and then returning to step 42; Step 46: Set the fourth-category pixel point that meets the first preset condition in the neighborhood of the i-th first reference pixel point as the second reference pixel point, c=c+1; Step 47, obtaining any second reference pixel point, determining whether there is a fifth-category pixel point satisfying the second preset condition in the neighborhood of any second reference pixel point, if yes, setting c=c+1, setting the fifth-category pixel point satisfying the second preset condition as a new second reference pixel point, and then returning to step 47, if no, the search ends, and setting the c value at the end of the search to the pending count value of the counter at the i-th first reference pixel point, wherein the second preset condition is that the fifth-category pixel point does not belong to the third-category pixel point, and the fifth-category pixel point satisfies the first preset condition; Step 48: After traversing all the second reference pixel points, set the minimum pending count value to be the count value of the counter at the i-th first reference pixel point; if i is less than 1, set i=i+1, and return to step 42; Step 49: After traversing all first reference pixel points on the contour edge line, an area consisting of pixel points whose count values ​​are greater than or equal to 0 is identified as the boundary area.

8. A computer storage medium, characterized in that The computer storage medium stores program instructions, wherein when the program instructions are executed, the device where the computer storage medium is located is controlled to execute the method according to any one of claims 1 to 6.