Meibomian gland duct state analysis system based on image recognition

By enhancing the contrast and texture analysis of meibomian gland duct images, and combining multi-scale segmentation and boundary optimization, the misjudgment problem in duct state analysis in existing technologies has been solved, achieving clear segmentation and accurate identification of duct structures.

CN120823638AInactive Publication Date: 2025-10-21HUAXIA EYE HOSPITAL GROUP HENGSHUI TONGRUI EYE HOSPITAL CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510903678.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-01
Publication Date
2025-10-21
Estimated Expiration
Not applicable · inactive patent

Smart Images

  • Figure CN120823638A_ABST
    Figure CN120823638A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of medical image recognition, in particular to a meibomian gland duct state analysis system based on image recognition, which comprises a meibomian gland duct enhancement module, a duct opening positioning module, a texture and structure fusion module, a multi-scale segmentation module and a boundary optimization module. According to the method, by screening background interference pixels and enhancing the image contrast of the catheter area, the identifiability of the catheter structure can be remarkably improved, the positioning accuracy of the catheter opening point is improved, feature fusion is achieved by extracting the area gray difference and combining the texture contrast distribution, and the overall presentation definition of the catheter lesion area is enhanced; by setting multi-scale segmentation parameters and extracting region feature point information, the boundary reduction degree and segmentation integrity of a catheter region are improved, edge adjustment is performed by calling boundary pixel gradient data, the expression effect of key information in a catheter image is enhanced in the whole process, the image support degree of pathological judgment is improved, and the accuracy of pathological judgment is improved. And the judgment difficulty caused by non-uniform image quality is relieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of medical image recognition, and in particular to a meibomian gland duct state analysis system based on image recognition. Background Art

[0002] The field of medical image recognition technology involves the use of image processing and analysis methods to identify, classify, and assist in the interpretation of medical image data. Core issues include image acquisition, image preprocessing, feature extraction, and recognition and classification. This technology is widely used in medical scenarios such as disease screening, diagnostic assistance, and postoperative evaluation, aiming to improve the efficiency and accuracy of medical image interpretation. Research in this field focuses on how to accurately extract the structural features of target tissues from two-dimensional or three-dimensional medical images to assist clinicians in determining the severity of lesions. The methods used include specific image analysis methods such as image-based edge detection, texture analysis, morphological analysis, and statistical modeling. Among them, traditional meibomian gland duct status analysis systems acquire high-resolution images of localized eyelid regions to identify and analyze the meibomian gland duct structure to determine whether the ducts are in pathological conditions such as blockage and atrophy. Traditional methods use optical imaging equipment to acquire eyelid images, then process the images using grayscale feature extraction methods, combined with morphological analysis methods to determine the number and distribution of duct openings. Some studies have also used gradient variation features to locate duct contours to infer duct patency.

[0003] Existing technologies that rely on grayscale features for catheter identification are limited by the influence of image background interference, and are prone to structural misjudgment when tissue contrast is unclear. The accuracy of judging the catheter opening status based on morphological analysis and grayscale contours is insufficient under low-contrast conditions. The inference of patency based on gradient change characteristics is easily affected by image noise, and it is difficult to accurately identify the catheter boundary when there is tissue overlap or local blur. If the edges of the catheter area are unclear or the texture features are weakened, the traditional methods have ambiguous judgment basis when identifying catheter occlusion or atrophy, resulting in missed diagnosis or misjudgment. In scenarios with high-density catheter distribution, due to the limited ability of the recognition algorithm to separate structural features, the problem of confusion of multiple catheter contours is prone to occur, resulting in uncertainty in the diagnostic basis. Summary of the Invention

[0004] In order to solve the technical problems existing in the prior art, the embodiment of the present invention provides a meibomian gland duct status analysis system based on image recognition. The technical solution is as follows: In one aspect, a meibomian gland duct status analysis system based on image recognition is provided, the system comprising: The meibomian gland duct enhancement module, based on the eyelid image data, calls the color channel information of the duct area, filters the background interference pixels, sets the image sharpening parameters, adjusts the filter kernel, and obtains the enhanced meibomian gland duct image data; The duct opening positioning module extracts texture information of pixels in the duct area based on the enhanced meibomian gland duct image data, calculates local connectivity statistics, screens a set of candidate duct opening pixels, and generates a duct opening positioning matrix; The texture and structure fusion module extracts the contrast values ​​of the pixels in the catheter area based on the catheter opening positioning matrix, calculates the weight values ​​of the local texture features, determines the weighted distribution of the global area, and obtains a fused catheter state distribution data set; The multi-scale segmentation module extracts the grayscale variation amplitude of the duct area feature points based on the fused duct state distribution data set, sets image segmentation parameters, adjusts the segmentation threshold, and obtains the meibomian gland duct segmentation area mapping value.

[0005] As a further solution of the present invention, the enhanced meibomian gland duct image data includes a sharpened image, a filtered image, and a denoised image; the duct opening positioning matrix includes the distribution of candidate pixels of the duct opening, local connectivity statistics, and the duct area texture gradient; the fused duct state distribution dataset includes local texture feature weight values, duct area pixel contrast, duct area pixel entropy values, and global area weighted distribution; the meibomian gland duct segmentation area mapping value includes image segmentation parameters, a set of candidate pixels of the duct area, and a segmentation threshold.

[0006] As a further embodiment of the present invention, the meibomian gland duct enhancement module includes: The background interference screening submodule uses the color channel information of the duct area based on the eyelid image data, analyzes the pixel texture change rate, and screens the background interference data according to connectivity to obtain a set of background interference pixels. The background noise analysis submodule analyzes the color distribution data of the pixels based on the background interference pixel set, analyzes the color offset in the color channel, identifies the background noise intensity based on the offset distribution, analyzes the distribution range of the background interference pixel points, and obtains the background noise distribution value; The filter kernel adjustment submodule calls the background noise distribution value, calculates the filter kernel sharpening parameters, matches the convolution parameters, analyzes the effect of the filter kernel in the eyelid image convolution processing, and obtains enhanced meibomian gland duct image data.

[0007] As a further solution of the present invention, the filter kernel sharpening parameter adopts the formula: ; in, represents the filter kernel sharpening parameter, Represents the total number of pixels in the filter kernel, Represents the first The gray value of a pixel, Represents the average grayscale value of the pixels in the filter kernel, Represents the sharpness adjustment coefficient, Represents the total number of pixels in the eyelid image area, Represents the eyelid image area The gray value of a pixel, Represents the average grayscale value of pixels in the eyelid image area.

[0008] As a further solution of the present invention, the catheter opening positioning module includes: The duct texture analysis submodule obtains the enhanced meibomian gland duct image data and extracts pixel points in the duct area, analyzes texture information of the pixel points, identifies local connectivity statistics, and obtains duct area texture values; The conduit edge connectivity analysis submodule analyzes the edge connectivity distribution of the conduit region based on the conduit region texture value to obtain a conduit edge connectivity coefficient; The duct opening screening submodule screens duct opening candidate points based on the duct edge connectivity coefficient, combined with the duct area texture value, connectivity coefficient and duct area density, and generates a duct opening positioning matrix.

[0009] As a further solution of the present invention, the texture and structure fusion module includes: The texture feature acquisition submodule obtains the catheter opening positioning matrix, constructs a pixel-level contrast map based on the grayscale of the catheter area pixels, extracts local grayscale differences, calculates local contrast and neighborhood entropy values ​​to reflect the information distribution difference, and calculates the local texture weight value; The global weighted calculation submodule combines the local texture weight value and the pixel distribution of the catheter area, extracts the texture response information, performs normalization processing, constructs a catheter area weighted response model, and accumulates pixel responses and assembles feature vectors based on it to generate a fused catheter state distribution dataset.

[0010] As a further solution of the present invention, the multi-scale segmentation module includes: The catheter region feature recognition submodule extracts the texture density value and grayscale variation amplitude of the catheter region feature points based on the fused catheter state distribution dataset, calls the spatial coordinate information of the feature points, calculates the distribution uniformity of the feature points in the local catheter, and eliminates feature points with excessive distribution dispersion to obtain a set of filtered feature points. The image segmentation parameter setting submodule calls the screened feature point set, calculates the mean spatial distance between feature points, identifies the distribution density, adjusts the parameter range to match the image resolution, and obtains the segmentation parameter value; The segmentation threshold adjustment submodule extracts candidate pixels based on the segmentation parameter value, analyzes the grayscale change rate and texture gradient, sets and adjusts the segmentation threshold according to the relationship between the texture gradient and the grayscale change rate, and obtains the meibomian gland duct segmentation area mapping value.

[0011] As a further solution of the present invention, the distribution uniformity of the characteristic points in the local catheter is calculated using the formula: ; in, Indicates the distribution uniformity of feature points in the local catheter, Represents the number of feature points involved in the calculation, Representative The spatial coordinate values ​​of the feature points, Represents the mean of the spatial coordinates of the feature points.

[0012] As a further solution of the present invention, the system also includes a boundary optimization module: The boundary optimization module calls the gradient distribution data of the duct boundary pixel points based on the meibomian gland duct segmentation region mapping value, adjusts the duct region segmentation boundary, and obtains an optimized meibomian gland duct segmentation result; The optimized meibomian gland duct segmentation result includes the duct area segmentation boundary, the gradient distribution of duct boundary pixel points, and the segmentation area edge contrast change rate.

[0013] As a further solution of the present invention, the boundary optimization module includes: The boundary gradient calculation submodule extracts the gradient distribution data of the boundary pixel points based on the meibomian gland duct segmentation area mapping value, calculates the gradient change, calls the edge contrast change rate, analyzes the relationship between the gradient change and the contrast change rate, and filters the boundary pixel points whose change exceeds the set range to obtain a set of abnormal boundary pixel points; The segmentation boundary adjustment submodule calls the abnormal boundary pixel point set, adjusts the segmentation boundary, corrects the position of the boundary pixel points, and obtains an optimized meibomian gland duct segmentation result.

[0014] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least: By filtering background interference pixels and enhancing the contrast of the catheter area image, the recognizability of the catheter structure can be significantly improved. By analyzing the texture and connectivity features of the catheter area, the positioning accuracy of the catheter opening point is improved. By extracting regional grayscale differences and combining them with texture contrast distribution to achieve feature fusion, the overall clarity of the catheter lesion area is enhanced. By setting multi-scale segmentation parameters and extracting regional feature point information, the boundary restoration and segmentation integrity of the catheter area are improved. By calling the boundary pixel gradient data for edge adjustment, the catheter segmentation contour is made to better fit the actual structural morphology. The overall process strengthens the expression effect of key information in the catheter image, improves the image support for pathological judgment, and alleviates the judgment difficulties caused by uneven image quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0016] Figure 1 is a schematic diagram of a meibomian gland duct status analysis system based on image recognition provided by an embodiment of the present invention; Figure 2 Schematic diagram of the system framework of the present invention; Figure 3 This is a flow chart of the meibomian gland duct enhancement module in the present invention; Figure 4 This is a flow chart of the catheter opening positioning module in the present invention; Figure 5 This is a flow chart of the texture and structure fusion module in the present invention; Figure 6 This is a flow chart of the multi-scale segmentation module in the present invention; Figure 7 This is a flow chart of the boundary optimization module in the present invention. DETAILED DESCRIPTION

[0017] The technical solution of the present invention is described below in conjunction with the accompanying drawings.

[0018] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as an "exemplary" in the present invention should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of the word "exemplary" is intended to present concepts in a concrete manner. Furthermore, in the embodiments of the present invention, "and / or" can mean both or either of the two.

[0019] In the embodiments of the present invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, when the distinction is not emphasized, the meanings they convey are the same. The terms "of," "corresponding," and "corresponding" may sometimes be used interchangeably. It should be noted that, when the distinction is not emphasized, the meanings they convey are the same.

[0020] In the embodiments of the present invention, sometimes a subscript such as W1 may be written as a non-subscript such as W1. When the difference is not emphasized, the meanings to be expressed are the same.

[0021] In order to make the technical problems, technical solutions and advantages to be solved by the present invention clearer, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.

[0022] The embodiment of the present invention provides a meibomian gland duct status analysis system based on image recognition, such as Figure 1-2 The schematic diagram of the meibomian gland duct status analysis system based on image recognition is shown, and the system includes: The meibomian gland duct enhancement module, based on the eyelid image data, calls the color channel information of the duct area, filters the background interference pixels, sets the image sharpening parameters, adjusts the filter kernel, and obtains the enhanced meibomian gland duct image data; The duct opening location module is based on the enhanced meibomian gland duct image data, extracts the texture information of the duct area pixels, calculates the local connectivity statistics, screens the duct opening candidate pixel set, and generates the duct opening location matrix; The texture and structure fusion module extracts the contrast values ​​of the pixels in the catheter area based on the catheter opening positioning matrix, calculates the weight values ​​of the local texture features, determines the weighted distribution of the global area, and obtains the fused catheter state distribution dataset; The multi-scale segmentation module extracts the grayscale variation amplitude of the characteristic points in the duct area based on the fused duct state distribution dataset, sets the image segmentation parameters, adjusts the segmentation threshold, and obtains the meibomian gland duct segmentation area mapping value; The boundary optimization module calls the gradient distribution data of the duct boundary pixel points based on the meibomian gland duct segmentation area mapping value, adjusts the duct area segmentation boundary, and obtains the optimized meibomian gland duct segmentation result.

[0023] The enhanced meibomian gland duct image data includes sharpened images, filtered images, and denoised images. The duct opening positioning matrix includes the distribution of candidate pixels of the duct opening, local connectivity statistics, and duct area texture gradients. The fused duct state distribution dataset includes local texture feature weights, duct area pixel contrast, duct area pixel entropy, and global area weighted distribution. The meibomian gland duct segmentation area mapping values ​​include image segmentation parameters, duct area candidate pixel set, and segmentation threshold. The tuned meibomian gland duct segmentation results include the duct area segmentation boundary, duct boundary pixel gradient distribution, and segmentation area edge contrast change rate.

[0024] Specifically, if Figure 2 、 3 As shown, the Meibomian Gland Duct Enhancement Module includes: The background interference screening submodule uses the color channel information of the duct area based on the eyelid image data, analyzes the pixel texture change rate, and screens the background interference data according to connectivity to obtain a set of background interference pixels. Based on the collected eyelid image data, for example, in clinical examination, an infrared meibomian gland imager is used to obtain a meibomian gland image with a resolution of 1920x1080 pixels. The image data contains all pixel information of the eyelid area. The background interference screening submodule calls the color channel information of the duct area in the image data. Specifically, for the image in RGB color mode, the R, G, and B channel values ​​of the duct area pixels are extracted. For example, for a certain pixel point (x, y), its R value is 120, G value is 100, and B value is 90. The pixel texture change rate is analyzed by calculating the standard deviation of the local pixel grayscale value and the average grayscale value. For example, in a 3x3 local area, if the pixel grayscale standard deviation is greater than 20% of the average grayscale value, it is considered that the texture change rate is high. Background interference data is filtered according to connectivity, that is, the connectivity is determined by judging whether the grayscale value difference between adjacent pixels exceeds a preset threshold. If the difference is less than 5, it is considered connected. In this way, background pixels that are not connected to the catheter area are identified and eliminated. For example, when the grayscale value differences of 5 consecutive pixels are all within 5, they are identified as the same connected area. Finally, a background interference pixel set is obtained, which contains the coordinates and color information of all pixels identified as background interference in the image.

[0025] The background noise analysis submodule analyzes the color distribution data of the pixels based on the background interference pixel set, analyzes the color offset within the color channel, identifies the background noise intensity based on the offset distribution, analyzes the distribution range of the background interference pixels, and obtains the background noise distribution value; Based on a set of background interference pixels, for example, a data set containing 1000 background interference pixels, the color distribution data of the pixels is analyzed. Specifically, the frequency distribution of the R, G, and B color channel values ​​of all pixels in the set is statistically analyzed. For example, on the R channel, the number of pixels with pixel values ​​of 150-160 is 200. The color offset in the color channel is analyzed, which is determined by calculating the absolute difference between the pixel value in each color channel and the average value of the channel. For example, if the average value of the R channel is 140 and the R value of a pixel is 150, the offset is 10. The background noise intensity is identified based on the offset distribution, that is, the number of pixels with color offsets in different intervals is statistically analyzed. If more than 60% of the pixel offsets are greater than 20, it is considered that the noise intensity is high, and this is used to judge The strength of the background noise can be determined. For example, after analyzing the color offset distribution of the three channels R, G, and B, it is found that the average offset of the R channel is 25, the G channel is 15, and the B channel is 10, indicating that the noise intensity of the R channel is the highest. The distribution range of the background interference pixels is analyzed, and the spatial range of the background interference pixels in the image is determined by calculating the maximum and minimum values ​​of the coordinates of all pixel points in the background interference pixel set. For example, the minimum x coordinate in the set is 10, the maximum x coordinate is 1900, the minimum y coordinate is 50, and the maximum y coordinate is 1000. Finally, the background noise distribution value is obtained. For example, through a comprehensive evaluation of the background noise intensity and distribution range, a normalized value is obtained, ranging from 0 to 1, which represents the overall level of background noise, and 0.8 represents a higher level of background noise.

[0026] The filter kernel adjustment submodule calls the background noise distribution value, calculates the filter kernel sharpening parameters, matches the convolution parameters, analyzes the effect of the filter kernel in the eyelid image convolution processing, and obtains the enhanced meibomian gland duct image data; The filter kernel sharpening parameter uses the formula: ; in, represents the filter kernel sharpening parameter, Represents the total number of pixels in the filter kernel, Represents the first The gray value of a pixel, Represents the average grayscale value of the pixels in the filter kernel, Represents the sharpness adjustment coefficient, Represents the total number of pixels in the eyelid image area, Represents the eyelid image area The gray value of a pixel, Represents the average grayscale value of pixels in the eyelid image area; The background noise distribution value is called, such as 0.8 obtained by the above calculation, and the filter kernel sharpening parameter is calculated. The calculation method is shown in the formula, matching the convolution parameters. Specifically, according to the calculated sharpening parameter R, the size and weight of the convolution kernel are adjusted. For example, if the R value is high, a larger convolution kernel (such as 5x5 instead of 3x3) is selected to enhance the sharpening effect, while increasing the weight of the central pixel. The effect of the filter kernel in the convolution processing of the eyelid image is analyzed, that is, by applying the adjusted filter kernel to the duct area of ​​the eyelid image, the image clarity, contrast, texture detail and other indicators are evaluated. For example, by calculating the variance of the grayscale histogram distribution of the image, the larger the variance, the higher the image contrast. Finally, enhanced meibomian gland duct image data is obtained, which has higher duct clarity and lower background noise. For example, the gradient value of the duct edge in the image is increased from an average of 15 before processing to an average of 30 after processing.

[0027] In this formula, R represents the filter kernel sharpening parameter, which is used to quantify the degree of enhancement of image details by the filter kernel; N represents the total number of pixels in the filter kernel. For example, for a 3x3 filter kernel, N is equal to 9. Represents the grayscale value of the i-th pixel in the filter kernel. For example, in a certain filter kernel, the grayscale value of a certain pixel is 120; Represents the average grayscale value of the pixels in the filter kernel, for example, the average grayscale value of all pixels in a 3x3 filter kernel; Represents the sharpness adjustment coefficient, which is used to control the sharpening strength. For example, its value range is 0.1 to 2.0, and the default is 1.0. M represents the total number of pixels in the eyelid image area. For example, for an image area of ​​100x100 pixels, M is equal to 10000. Represents the grayscale value of the jth pixel in the eyelid image area. For example, the grayscale value of a pixel in the image is 80; Represents the average grayscale value of the pixels in the eyelid image area, for example, the average grayscale value of all pixels in the image area.

[0028] The operation logic of this formula is to calculate the ratio of the discrete degree of the grayscale value of the pixel inside the filter kernel (the numerator, that is, the variance of the grayscale value of the pixel inside the filter kernel) to the discrete degree of the grayscale value of the pixel in the eyelid image area (the denominator, that is, the variance of the grayscale value of the pixel in the eyelid image area), and then multiply it by the sharpness adjustment coefficient. The purpose is to adaptively adjust the sharpening strength of the filter kernel according to the texture complexity and noise level of the image itself. When the texture changes more drastically in the image area, that is, the denominator value is larger, the R value tends to become smaller to avoid excessive sharpening and noise amplification. Conversely, when the grayscale changes inside the filter kernel are greater, that is, the numerator value is larger, the R value tends to become larger to enhance details. To calculate the R value, first determine the filter kernel parameters. Assume that a 3x3 filter kernel is used, that is, N=9. The grayscale value of the filter kernel is set to: According to the above filter kernel, the grayscale value of each pixel in the filter kernel is: The average grayscale value of the pixels in the filter kernel Calculated as: ; Variance of pixel grayscale values ​​in the filter kernel Calculated as: ; Consider the eyelid image area. Assuming that a duct area of ​​50x50 pixels is selected for analysis, then M=50*50=2500, and the grayscale values ​​of the pixels in this area are counted.

[0029] Table 1: Example of pixel grayscale value distribution in eyelid image region As shown in Table 1, the average gray value of the pixels in the eyelid image area is calculated by analyzing the gray values ​​of 2500 pixels in the area. , assuming that after calculation, The variance of pixel grayscale values ​​in the eyelid image area Assume that the variance of the pixel grayscale values ​​in this area is 125,000. Settings, The setting of the value needs to be verified through a lot of experiments to ensure that good sharpening effect can be achieved under different image qualities. The experimental process includes: selecting multiple groups of meibomian gland images of different qualities, such as clear, blurred, and with a lot of background noise, and setting different values ​​for each group of images. The image quality after sharpening is calculated and evaluated by setting values ​​(e.g. 0.5, 1.0, 1.5, 2.0). The evaluation indicators include image signal-to-noise ratio (SNR), edge sharpness index (such as Tenengrad gradient value), etc. Finally, the value that can achieve the best quality for most images is selected. Through multiple experiments, the value ; Substitute the above calculated values ​​into the formula: ; This R value indicates that, given the background noise and texture complexity of the current eyelid image, the filter kernel requires moderate sharpening adjustments. A smaller R value indicates that the texture information of the image region itself is relatively flat or the background noise is high. In this case, the sharpening intensity of the filter kernel needs to be carefully controlled to avoid over-sharpening. This sharpening parameter R will be used to guide further adjustments to the convolution kernel. For example, in convolution kernel design, the center weight factor is set to 1.0 + R to ensure that the filter kernel can accurately enhance the edge details of the duct. The benefit of the formula is that by considering the characteristics of the filter kernel itself and the actual pixel distribution differences in the eyelid image region, it achieves adaptive calculation of the filter kernel sharpening parameters, making the filter kernel adjustment more targeted, improving the quality of enhanced meibomian gland duct image data, and reducing image distortion caused by over-sharpening or under-sharpening.

[0030] Specifically, if Figure 2 、 4 As shown, the catheter opening positioning module includes: The duct texture analysis submodule acquires the enhanced meibomian gland duct image data and extracts the pixels of the duct area, analyzes the texture information of the pixels, identifies the local connectivity statistics, and obtains the texture value of the duct area; Enhanced meibomian gland duct image data is obtained, such as an enhanced image with a resolution of 1920x1080 pixels, and pixels in the duct area are extracted. For example, by setting a grayscale threshold, pixels with grayscale values ​​greater than 150 are identified as duct area pixels. The texture information of the pixels is analyzed. Specifically, the gray level co-occurrence matrix (GLCM) of each pixel in the duct area is calculated to obtain its texture feature values ​​such as contrast, energy, and homogeneity. For example, for a certain pixel, the contrast value of its GLCM is 0.8 and the energy value is 0.6. The local connectivity statistic is identified, that is, the connectivity between the pixel in the duct area and its eight neighboring pixels is calculated. For example, if the grayscale value difference between the central pixel and at least six neighboring pixels is less than 10, the local area is considered to have high connectivity. The number of connected pixels is counted to finally obtain the duct area texture value, which comprehensively reflects the texture details and local connectivity of the duct area. For example, a normalized value between 0 and 1, such as 0.9, indicates that the duct texture is clear and well connected.

[0031] The catheter edge connectivity analysis submodule analyzes the edge connectivity distribution of the catheter area based on the catheter area texture value and obtains the catheter edge connectivity coefficient; Based on the texture value of the catheter region, for example, 0.9 calculated above, the edge connectivity distribution of the catheter region is analyzed. Specifically, the Canny edge detection algorithm is first used to extract edge pixels in the catheter region, for example, setting a low threshold of 50 and a high threshold of 150. Then, the spatial distance and grayscale similarity between the edge pixels are calculated. For example, if the distance between two edge pixels is less than 5 pixels and the grayscale difference is less than 20, it is considered to have strong connectivity. The number and length of connected edge pixels are counted. For example, if more than 100 connected edges with a length greater than 20 pixels are counted, the catheter edge connectivity coefficient is finally obtained. This coefficient quantitatively evaluates the continuity and integrity of the catheter edge. For example, a value between 0 and 1, such as 0.8, indicates good catheter edge connectivity.

[0032] The duct opening screening submodule screens duct opening candidate points based on the duct edge connectivity coefficient, combined with the duct area texture value, connectivity coefficient and duct area density, and generates a duct opening positioning matrix; Based on the catheter edge connectivity coefficient (e.g., 0.8), combined with the catheter region texture value (e.g., 0.9), the connectivity coefficient (e.g., 0.8), and the catheter region density, which is determined by calculating the ratio of the number of catheter region pixels to the total number of pixels (e.g., if the catheter region pixels account for 20% of the total pixels, the density is 0.2), candidate catheter opening points are screened. Specifically, a series of rules are set. For example, if a local region has a catheter region texture value greater than 0.7, a catheter edge connectivity coefficient greater than 0.75, and a local catheter region density greater than 0.15, it is marked as a catheter opening candidate point. Morphological operations, such as erosion and dilation, are then combined to remove isolated points and fill small holes. For example, an erosion operation with a radius of 2 is first performed to remove small noise, followed by a dilation operation with a radius of 3 to connect broken areas. Finally, a catheter opening location matrix is ​​generated. This matrix is ​​represented as a binary image, in which pixels marked as 1 are the identified catheter opening locations. For example, a total of 500 pixels in the matrix are marked as 1.

[0033] Specifically, if Figure 2 、 5 As shown, the texture and structure fusion module includes: The texture feature acquisition submodule obtains the catheter opening positioning matrix, constructs a pixel-level contrast map based on the grayscale of the catheter area pixels, extracts local grayscale differences, calculates local contrast and neighborhood entropy values ​​to reflect the difference in information distribution, and calculates the local texture weight value; Obtain the catheter opening location matrix, for example, a binary matrix containing 500 pixels marked as 1, and construct a pixel-level contrast map based on the grayscale of the catheter area pixels. Specifically, traverse each catheter opening pixel marked as 1 in the location matrix, and with the pixel as the center, calculate the difference between the maximum grayscale value and the minimum grayscale value of the pixels in its 5x5 neighborhood to obtain the local contrast value of the pixel. For example, if the maximum grayscale value in the neighborhood of a pixel is 200 and the minimum grayscale value is 50, then the contrast is 150. Extract the local grayscale difference, which is determined by calculating the average grayscale difference between the central pixel and all pixels in the neighborhood. For example, calculate the grayscale difference of all pixels in the neighborhood. The average value of the pixel grayscale difference is 30, and the local contrast and neighborhood entropy are calculated. The neighborhood entropy reflects the distribution difference of the image information by calculating the Shannon entropy of the grayscale values ​​in the local 5x5 neighborhood. For example, if the grayscale values ​​in the neighborhood are evenly distributed, the entropy value is high. If the grayscale values ​​are concentrated, the entropy value is low. For example, the neighborhood entropy value of a certain pixel is 4.5, reflecting the difference in information distribution. Finally, the local texture weight value is calculated. This value is a normalized value between 0 and 1, which is used to measure the amount of texture information contained in each duct opening pixel. For example, it is obtained by weighted summation of local contrast, local grayscale difference and neighborhood entropy value, and the weight value is 0.75.

[0034] The global weighted calculation submodule combines the local texture weight value and the pixel distribution of the catheter area to extract the texture response information and perform normalization processing to construct a weighted response model of the catheter area. Based on this, it accumulates pixel responses and assembles feature vectors to generate a fused catheter state distribution dataset. Combined with the local texture weight value of 0.75 and the distribution of the pixels in the catheter area, that is, the spatial coordinate information of all the pixels marked as 1 in the catheter opening positioning matrix, the texture response information is extracted and normalized. It is done by accumulating all the local texture weight values ​​and then dividing each local texture weight value by the sum so that the sum of all weight values ​​is 1. For example, if the sum of all the local texture weight values ​​is 100 and a certain weight value is 0.75, then it is normalized to 0.0075. The catheter area weighted response model is constructed. The model maps the normalized local texture weight value to the corresponding catheter opening pixel position to form a representation. A two-dimensional weighted response map of texture information intensity is generated, and pixel response accumulation and feature vector assembly are performed based on this. Specifically, the weight value of each pixel in the weighted response map is added to its corresponding feature vector to form a multidimensional feature vector, where each dimension represents a specific texture feature. For example, the first dimension of the feature vector represents the contrast response, and the second dimension represents the entropy response. Finally, a fused catheter state distribution dataset is generated, which contains the texture feature vector and spatial position information of each catheter opening pixel. For example, a dataset contains 500 data entries, each entry contains pixel coordinates and the corresponding multidimensional feature vector.

[0035] Specifically, if Figure 2 、 6 As shown, the multi-scale segmentation module includes: The catheter region feature recognition submodule extracts the texture density value and grayscale variation amplitude of the catheter region feature points based on the fused catheter state distribution dataset, calls the spatial coordinate information of the feature points, calculates the distribution uniformity of the feature points in the local catheter, and eliminates feature points with excessive distribution dispersion to obtain a set of filtered feature points. The distribution uniformity of the feature points in the local catheter is calculated using the formula: ; in, Indicates the distribution uniformity of feature points in the local catheter, Represents the number of feature points involved in the calculation, Representative The spatial coordinate values ​​of the feature points, Represents the mean of the spatial coordinates of the feature points; Based on a fused catheter state distribution dataset, for example, a dataset containing 500 catheter opening pixels and their texture feature vectors, texture density values ​​and grayscale variation amplitudes of catheter region feature points are extracted. The texture density value is determined by calculating the average value of texture features in the local region of the feature point, for example, by calculating the average value of local texture weight values ​​in a 5x5 region surrounding each feature point. The grayscale variation amplitude is determined by calculating the difference between the maximum and minimum pixel grayscale values ​​in the local region of the feature point, for example, by calculating the range of grayscale values ​​in the 5x5 region surrounding each feature point. The spatial coordinate information of the feature points, for example, the (x, y) coordinates of each feature point in the image, is retrieved, and the distribution uniformity of the feature points in the local catheter is calculated. The calculation method is shown in the formula. Feature points with excessive distribution discreteness are eliminated. For example, if the distribution uniformity U is less than 0.05, the feature point is considered to be too discrete and is eliminated. Finally, a filtered feature point set is obtained, which contains uniformly distributed and representative catheter region feature points. For example, 450 feature points are filtered out of 500 feature points.

[0036] In this formula, U represents the distribution uniformity of feature points in the local catheter, which is used to quantify the degree of aggregation or dispersion of feature points in the local area; Q represents the number of feature points involved in the calculation. For example, in a 5x5 local area, Q is 25. Represents the spatial coordinate value of the mth feature point. For example, in a two-dimensional image, it can be the x-coordinate or y-coordinate of the feature point. Represents the mean of the spatial coordinates of the feature points, such as the average x-coordinates or the average y-coordinates of all feature points in a local area.

[0037] The operational logic of this formula is that by calculating the sum of the square differences between the spatial coordinates of all feature points in the local area and their average spatial coordinates, and then dividing it by the number of feature points Q, it is actually calculating the variance of the spatial coordinates of the feature points. Its purpose is to quantify the degree of dispersion of feature points in the local area. The smaller the variance, the more concentrated the distribution of feature points, that is, the higher the uniformity; the larger the variance, the more dispersed the distribution of feature points, that is, the lower the uniformity, which helps to identify and eliminate those isolated or irregularly distributed feature points, thereby improving the accuracy of subsequent image segmentation. The benefit of the formula is that by calculating the spatial distribution uniformity of feature points in the local area, it achieves the effective elimination of abnormally distributed feature points, improves the quality of the screened feature point set, provides a more reliable basis for subsequent image segmentation, and reduces the segmentation error introduced by discrete feature points; In order to calculate the U value, a local catheter area is selected, for example, a sub-area containing 5 feature points, that is, Q=5.

[0038] Table 2: Example of spatial coordinates of feature points in the local catheter area As shown in Table 2, the X coordinates of the feature points in the local area are calculated. To calculate the distribution uniformity of the X coordinates, first calculate the mean of the X coordinates of the feature points. : ; Then calculate : ; Finally calculate U: ; The U value indicates that the uniformity of the X-coordinate distribution of the feature points in this local area is 1.36. Assuming that the set distribution dispersion threshold is 2.0, since the calculated U value of 1.36 is less than the threshold 2.0, it indicates that the distribution of the feature points is relatively concentrated and does not exceed the dispersion range. Therefore, the feature points will be retained in the filtered feature point set. This result means that the distribution of feature points in this local area is sufficiently uniform and can be used for subsequent image segmentation, thereby improving the accuracy and reliability of segmentation.

[0039] The image segmentation parameter setting submodule calls and filters the feature point set, calculates the mean spatial distance between feature points, identifies the distribution density, adjusts the parameter range to match the image resolution, and obtains the segmentation parameter value; Call the filtered feature point set, for example, a set containing 450 feature points, and calculate the mean spatial distance between the feature points. This is determined by calculating the Euclidean distance between all adjacent feature points in the set and averaging the distances. For example, randomly select 100 pairs of adjacent feature points, calculate their distances, and then average them. Assume that the average distance is 15 pixels. Identify the distribution density, that is, judge the degree of clustering of feature points based on the mean spatial distance. For example, if the mean is less than 20 pixels, it is considered to be densely distributed. Adjust the parameter range to match the image resolution. Specifically, according to the image resolution (for example, 1920x1080 pixels), convert the calculated mean spatial distance into a ratio value relative to the overall image size. For example, if the image size is 1920 pixels and the average distance is 15 pixels, the ratio is 15 / 1920. This is used to adjust the parameter range used in the subsequent segmentation algorithm. For example, set the initial segmentation kernel size to 0.01 times the ratio. Finally, the segmentation parameter value is obtained, which includes the segmentation kernel size and number of iterations suitable for the current image resolution and feature point distribution. For example, the segmentation kernel size is 3x3 and the number of iterations is 50.

[0040] The segmentation threshold adjustment submodule extracts candidate pixels based on the segmentation parameter values, analyzes the grayscale change rate and texture gradient, sets and adjusts the segmentation threshold according to the relationship between texture gradient and grayscale change rate, and obtains the meibomian gland duct segmentation area mapping value; Based on the segmentation parameter value, for example, the segmentation kernel size is 3x3, the number of iterations is 50, and candidate pixels are extracted. Specifically, according to the segmentation parameter value, the region growing algorithm is used to start from each feature point in the screened feature point set and expand to its neighborhood, and the pixels whose grayscale value and texture similarity meet certain standards are identified as candidate pixels. For example, if the grayscale difference between adjacent pixels is less than 10 and the texture similarity is higher than 0.8, it is added to the candidate set, and the grayscale change rate and texture gradient are analyzed. The grayscale change rate is determined by calculating the difference between the grayscale values ​​of the candidate pixel and the pixels in its neighborhood. For example, the grayscale difference between a pixel and the pixel to its right is calculated, and the texture gradient is determined by calculating the Sobel or Prewitt operator in the local area around the candidate pixel. Determine, for example, calculate the gradient amplitude in the horizontal and vertical directions, set and adjust the segmentation threshold according to the relationship between the texture gradient and the grayscale change rate, specifically, by establishing a mapping relationship between the texture gradient and the grayscale change rate, for example, if the texture gradient is high and the grayscale change rate is large, it means that the area is the duct boundary, and a lower segmentation threshold is set (for example, pixels with a grayscale difference of less than 5) to more accurately capture the duct boundary. Conversely, if the texture gradient is low and the grayscale change rate is small, it means that the area is inside the duct, and a higher segmentation threshold is set (for example, pixels with a grayscale difference of less than 20), and finally obtain the meibomian gland duct segmentation area mapping value, which is a binary image, in which the area marked as 1 represents the identified meibomian gland duct area.

[0041] Specifically, if Figure 2 、 7 As shown, the boundary optimization module includes: The boundary gradient calculation submodule extracts the gradient distribution data of boundary pixels based on the mapping value of the meibomian gland duct segmentation area, calculates the gradient change, calls the edge contrast change rate, analyzes the relationship between the gradient change and the contrast change rate, and filters the boundary pixels whose changes exceed the set range to obtain the set of abnormal boundary pixels. Based on the meibomian gland duct segmentation area mapping value, for example, a binary image, where the duct area is marked as 1 and the background is marked as 0, the gradient distribution data of the boundary pixel points is extracted. Specifically, all the pixel points marked as 1 in the segmentation area mapping value are traversed, and the points with pixel points marked as 0 in their 8 neighborhoods are identified. The points are boundary pixels, and then the gradient values ​​of the boundary pixels in the original grayscale image are calculated. For example, the Prewitt operator is used to calculate the horizontal and vertical gradients of each boundary pixel point, and the gradient change is calculated, that is, it is determined by calculating the gradient value difference between adjacent boundary pixel points. For example, if the gradient values ​​of two adjacent boundary pixel points are 50 and 70 respectively, the gradient change is 20, and the edge contrast change rate is called, which is calculated by calculating the edge contrast. The difference in the average grayscale values ​​on both sides of the boundary pixel (inside and outside the catheter) is used to determine the difference. For example, if the average grayscale on the inside of the boundary is 150 and on the outside is 80, the contrast change rate is 70. The relationship between the gradient change and the contrast change rate is analyzed. Specifically, it is determined whether the gradient change and the edge contrast change rate show a consistent change trend. If the two change trends are inconsistent or one of the indicators exceeds the preset range (for example, the gradient change is greater than 30 or the contrast change rate is less than 10), the boundary pixel is considered an outlier. The boundary pixels with changes exceeding the set range are screened, and the boundary pixels with gradient changes greater than 25 are identified as outliers. Finally, a set of abnormal boundary pixels is obtained, which contains the coordinates of all boundary pixels that need to be corrected.

[0042] The segmentation boundary adjustment submodule calls the abnormal boundary pixel set, adjusts the segmentation boundary, corrects the position of the boundary pixel points, and obtains the optimized meibomian gland duct segmentation result; A set of abnormal boundary pixels is called, for example, a set containing 100 abnormal boundary pixels, and the segmentation boundary is adjusted. Specifically, for each abnormal boundary pixel in the set, the boundary position of the point is refitted using the B-spline interpolation algorithm according to the distribution trend and texture information of the surrounding normal boundary pixels. For example, a third-order B-spline interpolation is performed using the five surrounding normal boundary pixels to correct the position of the boundary pixel. For example, an abnormal boundary pixel is corrected from the original position (100, 50) to (101, 51), and finally an optimized meibomian gland duct segmentation result is obtained, which is a meibomian gland duct binary image with a smoother boundary and a more accurate one.

[0043] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.

Claims

1. Meibomian gland duct status analysis system based on image recognition, characterized by: The system comprises: The meibomian gland duct enhancement module, based on the eyelid image data, calls the color channel information of the duct area, filters the background interference pixels, sets the image sharpening parameters, adjusts the filter kernel, and obtains the enhanced meibomian gland duct image data; The duct opening positioning module extracts texture information of pixels in the duct area based on the enhanced meibomian gland duct image data, calculates local connectivity statistics, screens a set of candidate duct opening pixels, and generates a duct opening positioning matrix; The texture and structure fusion module extracts the contrast values ​​of the pixels in the catheter area based on the catheter opening positioning matrix, calculates the weight values ​​of the local texture features, determines the weighted distribution of the global area, and obtains a fused catheter state distribution data set; The multi-scale segmentation module extracts the grayscale variation amplitude of the duct area feature points based on the fused duct state distribution data set, sets image segmentation parameters, adjusts the segmentation threshold, and obtains the meibomian gland duct segmentation area mapping value.

2. The meibomian gland duct status analysis system based on image recognition according to claim 1, characterized in that: The enhanced meibomian gland duct image data includes a sharpened image, a filtered image, and a denoised image; the duct opening positioning matrix includes the distribution of candidate pixels of the duct opening, local connectivity statistics, and duct area texture gradients; the fused duct state distribution dataset includes local texture feature weight values, duct area pixel contrast, duct area pixel entropy values, and global area weighted distribution; the meibomian gland duct segmentation area mapping value includes image segmentation parameters, a set of candidate pixels of the duct area, and a segmentation threshold.

3. The meibomian gland duct status analysis system based on image recognition according to claim 1, characterized in that: The meibomian gland duct enhancement module includes: The background interference screening submodule uses the color channel information of the duct area based on the eyelid image data, analyzes the pixel texture change rate, and screens the background interference data according to connectivity to obtain a set of background interference pixels. The background noise analysis submodule analyzes the color distribution data of the pixels based on the background interference pixel set, analyzes the color offset in the color channel, identifies the background noise intensity based on the offset distribution, analyzes the distribution range of the background interference pixel points, and obtains the background noise distribution value; The filter kernel adjustment submodule calls the background noise distribution value, calculates the filter kernel sharpening parameters, matches the convolution parameters, analyzes the effect of the filter kernel in the eyelid image convolution processing, and obtains enhanced meibomian gland duct image data.

4. The meibomian gland duct status analysis system based on image recognition according to claim 3, characterized in that: The filter kernel sharpening parameter adopts the formula: ; in, represents the filter kernel sharpening parameter, Represents the total number of pixels in the filter kernel, Represents the first The gray value of a pixel, Represents the average grayscale value of the pixels in the filter kernel, Represents the sharpness adjustment coefficient, Represents the total number of pixels in the eyelid image area, Represents the eyelid image area The gray value of a pixel, Represents the average grayscale value of pixels in the eyelid image area.

5. The meibomian gland duct status analysis system based on image recognition according to claim 3, characterized in that: The catheter opening positioning module includes: The duct texture analysis submodule obtains the enhanced meibomian gland duct image data and extracts pixel points in the duct area, analyzes texture information of the pixel points, identifies local connectivity statistics, and obtains duct area texture values; The conduit edge connectivity analysis submodule analyzes the edge connectivity distribution of the conduit region based on the conduit region texture value to obtain a conduit edge connectivity coefficient; The duct opening screening submodule screens duct opening candidate points based on the duct edge connectivity coefficient, combined with the duct area texture value, connectivity coefficient and duct area density, and generates a duct opening positioning matrix.

6. The meibomian gland duct status analysis system based on image recognition according to claim 5, characterized in that: The texture and structure fusion module includes: The texture feature acquisition submodule obtains the catheter opening positioning matrix, constructs a pixel-level contrast map based on the grayscale of the catheter area pixels, extracts local grayscale differences, calculates local contrast and neighborhood entropy values ​​to reflect the information distribution difference, and calculates the local texture weight value; The global weighted calculation submodule combines the local texture weight value and the pixel distribution of the catheter area, extracts the texture response information, performs normalization processing, constructs a catheter area weighted response model, and accumulates pixel responses and assembles feature vectors based on it to generate a fused catheter state distribution dataset.

7. The meibomian gland duct status analysis system based on image recognition according to claim 6, characterized in that: The multi-scale segmentation module includes: The catheter region feature recognition submodule extracts the texture density value and grayscale variation amplitude of the catheter region feature points based on the fused catheter state distribution dataset, calls the spatial coordinate information of the feature points, calculates the distribution uniformity of the feature points in the local catheter, and eliminates feature points with excessive distribution dispersion to obtain a set of filtered feature points. The image segmentation parameter setting submodule calls the screened feature point set, calculates the mean spatial distance between feature points, identifies the distribution density, adjusts the parameter range to match the image resolution, and obtains the segmentation parameter value; The segmentation threshold adjustment submodule extracts candidate pixels based on the segmentation parameter value, analyzes the grayscale change rate and texture gradient, sets and adjusts the segmentation threshold according to the relationship between the texture gradient and the grayscale change rate, and obtains the meibomian gland duct segmentation area mapping value.

8. The meibomian gland duct status analysis system based on image recognition according to claim 7, characterized in that: The distribution uniformity of the characteristic points in the local catheter is calculated using the formula: ; in, Indicates the distribution uniformity of feature points in the local catheter, Represents the number of feature points involved in the calculation, Representative The spatial coordinate values ​​of the feature points, Represents the mean of the spatial coordinates of the feature points.

9. The meibomian gland duct status analysis system based on image recognition according to claim 1, characterized in that: The system also includes a boundary optimization module: The boundary optimization module calls the gradient distribution data of the duct boundary pixel points based on the meibomian gland duct segmentation region mapping value, adjusts the duct region segmentation boundary, and obtains an optimized meibomian gland duct segmentation result; The optimized meibomian gland duct segmentation result includes the duct area segmentation boundary, the gradient distribution of duct boundary pixel points, and the segmentation area edge contrast change rate.

10. The meibomian gland duct status analysis system based on image recognition according to claim 9, characterized in that: The boundary optimization module includes: The boundary gradient calculation submodule extracts the gradient distribution data of the boundary pixel points based on the meibomian gland duct segmentation area mapping value, calculates the gradient change, calls the edge contrast change rate, analyzes the relationship between the gradient change and the contrast change rate, and filters the boundary pixel points whose change exceeds the set range to obtain a set of abnormal boundary pixel points; The segmentation boundary adjustment submodule calls the abnormal boundary pixel point set, adjusts the segmentation boundary, corrects the position of the boundary pixel points, and obtains an optimized meibomian gland duct segmentation result.

Citation Information

Cited By

  • Method and system for multi-disease joint recognition of fundus image based on transformer

    CN122435662A