An image sharpening and enhancement method in cataract diagnostic screening
By constructing a structure-aware separation module and a local adjustment module for gamma values and a high-frequency residual enhancement module, the problem of separating and enhancing the illumination and reflection components in cataract diagnostic screening images was solved, thereby improving image clarity and diagnostic value.
Patent Information
- Application Number
- CN202511982464.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-03-24
- Estimated Expiration
- 2045-12-26
AI Technical Summary
Existing image enhancement methods for cataract diagnosis and screening have difficulty accurately distinguishing between illumination and reflection components when dealing with uneven illumination and reflection interference, resulting in loss of image details and structural blurring. Furthermore, the lack of frequency domain selectivity and dynamic control leads to artifacts and texture degradation.
A structure-aware separation module is constructed to separate the illumination and reflection components by calculating the structural gradient response field and smoothing the structural guidance map. Combined with a local adjustment of the gamma value and a high-frequency residual enhancement module, accurate separation and adaptive enhancement of illumination and reflection are achieved.
It significantly improves image clarity and diagnostic value, preserves structural edges and texture details, effectively suppresses artifacts and interference, and enhances the visual quality and clinical application value of images.
Smart Images

Figure CN121391646B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of image enhancement, and particularly relates to an image sharpening and enhancement method in cataract diagnosis screening. BACKGROUND
[0002] At present, image enhancement in cataract diagnosis screening is mostly carried out by using gamma correction and histogram equalization. Such algorithms have weak processing capacity for complex texture structures, are prone to cause edge blurring and detail loss, and are unstable in scenes with uneven illumination and noise interference, and thus are difficult to meet the high requirements of medical images on reality and interpretation value.
[0003] The existing methods generally lack modeling capacity for the coupling characteristics of illumination and reflection, the structural information is not effectively utilized, the enhancement operation is prone to amplify interference in non-structural areas, and the frequency domain selectivity and dynamic control mechanism are lacking, resulting in problems such as artifacts, misjudgment or texture degradation in the enhanced images.
[0004] The proposed model constructs a collaborative mechanism of structure perception separation, illumination adjustment and high-frequency enhancement three modules, which can not only maintain the clearness of the structure edge and the details of the texture, but also enhance the brightness and contrast of the image, effectively suppress artifacts and interference, and significantly improve the image clarity, structure restoration and diagnostic value. SUMMARY
[0005] The application provides an image sharpening and enhancement method in cataract diagnosis screening, aiming to improve the brightness balance and diagnostic interpretability of the image while maintaining the clearness of the structure edge and the reality of the texture.
[0006] The application aims to propose a cataract diagnosis screening image enhancement model, and provides an image sharpening and enhancement method in cataract diagnosis screening, which comprises the following steps:
[0007] S1, collecting cataract diagnosis screening image data to generate a cataract diagnosis screening image data set;
[0008] S2, defining a structure gating weight based on the original cataract diagnosis screening image, constructing an interactive separation module based on structure perception, and obtaining an illumination component and a reflection component of the cataract diagnosis screening image through the interactive separation module based on structure perception;
[0009] S3, constructing an illumination component structure adjustment module by designing a local adjustment gamma value, and obtaining an enhanced illumination component through the illumination component structure adjustment module;
[0010] S4, constructing a reflection component high-frequency residual enhancement module by building a residual enhancement coefficient, and obtaining an enhanced reflection component through the reflection component high-frequency residual enhancement module;
[0011] S5, integrate the structure perception based interactive separation module, the illumination component structure adjustment module and the reflection component high frequency residual enhancement module to build a cataract diagnosis screening image enhancement model;
[0012] S6, input the cataract diagnosis screening image into the cataract diagnosis screening image enhancement model, and output a high-resolution cataract diagnosis screening image.
[0013] Preferably, in S1, a cataract diagnosis screening image dataset is built, first, cataract diagnosis screening image data is collected, the data format is DICOM, which is converted to png format through the opencv library, and the image size is unified to 512*512, and the dataset contains a total of 1956 images, which provides a unified standard data input for the subsequent cataract diagnosis screening image enhancement model.
[0014] Preferably, the cataract diagnosis screening image dataset is built through the S1, first, the DICOM format cataract diagnosis screening image data is directly obtained in the collection stage, which guarantees the integrity and high quality of the original medical information of the image, and provides a solid foundation for subsequent processing, secondly, the collected DICOM image format is uniformly converted to PNG format by using the opencv library, and the size of all images is standardized to 512*512, which effectively eliminates the interference caused by inconsistent image format and size, ensures the standardization of input data, finally, a dataset containing 956 high-quality and size-unified images is built, which provides sufficient and unified sample support for model training, promotes the stable training and performance optimization of the model, and overall, this step provides a reliable and standardized data input basis for the cataract diagnosis screening image enhancement model by collecting high-quality original medical images and performing format and size uniform processing, which significantly improves the efficiency of model training and the stability of enhancement results.
[0015] Preferably, the cataract diagnosis screening image has the characteristics of complex structure, rich edge details and obvious texture hierarchy, and is affected by uneven illumination and reflection interference in the imaging process, resulting in high coupling of illumination and reflection components in the image, and traditional enhancement methods are difficult to accurately distinguish the two, resulting in loss of details and fuzzy structure, in view of the image characteristics, the application builds an interactive separation module based on structure perception, accurately captures the local structure and texture features of the image by calculating the structure gradient response field, and generates a smooth structure guide image to enhance edge retention and structure continuity, dynamically regulates the structure sensitivity of different regions by combining the structure gate weight, models the image as a pair combination of illumination component and reflection component, and iteratively solves the optimal separation result by using a joint optimization strategy, effectively solves the problems of detail loss and structure blur caused by uneven illumination and reflection aliasing, and significantly improves the accuracy and robustness of cataract diagnosis screening image enhancement.
[0016] Preferably, in S2, the structure-aware interaction separation module is constructed specifically comprising the following steps:
[0017] Step S21, based on the input cataract diagnosis screening image, the structure gradient response field of the image is calculated , the mathematical model is:
[0018] ;
[0019] Wherein, is the input cataract diagnosis screening image, is the partial derivative of the image in the x direction, is the partial derivative of the image in the y direction, is the structure gradient response map, and the structure response normalization is performed according to the structure gradient response map, and the mathematical model is:
[0020] ;
[0021] Wherein, and are the pixel mean and pixel standard deviation of the structure gradient response map respectively, is the normalized structure response map, and the smooth structure guide map is generated according to the normalized structure response map through the designed structure response distillation strategy, and the mathematical model is:
[0022] ;
[0023] Wherein, is the smooth structure guide map, is the neighborhood pixel set centered at (x, y), and are the Gaussian weight kernels in the spatial domain and the range domain respectively, is the bilateral filtering normalization coefficient.
[0024] Step S22, according to the smooth structure guide map, the structure gating weight is defined, and the mathematical model is:
[0025] ;
[0026] Wherein, is the structure sensitive coefficient, which controls the steepness of the gate, is the bias term, which controls the center of the threshold, is the structure gating weight.
[0027] Step S23, taking the logarithm of the input original cataract diagnosis screening image, the logarithmic representation of the illumination component and the reflection component is obtained, and the mathematical model is:
[0028] ;
[0029] wherein is the logarithmic representation of the initialized illumination component, is the logarithmic representation of the initialized reflection component.
[0030] Step S24, constructing a joint optimization target strategy to solve the optimal illumination component and reflection component , the mathematical model is:
[0031] ;
[0032] wherein, each round is repeated iteratively using gradient descent until convergence, obtaining the optimal solution of and .
[0033] Preferably, the structure perception based interactive separation module constructed by the S2 can effectively guide the separation of illumination and reflection components by using image structure information: step S21 extracts the structure gradient response of the image and generates a smooth structure guide image, which enhances edge preservation and structure continuity; step S22 calculates the structure gating weight through the guide image, realizing accurate regulation of the structure characteristics of different regions; step S23 models the image as a pair of illumination and reflection, and clearly separates the target; step S24 iteratively solves the optimal component through a joint optimization strategy, improving the accuracy and robustness of the separation; overall, this module strengthens the illumination-reflection decoupling effect under the guidance of structure, providing a more stable basis for image enhancement.
[0034] Preferably, the illumination component obtained by the structure perception based interactive separation module has smooth structure and uniform illumination distribution, but there may be problems of insufficient brightness and missing details in local areas. In view of this feature, the illumination component structure adjustment module is constructed to calculate the local adjustment gamma value by combining the smooth structure guide image of the image, adaptively adjust the brightness level of the illumination component, and perform linear enhancement on the illumination component, significantly improving the local brightness and detail performance of the image, solving the problem of single illumination adjustment and ignoring structure information in traditional methods, thereby enhancing the regional adaptability and visual quality of the illumination information.
[0035] Preferably, in S3, the illumination component structure adjustment module is constructed and specifically includes the following steps:
[0036] Step S31, inverse transforming the optimal solution of and to restore them from the logarithmic space to the original space, obtaining the illumination component and the reflection component , the mathematical model is:
[0037] ;
[0038] wherein, is the illumination component, is the reflection component, a local adjustment gamma value is obtained according to a smooth structure guided map of the image, and the mathematical model is:
[0039] ;
[0040] wherein, is a structure perception adjustment coefficient, is a brightness perception adjustment coefficient, is a basic gamma value, is a local adjustment gamma value, is the illumination component, is the smooth structure guided map generated in step S21.
[0041] Step S32, linearly enhancing the illumination component according to the local adjustment gamma value The mathematical model is:
[0042] ;
[0043] wherein, is the linearly enhanced illumination component.
[0044] Preferably, the structure perception based interactive separation module constructed in the S3 realizes adaptive enhancement of the illumination component; wherein, step S31 restores the illumination and reflection information in the logarithmic space to the original space, and calculates the local adjustment gamma value in combination with the structure guided map, so that the illumination adjustment is more adaptive to the structure and brightness; step S32 linearly enhances the illumination component by using the local gamma value, so as to improve the brightness level and detail performance of the image; overall, the module enhances the regional adaptability and visual quality of the illumination information, and provides a good foundation for subsequent image optimization.
[0045] Preferably, the reflection component shows rich detail texture and edge features, but due to noise interference and signal attenuation, the high-frequency details are often weakened and the edges are not clear, and the traditional method is difficult to balance detail enhancement and noise suppression, and in view of these characteristics, the application constructs a reflection component high-frequency residual enhancement module, denoises by an edge preserving filter and retains the structure information, calculates a residual enhancement coefficient to extract and enhance the high-frequency details, limits the enhancement amplitude to avoid artifacts, realizes effective enhancement of the details and edges, and significantly improves the definition and texture performance of the image.
[0046] Preferably, in S4, the reflection component high-frequency residual enhancement module includes the following steps:
[0047] Step S41: Use an edge-preserving filter to denoise the reflection component to obtain a smooth reflection map. The residual enhancement coefficient is calculated based on the reflection components and the smoothed reflection map. The mathematical model is as follows:
[0048] ;
[0049] in, This is the residual enhancement coefficient. For the reflection component, To smooth the reflection map, The local neighborhood centered at (x,y) To avoid small positive numbers with a denominator of zero, the residual between the smoothed reflection map and the reflection component is calculated based on the residual enhancement coefficient, yielding the high-frequency components in the reflection component. The mathematical model is as follows:
[0050] ;
[0051] in, This represents the reflection component after high-frequency enhancement.
[0052] Step S42: Truncate the range of the enhanced high-frequency reflection component to obtain the enhanced reflection component. The mathematical model is as follows:
[0053] ;
[0054] Here, it indicates that the pixel values of the high-frequency enhanced reflected image are limited to the legal range between 0 and 1.
[0055] Step S43: Reconstruct the image by performing pixel-level product of the enhanced reflection component and the enhanced illumination component. The mathematical model is as follows:
[0056] ;
[0057] in, To enhance the light component, For the enhanced reflection component, These are high-resolution images for cataract diagnosis and screening.
[0058] Preferably, the high-frequency residual enhancement module for the reflection component constructed by step S4 can effectively improve image details and clarity. Specifically, step S41 extracts and enhances the high-frequency residual information in the reflection image through edge-preserving filtering; step S42 truncates the value range of the enhanced reflection component to ensure that the pixel values are within a reasonable range; and step S43 multiplies the enhanced reflection component with the illumination component to reconstruct a clearer cataract diagnostic screening image. Overall, this module enhances the texture details and visual quality of the image.
[0059] Preferably, the input cataract diagnostic screening images have complex structures and rich edge details, but suffer from detail blurring and brightness unevenness caused by uneven illumination and reflection component aliasing. To address this issue, this invention constructs an image enhancement model consisting of a structure-aware interactive separation module, an illumination component structure adjustment module, and a reflection component high-frequency residual enhancement module. This model aims to achieve precise separation of illumination and reflection, adaptive illumination enhancement, and high-frequency detail enhancement, effectively solving the structural blurring and detail loss problems caused by illumination-reflection coupling in traditional methods. It significantly improves the visual quality and clinical application value of cataract diagnostic screening images.
[0060] Preferably, in S5, constructing the cataract diagnostic screening image enhancement model includes the following steps:
[0061] Step S51, Cataract Diagnostic Screening Images The optimal solution is obtained through a structure-aware interaction separation module. and The mathematical model is:
[0062] ;
[0063] in, This is a structure-aware interaction separation module.
[0064] Step S52 The illumination component is linearly enhanced after being adjusted by the illumination component structure module. The mathematical model is:
[0065] ;
[0066] in, This is a light component structure adjustment module.
[0067] Step S53 The enhanced reflection component is obtained after passing through the high-frequency residual enhancement module for the reflection component. The mathematical model is as follows:
[0068] ;
[0069] in, This is a high-frequency residual enhancement module for the reflection component. The enhanced reflection component is multiplied with the enhanced illumination component at the pixel level to reconstruct the image. The mathematical model is as follows:
[0070] ;
[0071] in, To enhance the light component, For the enhanced reflection component, These are high-resolution images for cataract diagnosis and screening.
[0072] In summary, by adopting this technical solution, compared with the prior art, the present invention has the following beneficial effects: the structure-aware interactive separation module can accurately separate illumination and reflection information to improve the expressive ability of image structure; the illumination component structure adjustment module achieves adaptive illumination enhancement through dual guidance of structure and brightness to enhance the contrast and brightness levels of the image; the reflection component high-frequency residual enhancement module effectively extracts and enhances image detail texture to improve image clarity. The three modules together constitute the cataract diagnosis and screening image enhancement model, which enables the model to achieve precise enhancement of high-frequency details while maintaining structural consistency and brightness naturalness, significantly improving the overall visual quality and clinical usability of the image. Attached Figure Description
[0073] Figure 1 This diagram illustrates the steps of an image sharpening and enhancement method used in cataract diagnosis and screening.
[0074] Figure 2 This is a structural diagram of the interaction separation module based on structure awareness.
[0075] Figure 3 This is a structural diagram of the illumination component adjustment module.
[0076] Figure 4 This is a structural diagram of the high-frequency residual enhancement module for the reflection component.
[0077] Figure 5 This is a diagram illustrating the overall structure of an image enhancement model for cataract diagnosis and screening.
[0078] Figure 6 This is a schematic diagram to enhance the comparison of images before and after cataract diagnosis and screening. Detailed Implementation
[0079] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0080] Please see the appendix Figure 1 - Appendix Figure 6 This invention provides a method for image sharpening and enhancement in cataract diagnosis and screening.
[0081] As attached Figure 1 As shown in the flowchart, this invention proposes an image sharpening and enhancement method for cataract diagnosis and screening. The specific implementation method includes the following steps:
[0082] S1. Collect cataract diagnostic screening image data and convert it into a cataract diagnostic screening image dataset.
[0083] Furthermore, as shown in the appendix Figure 1 The cataract diagnostic screening image data described in S1 is collected and constructed into a cataract diagnostic screening image dataset. Specifically, the cataract diagnostic screening image dataset is collected in DICOM format, converted to PNG format using the OpenCV library, and the image size is uniformly set to 512×512. The dataset contains a total of 956 images.
[0084] S2. Design structural response distillation and joint optimization objective strategy, and construct a structure-aware interactive separation module. Cataract diagnostic screening images obtain the optimal illumination component and reflection component through the interactive separation module.
[0085] Furthermore, as shown in the appendix Figure 1 The S2 section describes the construction of a structure-aware interaction separation module. The specific construction steps of the module are attached. Figure 2 As shown, the specific implementation of the module includes the following steps:
[0086] Further, in step S21, the structural gradient response field of the image is calculated. The mathematical model is:
[0087] ;
[0088] in, The input image is a cataract diagnostic screening image. Let be the partial derivative of the image in the x-direction. Let be the partial derivative of the image in the y-direction. The structural gradient response diagram is used as the basis for structural response normalization. The mathematical model is as follows: ;
[0089] in, and These represent the pixel mean and pixel standard deviation of the structural gradient response map, respectively. To standardize the structural response map, a smooth structural guide map is generated based on the normalized structural response map using a designed structural response distillation strategy. The mathematical model is as follows: ;
[0090] in, Let (x, y) be the set of neighborhood pixels centered at (x, y). and Gaussian weight kernels for the spatial domain and the range domain, respectively. These are the normalization coefficients for the bilateral filter. The specific implementation code for the smooth structure guide graph is as follows:
[0091] def bilateral_normalized_structure(S, sigma_s=3, sigma_r=0.1, ksize=5):
[0092] """
[0093] S: Input structure response diagram (H, W)
[0094] sigma_s: Spatial kernel standard deviation
[0095] sigma_r: range kernel standard deviation
[0096] ksize: Local neighborhood window size
[0097] """
[0098] H, W = S.shape
[0099] padded_S = np.pad(S, pad_width=ksize / / 2, mode='reflect')
[0100] output = np.zeros_like(S)
[0101] for x in range(H):
[0102] for y in range(W):
[0103] W_accum = 0.0
[0104] S_accum = 0.0
[0105] cx, cy = x + ksize / / 2, y + ksize / / 2
[0106] center_val = padded_S[cx, cy]
[0107] for dx in range(-ksize / / 2, ksize / / 2+1):
[0108] for dy in range(-ksize / / 2, ksize / / 2+1):
[0109] i, j = cx + dx, cy + dy
[0110] spatial_dist = np.sqrt(dx 2 + dy 2)
[0111] range_dist = np.abs(padded_S[i, j] - center_val)
[0112] Gs = np.exp(- (spatial_dist twenty two sigma_s 2))
[0113] Gr = np.exp(- (range_dist twenty two sigma_r 2))
[0114] weight = Gs Gr
[0115] S_accum += weight padded_S[i, j]
[0116] W_accum += weight
[0117] output[x, y] = S_accum / (W_accum + 1e-8)
[0118] Return output.
[0119] Further, in step S22, based on the smooth structure guidance graph, the structure gating weights are defined, and the mathematical model is as follows:
[0120] ;
[0121] in, The structural sensitivity coefficient, which controls the steepness of the gating, is set to 9. This is the bias term, controlling the center of the threshold, with a value of 0.5, located in the middle of the structural strength distribution. The specific implementation code for calculating the structural gating weights is as follows:
[0122] def structure_gate_weight(S_tilde, alpha=5.0, beta=0.1):
[0123] """
[0124] Calculate the structure-gated weights ψ(x,y)
[0125] """
[0126] psi = 1.0 / (1.0 + np.exp(-(alpha S_tilde - beta)))
[0127] return psi.
[0128] Further, in step S23, the original image consists of illumination information and reflection information. Taking the logarithm of the input image, the mathematical model is as follows:
[0129] ;
[0130] in The logarithmic representation of the initial illumination information. Logarithmic representation of the initial reflection information.
[0131] Further, in step S24, construct a joint optimization objective strategy and solve for the optimal solution. and The mathematical model is:
[0132] ;
[0133] In this process, gradient descent is used repeatedly in each round until... Convergence, yielding the optimal solution. and The specific implementation code for gradient descent is as follows:
[0134] def optimize_L_R(I_log, psi, lr=0.1, iterations=100):
[0135] L_log = gaussian_filter(I_log, sigma=1)
[0136] R_log = I_log - L_log
[0137] for _ in range(iterations):
[0138] # Simplified gradient estimation
[0139] residual = I_log - (psi L_log + (1 - psi) R_log)
[0140] grad_L = -psi residual + 0.01 cv2.Laplacian(L_log, cv2.CV_64F)
[0141] grad_R = -(1 - psi) residual + 0.01 cv2.Laplacian(R_log, cv2.CV_64F)
[0142] L_log -= lr grad_L
[0143] R_log -= lr grad_R
[0144] The code for the joint optimization objective strategy is as follows: (returns L_log and R_log)
[0145] def compute_loss(I_log, L_log, R_log, psi, lambda1=0.01, lambda2=0.01):
[0146] """
[0147] L_SR Joint Loss Function Calculation
[0148] """
[0149] residual = I_log - (psi L_log + (1 - psi) R_log)
[0150] loss_main = np.mean(residual 2)
[0151] # First-order gradient (L1 norm) smoothing term
[0152] def gradient_l1(img):
[0153] gx = np.abs(np.roll(img, -1, axis=1) - img)
[0154] gy = np.abs(np.roll(img, -1, axis=0) - img)
[0155] return np.mean(gx + gy)
[0156] loss_smooth_L = gradient_l1(L_log)
[0157] loss_smooth_R = gradient_l1(R_log)
[0158] total_loss = loss_main + lambda1 loss_smooth_L + lambda2 loss_smooth_R
[0159] return total_loss.
[0160] S3. Design a local adjustment gamma value and construct a light component structure adjustment module. The light component is enhanced by the light component structure adjustment module.
[0161] Furthermore, as shown in the appendix Figure 1 The construction steps of the illumination component structure adjustment module described in S3 are attached. Figure 3 As shown, the specific implementation of the module includes the following steps:
[0162] Further, in step S31, regarding... and Perform an inverse transformation to recover the original space from the logarithmic space, and obtain the illumination components. and reflection component The mathematical model is:
[0163] ;
[0164] in, For light component, For the reflection component, the locally adjusted gamma value is obtained based on the smooth structure guide map of the image. The mathematical model is as follows:
[0165] ;
[0166] in, This is the structure-aware adjustment coefficient. This is the brightness perception adjustment coefficient, with an initial value of 0.5, which changes as the smooth structure guide map is updated. The base gamma value is set to 1.0 to avoid overall brightness distortion. To locally adjust the gamma value, For light component, This is the smooth structure guide diagram generated in step S21.
[0167] Further, in step S32, the gamma value is adjusted locally. The mathematical model for linearly enhancing illumination information is as follows:
[0168] ;
[0169] in, The specific implementation code for the linearly enhanced illumination component is as follows:
[0170] import numpy as np
[0171] def gamma_structure_adjustment(log_L, log_R, structure_map, gamma0=1.0, eta=0.8, zeta=0.5):
[0172] """
[0173] The local gamma-ray modulation enhancement module is implemented, and the formula strictly corresponds to the three equations in the figure.
[0174] :param log_L: Logarithmic spatial illumination component
[0175] :param log_R: Log-space reflection component
[0176] :param structure_map: Smooth structure guide graph S̃(x, y)
[0177] :return: Enhanced illumination map L_enh, local gamma map gamma_map
[0178] """
[0179] # Inverse Transformation: Returning from logarithmic space to the original image space
[0180] L = np.exp(log_L)
[0181] R = np.exp(log_R)
[0182] # Calculate the local gamma value γ(x,y)
[0183] gamma_map = gamma0 + eta (1.0 - L) + zeta structure_map
[0184] gamma_map = np.clip(gamma_map, 0.5, 2.0) # Prevent overexposure or underexposure
[0185] # Power Enhancement
[0186] L_enh = np.power(L, gamma_map)
[0187] return L_enh, gamma_map.
[0188] S4. Establish residual enhancement coefficients and construct a high-frequency residual enhancement module for the reflection component. The reflection information is then processed by the high-frequency residual enhancement module to obtain the enhanced reflection component.
[0189] Furthermore, as shown in the appendix Figure 1 The high-frequency residual enhancement module for the reflection component described in S4 is constructed using the following steps: Figure 4 As shown, the specific implementation of the module includes the following steps:
[0190] Further, in step S41, an edge-preserving filter is used to denoise the reflection component to obtain a smooth reflection map. The residual enhancement coefficient is calculated based on the reflection components and the smoothed reflection map. The mathematical model is as follows:
[0191] ;
[0192] in, This is the residual enhancement coefficient, whose value is determined by the high-frequency texture intensity of local regions of the image and is dynamically adjusted according to different locations. For the reflection component, To smooth the reflection map, The local neighborhood centered at (x,y) To avoid small positive numbers with a denominator of zero, the value is set to 0.0001; the residual between the smoothed reflection map and the reflection component is calculated based on the residual enhancement coefficient, and the high-frequency components in the reflection component are obtained. The mathematical model is as follows:
[0193] ;
[0194] in, This represents the reflection component after high-frequency enhancement.
[0195] Further, in step S42, the range of the enhanced high-frequency reflection component is truncated to obtain the enhanced reflection component. The mathematical model is as follows:
[0196] ;
[0197] Here, it indicates that the pixel values of the high-frequency enhanced reflected image are limited to the legal range between 0 and 1.
[0198] Further, in step S43, the enhanced reflection component and the enhanced illumination component are multiplied at the pixel level to reconstruct the image, and the mathematical model is as follows:
[0199] ;
[0200] in, To enhance the light component, For the enhanced reflection component, The specific implementation code for high-resolution cataract diagnostic screening images is as follows:
[0201] import numpy as np
[0202] import cv2
[0203] def compute_alpha(R, R_smooth, eps=1e-4, window_size=5):
[0204] """
[0205] Calculation of the adaptive residual enhancement coefficient α(x,y)
[0206] """
[0207] H, W = R.shape
[0208] alpha_map = np.zeros_like(R)
[0209] padded_R = np.pad(R, window_size / / 2, mode='reflect')
[0210] padded_Rs = np.pad(R_smooth, window_size / / 2, mode='reflect')
[0211] for x in range(H):
[0212] for y in range(W):
[0213] i, j = x + window_size / / 2, y + window_size / / 2
[0214] R_patch = padded_R[i-window_size / / 2:i+window_size / / 2+1,
[0215] j-window_size / / 2:j+window_size / / 2+1]
[0216] Rs_patch = padded_Rs[i-window_size / / 2:i+window_size / / 2+1,
[0217] j-window_size / / 2:j+window_size / / 2+1]
[0218] diff_patch = np.abs(R_patch - Rs_patch)
[0219] max_diff = np.max(diff_patch)
[0220] current_diff = np.abs(R[x, y] - R_smooth[x, y])
[0221] alpha_map[x, y] = current_diff / (max_diff + eps)
[0222] return alpha_map
[0223] def enhance_reflection(R, R_smooth, alpha_map):
[0224] """
[0225] R_enh(x,y) = R + α (R - R_smooth)
[0226] """
[0227] return R + alpha_map (R - R_smooth)
[0228] def clip_range(R_enh):
[0229] """
[0230] R_final(x,y) = clip(R_enh, 0, 1)
[0231] """
[0232] return np.clip(R_enh, 0, 1)
[0233] def reconstruct_final_image(L_enh, R_final):
[0234] """
[0235] I_enh(x,y) = L_enh(x,y) R_final(x,y)
[0236] """
[0237] return L_enh R_final.
[0238] S5 integrates a structure-aware interactive separation module, an illumination component structure adjustment module, and a reflection component high-frequency residual enhancement module to construct an image enhancement model for cataract diagnosis and screening.
[0239] Furthermore, as shown in the appendix Figure 1 The image enhancement model for cataract diagnosis and screening described in S5 is constructed, and the specific steps for building the model are attached. Figure 5 As shown, the specific implementation of the model includes the following steps:
[0240] Furthermore, step S51, cataract diagnostic screening images After being processed by the structure-aware interaction separation module, the following was obtained: and The mathematical model is:
[0241] ;
[0242] in, This is a structure-aware interaction separation module.
[0243] Furthermore, step S52, The illumination component is linearly enhanced after being adjusted by the illumination component structure module. The mathematical model is:
[0244] ;
[0245] in, This is a light component structure adjustment module.
[0246] Furthermore, step S53, The enhanced reflection component is obtained after passing through the high-frequency residual enhancement module for the reflection component. The mathematical model is as follows:
[0247] ;
[0248] in, This is a high-frequency residual enhancement module for the reflection component. The enhanced reflection component is multiplied with the enhanced illumination component at the pixel level to reconstruct the image. The mathematical model is as follows:
[0249] ;
[0250] in, To enhance the light component, For the enhanced reflection component, These are high-resolution images for cataract diagnosis and screening.
[0251] S6. Input the cataract diagnosis and screening images into the cataract diagnosis and screening image enhancement model for image enhancement, and output high-resolution cataract diagnosis and screening images.
[0252] Furthermore, as shown in the appendix Figure 1 The cataract diagnostic screening image enhancement model described in S6 takes a cataract diagnostic screening image as input and outputs a high-quality cataract diagnostic screening image, as shown in the attached figure. Figure 6 As shown, the specific implementation includes the following steps:
[0253] Furthermore, in step S6, the operating system platform used by the model is CentOS, the language is Python 3.8.1, the processor is Jetson Xavier, the image processing library is OpenCV, and the server physical memory is 64G.
[0254] The above are merely preferred embodiments of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the inventive concept of the present invention, and these modifications and improvements all fall within the protection scope of the present invention.
Claims
1. A method for image sharpening and enhancement in cataract diagnosis and screening, characterized in that, Includes the following steps: S1. Collect cataract diagnostic screening image data and generate a cataract diagnostic screening image dataset; S2. Based on cataract diagnostic screening images, construct a structure-aware interactive separation module to output illumination and reflection components, including: Based on cataract diagnostic screening images, the horizontal and vertical gradients are calculated to obtain the structural gradient response field. The structural gradient response field is then normalized by mean and standard deviation to output a standardized structural response map. Combined with spatial domain Gaussian weight kernel Gaussian weight kernel for the range and bilateral filter normalization coefficients Construct a structural response distillation strategy to output a smooth structure guidance graph. The mathematical model is: ; in, Represented as The local neighborhood centered on, For scale parameters, For difference control parameters; through structural sensitivity coefficient With bias term Adjusting the structural sensitivity of different regions and defining structural gating weights The mathematical model is: ; The logarithm of the original image is taken to obtain the logarithmic representations of the illumination and reflection components. A joint optimization objective strategy is constructed, and the initial illumination information is obtained by iteratively applying gradient descent. and initial reflection information The optimal solution, mathematical model is: ; in, and These are the gradient regularization coefficients for the illumination and reflection terms, respectively. S3. By designing a local adjustment of the gamma value, a light component structure adjustment module is constructed, and the light component is enhanced by the light component structure adjustment module. S4. Establish residual enhancement coefficients and construct a high-frequency residual enhancement module for the reflection component. The reflection component is enhanced by the high-frequency residual enhancement module for the reflection component. S5. Integrate the structure-aware interactive separation module, the illumination component structure adjustment module, and the reflection component high-frequency residual enhancement module to construct a cataract diagnosis and screening image enhancement model; S6. Input the cataract diagnostic screening image into the cataract diagnostic screening image enhancement model and output a high-resolution cataract diagnostic screening image.
2. The image sharpening and enhancement method for cataract diagnosis and screening according to claim 1, characterized in that, The initialized illumination information and initialized reflection information are subjected to inverse transformation to restore the original space from the logarithmic space, thus obtaining the illumination component and the reflection component.
3. The image sharpening and enhancement method for cataract diagnosis and screening according to claim 2, characterized in that, Based on the illumination component and the smooth structure guide map, and combined with the preset base gamma value, brightness perception adjustment coefficient and structure perception adjustment coefficient, the local adjustment gamma value of each pixel position is obtained; based on the local adjustment gamma value, the illumination component is linearly enhanced through power transformation to obtain the linearly enhanced illumination component.
4. The image sharpening and enhancement method for cataract diagnosis and screening according to claim 3, characterized in that, The reflection component is filtered and denoised using a Gaussian filter to obtain a smooth reflection map; the absolute difference is calculated based on the reflection component and the smooth reflection map, and the maximum value of the corresponding difference of all pixels in the local neighborhood is calculated for each pixel position. The residual enhancement coefficient is obtained based on the absolute difference and the maximum value.
5. The image sharpening and enhancement method for cataract diagnosis and screening according to claim 4, characterized in that, Based on the residual enhancement coefficient, the difference between the reflection component and the smoothed reflection map is weighted and combined with the reflection component to obtain the high-frequency enhanced reflection component. The enhanced reflection component is obtained by truncating its value range based on the high-frequency enhanced reflection component.
6. The image sharpening and enhancement method for cataract diagnosis and screening according to claim 5, characterized in that, A high-resolution cataract diagnostic screening image is obtained by multiplying the enhanced reflection component and the enhanced illumination component pixel by pixel.
7. The image sharpening and enhancement method for cataract diagnosis and screening according to claim 6, characterized in that, The original cataract diagnostic screening image is processed by a structure-aware interactive separation module to obtain illumination and reflection information; the illumination and reflection information are then processed by an illumination component structure adjustment module to obtain an enhanced illumination component. The reflected component and the enhanced illumination component are passed through the high-frequency residual enhancement module of the reflected component to obtain a high-resolution cataract diagnostic screening image.
Citation Information
Patent Citations
Mine lamp dynamic illumination control method and system, storage medium and mine lamp
CN119255448A
