Endoscope image intelligent optimization method and system

By using the region growth algorithm and the method of increasing segmentation threshold in gastric endoscopic image processing, the problem of inaccurate lesion region segmentation in the prior art is solved, and more accurate lesion region identification and segmentation are achieved.

CN119963581AActive Publication Date: 2025-05-09FOURTH MILITARY MEDICAL UNIVERSITY

Patent Information

Application Number
CN202510445534.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2025-05-09
Estimated Expiration
2045-04-10

AI Technical Summary

Technical Problem

The prior art is difficult to achieve effective processing of gastric endoscopic images, resulting in inaccurate segmentation of lesions and affecting doctors' judgment.

Method used

By acquiring the grayscale image and edge image of the gastric endoscopic image, the connecting domain is obtained using the area growth algorithm, the minimum external rectangle area and the number of edge pixels of the connecting domain are calculated, and the probability that the boundary belongs to the lesion area is evaluated. Then, the suspected lesion area is segmented binarized by using the incremental segmentation threshold, and the target lesion area is determined based on the degree of difference in new pixel points between adjacent images.

Benefits of technology

It improves the accuracy of the lesion area, reduces the probability of misidentification of normal boundaries as lesion area, ensures that the target lesion area is as complete as possible, and avoids omissions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119963581A_ABST
    Figure CN119963581A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image data processing, in particular to an endoscope image intelligent optimization method and system. The method comprises the following steps: acquiring a grayscale image of an endoscope image of a stomach, acquiring an edge image of the grayscale image, and performing region growth on pixel points with gradient values greater than a preset gradient in the edge image to obtain a plurality of first connected domains; according to the area of the minimum enclosing rectangle of the first connected domain and the number of edge pixel points, determining a suspected lesion area in the grayscale image, and taking the minimum grayscale value in the suspected lesion area as an initial segmentation threshold value; and gradually increasing the segmentation threshold value from the initial segmentation threshold value, segmenting the suspected lesion area to obtain a plurality of binary images, and determining a target lesion area according to the difference degree of newly added pixel points between the adjacent binary images in discreteness characteristics. By means of the technical scheme, the accurate focus area in the endoscope image of the stomach can be obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of image data processing, and in particular to a method and system for intelligent optimization of endoscopic images. Background Art

[0002] Endoscopic images are visualized images of body cavities or tissues obtained through endoscopic equipment. An endoscope is a slender and flexible tubular instrument with a camera and light source installed at the front end. The endoscope can be inserted into the natural cavity of the human body or enter the body through a tiny incision to obtain images of deep tissues in the body. Endoscopic images can display the tissue structure and color changes inside the patient's body, making it easier for doctors to observe the patient's internal body conditions.

[0003] For example, by placing a gastroscope into the position to be observed in the patient's stomach, an endoscopic image of the position to be observed in the patient's stomach can be obtained through the gastroscope, so that the doctor can observe the mucosa and structure of the position to be observed in the patient's stomach through the endoscopic image of the stomach.

[0004] By segmenting the lesion area from the endoscopic image of the stomach, the time required for the doctor to observe the endoscopic image of the stomach can be shortened, and the doctor's labor intensity in determining the lesion area after observing the patient's stomach can be reduced.

[0005] Since the edge features of the lesion area of ​​the stomach are different from those of the normal tissue area, the related technology can segment the lesion area of ​​the stomach by performing edge detection on the endoscopic image of the stomach; however, the fine structure and features of the actual lesion area of ​​the stomach may be lost in the lesion area obtained by edge detection, affecting the doctor's judgment of the endoscopic image of the stomach. Therefore, it is difficult to effectively process the endoscopic image of the stomach to obtain a more accurate lesion area in the related technology. Summary of the invention

[0006] In order to overcome the problem in the related art that it is difficult to effectively process the endoscopic image of the stomach and obtain a more accurate lesion area, the present application provides an endoscopic image intelligent optimization method and system.

[0007] According to a first aspect of an embodiment of the present application, there is provided an intelligent optimization method for endoscopic images, comprising: obtaining a grayscale image of an endoscopic image of a stomach, and obtaining an edge image of the grayscale image, performing region growing on pixel points in the edge image whose gradient values ​​are greater than a preset gradient to obtain a plurality of first connected domains; determining a probability value that a boundary of the first connected domain belongs to a boundary of a lesion region according to the area of ​​a minimum circumscribed rectangle of the first connected domain and the number of edge pixel points in the first connected domain, so as to use the boundary pixel points of the first connected domain whose probability values ​​are greater than a preset probability as target pixel points; using a minimum region in the edge image that contains all target pixel points as a candidate lesion region, and determining a suspected lesion region corresponding to the candidate lesion region in the grayscale image, so as to use the minimum grayscale value in the suspected lesion region as an initial segmentation threshold; using the initial segmentation threshold as a starting point, performing binary segmentation on the suspected lesion region using a segmentation threshold with an increasing preset grayscale to obtain a plurality of binary images, and determining the target lesion region according to the degree of difference in discrete features between newly added pixels between adjacent binary images.

[0008] In this way, regional growth is performed on the pixel points in the edge image whose gradient values ​​are greater than the preset gradient to obtain multiple first connected domains, and the possibility that the boundary of the first connected domain belongs to the boundary of the lesion area is evaluated by calculating the minimum circumscribed rectangular area and the number of edge pixels of these first connected domains, which can reduce the probability of misjudging the normal boundary of the stomach as the lesion area, thereby obtaining a more accurate lesion area.

[0009] Optionally, the probability value that the boundary of the first connected domain belongs to the boundary of the lesion area is determined based on the area of ​​the minimum circumscribed rectangle of the first connected domain and the number of edge pixels in the first connected domain, including: normalizing the area of ​​the minimum circumscribed rectangle of the first connected domain to obtain a first normalized value, and normalizing the number of edge pixels in the first connected domain to obtain a second normalized value; and using the product of the first normalized value and the second normalized value as the probability value that the boundary of the first connected domain belongs to the boundary of the lesion area.

[0010] Optionally, a plurality of binary images are obtained by binarizing the suspected lesion area using a segmentation threshold with an increasing preset grayscale, including: using an initial segmentation threshold to binarize the suspected lesion area to obtain a binary image, and when the last binarization segmentation process is completed, increasing the segmentation threshold by a preset grayscale on the basis of the last binarization segmentation, and using the increased segmentation threshold to binarize the suspected lesion area to obtain a binary image corresponding to the next binarization segmentation process; when the binarization segmentation process meets a preset cutoff condition, stopping the increment of the segmentation threshold, and obtaining a plurality of binary images corresponding to the multiple binarization segmentation processes.

[0011] In this way, by gradually increasing the threshold value during segmentation to perform binary segmentation on the suspected lesion area, it is possible to further determine whether the suspected lesion area is the actual lesion area of ​​the stomach based on the multiple binary images obtained.

[0012] Optionally, the preset cutoff condition includes at least one of the following: the number of binarized images corresponding to multiple binarization segmentation processes is greater than or equal to a preset number; the segmentation threshold obtained after increasing the preset grayscale is greater than or equal to the preset segmentation threshold.

[0013] In this way, the number of times the suspected lesion area is binarized and segmented can be controlled within a predetermined range by using a pre-set cutoff condition.

[0014] Optionally, the target lesion area is determined according to the degree of difference in discrete features of newly added pixels between adjacent binary images, including: determining the abnormal value of the endoscopic image according to the degree of difference in discrete features of newly added pixels between adjacent binary images; when the abnormal value is greater than or equal to a preset threshold, outputting the suspected lesion area as the target lesion area.

[0015] By analyzing the differences in discrete features of newly added pixels between adjacent binary images and determining the abnormal values ​​of the endoscopic image, it is possible to determine whether the suspected lesion area is the actual lesion area in the stomach grayscale image.

[0016] Optionally, the target lesion area is determined according to the degree of difference in discrete features of newly added pixels between adjacent binary images, including: determining the abnormal value of the endoscopic image according to the degree of difference in discrete features of newly added pixels between adjacent binary images; when the abnormal value is less than a preset threshold, outputting the completely black image as the target lesion area.

[0017] Optionally, the abnormal value of the endoscopic image is determined according to the degree of difference in discrete features of newly added pixels between adjacent binary images, including: for a target binary image among multiple binary images, determining the newly added pixels of the target binary image relative to the previous binary image; the newly added pixels are pixels that are white in the target binary image and black in the previous binary image of the target binary image; determining the discrete feature values ​​of the newly added pixels corresponding to the target binary image, and taking the average value of the difference information of adjacent binary images in discrete feature values ​​as the abnormal value of the endoscopic image.

[0018] Optionally, the discrete characteristic value of the newly added pixel points is determined based on the number of newly added pixel points and the average distance from the newly added pixel points to the designated position points in the grayscale image; wherein the designated position points are determined in the following manner: determining multiple second connected domains in the suspected lesion area, and taking the centers of the second connected domains as the designated position points; the centers of different second connected domains correspond to different designated position points.

[0019] In this way, the dispersion characteristics of the newly added pixels under the adjacent segmentation threshold can be determined according to the number of newly added pixels in the neighborhood of the specified position point and the distance between the newly added pixels and the specified position point to which they belong, thereby determining whether the suspected lesion area meets the characteristics of the lesion area.

[0020] Optionally, the method further includes: determining the area of ​​the target lesion region, and determining a target labeling method for labeling the target lesion region from a plurality of preset labeling methods according to the area of ​​the target lesion region; different preset labeling methods correspond to different areas.

[0021] According to a second aspect of an embodiment of the present application, there is provided an endoscopic image intelligent optimization system, comprising: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the steps of the endoscopic image intelligent optimization method provided in the first aspect of the present application are implemented.

[0022] The technical solution provided by the embodiments of the present application may include the following beneficial effects: obtaining multiple first connected domains through a region growing algorithm, and determining the probability that the boundary of the first connected domain belongs to the boundary of the lesion area based on the minimum circumscribed rectangular area and the number of edge pixels of the connected domain, which can effectively reduce the possibility of misidentifying the normal boundary of the stomach as the lesion area, and by taking the minimum area containing all target pixels as the candidate lesion area and determining the corresponding suspected lesion area in the grayscale image, a more accurate target lesion area in the stomach can be determined based on the determined suspected lesion area. Therefore, the determined target lesion area can include all actual lesion areas of the stomach as much as possible, avoiding the omission of the actual lesion area of ​​the patient's stomach.

[0023] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 is a flow chart of an endoscope image intelligent optimization method according to an exemplary embodiment; Figure 2 It is a structural schematic diagram of an endoscope image intelligent optimization system according to an exemplary embodiment. DETAILED DESCRIPTION

[0025] Figure 1 is a flow chart of an endoscope image intelligent optimization method according to an exemplary embodiment. Figure 1 As shown, the method includes the following steps.

[0026] In step S101, a grayscale image of an endoscopic image of a stomach is obtained, and an edge image of the grayscale image is obtained, and region growing is performed on pixel points in the edge image whose gradient values ​​are greater than a preset gradient to obtain a plurality of first connected domains.

[0027] The endoscopic image intelligent optimization method in the embodiment of the present application can be applied to terminal devices; the terminal includes, for example, at least one of a mobile phone, a wearable device, an Internet of Things device, and a wireless terminal device in remote surgery, but is not limited thereto.

[0028] An endoscopic image of the patient's stomach may be acquired through an endoscope. The endoscopic image may be acquired, for example, through M-NBI (Magnifying Endoscopy with Narrow-Band Imaging) imaging.

[0029] M-NBI imaging filters out the broadband spectrum of red, blue and green light waves emitted by the endoscopic light source and leaves only the narrowband spectrum to output endoscopic images. The endoscopic images obtained through M-NBI imaging can more accurately observe the morphology of the gastrointestinal mucosal epithelium and other parts, such as the epithelial glandular fovea structure and the vascular network.

[0030] Through the endoscopic images obtained by M-NBI imaging, doctors can more clearly observe the microscopic anatomical structure of the stomach, such as the microvascular structure and microsurface structure of the stomach; the visualization of these microstructures can more clearly show the possible lesion areas in the stomach, thereby facilitating the screening of early gastric cancer.

[0031] The terminal device can process the endoscopic image acquired by the endoscope and display the image obtained after processing; alternatively, the terminal device can send the endoscope to other processing devices so that the other processing devices can process the endoscopic image, and the terminal device can receive the processed endoscopic image sent by the other processing devices and display the processed endoscopic image so that the doctor can view the processed endoscopic image.

[0032] A grayscale image can be obtained by graying the endoscopic image of the stomach, and an edge image of the grayscale image can be obtained by performing edge detection on the grayscale image; edge detection can be implemented by operators such as the Sobel operator, Prewitt operator, Canny operator, and Laplacian operator, and the embodiments of the present application do not limit the implementation method of edge detection.

[0033] The edge detection image is an image composed of edge pixels in the grayscale image. Region growing can be performed on the pixels in the edge image whose gradient values ​​are greater than the preset gradient to obtain multiple first connected domains. The preset gradient threshold can be set according to actual needs, for example, it can be set between 50 and 60.

[0034] Region growing is a region-based image segmentation technology. Region growing selects a set of seed points in the image as starting points, and then merges pixels with similar grayscale and adjacent to each other into the region where the seed points are located until all pixels in the grayscale image are merged. After the merging process is completed, multiple connected domains can be obtained; pixels in the same connected domain are similar or identical in grayscale value.

[0035] Since there are differences in grayscale characteristics between the lesion area of ​​the stomach and the area where normal cells are located, the multiple first connected domains obtained by performing regional growth on the pixels in the edge image whose gradient values ​​are greater than the preset gradient can achieve a preliminary distinction between the lesion area and the normal tissue area, so as to further determine a more accurate lesion area based on the multiple first connected domains.

[0036] In step S102, the probability value that the boundary of the first connected domain belongs to the boundary of the lesion area is determined based on the area of ​​the minimum circumscribed rectangle of the first connected domain and the number of edge pixels in the first connected domain, so that the boundary pixels of the first connected domain with probability values ​​greater than the preset probability are taken as target pixels.

[0037] In the endoscopic image of the stomach, compared with the normal tissue cells of the stomach, the blood vessels in the lesion area such as the cancerous cells of the stomach may be disordered, twisted or abnormally dilated, which makes the lesion area appear more diffusible in the grayscale image of the endoscopic image. The edge of the lesion area in the grayscale image has stronger extensibility, and the edge length of the pixel points at the junction of the lesion area and the normal tissue cell area is longer. Therefore, the probability value that the boundary of the first connected domain belongs to the boundary of the lesion area can be determined by combining the area of ​​the minimum circumscribed rectangle of the first connected domain and the number of edge pixels in the first connected domain.

[0038] The larger the area of ​​the minimum circumscribed rectangle of the first connected domain is, or the more edge pixels there are in the first connected domain, the greater the probability that the boundary of the first connected domain belongs to the boundary of the lesion area in the grayscale image, which helps to determine the location of the lesion area in the grayscale image.

[0039] In one embodiment, the probability value that the boundary of the first connected domain belongs to the boundary of the lesion area is determined based on the area of ​​the minimum circumscribed rectangle of the first connected domain and the number of edge pixels in the first connected domain, including: normalizing the area of ​​the minimum circumscribed rectangle of the first connected domain to obtain a first normalized value, and normalizing the number of edge pixels in the first connected domain to obtain a second normalized value; and taking the product of the first normalized value and the second normalized value as the probability value that the boundary of the first connected domain belongs to the boundary of the lesion area.

[0040] By normalizing the area of ​​the minimum circumscribed rectangle of the first connected domain, the minimum circumscribed rectangle areas of different connected domains can be made comparable; by normalizing the number of edge pixels in the first connected domain, connected domains with different numbers of edge pixels can be made comparable.

[0041] The product of the first normalized value and the second normalized value is used as the probability value that the boundary of the first connected domain belongs to the boundary of the lesion area; the larger the product of the first normalized value and the second normalized value, the more likely the boundary of the first connected domain is located at the junction between the lesion area and the normal tissue cell area in the grayscale image.

[0042] The preset probability can be between 0.7 and 0.8. Since the probability value corresponding to the first connected domain can represent the probability that the first connected domain belongs to the boundary of the lesion area, the boundary pixel points of the first connected domain with a probability value greater than the preset probability are taken as target pixels. This can realize the screening of the boundary of the lesion area in the grayscale image, so as to determine the lesion area in the grayscale image of the endoscopic image of the stomach.

[0043] In step S103, the minimum area containing all target pixels in the edge image is taken as a candidate lesion area, and a suspected lesion area corresponding to the candidate lesion area is determined in the grayscale image, so that the minimum grayscale value in the suspected lesion area is taken as an initial segmentation threshold.

[0044] Since the screened target pixels are pixels located at the boundary of the lesion area, and the pixels at the boundary of the lesion area are located inside the lesion area or outside the lesion area, the minimum area containing all the target pixels in the edge image can be used as a candidate lesion area.

[0045] A suspected lesion region corresponding to the candidate lesion region can be determined in the grayscale image; the position of the candidate lesion region in the edge image is the same as the position of the suspected lesion region in the grayscale image.

[0046] Compared with other regions except the suspected lesion region in the grayscale image, the suspected lesion region in the grayscale image has a higher probability of belonging to the actual lesion region of the stomach.

[0047] In order to further determine whether the suspected lesion area belongs to the actual lesion area of ​​the stomach, the minimum grayscale value in the suspected lesion area can be used as the initial segmentation threshold, so that the initial segmentation threshold can be used as the starting threshold to perform multiple segmentations on the suspected lesion area, and determine whether the suspected lesion area belongs to the actual lesion area of ​​the stomach based on the results of multiple segmentations.

[0048] In step S104, starting from the initial segmentation threshold, the suspected lesion area is binarized and segmented using the incremental preset grayscale segmentation threshold to obtain multiple binary images, and the target lesion area is determined based on the difference in discrete features of the newly added pixels between adjacent binary images.

[0049] In the endoscopic image of the stomach, the texture of the normal tissue cell area is clearer and the color is more uniform, while the color of the pixels in the lesion area of ​​the endoscopic image of the stomach may be more diverse and the shape is more complex. Therefore, the grayscale of the pixels in the lesion area of ​​the grayscale image may be more diverse and the shape is more complex. Based on this feature that the grayscale of the pixels in the lesion area of ​​the grayscale image may be more diverse and the shape is more complex, the suspected lesion area can be further determined.

[0050] Since the grayscale of pixels in the lesion area of ​​the grayscale image may be more diverse and the shape is more complex, if the suspected lesion area is the actual lesion area in the grayscale image of the stomach, when different thresholds are used to segment the suspected lesion area, there are certain differences between the segmented images obtained by adjacent segmentation processes. The suspected lesion area can be determined based on the differences between the segmented images obtained by adjacent segmentation processes.

[0051] In one embodiment, a suspected lesion area is binarized and segmented using a segmentation threshold with an increasing preset grayscale to obtain multiple binary images, including: using an initial segmentation threshold to binarize and segment the suspected lesion area to obtain a binary image, when the last binarization segmentation process is completed, the segmentation threshold is increased by a preset grayscale on the basis of the last binarization segmentation, and the suspected lesion area is binarized and segmented using the increased segmentation threshold to obtain a binary image corresponding to the next binarization segmentation process; when the binary segmentation process meets a preset cutoff condition, the segmentation threshold is stopped from being increased, and multiple binary images corresponding to multiple binarization segmentation processes are obtained.

[0052] For example, when the initial segmentation threshold is 80, the preset grayscale can be set to 10, and the segmentation thresholds used in different binary segmentation processes of the suspected lesion area are: 80, 90, 100, 110, 120, 130 and 140, etc.

[0053] By increasing the threshold used for binary segmentation, and thus using different segmentation thresholds with preset grayscale intervals to perform multiple segmentations on the suspected lesion area, the suspected lesion features of the suspected lesion area at different grayscale levels can be captured, and the more obvious lesion area in the suspected lesion area can be identified, thereby more accurately determining whether the suspected lesion area is the actual lesion area of ​​the stomach.

[0054] The binary segmentation process of the suspected lesion area starts from the initial segmentation threshold, which is equal to the minimum grayscale value in the suspected lesion area. The binary image obtained by binarizing the suspected lesion area at the initial segmentation threshold includes all the pixels in the suspected lesion area. Therefore, binarizing the suspected lesion area starting from the initial segmentation threshold can avoid the waste of the binary segmentation process as much as possible and improve the efficiency of multiple binary segmentation processes for the suspected lesion area.

[0055] For example, when the minimum grayscale value in the suspected lesion area is 80, it means that the grayscale values ​​of all pixels in the suspected lesion area are greater than or equal to 80. When the suspected lesion area is binarized using the threshold of 80, the area where the suspected lesion area is located can be completely retained in the obtained binary image.

[0056] When the minimum grayscale value in the suspected lesion area is 80, if the suspected lesion area is binarized with 60 as the starting segmentation threshold and the preset grayscale is 10, the suspected lesion area will be segmented according to the two thresholds of 60 and 70 respectively. Since the minimum grayscale value in the suspected lesion area is 80, the two binary images corresponding to the two thresholds of 60 and 70 and the two binary images corresponding to the threshold of 80 belong to the same binary image, so that the binarization segmentation process corresponding to the two thresholds of 60 and 70 wastes computing resources, which is not conducive to improving the segmentation efficiency of the suspected lesion area.

[0057] Furthermore, in the embodiment of the present application, the target lesion area is determined based on the degree of difference in discrete features of newly added pixels between adjacent binary images. Since the two binary images corresponding to the two thresholds of 60 and 70 and the two binary images corresponding to the threshold of 80 belong to the same binary image, the two binary images corresponding to the two thresholds of 60 and 70 may affect the degree of difference in discrete features of newly added pixels between adjacent binary images, thereby affecting the determined target lesion area. Therefore, binarization segmentation of the suspected lesion area starting from the initial segmentation threshold helps to more accurately determine whether the suspected lesion area belongs to the actual lesion area of ​​the stomach.

[0058] In this way, the suspected lesion area is binarized and segmented using the incremental preset grayscale segmentation threshold to obtain multiple binary images, which can facilitate the analysis of the characteristics of the suspected lesion area under different segmentation thresholds to determine whether the suspected lesion area belongs to the actual lesion area of ​​the stomach.

[0059] In one embodiment, the preset cutoff condition includes at least one of the following: the number of binarized images corresponding to multiple binarization segmentation processes is greater than or equal to a preset number; the segmentation threshold obtained after increasing the preset grayscale is greater than or equal to the preset segmentation threshold.

[0060] The preset segmentation threshold is greater than the initial segmentation threshold. For example, the preset segmentation threshold can be a grayscale value (for example, 220) equivalent to a larger pixel in the grayscale image, so that the binarization segmentation can be stopped when the number of binarization segmentations reaches a certain number; the preset number can be set according to actual needs. For example, the preset number can be an integer between 8 and 12.

[0061] By setting a cutoff condition for increasing the threshold when segmenting the suspected lesion area, it is possible to prevent details caused by over-segmentation of the suspected lesion area from being mistakenly identified as lesions, and it is also possible to avoid omission of lesions caused by under-segmentation of the suspected lesion area.

[0062] In one embodiment, a target lesion area is determined based on the degree of difference in discrete features of newly added pixels between adjacent binary images, including: determining an abnormal value of the endoscopic image based on the degree of difference in discrete features of newly added pixels between adjacent binary images; when the abnormal value is greater than or equal to a preset threshold, outputting the suspected lesion area as the target lesion area.

[0063] The outlier value of the endoscopic image is used to characterize the degree of difference in discrete features between the newly added pixels between adjacent binary images; the greater the degree of difference in discrete features between the newly added pixels between adjacent binary images, the greater the outlier value of the endoscopic image; conversely, the smaller the degree of difference in discrete features between the newly added pixels between adjacent binary images, the smaller the outlier value of the endoscopic image.

[0064] Compared with normal tissue cells in the stomach, cells in cancerous lesions such as the stomach have stronger diffusivity, and the colors of cells in cancerous lesions such as the stomach are more diverse. Therefore, compared with normal tissue cells in the stomach, cells in cancerous lesions such as the stomach appear in the grayscale image as pixels with grayscale values ​​within the same grayscale range with stronger discreteness, and the degree of difference between discreteness corresponding to different grayscale ranges is greater.

[0065] For example, when the initial segmentation threshold is 80 and the preset grayscale is 10, the suspected lesion area can be segmented according to 80, 90, 100, 110, 120, 130 and 140 respectively, and 7 binary images under different segmentation thresholds are obtained respectively. Since different binary images correspond to different segmentation thresholds and the suspected lesion area usually includes multiple grayscale levels, there are new pixels between two adjacent binary images.

[0066] Since in the binary image, the pixels whose grayscale values ​​in the image to be segmented are greater than or equal to the threshold are set to white pixels whose grayscale values ​​are equal to 255, and the pixels whose grayscale values ​​in the image to be segmented are greater than or equal to the threshold are set to black pixels whose grayscale values ​​are equal to 0, the area of ​​the white pixels included in the binary image corresponding to the segmentation threshold of 80 is greater than or equal to the area of ​​the white pixels included in the binary image corresponding to the segmentation threshold of 90.

[0067] In the binary image with a segmentation threshold of 80, there may be white pixels that do not exist in the binary image with a segmentation threshold of 90. The white pixels that are located in the binary image with a segmentation threshold of 80 but not in the binary image with a segmentation threshold of 90 can be used as newly added pixels for the segmentation threshold of 80 relative to the segmentation threshold of 90. Through the discrete characteristics of these newly added pixels, the characteristics of cells in the suspected lesion area with grayscale values ​​between 80 and 90 can be determined, so as to achieve the distinction between the lesion area and normal tissue cells in the grayscale image.

[0068] Since the cells in the lesion area such as gastric cancer have a greater degree of difference in discreteness corresponding to different grayscale ranges, it is possible to determine whether the suspected lesion area meets the characteristic that the lesion area has a greater degree of difference in discreteness corresponding to different grayscale ranges based on the changes in adjacent segmentation processes during multiple binary threshold segmentations of the suspected lesion area, so as to determine whether the suspected area is the actual lesion area of ​​the stomach.

[0069] When the outlier value is greater than or equal to the preset threshold, it means that the newly added pixels between adjacent binary images have a large difference in discrete features, and the obtained suspected lesion area is more consistent with the characteristics of the lesion area. Therefore, it can be determined that the suspected lesion area belongs to the actual lesion area in the grayscale image of the stomach, and the suspected lesion area can be output as the target lesion area.

[0070] In this way, the abnormal value of the endoscopic image is determined according to the degree of difference in discrete features of the newly added pixels between adjacent binary images, and it is possible to determine whether the suspected lesion area belongs to the actual lesion area in the grayscale image of the stomach based on the abnormal value of the endoscopic image. Therefore, when it is determined that the suspected lesion area belongs to the actual lesion area in the grayscale image of the stomach, the suspected lesion area is output as the target lesion area.

[0071] In one embodiment, the target lesion area is determined according to the difference degree of the discrete features of the newly added pixels between adjacent binary images, including: determining the abnormal value of the endoscopic image according to the difference degree of the discrete features of the newly added pixels between adjacent binary images; when the abnormal value is less than a preset threshold, outputting the completely black image as the target lesion area.

[0072] Since the outliers of the endoscopic image are used to characterize the difference in discrete features of newly added pixels between adjacent binary images, when the outliers are less than the preset threshold, it means that the suspected lesion area does not conform to the strong discreteness characteristics of the lesion area, and the all-black image can be output as the target lesion area.

[0073] Alternatively, when the abnormal value is less than a preset threshold, a prompt message may be output, and the prompt message may be used to indicate that the lesion area cannot be identified from the grayscale image.

[0074] In one embodiment, an abnormal value of an endoscopic image is determined based on the degree of difference in discrete features of newly added pixels between adjacent binary images, including: for a target binary image among multiple binary images, determining newly added pixels of the target binary image relative to a previous binary image; the newly added pixels are white in the target binary image and black in a binary image previous to the target binary image; determining discrete feature values ​​of the newly added pixels corresponding to the target binary image, and taking the average value of the difference information of the adjacent binary images in discrete feature values ​​as the abnormal value of the endoscopic image.

[0075] The discrete eigenvalue is used to characterize the discrete degree of the newly added pixel points corresponding to the target binary image. Since the cell surface of the lesion area such as gastric cancer may be smooth or rough, and there may be erosion, ulcer, necrosis, bleeding and interstitial reaction, the shapes of different cells in the lesion area are more different than those of normal tissue cells, and the cells in the lesion area are more irregular in shape.

[0076] The difference information of adjacent binary images in discrete eigenvalues ​​may be equal to the absolute value of the difference of adjacent binary images in discrete eigenvalues; the greater the difference information of adjacent binary images in discrete eigenvalues ​​in multiple binary images, the higher the degree of difference in discreteness of pixel points obtained in the suspected lesion area under different segmentation thresholds, and the more the suspected lesion area conforms to the characteristics of the actual lesion area.

[0077] In this way, the average value of the difference information of the adjacent binary images in the discrete characteristic values ​​is used as the abnormal value of the endoscopic image, which is helpful to determine the lesion area from the grayscale image according to the abnormal value.

[0078] In one embodiment, the discrete characteristic value of the newly added pixel points is determined based on the number of newly added pixel points and the average distance from the newly added pixel points to the designated position points in the grayscale image; wherein the designated position points are determined in the following manner: multiple second connected domains in the suspected lesion area are determined, and the centers of the second connected domains are used as the designated position points; the centers of different second connected domains correspond to different designated position points.

[0079] Connected domain detection can be performed on the suspected lesion area to obtain multiple second connected domains. The number of second connected domains corresponding to the suspected lesion area can be, for example, 4. For these 4 second connected domains, 4 designated position points can be obtained, and different designated position points correspond to the centers of different second connected domains.

[0080] A corresponding neighborhood range can be determined for a specified location point, and different specified location points correspond to different neighborhood ranges; for a target new pixel point among multiple new pixel points, if the target pixel point is within the neighborhood range of the specified location point, the target new pixel point can be used as the new pixel point belonging to the specified location point; the target new pixel point can be any one of the multiple new pixel points.

[0081] For example, the newly added pixel corresponding to the segmentation threshold 90 may be P 1 , P 2 , P 3 , P 4 , P 5 and P 6 There are 6 pixels in total. L can be pre-determined in the grayscale image. 1 , L 2 , L 3 and L 4 Wait for four designated positions and add a new pixel point P 1 and P 2 Can be located at the specified location point L 1 In the neighborhood of 3 Can be located at the specified location point L 2 In the neighborhood of 4 and P 5 Can be located at the specified location point L 3 In the neighborhood of 6 Can be located at the specified location point L 4 within the neighborhood range.

[0082] The newly added pixel points are all located within the neighborhood of the corresponding designated position point, or the designated position point with the closest distance can be used as the designated position point to which the newly added pixel point belongs.

[0083] The newly added pixel point P can be determined 1 and P 2 To the designated location point L 1 The average value of the distance is located at the specified location point L 1 Add new pixels in the neighborhood to the specified location point L 1 The larger the distance, the more the specified position point L 1 The more dispersed the newly added pixels are within the neighborhood of the specified position point L 1 The more new pixels there are in the neighborhood of the specified location L, the better 1 The more concentrated the new pixels are in the neighborhood.

[0084] The dispersion characteristics of the newly added pixels in the neighborhood of the specified location point can be determined based on the number of newly added pixels in the neighborhood of the specified location point and the distance from the newly added pixels in the neighborhood of the specified location point to the specified location point. The changes in the characteristics of the suspected lesion area under adjacent segmentation thresholds can be determined based on the dispersion characteristics of the newly added pixels in the neighborhoods of different specified location points to determine whether the suspected lesion area meets the characteristics of the lesion area.

[0085] In a possible implementation, the discrete feature value of the newly added pixel corresponding to the Bth segmentation threshold is , T is the number of specified location points, norm is the normalization function; The average distance from the newly added pixel point corresponding to the b-th designated position point among the multiple newly added pixel points corresponding to the B-th segmentation threshold to the b-th designated position point; The number of newly added pixel points corresponding to the b-th designated position point among the multiple newly added pixel points corresponding to the B-th segmentation threshold.

[0086] In this way, the discrete feature values ​​of the newly added pixels obtained under adjacent segmentation thresholds can be determined based on the number of newly added pixels and the average distance from the newly added pixels to the designated position points in the grayscale image, so as to determine the target lesion area based on the degree of difference in discrete features of the newly added pixels between adjacent binary images.

[0087] In one embodiment, the area of ​​the target lesion region may also be determined, and based on the area of ​​the target lesion region, a target labeling method for labeling the target lesion region may be determined from a plurality of preset labeling methods; different preset labeling methods correspond to different areas.

[0088] Different preset labeling methods have different levels of conspicuity, so that the conspicuity of the labeling method for the target lesion area can match the area of ​​the target lesion area; the conspicuity of the labeling method for the target lesion area can be negatively correlated with the area of ​​the target lesion area; for example, for a target lesion area with a smaller area, since the area of ​​the target lesion area may be difficult to attract the user's attention, a more eye-catching labeling method can be used to label the target lesion area.

[0089] For example, for a target lesion area with a smaller area, a more eye-catching red or orange color can be used for marking, or a wider marking line can be used for marking; for a target lesion area with a larger area, a larger target lesion area is more likely to attract the user's attention, and a less eye-catching marking method can be used to mark the target lesion area, so as to improve the simplicity of the interface marked with marking information for the target lesion area, and improve the appearance of the interface marked with marking information for the target lesion area while ensuring that the user is aware of the marking information for the target lesion area.

[0090] In this way, target lesion areas of different areas can be marked in different preset marking methods, which can both enhance the reminder of the target lesion area to the user and improve the appearance of the interface with the marking information of the target lesion area.

[0091] Figure 2 FIG. 1 is a schematic diagram showing a structure of an endoscope image intelligent optimization system 1000 according to an exemplary embodiment. Figure 2 The endoscopic image intelligent optimization system 1000 includes: a processor 1100 and a memory 1200, wherein the memory 1200 stores computer program instructions, and when the computer program instructions are executed by the processor 1100, all or part of the steps of the endoscopic image intelligent optimization method in the present application are implemented.

[0092] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary technical means in the art that are not disclosed in the present application, and the specification and embodiments are only considered as exemplary.

[0093] It should be understood that the present application is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof.

Claims

1. An intelligent optimization method for endoscope images, characterized in that: include: Acquire a grayscale image of the endoscopic image of the stomach, and acquire an edge image of the grayscale image, and perform region growing on pixel points in the edge image whose gradient values ​​are greater than a preset gradient to obtain a plurality of first connected domains; Determine the probability value that the boundary of the first connected domain belongs to the boundary of the lesion area according to the area of ​​the minimum circumscribed rectangle of the first connected domain and the number of edge pixels in the first connected domain, so as to take the boundary pixels of the first connected domain with probability values ​​greater than the preset probability as target pixels; The smallest area containing all target pixels in the edge image is taken as a candidate lesion area, and the suspected lesion area corresponding to the candidate lesion area is determined in the grayscale image, so that the minimum grayscale value in the suspected lesion area is taken as an initial segmentation threshold; Taking the initial segmentation threshold as the starting point, the suspected lesion area is binarized and segmented using the incremental preset grayscale segmentation threshold to obtain multiple binary images, and the target lesion area is determined according to the difference in discrete features of the newly added pixels between adjacent binary images.

2. The method for intelligent optimization of endoscope images according to claim 1, characterized in that: Determining the probability value that the boundary of the first connected domain belongs to the boundary of the lesion region according to the area of ​​the minimum circumscribed rectangle of the first connected domain and the number of edge pixels in the first connected domain includes: Normalizing the area of ​​the minimum circumscribed rectangle of the first connected domain to obtain a first normalized value, and normalizing the number of edge pixels in the first connected domain to obtain a second normalized value; The product of the first normalized value and the second normalized value is used as a probability value that the boundary of the first connected domain belongs to the boundary of the lesion area.

3. The method for intelligent optimization of endoscope images according to claim 1, characterized in that: The suspected lesion area is binarized by using the segmentation threshold of the preset grayscale to obtain multiple binary images, including: Using the initial segmentation threshold to perform binary segmentation on the suspected lesion area to obtain a binary image, when the last binary segmentation process is completed, the segmentation threshold is incremented by a preset grayscale on the basis of the last binary segmentation, and the increased segmentation threshold is used to perform binary segmentation on the suspected lesion area to obtain a binary image corresponding to the next binary segmentation process; When the binary segmentation process meets the preset cutoff condition, the increment of the segmentation threshold is stopped, and a plurality of binary images corresponding to the plurality of binary segmentation processes are obtained.

4. The method for intelligent optimization of endoscope images according to claim 3, characterized in that: The preset cutoff condition includes at least one of the following: the number of binary images corresponding to multiple binary segmentation processes is greater than or equal to a preset number; The segmentation threshold obtained after increasing the preset grayscale is greater than or equal to the preset segmentation threshold.

5. The method for intelligent optimization of endoscope images according to claim 1, characterized in that: The target lesion area is determined according to the difference in discrete features of the newly added pixels between adjacent binary images, including: Determine the abnormal value of the endoscopic image according to the difference degree of the discrete characteristics of the newly added pixels between adjacent binary images; When the abnormal value is greater than or equal to the preset threshold, the suspected lesion area is output as the target lesion area.

6. The method for intelligent optimization of endoscope images according to claim 1, characterized in that: The target lesion area is determined according to the difference in discrete features of the newly added pixels between adjacent binary images, including: Determine the abnormal value of the endoscopic image according to the difference degree of the discrete characteristics of the newly added pixels between adjacent binary images; When the outlier value is less than the preset threshold, the completely black image is output as the target lesion area.

7. The method for intelligent optimization of endoscopic images according to claim 5 or 6, characterized in that: According to the difference in discrete features of newly added pixels between adjacent binary images, the abnormal values ​​of the endoscopic image are determined, including: For a target binary image among the multiple binary images, determine newly added pixel points of the target binary image relative to a previous binary image; the newly added pixel points are pixel points that are white in the target binary image and black in a previous binary image of the target binary image; The discrete characteristic value of the newly added pixel point corresponding to the target binary image is determined, and the average value of the difference information of the discrete characteristic values ​​of adjacent binary images is taken as the abnormal value of the endoscopic image.

8. The method for intelligent optimization of endoscope images according to claim 7, characterized in that: The discrete characteristic value of the newly added pixel point is determined according to the number of the newly added pixel points and the average distance from the newly added pixel points to the designated position points in the grayscale image; The designated position point is determined in the following manner: multiple second connected domains in the suspected lesion area are determined, and the centers of the second connected domains are used as the designated position points; the centers of different second connected domains correspond to different designated position points.

9. The method for intelligent optimization of endoscope images according to claim 1, characterized in that: The method further comprises: The area of ​​the target lesion region is determined, and according to the area of ​​the target lesion region, a target marking method for marking the target lesion region is determined from a plurality of preset marking methods; different preset marking methods correspond to different areas.

10. An endoscope image intelligent optimization system, characterized in that: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the endoscopic image intelligent optimization method according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Ultrasonic image focus description method and device, computer equipment and storage medium

    CN113034426A

  • Power adapter appearance quality detection method based on multi-feature fusion

    CN117408995A

  • Method for segmenting focus area in thermochemotherapy process based on infrared image

    CN117557568A

  • Craniomaxillofacial CT image segmentation method based on computer vision

    CN118314351A

  • Stomach CT image feature recognition and segmentation system

    CN118411528A

Cited By

  • Intelligent detection method for minimal lesion of central nervous system image

    CN120147324A

  • Gastrointestinal endoscope-based AI-assisted focus positioning method and system

    CN121190501A

  • Gastrointestinal endoscope-based ai-assisted lesion localization method and system

    CN121190501B