A method for enhancing the detail fidelity of low-quality fundus images in patients with posterior uveitis

By analyzing grayscale histograms and discrete cosine transformations, the real lesion areas in low-quality fundus images were screened out, which solved the problem of low accuracy in the lesion areas in the prior art, and achieved better image enhancement effects.

CN119313600BActive Publication Date: 2025-03-07自贡市第一人民医院
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411866135.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-03-07
Estimated Expiration
2044-12-18

AI Technical Summary

Technical Problem

Due to insufficient exposure in low-quality fundus images, changes in grayscale values ​​of the lesion areas lead to low accuracy in the lesion areas determined by the threshold segmentation method, which in turn affects the image enhancement effect.

Method used

By analyzing the fluctuations of the grayscale histogram curve, the segmentation window size is determined, the high-frequency boundary belonging and boundary interference degree are determined using discrete cosine transformation, the real lesion boundary pixel points and regions are selected, and local image enhancement is performed.

Benefits of technology

It improves the accuracy of the lesion area, enhances the detail fidelity of the image, and significantly improves the enhancement effect of low-quality fundus images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119313600B_ABST
    Figure CN119313600B_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image enhancement, and in particular to a method for enhancing the detail fidelity of a low-quality fundus image of a patient with posterior uveitis. The method comprises the following steps: firstly determining a window size represented by a regional distribution under different grayscale features according to fluctuations of a curve corresponding to a grayscale histogram; then determining the high-frequency boundary belonging degree of each pixel point according to the characteristic that boundary information is usually represented as high-frequency information after discrete cosine transformation, thereby screening out high-frequency boundary pixel points; determining the corresponding boundary interference degree according to the characteristic that the frequency information of a lesion boundary is relatively concentrated, thereby screening out the lesion boundary pixel points; then screening out a more accurate real lesion area according to the characteristic that the grayscale distribution of the lesion area is relatively scattered and the frequency information distribution disorder of a lesion boundary area surrounded by the lesion boundary pixel points, so that the image enhancement effect of the enhanced fundus image obtained by performing local image enhancement according to the real lesion area is better.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of image enhancement, and in particular to a method for enhancing the detail fidelity of low-quality fundus images of patients with posterior uveitis. Background Art

[0002] Posterior uveitis is also called choroiditis. Because the choroid and retina are adjacent, the choroid often affects the retina when it becomes inflamed, so it is also called chorioretinitis. Choroiditis is characterized by the absence of eye pain, but decreased vision and obvious dark shadows in front of the eyes. Posterior uveitis lesions usually appear as irregular areas with larger grayscale than normal areas in fundus images, but in low-quality fundus images, they are often affected by external environments such as noise and light, resulting in unclear features of the lesion area. Therefore, it is necessary to enhance the fundus images of patients with posterior uveitis.

[0003] Therefore, it is necessary to enhance the fundus images of patients with posterior uveitis. Considering that the area to be enhanced in the fundus images of patients with posterior uveitis is the lesion area of ​​posterior uveitis, it is necessary to first screen out the corresponding lesion area; the existing technology usually determines the lesion area by threshold segmentation method based on the large difference between the grayscale expression of the lesion area of ​​posterior uveitis and the grayscale expression of the normal area, and then performs local image enhancement on all lesion areas to determine the enhanced fundus grayscale image of patients with posterior uveitis.

[0004] However, in low-quality fundus images, the grayscale values ​​of some pixels in the fundus image may change due to underexposure, thereby reducing the accuracy of the lesion area determined by the threshold segmentation method, resulting in poor image enhancement effect of the enhanced fundus image obtained by local image enhancement based on the lesion area. Summary of the invention

[0005] The present application provides a method for enhancing detail fidelity of low-quality fundus images of patients with posterior uveitis. The method first determines the window size represented by the regional distribution under different grayscale features according to the fluctuation of the curve corresponding to the grayscale histogram; then determines the high-frequency boundary belonging degree of each pixel point according to the characteristic that the boundary information is usually expressed as high-frequency information after discrete cosine transform, thereby screening out the high-frequency boundary pixel points; further determines the corresponding boundary interference degree according to the characteristic that the frequency information of the lesion boundary is relatively concentrated, thereby screening out the lesion boundary pixel points; then, according to the characteristic that the grayscale distribution of the lesion area is relatively scattered, according to the chaotic distribution of the frequency information of the lesion boundary area surrounded by the lesion boundary pixel points, screens out a more accurate real lesion area, thereby solving the problem of low accuracy of the lesion area determined by the threshold segmentation method, so that the image enhancement effect of the enhanced fundus image obtained by performing local image enhancement according to the real lesion area is better.

[0006] The first aspect of the present application provides a method for enhancing detail fidelity of low-quality fundus images of patients with posterior uveitis, comprising:

[0007] Obtaining grayscale fundus images to be enhanced in patients with posterior uveitis;

[0008] Determine all segmentation window sizes according to the fluctuation of the curve corresponding to the grayscale histogram of the fundus grayscale image to be enhanced; determine the high-frequency boundary belonging degree of each pixel point in the fundus grayscale image to be enhanced according to the high-frequency information distribution of all local image areas obtained by segmentation of each segmentation window size after discrete cosine transformation; and filter out all high-frequency boundary pixel points according to the high-frequency boundary belonging degree;

[0009] Determine the boundary interference degree of each high-frequency boundary pixel point according to the magnitude of the high-frequency boundary belonging degree of each high-frequency boundary pixel point and the overall standard deviation; filter out all lesion boundary pixels according to the boundary interference degree; determine all lesion boundary encirclement areas according to the adjacent distribution of lesion boundary pixels; filter out the real lesion area according to the frequency information distribution disorder of each lesion boundary encirclement area;

[0010] Perform image enhancement processing on the real lesion area to determine an enhanced fundus grayscale image.

[0011] Furthermore, the process of obtaining the split window size includes:

[0012] The curve corresponding to the grayscale histogram of the fundus grayscale image to be enhanced is used as the grayscale histogram curve; the grayscale histogram curve is processed by Douglas Peucker algorithm and then curve fitting is performed to determine the corresponding reference fitting curve; each minimum value point of the reference fitting curve is used as the segmentation point of the corresponding grayscale histogram curve; the grayscale histogram curve is divided into at least two grayscale characteristic curve segments by all the segmentation points;

[0013] According to the grayscale histogram, all pixel points corresponding to each grayscale characteristic curve segment in the fundus grayscale image to be enhanced are used as grayscale characteristic pixel points of each grayscale characteristic curve segment; under each grayscale characteristic curve segment, all adjacent grayscale characteristic pixel points are merged to determine all merged areas under each grayscale characteristic curve segment;

[0014] In all the merged areas under all the grayscale characteristic curve segments, the length of the long side of the circumscribed rectangle of the largest merged area is rounded up to an even integer as the maximum window size; half of the length of the long side of the circumscribed rectangle of the smallest merged area is rounded up to an even integer to determine the minimum window size; wherein the length of the long side of the circumscribed rectangle is measured by the number of pixels;

[0015] Iterate from the minimum window size as the starting point to the maximum window size with a preset iteration length as the step length, and use the window size obtained after each iteration as the split window size; wherein the minimum window size and the maximum window size are both split window sizes.

[0016] Furthermore, the process of obtaining the high-frequency boundary belonging degree includes:

[0017] The fundus grayscale image to be enhanced is divided into at least two segmentation window areas according to each segmentation window size; at each segmentation window size, after each segmentation window area is converted into a DCT coefficient matrix by discrete cosine transform, an inverse discrete cosine transform is performed according to all frequency coefficients in the lower right half of the DCT coefficient matrix to determine all high-frequency pixel points corresponding to each segmentation window area; and all high-frequency pixel points of the fundus grayscale image to be enhanced under each segmentation window size are counted;

[0018] Under all segmentation window sizes, the number of times each pixel in the fundus grayscale image to be enhanced belongs to a high-frequency pixel is used as a high-frequency information feature value of each pixel;

[0019] The distance between the frequency coefficient corresponding to each pixel in the DCT coefficient matrix of each segmentation window area and the frequency coefficient in the lower right corner of the DCT coefficient matrix is ​​used as the high-frequency reference distance of each pixel in each segmentation window area; the average of the high-frequency reference distances of all segmentation window areas where each pixel is located in all segmentation window sizes is used as the high-frequency distance feature value of each pixel;

[0020] The product of the negative correlation mapping value of the high-frequency distance feature value and the high-frequency information feature value is normalized to determine the high-frequency boundary belonging degree of each pixel point in the fundus grayscale image to be enhanced.

[0021] Furthermore, the process of acquiring the high-frequency boundary pixel points includes:

[0022] The pixel points corresponding to the high-frequency boundary belonging degrees greater than the preset boundary threshold are regarded as high-frequency boundary pixel points.

[0023] Furthermore, the process of obtaining the boundary interference degree includes:

[0024] Each high-frequency boundary pixel point is sequentially used as a target boundary pixel point; other boundary pixel points other than the target boundary pixel point are used as comparison boundary pixel points corresponding to the target boundary pixel point;

[0025] The difference between the high-frequency boundary belonging degree of the target boundary pixel point and the high-frequency boundary belonging degree of each corresponding comparison boundary pixel point is used as the comparison belonging degree deviation of each comparison boundary pixel point; the average of the comparison belonging degree deviations of all comparison boundary pixel points corresponding to the target boundary pixel point is used as the overall belonging degree deviation value of the target boundary pixel point;

[0026] The product of the high-frequency boundary belonging degree of the target boundary pixel point and the overall deviation value of the belonging degree is normalized to determine the boundary interference degree of the target boundary pixel point.

[0027] Furthermore, the process of acquiring the lesion boundary pixel points includes:

[0028] The high-frequency boundary pixel points whose boundary interference degree is less than the preset interference threshold are regarded as the lesion boundary pixel points.

[0029] Furthermore, the process of obtaining the lesion boundary enclosing area includes:

[0030] Connect each lesion boundary pixel point with the lesion boundary pixel points within its preset neighborhood range with a straight line to obtain a corresponding connecting line; obtain all connecting lines in the fundus grayscale image to be enhanced; wherein the boundary of the fundus grayscale image to be enhanced is also used as a connecting line; obtain all enclosed areas surrounded by all connecting lines; merge all adjacent enclosed areas to obtain all lesion boundary enclosed areas.

[0031] Furthermore, the process of acquiring the real lesion area includes:

[0032] The number of non-zero frequency values ​​in the DCT coefficient matrix obtained by discrete cosine transform of each lesion boundary surrounding area is used as the frequency value number disorder degree of each lesion boundary surrounding area;

[0033] All pixel points corresponding to the frequency value in the lower right corner of the DCT coefficient matrix corresponding to each lesion boundary encirclement area are taken as reference pixel points; in each lesion boundary encirclement area, the Euclidean distance between each reference pixel point and the nearest reference pixel point is taken as the reference proximity distance of each reference pixel point; the average of the reference proximity distances of all reference pixels in each lesion boundary encirclement area is taken as the texture distribution disorder degree of each lesion boundary encirclement area;

[0034] The product of the frequency value quantity disorder and the texture distribution disorder is normalized to determine the lesion area possibility of each lesion boundary enclosed area; and the real lesion areas in all lesion boundary enclosed areas are screened out according to the lesion area possibility.

[0035] Furthermore, the process of screening out the real lesion areas in all lesion boundary enclosed areas according to the lesion area possibility includes:

[0036] The lesion boundary surrounding area corresponding to the lesion area possibility greater than the preset lesion threshold is taken as the real lesion area.

[0037] Furthermore, the process of acquiring the enhanced fundus grayscale image includes:

[0038] Perform image enhancement on each real lesion region through a histogram equalization algorithm to obtain a lesion enhancement region corresponding to each real lesion region;

[0039] After each real lesion region in the to-be-enhanced fundus grayscale image is replaced with the corresponding lesion enhancement region, an enhanced fundus grayscale image is determined.

[0040] This application has the following beneficial effects:

[0041] First, the lesion area usually has a significant boundary, and the texture information corresponding to the boundary is usually expressed as high-frequency information after discrete cosine transform, so the boundary of the lesion area can be determined with the help of discrete cosine transform. Discrete cosine transform has different frequency information characteristics in windows of different sizes, so in order to more comprehensively and accurately determine the high-frequency boundary information, it is necessary to first determine all suitable segmentation window sizes; the grayscale histogram can show the distribution of pixels with different grayscale features, so according to the fluctuation of the curve corresponding to the grayscale histogram, according to the distribution of pixels with different grayscale features, all segmentation window sizes that are compatible with all grayscale features are determined; then, according to the high-frequency information distribution of the local image area obtained by each segmentation window size after discrete cosine transform, the high-frequency information representation degree of each pixel point is comprehensively evaluated, that is, the high-frequency boundary belonging degree that represents the possibility of belonging to the boundary, and the high-frequency boundary pixel points belonging to the boundary texture are screened out according to the size of the high-frequency boundary belonging degree.

[0042] However, low-quality fundus images, when underexposed, will result in obvious light-dark boundaries in the fundus grayscale image to be enhanced. The pixels on the light-dark boundary will also show high-frequency information, resulting in the obtained high-frequency boundary pixels containing interfering pixels belonging to the light-dark boundary that will interfere with the screening of the lesion area; therefore, further screening is required. First, the light-dark boundary is generated under the influence of light, and the grayscale difference on both sides is larger than that in other areas. Therefore, the frequency represented by the pixels on the light-dark boundary is higher than that of other high-frequency boundary pixels, that is, the high-frequency boundary belonging degree corresponding to the pixels on the light-dark boundary is relatively larger; and considering that the causes of the lesion areas are the same, the frequencies of the corresponding boundaries are usually closer, that is, the high-frequency boundary belonging degrees between the lesion boundary pixels are similar, so the overall standard deviation of the high-frequency boundary belonging degrees of the lesion boundary pixels is usually small; therefore, according to the size of the high-frequency boundary belonging degree of each high-frequency boundary pixel and the overall standard deviation, the boundary interference degree of each high-frequency boundary pixel is determined, so as to screen out the lesion boundary pixels with smaller boundary interference degrees, and further determine the lesion boundary encirclement area surrounded by the lesion boundary pixels. Finally, based on the fact that the grayscale value distribution in the lesion area is relatively more scattered, resulting in a more chaotic distribution of frequency information after discrete cosine transform, a more accurate real lesion area is screened out; finally, local image enhancement is performed on each real lesion area, so that the image enhancement effect of the enhanced fundus image obtained by local image enhancement based on the real lesion area is better. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. 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 paying creative work.

[0044] Figure 1 A flow chart of a method for enhancing detail fidelity of low-quality fundus images of patients with posterior uveitis provided by one embodiment of the present invention;

[0045] Figure 2 A schematic diagram of a fundus grayscale image to be enhanced provided by an embodiment of the present invention;

[0046] Figure 3 A schematic diagram of distinguishing features between blood vessel boundaries and lesion areas in a fundus image provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0047] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of a method for enhancing the detail fidelity of low-quality fundus images of patients with posterior uveitis proposed by the present invention, its specific implementation method, structure, characteristics and effects are described in detail as follows in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment, and the specific features, structures or characteristics in one or more embodiments may be combined in any suitable form. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features.

[0048] Unless defined otherwise, 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 belongs.

[0049] The following is a detailed description of a method for enhancing detail fidelity of low-quality fundus images of patients with posterior uveitis provided by the present invention in conjunction with the accompanying drawings.

[0050] This application embodiment provides a method for enhancing the detail fidelity of low-quality fundus images of patients with posterior uveitis. Figure 1 , which shows a flow chart of a method for enhancing detail fidelity of low-quality fundus images of patients with posterior uveitis provided by an embodiment of the present invention, the method comprising:

[0051] Step S101: obtaining a grayscale image of the fundus of a patient with posterior uveitis to be enhanced.

[0052] In a specific implementation of the embodiment of the present invention, the fundus image of the patient with posterior uveitis is photographed by a fundus camera to obtain an initial fundus image to be enhanced; then the initial fundus image to be enhanced is grayed to obtain the fundus grayscale image to be enhanced of the patient with posterior uveitis required by the embodiment of the present invention. Figure 2 , which shows a schematic diagram of a fundus grayscale image to be enhanced provided by an embodiment of the present invention, Figure 2 In the image, due to insufficient exposure, more light-dark boundaries appear, so that the features of the lesion area are covered; therefore, it is necessary to further enhance the fundus grayscale image to be enhanced, reduce the impact of insufficient exposure on the features of the lesion area, and make the features of the lesion area more obvious.

[0053] Step S102: determine all segmentation window sizes according to the fluctuation of the curve corresponding to the grayscale histogram of the fundus grayscale image to be enhanced; determine the high-frequency boundary belonging degree of each pixel point in the fundus grayscale image to be enhanced according to the distribution of high-frequency information of all local image areas obtained by segmentation of each segmentation window size after discrete cosine transform; and filter out all high-frequency boundary pixel points according to the high-frequency boundary belonging degree.

[0054] First, the lesion area usually has a significant boundary, and the texture information corresponding to the boundary is usually expressed as high-frequency information after discrete cosine transform, so the boundary of the lesion area can be determined with the help of discrete cosine transform. Discrete cosine transform has different frequency information characteristics in windows of different sizes, so in order to more comprehensively and accurately determine the high-frequency boundary information, it is necessary to first determine all suitable segmentation window sizes; the grayscale histogram can show the distribution of pixels with different grayscale features, so according to the fluctuation of the curve corresponding to the grayscale histogram, according to the distribution of pixels with different grayscale features, all segmentation window sizes that are compatible with all grayscale features are determined; then, according to the high-frequency information distribution of the local image area obtained by each segmentation window size after discrete cosine transform, the high-frequency information representation degree of each pixel point is comprehensively evaluated, that is, the high-frequency boundary belonging degree that represents the possibility of belonging to the boundary, and the high-frequency boundary pixel points belonging to the boundary texture are screened out according to the size of the high-frequency boundary belonging degree.

[0055] Preferably, in a specific implementation of the embodiment of the present invention, the process of acquiring the split window size includes:

[0056] The curve corresponding to the grayscale histogram of the fundus grayscale image to be enhanced is used as the grayscale histogram curve; the grayscale histogram curve is processed by the Douglas Peucker algorithm and then curve fitting is performed to determine the corresponding reference fitting curve; each minimum value point of the reference fitting curve is used as the segmentation point of the corresponding grayscale histogram curve; the grayscale histogram curve is divided into at least two grayscale characteristic curve segments through all segmentation points. Using the Douglas Peucker algorithm to process the grayscale histogram curve can make the curve change smoother and can highlight the main grayscale features in the image. Further curve fitting can better capture the curve change and define the segmentation points; the minimum value point usually represents the turning point or demarcation point of the curve change, so these points can effectively reflect the grayscale interval of different grayscale features in the image, that is, each grayscale characteristic curve segment represents the grayscale interval corresponding to each grayscale feature. It should be noted that the Douglas Peucker algorithm and curve fitting are technical means well known to those skilled in the art, and are not further defined or elaborated here.

[0057] According to the grayscale histogram, all the pixel points corresponding to each grayscale characteristic curve segment in the grayscale image of the fundus to be enhanced are used as the grayscale characteristic pixel points of each grayscale characteristic curve segment; under each grayscale characteristic curve segment, all adjacent grayscale characteristic pixel points are merged to determine all merged regions under each grayscale characteristic curve segment. It should be noted that the acquisition of the merged region is similar to regional growth. Under each grayscale characteristic curve segment, the corresponding grayscale characteristic pixel point is selected as the seed point, and the grayscale characteristic pixel points within the eight neighborhoods of the seed point are used as new seed points for regional growth until no new seed points can be obtained, thereby obtaining each merged region, so that each merged region can represent specific image structure information with specific grayscale features.

[0058] In all the merged regions under all the grayscale feature curve segments, the length of the long side of the circumscribed rectangle of the largest merged region is rounded up to an even integer as the maximum window size; half of the length of the long side of the circumscribed rectangle of the smallest merged region is rounded up to an even integer to determine the minimum window size; wherein, the length of the long side of the circumscribed rectangle is measured by the number of pixels; starting from the minimum window size and taking the preset iteration length as the step length to iterate toward the maximum window size, the window size obtained after each iteration is taken as the segmentation window size; wherein, the minimum window size and the maximum window size are both segmentation window sizes. Since each merged region can represent the image structure information, the selection of the maximum window size and the minimum window size determined by the merged region can be more in line with the image itself, so as to adaptively obtain the corresponding window size in different images; further starting from the minimum window size and taking the preset iteration length as the step length to iterate toward the maximum window size, the determined segmentation window size is more comprehensive, the subsequent analysis of high-frequency information is more accurate, and the robustness of the subsequent analysis is improved. In a specific implementation of an embodiment of the present invention, the preset iteration length is set to two pixels, that is, two pixel lengths, so that it can correspond to the process of rounding up the minimum window size and the maximum window size, so that the iteration can proceed smoothly.

[0059] Preferably, in some possible implementations of the embodiments of the present invention, the process of obtaining the high-frequency boundary belonging degree includes:

[0060] The fundus grayscale image to be enhanced is divided into at least two segmentation window areas through each segmentation window size; so that all the segmentation window areas divided by each segmentation window size can include the entire fundus grayscale image to be enhanced, that is, the segmentation window areas divided under each segmentation window size have the same shape and size, and are all squares with the corresponding segmentation window size as the side length.

[0061] At each segmentation window size, after each segmentation window area is converted into a discrete cosine transform (DCT) coefficient matrix through discrete cosine transform, an inverse discrete cosine transform is performed based on all the frequency coefficients in the lower right half of the DCT coefficient matrix to determine all the high-frequency pixel points corresponding to each segmentation window area; all the high-frequency pixel points of the fundus grayscale image to be enhanced at each segmentation window size are counted. According to the characteristics of discrete cosine transform, in the DCT coefficient matrix, the closer to the lower right corner, the higher the frequency corresponding to the frequency information represented; therefore, this application identifies the frequency information in the lower right half as high-frequency information, and high-frequency information usually represents the boundary or edge texture with more drastic grayscale changes; therefore, after all the frequency coefficients in the lower right half of the DCT coefficient matrix are inversely discrete cosine transformed, all the high-frequency pixel points representing the high-frequency information of the boundary or edge corresponding to each segmentation window area can be obtained. Considering that each segmentation window size corresponds to multiple segmentation window areas, and there may be partial overlap of segmentation window areas, this causes some pixels to be identified as high-frequency pixels in different segmentation window areas corresponding to the same segmentation window size. Therefore, this application counts all high-frequency pixels of the fundus grayscale image to be enhanced under each segmentation window size, so that each pixel under each segmentation window size is counted as a high-frequency pixel at most once. It should be noted that the lower right corner of the DCT coefficient matrix in the embodiment of the present invention refers to the DCT coefficient corresponding to the last column and the last row of the DCT coefficient matrix, that is, the frequency value; and the lower right half is the part located below the row centerline and to the right of the column centerline after obtaining the two row centerlines and column centerlines of the DCT coefficient matrix.

[0062] Under all segmentation window sizes, the number of times each pixel in the fundus grayscale image to be enhanced belongs to a high-frequency pixel is used as the high-frequency information feature value of each pixel. For each pixel, the more times it is divided into high-frequency pixels under different segmentation window sizes, the more significant the high-frequency information of the pixel is, and the higher the possibility of belonging to the high-frequency boundary is.

[0063] The distance between the frequency coefficient corresponding to each pixel in the DCT coefficient matrix of each segmentation window area and the frequency coefficient in the lower right corner of the DCT coefficient matrix is ​​used as the high-frequency reference distance of each pixel in each segmentation window area; the average of the high-frequency reference distances of all segmentation window areas where each pixel is located in all segmentation window sizes is used as the high-frequency distance eigenvalue of each pixel. Since the closer to the lower right corner of the DCT coefficient matrix, the higher the frequency corresponding to the represented frequency information, the smaller the high-frequency distance eigenvalue, the higher the frequency information represented by the corresponding pixel, and the higher the possibility of belonging to the high-frequency boundary. It should be noted that the calculation of the high-frequency reference distance adopts the chessboard distance, which can be adjusted according to the specific implementation environment.

[0064] The product of the negative correlation mapping value of the high-frequency distance eigenvalue and the high-frequency information eigenvalue is normalized to determine the high-frequency boundary belonging degree of each pixel in the fundus grayscale image to be enhanced. Since the larger the high-frequency information eigenvalue and the smaller the high-frequency distance eigenvalue, the higher the possibility that the corresponding pixel belongs to the high-frequency boundary; therefore, the larger the obtained high-frequency boundary belonging degree, the higher the possibility that the corresponding pixel belongs to the high-frequency boundary. Normalization can limit the value range of the high-frequency boundary belonging degree to 0 to 1, which is convenient for the subsequent screening of high-frequency boundary pixels.

[0065] In a specific implementation of the embodiment of the present invention, the process of obtaining the high-frequency boundary belonging degree is expressed by the formula: ;in, For the The high-frequency boundary belonging degree of edge pixels; For the The high-frequency information feature value of the edge pixel, that is, The number of times an edge pixel belongs to a high-frequency pixel under all segmentation window sizes; For the The total number of segmentation window areas where edge pixels are located in all segmentation window sizes; For the The edge pixel is located in the first position of all segmentation window sizes High-frequency reference distance in the segmentation window area; For the High-frequency distance feature values ​​of edge pixels; It is a linear normalization function. The implementer can adjust the normalization method according to the specific implementation environment. is an exponential function with a natural constant as the base. Implementers can adopt other negative correlation mapping methods according to the specific implementation environment, such as , and the reciprocal, where is a hyperbolic tangent function, which will not be further described here.

[0066] Preferably, in some possible implementations of the embodiments of the present invention, the process of acquiring high-frequency boundary pixel points includes:

[0067] The pixel points corresponding to the high-frequency boundary belonging degree greater than the preset boundary threshold are regarded as high-frequency boundary pixel points. Since the higher the high-frequency boundary belonging degree is, the higher the possibility that the corresponding pixel point belongs to the high-frequency boundary pixel point is, the high-frequency boundary pixel points are screened by setting the preset boundary threshold. In a specific implementation of the embodiment of the present invention, the preset boundary threshold is set to 0.6, which can be adjusted according to the specific implementation environment.

[0068] Step S103: Determine the boundary interference degree of each high-frequency boundary pixel point according to the magnitude of the high-frequency boundary belonging degree of each high-frequency boundary pixel point and the overall standard deviation; filter out all lesion boundary pixels according to the boundary interference degree; determine all lesion boundary enclosing areas according to the adjacent distribution of lesion boundary pixels; filter out the real lesion area according to the chaotic distribution of frequency information of each lesion boundary enclosing area.

[0069] However, low-quality fundus images, when underexposed, will result in obvious light-dark boundaries in the fundus grayscale image to be enhanced. The pixels on the light-dark boundary will also show high-frequency information, resulting in the obtained high-frequency boundary pixels containing interfering pixels belonging to the light-dark boundary that will interfere with the screening of the lesion area; therefore, further screening is required. First, the light-dark boundary is generated under the influence of light, and the grayscale difference on both sides is larger than that in other areas. Therefore, the frequency represented by the pixels on the light-dark boundary is higher than that of other high-frequency boundary pixels, that is, the high-frequency boundary belonging degree corresponding to the pixels on the light-dark boundary is relatively larger; and considering that the cause of the lesion area is the same, the frequency of the corresponding boundary is usually close, that is, the high-frequency boundary belonging degree between the lesion boundary pixels is relatively close, so the overall standard deviation of the high-frequency boundary belonging degree of the lesion boundary pixels is usually small; therefore, according to the size of the high-frequency boundary belonging degree of each high-frequency boundary pixel and the overall standard deviation, the boundary interference degree of each high-frequency boundary pixel is determined, so as to screen out the lesion boundary pixels with small boundary interference, and further determine the lesion boundary encirclement area surrounded by the lesion boundary pixels. Finally, according to the characteristics that the grayscale value distribution in the lesion area is relatively scattered, resulting in a more chaotic distribution of frequency information after discrete cosine transform, a more accurate real lesion area is screened out.

[0070] Preferably, in some possible implementations of the embodiments of the present invention, the process of obtaining the boundary interference degree includes:

[0071] Each high-frequency boundary pixel point is taken as the target boundary pixel point in turn; other boundary pixels other than the target boundary pixel point are taken as the contrast boundary pixel points corresponding to the target boundary pixel point; the difference between the high-frequency boundary belonging degree of the target boundary pixel point and the high-frequency boundary belonging degree of each corresponding contrast boundary pixel point is taken as the contrast belonging degree deviation of each contrast boundary pixel point; the mean of the contrast belonging degree deviations of all contrast boundary pixels corresponding to the target boundary pixel point is taken as the overall belonging degree deviation value of the target boundary pixel point. Compared with the high-frequency boundary belonging degrees of each pixel point on the light-dark boundary line, the high-frequency boundary belonging degrees of each pixel point on the lesion boundary are usually closer to each other. Therefore, for the target boundary pixel point, the smaller the overall contrast belonging degree deviation of all corresponding contrast boundary pixels is, that is, the smaller the overall belonging degree deviation value is, the more it conforms to the feature that the high-frequency boundary belonging degrees of each pixel point on the lesion boundary are closer, that is, the greater the possibility of belonging to the lesion boundary pixel point.

[0072] Since the high-frequency boundary belonging degree on the light-dark boundary line is relatively larger, the larger the high-frequency boundary belonging degree is, the smaller the possibility of the pixel point belonging to the lesion boundary is; combined with the characteristic that the smaller the overall deviation value of the belonging degree is, the greater the possibility of the pixel point belonging to the lesion boundary is, the product between the high-frequency boundary belonging degree of the target boundary pixel point and the overall deviation value of the belonging degree is normalized to determine the boundary interference degree of the target boundary pixel point, so that the smaller the boundary interference degree is, the greater the possibility of the pixel point belonging to the lesion boundary is; that is, the larger the boundary interference degree is, the greater the possibility of the corresponding pixel point belonging to the interference pixel point on the light-dark boundary line that interferes with the lesion boundary. Further, according to the method for obtaining the boundary interference degree of the target boundary pixel point, the boundary interference degree of all high-frequency boundary pixels is counted.

[0073] In a specific implementation of the embodiment of the present invention, the process of obtaining the boundary interference degree is expressed by the formula: ;in, For the The boundary interference degree of high-frequency boundary pixels; For the The high-frequency boundary belonging degree of high-frequency boundary pixels; For the The number of high-frequency boundary pixels compared to the number of boundary pixels; For the The high-frequency boundary pixel corresponds to the The high-frequency boundary belonging degree of the contrast boundary pixels; For the The high-frequency boundary pixel corresponds to the The contrast belonging degree deviation of contrast boundary pixels; For the The overall deviation value of the degree of high-frequency boundary pixels; is the absolute value symbol; It is a linear normalization function. The implementer can adjust the normalization method according to the specific implementation environment.

[0074] Preferably, in some possible implementations of the embodiments of the present invention, the process of acquiring the lesion boundary pixel points includes:

[0075] Since the smaller the boundary interference degree is, the greater the possibility that the corresponding high-frequency boundary pixel point belongs to the lesion boundary pixel point is; therefore, the high-frequency boundary pixel point whose boundary interference degree is less than the preset interference threshold is further regarded as the lesion boundary pixel point. In a specific implementation of the embodiment of the present invention, the preset interference threshold is set to 0.56, which can be adjusted according to the specific implementation environment.

[0076] Preferably, in some possible implementations of the embodiments of the present invention, the process of acquiring the lesion boundary enclosing area includes:

[0077] Connect each lesion boundary pixel point with the lesion boundary pixel point within its preset neighborhood range by straight lines to obtain corresponding connecting lines; obtain all connecting lines in the fundus grayscale image to be enhanced; wherein, the boundary of the fundus grayscale image to be enhanced is also used as a connecting line; obtain all enclosed areas surrounded by all connecting lines; merge all adjacent enclosed areas to obtain all lesion boundary enclosed areas. Considering that under the influence of noise, some pixels may be lost at the lesion boundary, by connecting each lesion boundary pixel point with the lesion boundary pixel point within its preset neighborhood range by straight lines, the situation that the boundary is broken due to the influence of noise is reduced. In a specific implementation of an embodiment of the present invention, the preset neighborhood range is set to a twenty-four neighborhood range; in other possible implementations of the embodiment of the present invention, the lesion boundary pixel points that are less than 2 pixels apart are connected by straight lines. It should be noted that the reason why the embodiment of the present invention merges adjacent enclosed areas is that the linear connection of the pixels may result in smaller enclosed areas, which are entirely caused by the linear connection and are actually part of the lesion area, so all adjacent enclosed areas are merged.

[0078] Preferably, in some possible implementations of the embodiments of the present invention, the process of acquiring the real lesion area includes:

[0079] The number of non-zero frequency values ​​in the DCT coefficient matrix obtained by discrete cosine transform of each lesion boundary enclosing area is used as the frequency value number disorder of each lesion boundary enclosing area; all pixel points corresponding to the frequency value in the lower right corner of the DCT coefficient matrix corresponding to each lesion boundary enclosing area are used as reference pixel points; in each lesion boundary enclosing area, the Euclidean distance between each reference pixel point and the reference pixel point closest to it is used as the reference adjacent distance of each reference pixel point; the average of the reference adjacent distances of all reference pixels in each lesion boundary enclosing area is used as the texture distribution disorder of each lesion boundary enclosing area. It should be noted that when obtaining the DCT coefficient matrix corresponding to each lesion boundary enclosing area, the minimum circumscribed square of each lesion boundary enclosing area is first obtained, and then the grayscale values ​​of all pixels outside the corresponding lesion boundary area in the minimum circumscribed square are set to 0, and then the area corresponding to the minimum circumscribed square is subjected to discrete cosine transform to obtain the corresponding DCT coefficient matrix.

[0080] In addition to the light-dark boundary caused by underexposure, there are often interference areas such as blood vessels in fundus images. Figure 3 , which shows a schematic diagram of distinguishing features of blood vessel boundaries and lesion areas in a fundus image provided by an embodiment of the present invention; Figure 3 In the fundus image, compared with the interference area corresponding to the blood vessel boundary, the grayscale distribution of the pixels representing the texture inside some lesion areas is more scattered, and usually contains a variety of pixels with different frequency sizes. Therefore, when the pixels in the lesion boundary encirclement area contain more frequency value types, that is, non-0 frequency values, and the distribution of edge texture pixels is more scattered, the corresponding lesion boundary encirclement area is more likely to belong to the real lesion area. Therefore, when the frequency value number chaos is greater, the corresponding lesion boundary encirclement area contains more frequency value types, that is, non-0 frequency values, and the corresponding lesion boundary encirclement area is more likely to belong to the real lesion area. The texture details of interference areas such as blood vessels are relatively regular, and high-frequency pixels are usually adjacent; while scattered high-frequency information pixels will appear inside the lesion area. Therefore, when the reference proximity distance of the reference pixels representing high-frequency information is larger as a whole, that is, the greater the texture distribution chaos, the corresponding lesion boundary encirclement area The distribution of edge texture pixels inside the lesion boundary encirclement area is more scattered, that is, the greater the possibility of belonging to the real lesion area.

[0081] Therefore, we further combined the characteristics of the frequency value quantity chaos and the texture distribution chaos, normalized the product of the frequency value quantity chaos and the texture distribution chaos, and determined the possibility of the lesion area in each lesion boundary encirclement area; further, we screened out the real lesion areas in all lesion boundary encirclement areas according to the lesion area possibility.

[0082] In some possible implementations of the embodiments of the present invention, the process of obtaining the possibility of the lesion area is expressed by the formula: ;in, For the The probability of the lesion area surrounded by the lesion boundary; For the The number of non-zero frequency values ​​in the DCT coefficient matrix obtained by discrete cosine transform of the lesion boundary surrounding area, that is, the frequency value number disorder degree; For the The number of reference pixels in the area surrounded by the lesion boundary; For the The lesion boundary surrounds the area The Euclidean distance between a reference pixel and its nearest reference pixel, also known as the reference proximity distance; For the The texture distribution chaos of the area surrounded by the lesion boundary. It is a linear normalization function. The implementer can adjust the normalization method according to the specific implementation environment.

[0083] Preferably, in some possible implementations of the embodiments of the present invention, the process of screening out the real lesion areas in all lesion boundary enclosed areas according to the lesion area possibility includes:

[0084] The greater the possibility of the lesion area, the more likely the lesion boundary enclosed area is to be the real lesion area, so the lesion boundary enclosed area corresponding to the lesion area possibility greater than the preset lesion threshold is further taken as the real lesion area. In a specific implementation of the embodiment of the present invention, the preset lesion threshold is set to 0.6, which can be adjusted according to the specific implementation environment.

[0085] Step S104: performing image enhancement processing on the real lesion area to determine an enhanced fundus grayscale image.

[0086] After obtaining the real lesion area to be enhanced, the local image enhancement is finally performed by the image enhancement method to obtain the enhanced fundus grayscale image required by the embodiment of the present invention. Preferably, in some possible implementations of the embodiment of the present invention, the process of obtaining the enhanced fundus grayscale image includes:

[0087] Each real lesion area is image enhanced by a histogram equalization algorithm to obtain a lesion enhancement area corresponding to each real lesion area; after each real lesion area in the fundus grayscale image to be enhanced is replaced with the corresponding lesion enhancement area, the enhanced fundus grayscale image is determined. It should be noted that in addition to the histogram equalization algorithm, the implementer may also use other image enhancement methods to enhance the image of the real lesion area according to the specific implementation environment, such as gamma correction, wavelet transform, etc., and histogram equalization is a technical means well known to those skilled in the art, and will not be further limited or elaborated here.

[0088] In summary, the present application first determines the window size of the regional distribution under different grayscale features according to the fluctuation of the curve corresponding to the grayscale histogram; then determines the high-frequency boundary belonging degree of each pixel point according to the characteristic that the boundary information usually appears as high-frequency information after discrete cosine transform, thereby screening out the high-frequency boundary pixel points; further determines the corresponding boundary interference degree according to the characteristic that the frequency information of the lesion boundary is relatively concentrated, thereby screening out the lesion boundary pixel points; then, according to the characteristic that the grayscale distribution of the lesion area is relatively scattered, and according to the chaotic distribution of the frequency information of the lesion boundary area surrounded by the lesion boundary pixel points, a more accurate real lesion area is screened out, thereby solving the problem of low accuracy of the lesion area determined by the threshold segmentation method, so that the image enhancement effect of the enhanced fundus image obtained by local image enhancement according to the real lesion area is better.

[0089] It should be noted that the sequence of the above embodiments of the present invention is for description only and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0090] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

Claims

1. A method for enhancing detail fidelity of low-quality fundus images of patients with posterior uveitis, characterized in that: The method comprises: Obtaining grayscale fundus images to be enhanced in patients with posterior uveitis; Determine all segmentation window sizes according to the fluctuation of the curve corresponding to the grayscale histogram of the fundus grayscale image to be enhanced; determine the high-frequency boundary belonging degree of each pixel point in the fundus grayscale image to be enhanced according to the high-frequency information distribution of all local image areas obtained by segmentation of each segmentation window size after discrete cosine transformation; and filter out all high-frequency boundary pixel points according to the high-frequency boundary belonging degree; Determine the boundary interference degree of each high-frequency boundary pixel point according to the magnitude of the high-frequency boundary belonging degree of each high-frequency boundary pixel point and the overall standard deviation; filter out all lesion boundary pixels according to the boundary interference degree; determine all lesion boundary encirclement areas according to the adjacent distribution of lesion boundary pixels; filter out the real lesion area according to the frequency information distribution disorder of each lesion boundary encirclement area; Perform image enhancement processing on the real lesion area to determine an enhanced fundus grayscale image.

2. The method for enhancing detail fidelity of low-quality fundus images of patients with posterior uveitis according to claim 1, characterized in that: The process of obtaining the split window size includes: The curve corresponding to the grayscale histogram of the fundus grayscale image to be enhanced is used as the grayscale histogram curve; the grayscale histogram curve is processed by Douglas Peucker algorithm and then curve fitting is performed to determine the corresponding reference fitting curve; each minimum value point of the reference fitting curve is used as the segmentation point of the corresponding grayscale histogram curve; the grayscale histogram curve is divided into at least two grayscale characteristic curve segments by all the segmentation points; According to the grayscale histogram, all pixel points corresponding to each grayscale characteristic curve segment in the fundus grayscale image to be enhanced are used as grayscale characteristic pixel points of each grayscale characteristic curve segment; under each grayscale characteristic curve segment, all adjacent grayscale characteristic pixel points are merged to determine all merged areas under each grayscale characteristic curve segment; In all the merged areas under all the grayscale characteristic curve segments, the length of the long side of the circumscribed rectangle of the largest merged area is rounded up to an even integer as the maximum window size; half of the length of the long side of the circumscribed rectangle of the smallest merged area is rounded up to an even integer to determine the minimum window size; wherein the length of the long side of the circumscribed rectangle is measured by the number of pixels; Iterate from the minimum window size as the starting point to the maximum window size with a preset iteration length as the step length, and use the window size obtained after each iteration as the split window size; wherein the minimum window size and the maximum window size are both split window sizes.

3. The method for enhancing detail fidelity of low-quality fundus images of patients with posterior uveitis according to claim 1, characterized in that: The process of obtaining the high-frequency boundary belonging degree includes: The fundus grayscale image to be enhanced is divided into at least two segmentation window areas according to each segmentation window size; at each segmentation window size, after each segmentation window area is converted into a DCT coefficient matrix by discrete cosine transform, an inverse discrete cosine transform is performed according to all frequency coefficients in the lower right half of the DCT coefficient matrix to determine all high-frequency pixel points corresponding to each segmentation window area; and all high-frequency pixel points of the fundus grayscale image to be enhanced under each segmentation window size are counted; Under all segmentation window sizes, the number of times each pixel in the fundus grayscale image to be enhanced belongs to a high-frequency pixel is used as a high-frequency information feature value of each pixel; The distance between the frequency coefficient corresponding to each pixel in the DCT coefficient matrix of each segmentation window area and the frequency coefficient in the lower right corner of the DCT coefficient matrix is ​​used as the high-frequency reference distance of each pixel in each segmentation window area; the average of the high-frequency reference distances of all segmentation window areas where each pixel is located in all segmentation window sizes is used as the high-frequency distance feature value of each pixel; The product of the negative correlation mapping value of the high-frequency distance feature value and the high-frequency information feature value is normalized to determine the high-frequency boundary belonging degree of each pixel point in the fundus grayscale image to be enhanced.

4. The method for enhancing detail fidelity of low-quality fundus images of patients with posterior uveitis according to claim 1, characterized in that: The process of acquiring the high-frequency boundary pixel points includes: The pixel points corresponding to the high-frequency boundary belonging degrees greater than the preset boundary threshold are regarded as high-frequency boundary pixel points.

5. The method for enhancing detail fidelity of low-quality fundus images of patients with posterior uveitis according to claim 1, characterized in that: The process of obtaining the boundary interference degree includes: Each high-frequency boundary pixel point is sequentially used as a target boundary pixel point; other boundary pixel points other than the target boundary pixel point are used as comparison boundary pixel points corresponding to the target boundary pixel point; The difference between the high-frequency boundary belonging degree of the target boundary pixel point and the high-frequency boundary belonging degree of each corresponding comparison boundary pixel point is used as the comparison belonging degree deviation of each comparison boundary pixel point; the average of the comparison belonging degree deviations of all comparison boundary pixel points corresponding to the target boundary pixel point is used as the overall belonging degree deviation value of the target boundary pixel point; The product of the high-frequency boundary belonging degree of the target boundary pixel point and the overall deviation value of the belonging degree is normalized to determine the boundary interference degree of the target boundary pixel point.

6. The method for enhancing detail fidelity of low-quality fundus images of patients with posterior uveitis according to claim 1, characterized in that: The process of acquiring the pixel points at the lesion boundary includes: The high-frequency boundary pixel points whose boundary interference degree is less than the preset interference threshold are regarded as the lesion boundary pixel points.

7. The method for enhancing detail fidelity of low-quality fundus images of patients with posterior uveitis according to claim 1, characterized in that: The process of obtaining the lesion boundary enclosed area includes: Connect each lesion boundary pixel point with the lesion boundary pixel points within its preset neighborhood range with a straight line to obtain a corresponding connecting line; obtain all connecting lines in the fundus grayscale image to be enhanced; wherein the boundary of the fundus grayscale image to be enhanced is also used as a connecting line; obtain all enclosed areas surrounded by all connecting lines; merge all adjacent enclosed areas to obtain all lesion boundary enclosed areas.

8. The method for enhancing detail fidelity of low-quality fundus images of patients with posterior uveitis according to claim 1, characterized in that: The process of obtaining the real lesion area includes: The number of non-zero frequency values ​​in the DCT coefficient matrix obtained by discrete cosine transform of each lesion boundary surrounding area is used as the frequency value number disorder degree of each lesion boundary surrounding area; All pixel points corresponding to the frequency value in the lower right corner of the DCT coefficient matrix corresponding to each lesion boundary encirclement area are taken as reference pixel points; in each lesion boundary encirclement area, the Euclidean distance between each reference pixel point and the nearest reference pixel point is taken as the reference proximity distance of each reference pixel point; the average of the reference proximity distances of all reference pixels in each lesion boundary encirclement area is taken as the texture distribution disorder degree of each lesion boundary encirclement area; The product of the frequency value quantity disorder and the texture distribution disorder is normalized to determine the lesion area possibility of each lesion boundary enclosed area; and the real lesion areas in all lesion boundary enclosed areas are screened out according to the lesion area possibility.

9. The method for enhancing detail fidelity of low-quality fundus images of patients with posterior uveitis according to claim 8, characterized in that: The process of screening out the real lesion areas in all lesion boundary enclosed areas according to the lesion area possibility comprises: The lesion boundary surrounding area corresponding to the lesion area possibility greater than the preset lesion threshold is taken as the real lesion area.

10. The method for enhancing detail fidelity of low-quality fundus images of patients with posterior uveitis according to claim 1, characterized in that: The process of acquiring the enhanced fundus grayscale image includes: Perform image enhancement on each real lesion region through a histogram equalization algorithm to obtain a lesion enhancement region corresponding to each real lesion region; After each real lesion region in the to-be-enhanced fundus grayscale image is replaced with the corresponding lesion enhancement region, an enhanced fundus grayscale image is determined.

Citation Information

Patent Citations

  • Auxiliary equipment for diagnosing galactophore nidus based on galactophore X-ray photograph

    CN101564323A

  • Method for adjusting eye image in self-photographed video

    CN101930543A