Ear drum lesion area segmentation system based on ear canal endoscope image
By acquiring tympanic membrane images under different light source angles, and using connected component analysis and clustering algorithms to filter noise and identify grayscale distribution features, the problem of identification errors for tympanic membrane calcifications and cholesteatomas was solved, and high-precision segmentation of the lesion area was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-04
- Publication Date
- 2026-03-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In existing technologies, there are errors in the identification of tympanic membrane calcifications and cholesteatomas, resulting in poor accuracy in the segmentation of lesion areas, especially in complex intraocular environments and under reflective conditions.
By acquiring tympanic membrane images under different light source angles, connected component analysis and clustering algorithms are used to filter out noisy connected components. Based on grayscale distribution and shape features, cholesteatoma and calcification areas are segmented, and overlapping areas are identified to improve segmentation accuracy.
Accurately identify the area of cholesteatoma covered by calcification, optimize the segmentation of the lesion area, reduce the possibility of missed diagnosis, and improve segmentation accuracy.
Smart Images

Figure CN121661073A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of region segmentation technology, and specifically to a system for segmenting tympanic membrane lesion regions based on endoscopic images of the ear canal. Background Technology
[0002] An otoscope allows for a clear view of the inner ear through the narrow and long ear canal. It can detect lesions such as tympanic membrane calcification and cholesteatoma. Tympanic membrane calcification forms a white spot in the pars tensa of the tympanic membrane, which is the central transparent membrane. Cholesteatoma, on the other hand, usually occurs in the tympanic cavity behind the tympanic membrane. Both can affect hearing and, in severe cases, can even damage brain function. Accurate analysis of the lesions is necessary.
[0003] In existing technologies, calcified leukoplakia in the tympanic membrane region covers the cholesteatoma behind it. The cholesteatoma and calcified plaque need to be distinguished by temporal bone CT. However, in practice, due to the complex intraocular environment and the reflection generated by external light sources on smooth areas, it is difficult to distinguish between the two lesions with similar colors. The cholesteatoma that is not identified or that is to be covered is still considered as a calcified plaque. There is an error in identifying whether the calcified plaque covers the cholesteatoma, and the accuracy of lesion area segmentation is poor. Summary of the Invention
[0004] To address the technical problems of errors in identifying whether calcifications cover cholesteatomas and the poor accuracy of lesion area segmentation, the present invention aims to provide a tympanic membrane lesion area segmentation system based on endoscopic images of the ear canal. The specific technical solution adopted is as follows: This invention proposes a system for segmenting tympanic membrane lesion regions based on endoscopic images of the ear canal, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it performs the following steps: Acquire consecutive frame images of the tympanic membrane containing the lesion area under different light source angles, with each light source angle corresponding to one frame of tympanic membrane image; For any frame of tympanic membrane image, multiple connected components of the lesion area are obtained; based on the shape characteristics of different connected components and the gray-level distribution of pixels, the noisy connected components are filtered out. Other connected regions outside the noise connected regions are taken as target connected regions. The gray-level dispersion of each target connected region is obtained based on the gray-level distribution of pixels in each target connected region. Based on the gray-level dispersion of different target connected regions, all target connected regions are clustered to obtain cholesteatoma connected region clusters and calcification plaque connected region clusters. Based on the positional distribution of connected domains between the cholesteatoma connected domain cluster and the calcification patch connected domain cluster, as well as the grayscale distribution of pixels within the calcification patch connected domain in different frames, the overlapping region between the calcification patch connected domain cluster and the cholesteatoma connected domain cluster is obtained, and region segmentation is performed.
[0005] Furthermore, the method for obtaining the connected components includes: Obtain the edge lines of the lesion area, and treat the closed region formed by all adjacent edge lines as a connected region.
[0006] Furthermore, the method for obtaining the noisy connected component includes: The noise level of each connected component is obtained based on its shape features and the grayscale distribution of the pixels. Obtain the average noise level of all connected components as the overall noise level; if the noise level of a connected component is greater than the overall noise level, the corresponding connected component is designated as the noisy connected component.
[0007] Furthermore, the method for obtaining the noise level includes: For any connected component, obtain the average gray value of all pixels within the connected component as the overall gray level; The noise level of the corresponding connected region is obtained based on the number of edge pixels in the corresponding connected region, the gray level difference between the preset maximum gray level and the overall gray level, and the number of edge pixels and the gray level difference are negatively correlated with the noise level.
[0008] Furthermore, the method for obtaining the grayscale dispersion includes: For any target connected region, the degree of grayscale value fluctuation of different pixels is obtained as the grayscale dispersion of each target connected region.
[0009] Furthermore, the method for obtaining the cholesteatoma connected domain cluster and the calcification plaque connected domain cluster includes: Based on the gray-level dispersion of different target connected components, K-means clustering is performed on all target connected components to obtain two connected component clusters; The mean gray-level dispersion of all target connected components in each connected component cluster is obtained as the overall dispersion level. The cluster of connected domains with the highest overall discreteness is taken as the cholesteatoma cluster, and the cluster of connected domains with the lowest overall discreteness is taken as the calcification plaque cluster.
[0010] Furthermore, the method for obtaining the overlapping region includes: Based on the positional distribution of connected domains between the cholesteatoma connected domain cluster and the calcification patch connected domain cluster, and the grayscale distribution of pixels within the calcification patch connected domain in different frames, the coverage confidence of each pixel within the calcification patch connected domain is obtained. Each coverage confidence is used as a coverage threshold. If the coverage confidence of a pixel is greater than the coverage threshold, the corresponding pixel is used as a covered pixel. The gray-level dispersion of the overlapping area formed by the covered pixels is obtained as the coverage roughness. The mean gray-level dispersion of the connected region of the calcification spot is obtained as the calcification roughness. The square of the difference between the coverage roughness and calcification roughness corresponding to each coverage confidence level is obtained and normalized to serve as the coverage roughness deviation for each coverage confidence level. If the coverage confidence level corresponds to a coverage coarseness deviation greater than a preset deviation threshold, the coverage confidence level is taken as the target coverage confidence level; the region formed by all coverage pixels corresponding to the target confidence level is taken as the overlapping region.
[0011] Furthermore, the method for obtaining the coverage confidence level includes: If there is an intersection between the connected domain clusters of cholesteatoma and calcification patch, the relative distance between each pixel in the connected domain of calcification patch and the centroid of the region formed by the intersecting pixels is obtained as the deviation coefficient of each pixel in the connected domain of calcification patch. The associated pixels of each pixel in the connected domain of the calcified spot are obtained in different frames based on the optical flow field; the coverage confidence of each pixel in the connected domain of the calcified spot is obtained based on the deviation coefficient of different pixels in the connected domain of the calcified spot and the gray level difference of associated pixels between adjacent frames. If there is no intersection between the connected domain clusters of cholesteatoma and calcification, the coverage confidence of the corresponding pixels in the connected domain of calcification is set to 0.
[0012] Furthermore, the method for obtaining the coverage confidence level includes: For the connected region of calcified spots, select the maximum deviation coefficient among all pixels to obtain the deviation coefficient of each pixel and the deviation ratio of the maximum deviation coefficient; calculate the difference between the positive integer 1 and the deviation ratio as the first confidence coefficient; The cumulative value of the squared grayscale difference between related pixels of each pixel in different adjacent frames is obtained. The maximum value of the cumulative value of all pixels is selected, and the ratio of the cumulative value of each pixel to the maximum value of the cumulative value is calculated as the second confidence coefficient. The product of the first confidence coefficient and the second confidence coefficient is used as the coverage confidence level.
[0013] Furthermore, the preset deviation threshold is 0.7.
[0014] The present invention has the following beneficial effects: This invention considers that the lesion area includes not only cholesteatoma and calcification areas, but also some noise areas caused by reflection, thus obtaining multiple connected regions of the lesion area. Based on the shape characteristics of different connected regions and the grayscale distribution of pixels, noisy connected regions are selected to avoid the influence of noise generated by reflection on subsequent analysis. Considering that calcification spots have a flat surface texture and uniform pixel value distribution, while cholesteatoma surfaces are relatively rough and have a more discrete pixel value distribution, other connected regions outside the noisy connected regions are used as target connected regions. Based on the grayscale distribution of pixels within each target connected region, the following is obtained: The gray-level dispersion of each target connected component is analyzed. Based on the gray-level dispersion of different target connected components, all target connected components are clustered to obtain cholesteatoma connected component clusters and calcification patch connected component clusters. Clusters with similar gray-level distribution features are then formed to initially distinguish between lipoma and calcification patch regions. Based on the positional distribution of connected components between the cholesteatoma and calcification patch connected component clusters, and the gray-level distribution of pixels within the calcification patch connected component in different frames, the overlapping region between the calcification patch and cholesteatoma connected component clusters is obtained. This accurately extracts the region where calcification patches cover cholesteatoma, optimizing the segmentation effect. This invention improves the accuracy of region segmentation by accurately identifying the region where calcification patches overlap with lipomas. Attached Figure Description
[0015] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 A flowchart illustrating an implementation method for a tympanic membrane lesion region segmentation system based on endoscopic images of the ear canal, as provided in one embodiment of the present invention; Figure 2 A flowchart illustrating a method for obtaining an overlapping region according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the intersection of connected domains provided in one embodiment of the present invention. Detailed Implementation
[0017] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a tympanic membrane lesion region segmentation system based on endoscopic images of the ear canal proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0018] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0019] The following description, in conjunction with the accompanying drawings, details a specific scheme for a tympanic membrane lesion region segmentation system based on endoscopic images of the ear canal provided by the present invention.
[0020] Please see Figure 1 The diagram illustrates a flowchart of an implementation method for a tympanic membrane lesion region segmentation system based on endoscopic images of the ear canal, according to an embodiment of the present invention. The method specifically includes: Step S1: Obtain consecutive frame images of the tympanic membrane containing the lesion area under different light source angles, with each light source angle corresponding to one frame of tympanic membrane image.
[0021] In an embodiment of the present invention, considering that external light sources reflect light when illuminating smooth areas, making it difficult to distinguish lesions of similar color, it is necessary to analyze the grayscale of multiple frames of tympanic membrane images under different light sources. First, an otoscope is used to acquire images, ensuring that the lens is perpendicular to the tympanic membrane area, and the position of the light source is continuously changed to acquire multiple frames of tympanic membrane images; then, continuous frames of tympanic membrane images containing the lesion area are acquired under different light source angles, with each light source angle corresponding to one frame of tympanic membrane image.
[0022] It should be noted that, in order to facilitate subsequent image processing, the acquired tympanic membrane image was subjected to bilateral filter denoising, and the denoised image was then grayscaled and exponentially transformed to make the contrast between the larger and smaller grayscale parts more obvious and enhance the details of the bright parts. The specific methods are well known to those skilled in the art and will not be described in detail here.
[0023] It should be noted that, in one embodiment of the present invention, the method for obtaining the lesion area includes: The Otsu's method was used to process the exponentially transformed endoscopic images to obtain the lesion region and the background region. The mean gray value of all pixels in the lesion region was greater than the mean gray value of all pixels in the background region.
[0024] It should be noted that finding a threshold for the maximum inter-class variance to maximize the difference between the foreground and background after segmentation is a technique well-known to those skilled in the art and will not be elaborated here.
[0025] Step S2: For any frame of tympanic membrane image, obtain multiple connected regions of the lesion area; based on the shape characteristics of different connected regions and the gray-level distribution of pixels, filter out the noise connected regions.
[0026] For any frame of tympanic membrane image, the lesion area is analyzed. Considering that the lesion area also contains some bright noise areas caused by reflection, and although cholesteatoma and calcification are similar in color, calcification is flat on the tympanic membrane area, while cholesteatoma has a certain volume and will form a shadow area under external light source, therefore, for any frame of tympanic membrane image, multiple connected components of the lesion area are obtained. It should be noted that, in one embodiment of the present invention, the method for obtaining connected components includes: The CANNY algorithm is used to obtain the edge lines of the lesion area, and the closed region formed by all adjacent edge lines is taken as the connected region.
[0027] It should be noted that the CANNY algorithm is a well-known technique in the field and will not be elaborated upon here.
[0028] Cholesteatomas mostly occur behind the tympanic membrane. By the time they can be observed with an otoscope, they are no longer in the early stages, and at this time, the cholesteatoma occupies a large proportion of the image. Calcifications, on the other hand, are formed due to the self-repair of damage to the tympanic membrane area and are usually secondary to chronic, extensive middle otitis media. Therefore, the area of calcifications is also relatively large. Since any slight undulation or unevenness on a curved surface will change the direction of light reflection, some of the bright noise areas caused by reflection form discontinuous, small highlight points with small connected areas and poor continuity. Therefore, based on the shape characteristics of different connected regions and the grayscale distribution of pixels, noise connected regions are screened out.
[0029] Preferably, in one embodiment of the present invention, the method for obtaining the noisy connected component includes: The noise level of each connected component is obtained based on its shape features and the grayscale distribution of the pixels. Preferably, in one embodiment of the present invention, the method for obtaining the noise level includes: For any connected component, obtain the average gray value of all pixels within the connected component as the overall gray level; The noise level of the corresponding connected region is obtained based on the number of edge pixels in the corresponding connected region, the gray level difference between the preset maximum gray level and the overall gray level, and the number of edge pixels and the gray level difference are negatively correlated with the noise level.
[0030] It should be noted that, in the embodiments of the present invention, the preset maximum grayscale value is 255; the number of edge pixels reflects the length characteristics of the edge of the connected domain. The more edge pixels there are, the longer the edge length, the greater the edge continuity, the larger the area formed, and the less likely it is to be a noise area; the overall grayscale level reflects the brightness within the connected domain. The larger the overall grayscale level, the closer it is to the preset maximum grayscale value, the greater the brightness within the connected domain, the more likely it is to be a reflective area, and the greater the noise level. Therefore, the number of edge pixels and the grayscale difference are both negatively correlated with the noise level.
[0031] In one embodiment of the present invention, the number of edge pixels in each connected domain is normalized, that is, the average number of edge pixels in all connected domains is obtained, and the ratio of the number of edge pixels in each connected domain to the average number is calculated to represent the normalization of the number of edge pixels. This reflects the proportion of the edge length of the connected domain relative to the overall situation. The smaller the ratio, the smaller the trend relative to the overall situation, the more likely it is to be a reflective area, and the greater the noise level. The square of the grayscale difference between the preset maximum grayscale value and the overall grayscale level is used as the degree of grayscale deviation. The smaller the degree of grayscale deviation, the closer the overall grayscale level is to the preset maximum grayscale value, the greater the brightness, the greater the possibility of it being a reflective area, and the greater the noise level. The sum of the ratio result and the gray-level deviation is obtained and negatively correlated to represent the noise level of each connected component. Therefore, based on the above basic mathematical operations, the correlation between the number of edge pixels and the gray-level difference and the noise level is constructed. That is, the smaller the number of edge pixels, the smaller the gray-level difference, and the greater the noise level.
[0032] It should be noted that, in the embodiments of the present invention, negative correlation mapping is performed by taking the reciprocal or by using an exponential function with the natural constant as the base. When taking the reciprocal, in order to avoid the formula being meaningless with a denominator of 0, a threshold, such as 0.01, is artificially added to the denominator. The specific means are well known to those skilled in the art and will not be described in detail here.
[0033] Based on the above description, the greater the noise level, the more likely it is to be a noise region caused by reflection. Therefore, the average noise level of all connected regions is obtained as the overall noise level. If the noise level of a connected region is greater than the overall noise level, the corresponding connected region is taken as the noise connected region.
[0034] Step S3: Take the other connected regions outside the noise connected regions as target connected regions, and obtain the gray-level dispersion of each target connected region based on the gray-level distribution of pixels in each target connected region; based on the gray-level dispersion of different target connected regions, cluster all target connected regions to obtain cholesteatoma connected region clusters and calcification plaque connected region clusters.
[0035] Considering the complex environment of the ear canal, the flat surface texture of calcified spots, and the uniform distribution of gray values of pixels; cholesteatomas often present as tofu-like substances in the initial stage of outward spread, with a rougher surface and more discrete gray value distribution. Therefore, by analyzing the gray value distribution of pixels within connected regions, we can reflect the gray value uniformity and consistency of the region and quantify the gray value dispersion. Other connected regions outside the noise connected regions are taken as target connected regions, and the gray value dispersion of each target connected region is obtained based on the gray value distribution of pixels within each target connected region.
[0036] Preferably, in one embodiment of the present invention, the method for obtaining grayscale dispersion includes: For any target connected region, the degree of grayscale value fluctuation of different pixels is obtained as the grayscale dispersion of each target connected region.
[0037] It should be noted that, in one embodiment of the present invention, the degree of grayscale fluctuation is reflected by calculating the variance. The larger the variance, the greater the degree of fluctuation, the more uneven the grayscale distribution, and the more discrete the distribution. The smaller the variance, the smaller the degree of fluctuation, and the more uniform the grayscale distribution. In other embodiments of the present invention, the degree of fluctuation can also be reflected by calculating the standard deviation. The specific means are well known to those skilled in the art and will not be described in detail here.
[0038] Gray-level dispersion reflects the texture of connected components. The larger the gray-level dispersion, the coarser the texture, and the more likely it is to be a cholesteatoma; the smaller the gray-level dispersion, the flatter the texture, and the more likely it is to be a calcification. By clustering, target connected components with similar gray-level dispersion can be classified into a group, allowing for targeted analysis of each part. Based on the gray-level dispersion of different target connected components, all target connected components are clustered to obtain cholesteatoma connected component clusters and calcification connected component clusters.
[0039] Preferably, in one embodiment of the present invention, the method for obtaining the cholesteatoma connected domain cluster and the calcification plaque connected domain cluster includes: Based on the gray-level dispersion of different target connected components, K-means clustering is performed on all target connected components to obtain two connected component clusters; The mean gray-level dispersion of all target connected components in each connected component cluster is obtained as the overall dispersion level. The cluster of connected domains with the highest overall discreteness is taken as the cholesteatoma cluster, and the cluster of connected domains with the lowest overall discreteness is taken as the calcification plaque cluster.
[0040] It should be noted that K-means makes the gray-level dispersion of connected regions within the same cluster similar to each other, while the gray-level dispersion of connected regions within different clusters varies greatly. Considering that the lesion area includes cholesteatoma and calcification, as well as some bright noise areas caused by reflection, the remaining connected regions are classified by filtering out the noise areas. In one embodiment of the present invention, K is set to 2. The specific means are well known to those skilled in the art and will not be described in detail here.
[0041] Step S4: Based on the positional distribution of connected domains between the cholesteatoma connected domain cluster and the calcification patch connected domain cluster, and the grayscale distribution of pixels within the calcification patch connected domain in different frames, obtain the overlapping region between the calcification patch connected domain cluster and the cholesteatoma connected domain cluster, and perform region segmentation.
[0042] When calcification areas cover cholesteatoma areas, there may be shared edges that diffuse into the interior of the calcification areas, resulting in three-dimensional features that were not present in the original calcification areas. Under illumination, these areas form shadow regions and the texture becomes rough. The grayscale values of these regions vary relatively greatly across multiple frames under different lighting angles. Therefore, based on the positional distribution of connected domains between the cholesteatoma and calcification clusters, as well as the grayscale distribution of pixels within the connected domains of calcification areas in different frames, the overlapping region between the calcification and cholesteatoma clusters can be obtained.
[0043] Preferably, in one embodiment of the present invention, the method for obtaining the overlapping region is described in [reference needed]. Figure 2 It shows a flowchart of a method for obtaining overlapping regions, including: Step S201: Based on the positional distribution of connected domains between the cholesteatoma connected domain cluster and the calcification patch connected domain cluster, and the grayscale distribution of pixels within the calcification patch connected domain in different frames, obtain the coverage confidence of each pixel within the calcification patch connected domain.
[0044] Preferably, considering that when calcified plaques cover cholesteatoma areas, the surface of the area is uneven, and the grayscale change of the same pixel in multiple frames under different illumination angles is greater than that in relatively flat images, and the closer the distance, the greater the coverage will occur if affected. In one embodiment of the present invention, the method for obtaining the coverage confidence includes: If there is an intersection between the connected domain clusters of cholesteatoma and calcification patch, the relative distance between each pixel in the connected domain of calcification patch and the centroid of the region formed by the intersecting pixels is obtained as the deviation coefficient of each pixel in the connected domain of calcification patch. It should be noted that, in the embodiments of the present invention, intersecting connected components means that at least one pixel belongs to two connected components simultaneously, such as... Figure 3It shows a schematic diagram of the intersection of connected regions, where A and B refer to the connected regions of cholesteatoma and calcification, and the arrow segments indicate the intersection positions. The centroid is obtained by calculating the average coordinates of all intersecting pixels, and the relative distance is obtained by Euclidean distance or Manhattan distance calculation methods. The specific methods are well known to those skilled in the art and will not be described in detail here.
[0045] The associated pixels of each pixel in the connected domain of the calcified spot are obtained in different frames based on the optical flow field; the coverage confidence of each pixel in the connected domain of the calcified spot is obtained based on the deviation coefficient of different pixels in the connected domain of the calcified spot and the gray level difference of associated pixels between adjacent frames.
[0046] It should be noted that optical flow analysis can match and track pixels in consecutive frames of an image, describing the dynamic trend of the position change of each pixel between consecutive frames, and representing the motion of the same pixel in consecutive frames. Optical flow is a well-known technique in the art and will not be elaborated here.
[0047] It should be noted that, in the embodiments of the present invention, the difference represents the absolute value of the difference.
[0048] It should be noted that the larger the deviation coefficient, the greater the relative distance between each pixel in the calcified patch connected region and the centroid of the region formed by intersecting pixels, the less close they are to the intersecting region, and the lower the probability of coverage; the greater the grayscale difference between related pixels in adjacent frames, the greater the grayscale difference between different frames, and the greater the probability of coverage; in one embodiment of the present invention, for the calcified patch connected region, the maximum deviation coefficient among all pixels is selected to obtain the deviation coefficient of each pixel and the deviation ratio of the maximum deviation coefficient; the difference between the positive integer 1 and the deviation ratio is calculated as the first confidence coefficient; The cumulative value of the squared grayscale difference between related pixels of each pixel in different adjacent frames is obtained. The maximum value of the cumulative value of all pixels is selected, and the ratio of the cumulative value of each pixel to the maximum value of the cumulative value is calculated as the second confidence coefficient. The product of the first confidence coefficient and the second confidence coefficient is obtained as the coverage confidence. Therefore, based on the above basic mathematical operations, the deviation coefficient and the correlation between gray-level difference and coverage confidence are constructed. That is, the larger the deviation coefficient, the smaller the gray-level difference, and the smaller the coverage confidence.
[0049] If there is no intersection between the connected domain clusters of cholesteatoma and calcification, the coverage confidence of the corresponding pixels in the connected domain of calcification is set to 0.
[0050] Step S202: Treat each coverage confidence as a coverage threshold. If the coverage confidence of a pixel is greater than the coverage threshold, treat the corresponding pixel as a covered pixel. Obtain the gray-level dispersion of the overlapping area formed by the covered pixels as the coverage roughness. Obtain the mean gray-level dispersion of the connected region of the calcification spot as the calcification roughness.
[0051] It should be noted that the grayscale dispersion of the overlapping region is obtained according to the grayscale dispersion acquisition method in step S3, that is, the degree of grayscale value fluctuation of different pixels in the overlapping region is obtained to obtain the grayscale dispersion.
[0052] The mean value is used to obtain the overall gray-level dispersion in all connected domains of calcified spots, reflecting the baseline gray-level distribution in the connected domains of calcified spots, which can be used for subsequent comparison.
[0053] Step S203: Obtain the square of the difference between the coverage roughness and calcification roughness corresponding to each coverage confidence level, and normalize it to obtain the coverage roughness deviation level for each coverage confidence level.
[0054] The larger the square of the difference between the roughness of the covering and the roughness of the calcification, the less the roughness of the covering is close to the roughness of the calcification, the more inconsistent it is with the flatness of the calcification patch area, and the greater the deviation of the roughness of the covering.
[0055] It should be noted that, in the embodiments of the present invention, normalization is performed using linear normalization or a normalization function, such as... The specific methods for converting function values to the range [0,1] are well-known to those skilled in the art and will not be elaborated here.
[0056] Step S204: If the coverage coarseness deviation of the coverage confidence is greater than the preset deviation threshold, the corresponding coverage confidence is taken as the target coverage confidence; the region formed by the coverage pixels corresponding to all target confidences is taken as the overlapping region.
[0057] The greater the deviation in roughness, the more inconsistent the roughness of the overlapping area is with that of the calcified area. The more the pixels in the calcified area deviate from the roughness of the reference, the more likely it is to be an overlapping area.
[0058] It should be noted that, in one embodiment of the present invention, the preset deviation threshold is set to 0.7; in other embodiments of the present invention, the size of the preset deviation threshold can be set according to specific circumstances, and will not be limited or elaborated here.
[0059] Based on this, after obtaining the overlapping area, region segmentation is performed to obtain the special region of calcified plaque covering lipoma in the calcified plaque connected domain, so as to more accurately distinguish and segment different characteristic regions. Further analysis is performed using temporal bone CT to reduce the possibility of missed diagnosis.
[0060] In summary, this invention obtains multiple connected components in the lesion region; based on the shape characteristics of different connected components and the grayscale distribution of pixels, noisy connected components are selected; other connected components outside the noisy connected components are taken as target connected components, and the grayscale dispersion of each target connected component is obtained based on the grayscale distribution of pixels within each target connected component; based on the grayscale dispersion of different target connected components, cholesteatoma connected component clusters and calcification plaque connected component clusters are obtained; based on the positional distribution of connected components between the cholesteatoma connected component cluster and the calcification plaque connected component cluster, and the grayscale distribution of pixels within the calcification plaque connected component in different frames, the overlapping region between the calcification plaque connected component cluster and the cholesteatoma connected component cluster is obtained, and region segmentation is performed. This invention improves the accuracy of region segmentation by accurately identifying the region where calcification plaques overlap with lipomas.
[0061] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0062] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
Claims
1. A system for segmenting tympanic membrane lesion regions based on endoscopic images of the ear canal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it performs the following steps: Acquire consecutive frame images of the tympanic membrane containing the lesion area under different light source angles, with each light source angle corresponding to one frame of tympanic membrane image; For any frame of tympanic membrane image, multiple connected components of the lesion area are obtained; based on the shape characteristics of different connected components and the gray-level distribution of pixels, the noisy connected components are filtered out. Other connected regions outside the noise connected regions are taken as target connected regions. The gray-level dispersion of each target connected region is obtained based on the gray-level distribution of pixels in each target connected region. Based on the gray-level dispersion of different target connected regions, all target connected regions are clustered to obtain cholesteatoma connected region clusters and calcification plaque connected region clusters. Based on the positional distribution of connected domains between the cholesteatoma connected domain cluster and the calcification patch connected domain cluster, as well as the grayscale distribution of pixels within the calcification patch connected domain in different frames, the overlapping region between the calcification patch connected domain cluster and the cholesteatoma connected domain cluster is obtained, and region segmentation is performed.
2. The tympanic membrane lesion region segmentation system based on endoscopic images of the ear canal according to claim 1, characterized in that, The method for obtaining the connected components includes: Obtain the edge lines of the lesion area, and treat the closed region formed by all adjacent edge lines as a connected region.
3. The tympanic membrane lesion region segmentation system based on endoscopic images of the ear canal according to claim 1, characterized in that, The method for obtaining the noise connected component includes: The noise level of each connected component is obtained based on its shape features and the grayscale distribution of the pixels. Obtain the average noise level of all connected components as the overall noise level; if the noise level of a connected component is greater than the overall noise level, the corresponding connected component is designated as the noisy connected component.
4. The tympanic membrane lesion region segmentation system based on endoscopic images of the ear canal according to claim 3, characterized in that, The method for obtaining the noise level includes: For any connected component, obtain the average gray value of all pixels within the connected component as the overall gray level; The noise level of the corresponding connected region is obtained based on the number of edge pixels in the corresponding connected region, the gray level difference between the preset maximum gray level and the overall gray level, and the number of edge pixels and the gray level difference are negatively correlated with the noise level.
5. A system for segmenting tympanic membrane lesions based on endoscopic images of the ear canal according to claim 1, characterized in that, The method for obtaining the grayscale dispersion includes: For any target connected region, the degree of grayscale value fluctuation of different pixels is obtained as the grayscale dispersion of each target connected region.
6. The tympanic membrane lesion region segmentation system based on endoscopic images of the ear canal according to claim 1, characterized in that, The methods for obtaining the cholesteatoma connected domain clusters and calcification plaque connected domain clusters include: Based on the gray-level dispersion of different target connected components, K-means clustering is performed on all target connected components to obtain two connected component clusters; The mean gray-level dispersion of all target connected components in each connected component cluster is obtained as the overall dispersion level. The cluster of connected domains with the highest overall discreteness is taken as the cholesteatoma cluster, and the cluster of connected domains with the lowest overall discreteness is taken as the calcification plaque cluster.
7. A system for segmenting tympanic membrane lesions based on endoscopic images of the ear canal according to claim 1, characterized in that, The method for obtaining the overlapping region includes: Based on the positional distribution of connected domains between the cholesteatoma connected domain cluster and the calcification patch connected domain cluster, and the grayscale distribution of pixels within the calcification patch connected domain in different frames, the coverage confidence of each pixel within the calcification patch connected domain is obtained. Each coverage confidence is used as a coverage threshold. If the coverage confidence of a pixel is greater than the coverage threshold, the corresponding pixel is used as a covered pixel. The gray-level dispersion of the overlapping area formed by the covered pixels is obtained as the coverage roughness. The mean gray-level dispersion of the connected region of the calcification spot is obtained as the calcification roughness. The square of the difference between the coverage roughness and calcification roughness corresponding to each coverage confidence level is obtained and normalized to serve as the coverage roughness deviation for each coverage confidence level. If the coverage confidence level corresponds to a coverage coarseness deviation greater than a preset deviation threshold, the coverage confidence level is taken as the target coverage confidence level; the region formed by all coverage pixels corresponding to the target confidence level is taken as the overlapping region.
8. A system for segmenting tympanic membrane lesions based on endoscopic images of the ear canal according to claim 7, characterized in that, The method for obtaining the coverage confidence includes: If there is an intersection between the connected domain clusters of cholesteatoma and calcification patch, the relative distance between each pixel in the connected domain of calcification patch and the centroid of the region formed by the intersecting pixels is obtained as the deviation coefficient of each pixel in the connected domain of calcification patch. The associated pixels of each pixel in the connected domain of the calcified spot are obtained in different frames based on the optical flow field; the coverage confidence of each pixel in the connected domain of the calcified spot is obtained based on the deviation coefficient of different pixels in the connected domain of the calcified spot and the gray level difference of associated pixels between adjacent frames. If there is no intersection between the connected domain clusters of cholesteatoma and calcification, the coverage confidence of the corresponding pixels in the connected domain of calcification is set to 0.
9. A system for segmenting tympanic membrane lesions based on endoscopic images of the ear canal according to claim 8, characterized in that, The method for obtaining the coverage confidence includes: For the connected region of calcified spots, select the maximum deviation coefficient among all pixels to obtain the deviation coefficient of each pixel and the deviation ratio of the maximum deviation coefficient; calculate the difference between the positive integer 1 and the deviation ratio as the first confidence coefficient; The cumulative value of the squared grayscale difference between related pixels of each pixel in different adjacent frames is obtained. The maximum value of the cumulative value of all pixels is selected, and the ratio of the cumulative value of each pixel to the maximum value of the cumulative value is calculated as the second confidence coefficient. The product of the first confidence coefficient and the second confidence coefficient is used as the coverage confidence level.
10. A system for segmenting tympanic membrane lesions based on endoscopic images of the ear canal according to claim 7, characterized in that, The preset deviation threshold is 0.7.