An intelligent optimization method and system for endoscopic images

By applying area growth algorithm and segmentation threshold increment technology in endoscopic image processing, the problem of inaccurate lesion region segmentation in the prior art is solved, and more accurate lesion region recognition is achieved.

CN119963581BActive Publication Date: 2025-06-20FOURTH MILITARY MEDICAL UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The prior art is difficult to effectively process endoscopic images, resulting in inaccurate segmentation of lesion areas and affecting doctors' judgment.

Method used

By obtaining the grayscale image and edge image of the endoscopic image of the stomach, the connecting domain is obtained using the region growth algorithm, the probability value of the boundary is determined based on the characteristics of the connecting domain, the candidate lesion area is screened, and the binarized segmentation is performed through the incremental segmentation threshold, and the target lesion area is finally determined based on the differences of adjacent images.

Benefits of technology

It improves the segmentation accuracy of the lesion area, reduces the probability that the normal boundary is misidentified as a lesion area, and ensures accurate identification of the lesion area in the stomach.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119963581B_ABST
    Figure CN119963581B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image data processing, and in particular, to an intelligent optimization method and system for endoscopic images. The method includes: obtaining a grayscale image of an endoscopic image of the stomach, and obtaining an edge image of the grayscale image, and 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 regions; determining a suspected lesion region in the grayscale image according to the area of the minimum circumscribed rectangle of the first connected region and the number of edge pixel points, and taking the minimum grayscale value in the suspected lesion region as an initial segmentation threshold; incrementing the segmentation threshold from the initial segmentation threshold, segmenting the suspected lesion region to obtain a plurality of binary images, and determining a target lesion region according to the difference degree of the discrete characteristics of the newly added pixel points between adjacent binary images. Through the above technical solutions, a relatively accurate lesion region in the endoscopic image of the stomach can be obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Endoscopic images are visual images of internal cavities or tissues obtained through endoscopic devices. An endoscope is a slender and flexible tubular instrument with a camera and a light source at its front end. The endoscope can be inserted into the natural cavities of the human body or into the body through a small incision to obtain images of deep tissues inside the body. Endoscopic images can show the organizational structure and color changes of the internal position of the patient's body, facilitating doctors to observe the internal conditions of the patient's body.

[0003] For example, by inserting 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 doctors 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 doctors to observe the endoscopic image of the stomach can be shortened, and the labor intensity of doctors to determine the lesion area after observing the patient's stomach can be reduced.

[0005] Since the edge features of the lesion area in the stomach are different from those of the normal tissue area, in the related art, edge detection can be performed on the endoscopic image of the stomach to segment the lesion area in the stomach. However, the subtle structures and features in the actual lesion area in the stomach may be lost in the lesion area obtained by edge detection, affecting doctors' judgment of the endoscopic image of the stomach. Therefore, it is difficult to effectively process the endoscopic image of the stomach to obtain a relatively accurate lesion area in the related art. Summary of the Invention

[0006] To overcome the problem in the related art that it is difficult to effectively process the endoscopic image of the stomach to obtain a relatively accurate lesion area, this application provides an intelligent optimization method and system for endoscopic images.

[0007] According to the first aspect of the embodiments of the present application, an intelligent optimization method for endoscopic images is provided, including: obtaining a grayscale image of an endoscopic image of the stomach, and obtaining an edge image of the grayscale image; performing region growing on pixel points in the edge image with gradient values greater than a preset gradient to obtain a plurality of first connected domains; determining a 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 pixel points in the first connected domain, so as to use the boundary pixel points of the first connected domain with a probability value greater than a preset probability as target pixel points; taking the smallest area in the edge image that contains all the target pixel points as a candidate lesion area, and determining a suspected lesion area corresponding to the candidate lesion area in the grayscale image, so as to use the smallest grayscale value in the suspected lesion area as an initial segmentation threshold; starting from the initial segmentation threshold, performing binary segmentation on the suspected lesion area using a segmentation threshold that increases by a preset grayscale to obtain multiple binary images, and determining the target lesion area according to the difference degree of the discrete characteristics of the newly added pixel points between adjacent binary images.

[0008] In this way, by performing region growing on pixel points in the edge image with gradient values greater than a preset gradient to obtain a plurality of first connected domains, and evaluating the possibility that the boundary of these first connected domains belongs to the boundary of the lesion area by calculating the area of the minimum circumscribed rectangle of these first connected domains and the number of their edge pixels, the probability of misjudging the normal boundary of the stomach as the lesion area can be reduced, thereby obtaining a more accurate lesion area.

[0009] Optionally, determining a 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 pixel points 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 pixel points in the first connected domain to obtain a second normalized value; 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.

[0010] Optionally, performing binary segmentation on the suspected lesion area using a segmentation threshold that increases by a preset grayscale to obtain multiple binary images includes: performing binary segmentation on the suspected lesion area using the initial segmentation threshold to obtain a binary image; in the case where the previous binary segmentation process is completed, increasing the segmentation threshold by a preset grayscale on the basis of the previous binary segmentation, and performing binary segmentation on the suspected lesion area using the increased segmentation threshold to obtain a binary image corresponding to the next binary segmentation process; in the case where the binary segmentation process meets a preset cut-off condition, stopping increasing the segmentation threshold, and obtaining multiple binary images corresponding to multiple binary 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 obtained multiple binary images.

[0012] Optionally, the preset cut-off condition includes at least one of the following: the number of multiple binary images corresponding to multiple binary segmentation processes is greater than or equal to a preset number; the segmentation threshold value obtained after increasing the preset gray level is greater than or equal to the preset segmentation threshold value.

[0013] In this way, through the preset cut-off condition, the number of times of binary segmentation of the suspected lesion area can be controlled within a predetermined range.

[0014] Optionally, determining the target lesion area according to the difference degree of the discrete characteristics of the newly added pixel points between adjacent binary images includes: determining the outlier of the endoscopic image according to the difference degree of the discrete characteristics of the newly added pixel points between adjacent binary images; in the case where the outlier is greater than or equal to the preset threshold value, outputting the suspected lesion area as the target lesion area.

[0015] By analyzing the difference in the discrete characteristics of the newly added pixel points between adjacent binary images to determine the outlier of the endoscopic image, it can be judged whether the suspected lesion area is the actual lesion area in the gastric gray-scale image.

[0016] Optionally, determining the target lesion area according to the difference degree of the discrete characteristics of the newly added pixel points between adjacent binary images includes: determining the outlier of the endoscopic image according to the difference degree of the discrete characteristics of the newly added pixel points between adjacent binary images; in the case where the outlier is less than the preset threshold value, outputting the all-black image as the target lesion area.

[0017] Optionally, determining the outlier of the endoscopic image according to the difference degree of the discrete characteristics of the newly added pixel points between adjacent binary images includes: for the target binary image among multiple binary images, determining the newly added pixel points of the target binary image relative to the previous binary image; the newly added pixel points are the pixel points that are white in the target binary image and black in the previous binary image of the target binary image; determining the discrete characteristic value of the newly added pixel points corresponding to the target binary image, and taking the average value of the difference information of the discrete characteristic values between adjacent binary images as the outlier of the endoscopic image.

[0018] Optionally, the discreteness eigenvalue of the newly added pixel points is determined according to the number of the newly added pixel points and the average distance from the newly added pixel points to the specified position points in the grayscale image; wherein, the specified position points are determined in the following manner: determining a plurality of second connected regions in the suspected lesion region, and taking the centers of the second connected regions as the specified position points; the centers of different second connected regions respectively correspond to different specified position points.

[0019] In this way, it is possible to determine the dispersion characteristics of the newly added pixel points under adjacent segmentation thresholds according to the number of newly added pixel points in the neighborhood of the specified position points and the distance between the newly added pixel points and the corresponding specified position points, so as to determine whether the suspected lesion region conforms to the characteristics of the lesion region.

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

[0021] According to a second aspect of the embodiments of the present application, there is provided an endoscopic image intelligent optimization system, including: a processor and a memory, where 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 solutions provided by the embodiments of the present application may include the following beneficial effects: obtaining a plurality of first connected regions through a region growing algorithm, and determining the probability that the boundary of the first connected region belongs to the boundary of the lesion region according to the area of the minimum circumscribed rectangle and the number of edge pixel points of the connected region, which can effectively reduce the possibility of misidentifying the normal boundary of the stomach as the lesion region. By taking the smallest region containing all target pixel points as the candidate lesion region and determining the corresponding suspected lesion region in the grayscale image, it is possible to determine a more accurate target lesion region in the stomach according to the determined suspected lesion region. Therefore, the determined target lesion region can include as many actual lesion regions in the stomach as possible, avoiding the omission of the actual lesion regions in the patient's stomach.

[0023] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 is a flowchart of an endoscopic image intelligent optimization method shown according to an exemplary embodiment;

[0025] Figure 2 is a schematic structural diagram of an endoscopic image intelligent optimization system shown according to an exemplary embodiment. Detailed implementation manners

[0026] Figure 1 is a flowchart of an intelligent optimization method for endoscopic images shown according to an exemplary embodiment. As Figure 1 shown, the method includes the following steps.

[0027] In step S101, a grayscale image of an endoscopic image of the stomach is obtained, and an edge image of the grayscale image is obtained. Pixel points in the edge image with a gradient value greater than a preset gradient are subjected to region growing to obtain a plurality of first connected domains.

[0028] The intelligent optimization method for endoscopic images in the embodiments of the present application can be applied to a terminal device; 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.

[0029] An endoscopic image of a patient's stomach can be obtained through an endoscope. The endoscopic image can be obtained, for example, by M-NBI (Magnifying Endoscopy with Narrow-Band Imaging) imaging.

[0030] M-NBI imaging filters out the broadband spectra in the red, blue, and green light waves emitted by the endoscopic light source and only leaves the narrow-band spectra to output an endoscopic image; the endoscopic image obtained through M-NBI imaging can more accurately observe the morphology of parts such as the digestive tract mucosal epithelium, such as the morphology of epithelial glandular pits and blood vessel networks.

[0031] Through the endoscopic image obtained by M-NBI imaging, a doctor can more clearly observe the microscopic anatomical structure of the stomach, such as the microvascular structure and micro-surface structure of the stomach; the visualization of these micro-structures can more clearly show the possible lesion areas in the stomach, thus contributing to the early screening of gastric cancer.

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

[0033] A grayscale image can be obtained by grayscaling 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 Sobel operator, Prewitt operator, Canny operator, and Laplacian operator, and the implementation manner of edge detection in the embodiments of the present application is not limited.

[0034] The edge detection image is an image composed of edge pixel points in the grayscale image. Multiple first connected regions can be obtained by performing region growing on the pixel points in the edge image whose gradient values are greater than a preset gradient; the preset gradient threshold can be set according to actual needs. For example, it can be set between 50 and 60.

[0035] Region growing is a region-based image segmentation technique. Region growing selects a set of seed points in the image as starting points, and then merges pixel points with similar grayscales and adjacent to each other into the region where the seed points are located until the merging of all pixel points in the grayscale image is completed. Multiple connected regions can be obtained after the merging process; the pixel points in the same connected region are similar or the same in grayscale value.

[0036] Since there are differences in grayscale features between the lesion area of the stomach and the area where normal cells are located, therefore, by performing region growing on the pixel points in the edge image whose gradient values are greater than the preset gradient, the multiple first connected regions obtained 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 regions.

[0037] In step S102, according to the area of the minimum bounding rectangle of the first connected region and the number of edge pixel points in the first connected region, determine the probability value that the boundary of the first connected region belongs to the boundary of the lesion area, and use the boundary pixel points of the first connected region with a probability value greater than the preset probability as target pixel points.

[0038] In the endoscopic image of the stomach, compared with the normal tissue cells of the stomach, the blood vessels in the lesion areas such as cancerous cells in the stomach may be disordered, distorted, or abnormally dilated, making the lesion areas show stronger diffusivity in the grayscale image of the endoscopic image, the edges of the lesion areas in the grayscale image have stronger extensibility, and the length of the edges 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 region belongs to the boundary of the lesion area can be determined by combining the area of the minimum bounding rectangle of the first connected region and the number of edge pixel points in the first connected region.

[0039] The larger the area of the minimum circumscribed rectangle of the first connected region, or the more the number of edge pixel points in the first connected region, the greater the probability that the boundary of the first connected region belongs to the boundary of the lesion region in the grayscale image, which helps to determine the location of the lesion region in the grayscale image.

[0040] In one embodiment, determining the probability value that the boundary of the first connected region belongs to the boundary of the lesion region according to the area of the minimum circumscribed rectangle of the first connected region and the number of edge pixel points in the first connected region includes: normalizing the area of the minimum circumscribed rectangle of the first connected region to obtain a first normalized value, and normalizing the number of edge pixel points in the first connected region to obtain a second normalized value; taking the product of the first normalized value and the second normalized value as the probability value that the boundary of the first connected region belongs to the boundary of the lesion region.

[0041] By normalizing the area of the minimum circumscribed rectangle of the first connected region, the areas of the minimum circumscribed rectangles of different connected regions can be made comparable; by normalizing the number of edge pixel points in the first connected region, the connected regions with different numbers of edge pixel points can be made comparable.

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

[0043] The preset probability can be between 0.7 and 0.8. Since the probability value corresponding to the first connected region can represent the probability that the first connected region belongs to the boundary of the lesion region, taking the boundary pixel points of the first connected region with a probability value greater than the preset probability as target pixel points can achieve the screening of the boundary of the lesion region in the grayscale image, so as to determine the lesion region in the grayscale image of the endoscopic image of the stomach.

[0044] In step S103, taking the smallest region in the edge image that contains all target pixel points as the candidate lesion region, and determining the suspected lesion region corresponding to the candidate lesion region in the grayscale image, so as to take the smallest gray value in the suspected lesion region as the initial segmentation threshold.

[0045] Since the selected target pixel points are the pixel points located at the boundary of the lesion region, and the pixel points at the boundary of the lesion region are located inside the lesion region or outside the lesion region, therefore, the smallest region in the edge image that contains all target pixel points can be taken as the candidate lesion region.

[0046] The 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.

[0047] The probability that the suspected lesion area in the grayscale image belongs to the actual lesion area of the stomach is higher than that of other areas in the grayscale image except the suspected lesion area.

[0048] 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 as to use the initial segmentation threshold 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 according to the results of the multiple segmentations.

[0049] In step S104, starting from the initial segmentation threshold, multiple binary images are obtained by performing binary segmentation on the suspected lesion area using a segmentation threshold that increases by a preset grayscale value, and the target lesion area is determined according to the difference degree of the newly added pixel points in the discreteness characteristics between adjacent binary images.

[0050] 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 colors of the pixel points in the lesion area of the endoscopic image of the stomach may be more diverse and the shapes may be more complex. Therefore, the grayscales of the pixel points in the lesion area of the grayscale image may be more diverse and the shapes may be more complex. According to this characteristic that the grayscales of the pixel points in the lesion area of the grayscale image may be more diverse and the shapes may be more complex, the further determination of the suspected lesion area can be realized.

[0051] Since the grayscales of the pixel points in the lesion area of the grayscale image may be more diverse and the shapes may be more complex, if the suspected lesion area is the actual lesion area in the grayscale image of the stomach, when the suspected lesion area is segmented using different thresholds respectively, there are certain differences between the segmentation images obtained in adjacent segmentation processes. The determination of the suspected lesion area can be realized according to the differences between the segmentation images obtained in adjacent segmentation processes.

[0052] In one embodiment, multiple binary images are obtained by performing binary segmentation on the suspected lesion area using a segmentation threshold that increases by a preset grayscale value, including: performing binary segmentation on the suspected lesion area using the initial segmentation threshold to obtain a binary image; in the case of completing the previous binary segmentation process, increasing the segmentation threshold by the preset grayscale value on the basis of the previous binary segmentation, and performing binary segmentation on the suspected lesion area using the increased segmentation threshold to obtain the binary image corresponding to the next binary segmentation process; in the case that the binary segmentation process meets the preset cut-off condition, stop increasing the segmentation threshold, and obtain multiple binary images corresponding to multiple binary segmentation processes.

[0053] For example, when the initial segmentation threshold is 80, the preset gray level can be set to 10, and the segmentation thresholds adopted for different binary segmentation processes of the suspected lesion area are successively: 80, 90, 100, 110, 120, 130, 140, etc.

[0054] By increasing the threshold adopted for binary segmentation, and thus using different segmentation thresholds with an interval of the preset gray level to perform multiple segmentations on the suspected lesion area respectively, the suspected lesion features of the suspected lesion area at different gray levels can be captured, and the recognition of the more superficial lesion areas in the suspected lesion area can be achieved, so as to more accurately determine whether the suspected lesion area is the actual lesion area of the stomach.

[0055] The binary segmentation process of the suspected lesion area starts from the initial segmentation threshold. The initial segmentation threshold is equal to the minimum gray value in the suspected lesion area. In the binary image obtained by performing binary segmentation on the suspected lesion area with the initial segmentation threshold, all the pixel points in the suspected lesion area are included. Therefore, starting the binary segmentation of the suspected lesion area from the initial segmentation threshold can avoid the waste of the binary segmentation process as much as possible and improve the efficiency of the multiple binary segmentation processes of the suspected lesion area.

[0056] For example, when the minimum gray value in the suspected lesion area is 80, it means that the gray values of all pixel points in the suspected lesion area are greater than or equal to 80. When using the threshold of 80 to perform binary segmentation on the suspected lesion area, the area where the suspected lesion area is located can be completely retained in the obtained binary image.

[0057] When the minimum gray value in the suspected lesion area is 80, if the starting segmentation threshold for binary segmentation of the suspected lesion area is 60 and the preset gray level is 10, then the suspected lesion area will be segmented according to the two thresholds of 60 and 70 respectively. Since the minimum gray value in the suspected lesion area is 80, the two binary images corresponding to the two thresholds of 60 and 70 are the same as the two binary images corresponding to the threshold of 80, resulting in a waste of computing resources in the binary segmentation processes corresponding to the two thresholds of 60 and 70, which is not conducive to improving the segmentation efficiency of the suspected lesion area.

[0058] Furthermore, in the embodiments of the present application, the target lesion area is determined according to the difference degree of the discrete features of the newly added pixel points 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 difference degree of the discrete features of the newly added pixel points between adjacent binary images, thereby affecting the determined target lesion area. Therefore, starting from the initial segmentation threshold to perform binary segmentation on the suspected lesion area helps to more accurately determine whether the suspected lesion area belongs to the actual lesion area of the stomach.

[0059] In this way, by using the segmentation threshold of increasing the preset gray level to perform binary segmentation on the suspected lesion area to obtain multiple binary images, it is convenient to analyze the features of the suspected lesion area under different segmentation thresholds, so as to determine whether the suspected lesion area belongs to the actual lesion area of the stomach.

[0060] In one embodiment, the preset cut-off condition includes at least one of the following: the multiple binary images corresponding to multiple binary segmentation processes are greater than or equal to a preset quantity; the segmentation threshold obtained after increasing the preset gray level is greater than or equal to a preset segmentation threshold.

[0061] The preset segmentation threshold is greater than the initial segmentation threshold. For example, the preset segmentation threshold can be a gray value (such as 220) that is larger than the pixel points in the gray image, so as to stop the binary segmentation when the number of binary segmentation times reaches a certain number; the preset quantity can be set according to actual needs. For example, the preset quantity can be an integer between 8 and 12.

[0062] By setting the cut-off condition for increasing the threshold when segmenting the suspected lesion area, it is possible to prevent the details caused by over-segmenting the suspected lesion area from being misidentified as lesions, and it is also possible to avoid missing the lesions caused by under-segmenting the suspected lesion area.

[0063] In one embodiment, determining the target lesion area according to the difference degree of the discrete features of the newly added pixel points between adjacent binary images includes: determining the outlier of the endoscopic image according to the difference degree of the discrete features of the newly added pixel points between adjacent binary images; in the case where the outlier is greater than or equal to a preset threshold, outputting the suspected lesion area as the target lesion area.

[0064] The outlier of the endoscopic image is used to characterize the difference degree of the discreteness characteristics of the newly added pixel points between adjacent binary images; the greater the difference degree of the discreteness characteristics of the newly added pixel points between adjacent binary images, the greater the outlier of the endoscopic image; on the contrary, the smaller the difference degree of the discreteness characteristics of the newly added pixel points between adjacent binary images, the smaller the outlier of the endoscopic image.

[0065] Compared with the normal tissue cells in the stomach, the cells in the diseased areas such as gastric cancer have stronger diffusibility, and the colors of the cells in the diseased areas such as gastric cancer are more diverse. Therefore, compared with the normal tissue cells in the stomach, the cells in the diseased areas such as gastric cancer show stronger discreteness of the pixel points with gray values within the same gray range in the gray-scale image, and the difference degree between the discretenesses corresponding to different gray ranges is greater.

[0066] For example, when the initial segmentation threshold is 80 and the preset gray value is 10, the suspected diseased area can be segmented according to 80, 90, 100, 110, 120, 130, and 140 respectively to obtain 7 binary images under different segmentation thresholds. Since the corresponding segmentation thresholds of different binary images are different, and the suspected diseased area usually includes multiple gray levels, there are newly added pixel points between adjacent two binary images.

[0067] Since in the binary image, the pixel points with gray values greater than or equal to the threshold in the image to be segmented are set as white pixel points with a gray value equal to 255, and the pixel points with gray values less than the threshold in the image to be segmented are set as black pixel points with a gray value equal to 0, the area of the white pixel points included in the binary image with a segmentation threshold of 80 is greater than or equal to the area of the white pixel points included in the binary image with a segmentation threshold of 90.

[0068] In the binary image with a segmentation threshold of 80, there may be white pixel points that do not exist in the binary image with a segmentation threshold of 90. The white pixel points 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 the newly added pixel points of the segmentation threshold 80 relative to the segmentation threshold 90. Through the discreteness characteristics of these newly added pixel points, the characteristics of the cells with gray values between 80 and 90 in the suspected diseased area can be determined, so as to distinguish the diseased area from the normal tissue cells in the gray-scale image.

[0069] Since the differences in the discreteness corresponding to different gray - scale ranges among the cells in the diseased areas such as gastric cancer are greater, it is possible to determine whether the suspected diseased area conforms to the characteristic that the differences in the discreteness corresponding to different gray - scale ranges in the diseased area are greater based on the changes in adjacent segmentation processes during the multiple binary threshold segmentations of the suspected diseased area, so as to determine whether the suspected area is the actual diseased area of the stomach.

[0070] When the outlier is greater than or equal to the preset threshold, it indicates that the difference in the discreteness characteristics of the newly added pixel points between adjacent binary images is relatively large, and the obtained suspected diseased area is more in line with the characteristics of the diseased area. Therefore, it can be determined that the suspected diseased area belongs to the actual diseased area in the gray - scale image of the stomach, and the suspected diseased area can be output as the target diseased area.

[0071] In this way, by determining the outlier of the endoscopic image according to the difference in the discreteness characteristics of the newly added pixel points between adjacent binary images, it is possible to determine whether the suspected diseased area belongs to the actual diseased area in the gray - scale image of the stomach. Thus, when it is determined that the suspected diseased area belongs to the actual diseased area in the gray - scale image of the stomach, the suspected diseased area is output as the target diseased area.

[0072] In one embodiment, determining the target diseased area according to the difference in the discreteness characteristics of the newly added pixel points between adjacent binary images includes: determining the outlier of the endoscopic image according to the difference in the discreteness characteristics of the newly added pixel points between adjacent binary images; when the outlier is less than the preset threshold, outputting the all - black image as the target diseased area.

[0073] Since the outlier of the endoscopic image is used to characterize the difference in the discreteness characteristics of the newly added pixel points between adjacent binary images, when the outlier is less than the preset threshold, it indicates that the suspected diseased area does not conform to the characteristic of strong discreteness of the diseased area, and the all - black image can be output as the target diseased area.

[0074] Alternatively, when the outlier is less than the preset threshold, a prompt message can be output, and the prompt message can be used to prompt that no diseased area is recognized from the gray - scale image.

[0075] In one embodiment, determining outliers in an endoscopic image according to the difference degree of the newly added pixel points between adjacent binarized images in terms of discrete features includes: for a target binarized image among multiple binarized images, determining the newly added pixel points of the target binarized image relative to the previous binarized image; the newly added pixel points are the pixel points that are white in the target binarized image and black in the previous binarized image of the target binarized image; determining the discrete feature value of the newly added pixel points corresponding to the target binarized image, and taking the average value of the difference information of the discrete feature values between adjacent binarized images as the outlier of the endoscopic image.

[0076] The discrete feature value is used to characterize the discrete degree of the newly added pixel points corresponding to the target binarized image. Since the cell surfaces in lesion areas such as gastric cancer may be smooth or rough, and there may be erosion, ulcer, necrosis, bleeding, and stromal reaction, etc., compared with normal tissue cells, the differences in the shapes of different cells in the lesion area are greater, and the irregularity degree of the cells in the lesion area is higher.

[0077] The difference information of the discrete feature values between adjacent binarized images can be equal to the absolute value of the difference of the discrete feature values between adjacent binarized images; the greater the difference information of the discrete feature values between adjacent binarized images among multiple binarized images, the higher the difference degree of the discreteness of the pixel points obtained under different segmentation thresholds in the suspected lesion area, and the more the suspected lesion area conforms to the characteristics of the actual lesion area.

[0078] In this way, taking the average value of the difference information of the discrete feature values between adjacent binarized images as the outlier of the endoscopic image helps to determine the lesion area from the grayscale image according to the outlier.

[0079] In one embodiment, the discrete feature value of the newly added pixel points is determined according to the number of the newly added pixel points and the average distance from the newly added pixel points to the specified position points in the grayscale image; wherein, the specified position points are determined in the following way: determining multiple second connected regions in the suspected lesion area, and taking the center of the second connected region as the specified position point; the centers of different second connected regions respectively correspond to different specified position points.

[0080] The connected region detection can be performed on the suspected lesion area to obtain multiple second connected regions. For example, the number of the second connected regions corresponding to the suspected lesion area can be 4. For these 4 second connected regions, 4 specified position points can be obtained, and different specified position points respectively correspond to the centers of different second connected regions.

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

[0082] For example, the new pixel points corresponding to the segmentation threshold 90 can be 6 pixel points P1, P2, P3, P4, P5, and P6. Four specified position points L1, L2, L3, and L4 can be determined in advance in the grayscale image. The new pixel points P1 and P2 can be within the neighborhood range of the specified position point L1, the new pixel point P3 can be within the neighborhood range of the specified position point L2, the new pixel points P4 and P5 can be within the neighborhood range of the specified position point L3, and the new pixel point P6 can be within the neighborhood range of the specified position point L4.

[0083] All new pixel points are within the neighborhood range of the corresponding specified position point, or the specified position point with the closest distance can be regarded as the specified position point to which the new pixel point belongs.

[0084] The average value of the distances from the new pixel points P1 and P2 to the specified position point L1 can be determined. The greater the distance from the new pixel points within the neighborhood range of the specified position point L1 to the specified position point L1, the more dispersed the new pixel points within the neighborhood range of the specified position point L1 are; the larger the number of new pixel points within the neighborhood range of the specified position point L1, the more concentrated the new pixel points within the neighborhood range of the specified position point L1 are.

[0085] The dispersion characteristics of the new pixel points within the neighborhood range of the specified position point can be determined according to the number of new pixel points within the neighborhood range of the specified position point and the distances from the new pixel points within the neighborhood range of the specified position point to the specified position point, so as to determine the characteristic changes of the suspected lesion area under adjacent segmentation thresholds according to the dispersion characteristics of the new pixel points within the neighborhood ranges of different specified position points, and to determine whether the suspected lesion area conforms to the characteristics of the lesion area.

[0086] In a possible implementation manner, the discreteness characteristic value of the new pixel points corresponding to the B-th segmentation threshold , where T is the number of specified position points and norm is a normalization processing function; The average distance from the new pixel point corresponding to the b-th specified position point among the multiple new pixel points corresponding to the B-th segmentation threshold to the b-th specified position point; The number of new pixel points corresponding to the b-th specified position point among the multiple new pixel points corresponding to the B-th segmentation threshold.

[0087] 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.

[0088] 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.

[0089] 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.

[0090] 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.

[0091] 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.

[0092] 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.

[0093] Other embodiments of the present application will be readily apparent to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. The present application is intended to cover any variations, uses, or adaptations of the present application, which follow the general principles of the present application and include known common general knowledge or conventional technical means in the technical field not disclosed in the present application. The specification and examples are only regarded as exemplary.

[0094] It should be understood that the present application is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope.

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 segmentation threshold with increasing preset grayscale to obtain multiple binary images, and the target lesion area is determined according to the difference degree of the discrete features of the newly added pixels between adjacent binary images; The target lesion area is determined according to the difference in discrete features of the newly added pixels between adjacent binary images, 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; Determine the discrete characteristic value of the newly added pixel points corresponding to the target binary image, and use the average value of the difference information of the adjacent binary images on the discrete characteristic value as the abnormal value of the endoscopic image; the difference information of the adjacent binary images on the discrete characteristic value is equal to the absolute value of the difference value of the adjacent binary images on the discrete characteristic value; the discrete characteristic value of the newly added pixel points is determined according to 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: determine multiple second connected domains in the suspected lesion area, and use the center of the second connected domain as the designated position point; the centers of different second connected domains correspond to different designated position points respectively; When the abnormal value is greater than or equal to the preset threshold, the suspected lesion area is output as the target lesion area; When the outlier value is less than the preset threshold, the completely black image is output as the target lesion area.

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 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.

6. 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 method for intelligent optimization of endoscopic images according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

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

    CN113034426A

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

    CN117557568A