Image processing method for improving dazzle light and shadow environment

By combining region segmentation and feature extraction algorithms with dynamic compensation focusing and shadow edge enhancement techniques, the image processing problems in glare and shadow environments are solved, enabling accurate identification and monitoring of aircraft and vehicles, and meeting the real-time and accuracy requirements of airport intelligent berth guidance systems.

CN120807378AActive Publication Date: 2025-10-17CHENGDU NUOBIKAN TECH CO LTD

Patent Information

Application Number
CN202511307740.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-15
Publication Date
2025-10-17
Estimated Expiration
2045-09-15

AI Technical Summary

Technical Problem

Existing image processing methods cannot simultaneously address the overexposure issues in glare areas and the low contrast issues in shadow areas under glare and shadow environments. This results in blurred key features, inaccurate identification of transition boundaries between shadow and non-shadow areas, and loss of image features due to sudden changes in illumination. This affects the accuracy of model identification and distance measurement, making it difficult to adapt to dynamic scenes in real time.

Method used

By accurately dividing shadow and non-shadow areas using a region segmentation algorithm, and employing feature extraction and focus parameter mapping, combined with a dynamic compensation algorithm and shadow edge enhancement technology, the focus shift and sharpness are dynamically adjusted to achieve global focus balance.

Benefits of technology

Accurately identify aircraft fuselages, jet bridges, and vehicle targets to ensure the real-time and accuracy of apron equipment positioning status monitoring and personnel behavior recognition, improve image quality and ranging accuracy, and meet the high requirements of intelligent parking guidance systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120807378A_ABST
    Figure CN120807378A_ABST
Patent Text Reader

Abstract

The invention discloses an image processing method for improving dazzle light and shadow environments, which comprises the following steps of: adjusting focus offset in real time by adopting a dynamic compensation algorithm, and judging the correctness of a current focusing direction and the suitability of a focusing amplitude by monitoring the change trend of a contrast value and the convergence state of a definition index in a focusing process; analyzing transition features of shadow and non-shadow areas through a shadow edge enhancement algorithm, and dynamically adjusting the direction and amplitude of focus transformation to obtain a real position locking result of a shadow edge; and for the improved edge sharpness distribution parameters, verifying the focus consistency of the whole image by adopting a feature matching algorithm, and obtaining an evaluation result of global focus quality by calculating the definition difference between different regions.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of image processing, and particularly relates to an image processing method for improving images in a glare and shadow environment. BACKGROUND

[0002] In an airport intelligent parking guidance system (A-VDGS) and a comprehensive management system for a safety of a ramp, an image recognition technology needs to realize high-precision aircraft model recognition, distance measurement, obstacle detection and personnel and vehicle monitoring in a complex lighting environment. The ramp is an open-air operation scene, which is easily affected by strong light direct radiation, cloud layer shielding, building shadow and ground reflection, etc., so that serious glare and shadow regions appear in the image.

[0003] The existing image processing method has significant limitations when dealing with such scenes: firstly, a global focusing strategy cannot take into account the overexposure of the glare region and the low contrast of the shadow region, resulting in blurred key features such as aircraft contours, bridge states and vehicles; secondly, the transition boundary between the shadow and non-shadow regions is not accurately identified, affecting the model judgment (such as misjudging the details of the fuselage) and the distance measurement accuracy (the error exceeds the grading requirement of 50cm / 20cm / 10cm); thirdly, in a dynamic scene (such as aircraft taxiing and vehicle passing), sudden changes in light can easily cause image feature loss, resulting in delayed or false obstacle warning, which threatens the safety of the ramp operation.

[0004] In addition, the shadow of the ramp equipment (such as high-pole lamps and bridges) changes dynamically over time, and traditional static image processing algorithms are difficult to adapt in real time, resulting in ineffective monitoring of the analysis unit on the in-place state of the protection equipment and the illegal behavior of personnel, and a decrease in the guidance and distance measurement accuracy.

[0005] Therefore, there is an urgent need for a processing method that can optimize image quality in a glare and shadow environment to meet the high requirements of real-time, accuracy and robustness of the intelligent parking guidance system. SUMMARY

[0006] The purpose of the present application is to provide an image processing method for improving images in a glare and shadow environment, to solve the problems in the prior art that the overexposure of the glare region, the inaccurate transition boundary between the shadow and non-shadow regions and the sudden changes in light easily causing image feature loss cannot be taken into account.

[0007] To solve the above technical problems, the technical solution adopted by the present application is: An image processing method for improving images in a glare and shadow environment, the method comprising: obtaining original image data in a glare and shadow environment, accurately dividing the image into a shadow region and a non-shadow region through a region segmentation algorithm, determining the boundary coordinates and region identification information of each region according to the gray distribution characteristics and neighborhood contrast difference of the pixel points; For the shadow area in the region identification information, the average gray value and gray variance of each shadow area are calculated by using a feature extraction method, and the quantization value of the shadow intensity and the depth recognition result are obtained by analyzing the statistical characteristics and histogram shape parameters of the gray distribution; According to the shadow intensity and the depth recognition result, a parameter mapping relationship table between the shadow characteristics and the focusing parameters is established, if the shadow intensity is lower than a preset shallow threshold, a small step focusing mode is adopted, and if the shadow intensity is higher than a preset deep threshold, a large step focusing mode is adopted; Through the focusing parameter configuration in the parameter mapping relationship table, differential focus offset calculation is performed on different shadow areas, and the focus offset amount and the convergence speed parameter of each area are determined according to the shadow depth level and the area area weight; The dynamic compensation algorithm is used to adjust the focus offset amount in real time, and the correctness of the current focusing direction and the suitability of the focusing amplitude are judged by monitoring the change trend of the contrast value and the convergence state of the definition index in the focusing process; If the contrast value shows an upward trend and the definition index continuously improves, the current focusing parameter is maintained to continue the fine adjustment operation, and if the contrast value decreases or the definition index tends to be stable, the focusing action in the current direction is stopped and the shadow edge enhancement algorithm is introduced; The transition characteristics of the shadow and non-shadow area are analyzed by the shadow edge enhancement algorithm, and the direction and amplitude of the focus transformation are dynamically adjusted to obtain the real position locking result of the shadow edge; For the improved edge sharpness distribution parameters, a feature matching algorithm is used to verify the focus consistency of the overall image, and the evaluation result of the global focus quality is obtained by calculating the definition difference between different areas; If the evaluation result shows that the focus difference between the areas exceeds the preset tolerance range, the dynamic compensation algorithm of the local area is re-executed according to the evaluation result, the focus offset amount is adjusted by the dynamic compensation algorithm, and the final clear image output is obtained until all the shadow areas and non-shadow areas reach the focus balance state.

[0008] According to the above technical scheme, the original image data in the glare shadow environment is obtained, the image is accurately divided into shadow area and non-shadow area by the region segmentation algorithm, and the boundary coordinates and region identification information of each area are determined according to the gray distribution characteristics and neighborhood contrast difference of the pixel points, including: The original image data in the glare environment is obtained, the image data is processed by the preprocessing module to remove noise and equalize brightness, and the standardized image data is obtained; The standardized image data is processed by using a gray scale conversion algorithm, the gray value distribution of each pixel point is calculated, and the complete pixel gray matrix information is obtained; According to the pixel gray matrix information, a neighborhood contrast value between adjacent pixel points is calculated, and if the neighborhood contrast value exceeds a preset threshold, it is judged that the region has an obvious light change boundary; Through a region growing algorithm, pixel points with light change boundaries are clustered and analyzed, and pixel points with similar gray characteristics are merged into the same region identifier to obtain a preliminary region segmentation result; A boundary detection method is used to extract boundary coordinates of the preliminary region segmentation result, calculate the contour coordinate point sequence of each segmented region, and obtain accurate boundary coordinate data; According to the boundary coordinate data and feature analysis, if the gray distribution in the region is uniform and the contrast difference is small, the region is marked as a non-shading region, and if the gray value in the region is low and the contrast difference with the surrounding region is large, the region is marked as a shading region; Through a region identifier assignment mechanism, all segmented regions are uniquely identified and coded, a corresponding relationship database between region identifiers and boundary coordinates is established, and an accurate division task of the shading region and the non-shading region is completed.

[0009] According to the above technical solution, for the shading region in the region identifier information, a feature extraction method is used to calculate the average gray value and the gray variance of each shading region, and through analysis of the statistical characteristics and histogram shape parameters of the gray distribution, a quantitative value of the shadow intensity and a depth recognition result are obtained, including: The coordinate range of the shading region in the region identifier information is obtained, the gray pixel values in each shading region are extracted through pixel traversal, and a complete shading region gray data set is obtained; The gray data set is processed by a statistical calculation method, and the average gray value μ and the gray variance of each shading region are calculated, where μ represents the mean value of the pixel gray in the region, σ2 represents the dispersion degree of the gray value, and the basic statistical characteristics of the shading region are determined; A gray histogram of each shading region is constructed according to the statistical characteristics, and shape parameters such as peak position, distribution width and skewness are obtained through histogram analysis to obtain the gray distribution mode of the shading region; If the peak position in the shape parameter is lower than a preset threshold and the distribution width is narrow, it is judged that the shading region is a high-intensity shadow, and the corresponding intensity quantitative value is obtained; A K-means clustering algorithm is used to classify and process the quantitative value, the shadow intensity level is divided according to the distance of the cluster center, and the depth level identifier of each shading region is determined through level mapping; Through the correlation analysis of the depth level identifier and the gray variance, if the variance value exceeds a preset range, the feature parameters of the region are recalculated, and the corrected shadow intensity evaluation result is obtained; According to the evaluation result, the intensity distribution atlas of the shadow area is generated, the quantization value and the depth level information of each area are marked, and complete shadow feature recognition data is obtained.

[0010] According to the above technical scheme, according to the shadow intensity and depth recognition result, the parameter mapping relationship table between the shadow feature and the focusing parameter is established, if the shadow intensity is lower than the preset shallow layer threshold value, the small step focusing mode is adopted, if the shadow intensity is higher than the preset deep layer threshold value, the large step focusing mode is adopted, including: The original image data collected by the image sensor is acquired, and the shadow intensity distribution matrix of each pixel point is obtained by calculating the gray value; According to the shadow intensity distribution matrix, the depth information of the shadow area is calculated by using the gradient algorithm, and a shadow depth feature vector is obtained; By comparing the shadow depth feature vector with the preset shallow layer threshold value, if the depth feature value is less than the shallow layer threshold value, it is determined that the current scene is in a shallow shadow state; According to the shallow shadow state judgment result, the focusing system automatically switches to the small step focusing mode, and the corresponding fine focusing parameter group is acquired; If the shadow depth feature value is greater than the preset deep layer threshold value, it is judged that the current scene is in a deep shadow state, and the focusing system switches to the large step focusing mode; The mapping relationship model of the shadow feature and the focusing parameter is trained by using the support vector machine algorithm, and the optimized parameter mapping table is obtained; The best focusing parameter corresponding to the current shadow state is queried through the parameter mapping table, and the focusing motor is driven to perform the corresponding focal length adjustment operation.

[0011] According to the above technical scheme, through the focusing parameter configuration in the parameter mapping relationship table, the focal point offset calculation of different shadow areas is performed, according to the shadow depth level and the area weight, the focal point offset amount and the convergence speed parameter of each area are determined, including: The focusing configuration data in the preset parameter mapping relationship table is acquired, the basic focal point parameters corresponding to each shadow area are analyzed, and an initial focusing parameter set is obtained; The shadow area recognition is performed on the input image by using the image segmentation algorithm, the boundary coordinates and the pixel distribution of each shadow area are calculated, and the spatial position information of the shadow area is determined; According to the shadow area pixel gray value distribution feature, the depth level value of each area is calculated, if the gray mean value is lower than the preset threshold value, it is determined as a deep shadow area, and the depth level identifier is obtained; The area weight coefficient of each area is calculated by the ratio of the total number of shadow area pixels to the total number of image pixels, and a region area weight parameter matrix is obtained; The focus offset value of each shadow area is calculated by using a weighted calculation method, combining the depth level value and the area weight coefficient, and the differentiated offset parameter is determined; According to the change range of the focus offset value, an adaptive adjustment strategy is used to calculate the convergence speed parameter, and if the offset value exceeds the preset range, the convergence speed is reduced to obtain the final convergence control parameter; The focus offset value and the convergence speed parameter of each shadow area are grouped and optimized by using a clustering algorithm to generate a set of regional precise adjustment control instructions.

[0012] According to the above technical solution, the focus offset is adjusted in real time by using a dynamic compensation algorithm, the correctness of the current focusing direction and the suitability of the focusing amplitude are judged by monitoring the change trend of the contrast value and the convergence state of the definition index during the focusing process, including: The pixel gray scale distribution data of the current image frame is obtained, the contrast value and the definition index of the image frame are calculated by using the Laplace operator, and the initial focus state parameter is obtained; A contrast change trend sequence is established according to the initial focus state parameter, and the contrast difference value between consecutive frames is recorded by using a sliding window method to determine the change trend direction of the current focusing process; If the change trend direction shows that the contrast value is continuously rising, it is judged that the current focusing direction is correct, and a positive focusing instruction signal is obtained; If the change trend direction shows that the contrast value is continuously decreasing, it is judged that the current focusing direction is incorrect, and a focusing direction correction instruction is generated by using a reverse control algorithm; The definition convergence state parameter is calculated according to the focusing direction correction instruction, the adjustment step of the focus offset is optimized by using the gradient descent method, and the dynamic compensation coefficient is obtained; The focus offset driven by the motor is adjusted in real time by using the dynamic compensation coefficient, the influence degree of the focusing amplitude change on the definition index is monitored, and the suitability evaluation result of the focusing amplitude is judged; According to the suitability evaluation result, the final focus position control parameter is output, and the closed-loop control of the entire dynamic compensation focusing process is completed.

[0013] According to the above technical solution, if the contrast value shows an upward trend and the definition index continuously improves, the current focusing parameter is maintained to continue the fine tuning operation, and if the contrast value decreases or the definition index tends to be stable, the focusing action in the current direction is stopped and a shadow edge enhancement algorithm is introduced, including: The original image data collected by the image sensor is obtained, and the contrast value of the original image is calculated by using a contrast detection module; According to the contrast value change, the definition value of the current image is calculated by using a definition evaluation algorithm to obtain the change trend of the definition index; If the contrast value shows an upward trend and the sharpness value continues to improve, the current focusing parameter setting is maintained, and an execution instruction for fine adjustment operation is obtained; The lens focal length position is adjusted through fine adjustment operation, new image data after adjustment is obtained, and the change state of the contrast value of the new image data is judged; If the contrast value shows a downward trend or the sharpness value tends to be stable, a stop action instruction is generated, and a termination condition of the current focusing direction is determined; According to the stop action instruction, a shadow edge enhancement algorithm is used to process the current image to obtain edge-enhanced image data; The contrast value and the sharpness value are recalculated using the edge-enhanced image data, the improvement degree of the image quality is judged, and the final focusing parameter configuration is determined.

[0014] According to the above technical scheme, the transition characteristics of the shadow and non-shadow area are analyzed by the shadow edge enhancement algorithm, the direction and amplitude of the focal point transformation are dynamically adjusted, and the real position locking result of the shadow edge is obtained, including: The original image data is obtained, and the Sobel operator is used to perform edge detection processing on the image to obtain an initial edge response image; According to the gradient intensity distribution in the initial edge response image, the gradient direction angle θ=arctan(Gy / Gx) of each pixel point is calculated, where Gx represents the horizontal direction gradient and Gy represents the vertical direction gradient, to obtain a direction angle matrix; The angle change rate of adjacent pixel points is analyzed through the direction angle matrix, and if the angle change rate exceeds a preset threshold, it is judged that the region has a shadow transition characteristic, and a candidate shadow edge region is obtained; For the candidate shadow edge region, a gray value statistical analysis method is used to calculate the mean and standard deviation of the pixel gray value in the region, and if the mean is lower than the overall mean and the standard deviation is greater than a preset value, the region is determined as a real shadow edge, and a shadow edge marker map is obtained. According to the edge pixel distribution in the shadow edge marker map, the center coordinates and transformation radius of the focal point transformation are calculated, the sensitivity parameter of edge detection is adjusted through the transformation radius, and the optimized edge detection parameter is obtained; The original image is reprocessed using the optimized edge detection parameter, and if the detected edge continuity index is higher than a threshold, it is judged that the edge position is accurate, and a final shadow edge position coordinate set is obtained; The edge contour line is constructed through the final shadow edge position coordinate set, the contour line is smoothed by a polynomial fitting method, and an accurate shadow edge positioning result is obtained.

[0015] According to the above technical scheme, the feature matching algorithm is used to verify the focus consistency of the overall image for the enhanced edge sharpness distribution parameter, and the evaluation result of the global focus quality is obtained by calculating the definition difference between different regions, including: Obtain the edge sharpness value of each region in the image, calculate the gradient amplitude of each pixel point by the gradient operator, and obtain the initial edge sharpness distribution data; According to the initial edge sharpness distribution data, the Gaussian filter processing is used to eliminate noise interference, and if the gradient amplitude exceeds the preset threshold, it is marked as an effective edge point, and the optimized edge sharpness distribution parameter is obtained; Through the optimized edge sharpness distribution parameter, the SIFT feature matching algorithm is used to extract the key feature points of the image, the Euclidean distance between the feature points is calculated, and the feature matching measurement value is obtained; The feature matching measurement value is used to divide the image into multiple sub-regions, and if the feature matching measurement value difference between adjacent regions is less than the preset difference threshold, it is judged that the region focus consistency is good, and the region focus state identifier is determined; According to the region focus state identifier, the definition variance value between regions is calculated, and the definition difference degree of different regions is quantified by variance analysis method, and the region definition difference matrix is obtained; Using the region definition difference matrix, if the overall variance value is lower than the preset consistency threshold, it is judged that the global focus quality is excellent, and the global focus quality evaluation score is obtained; Through the global focus quality evaluation score, a focus quality level mapping table is established, the final focus quality level is determined according to the score range, and the complete image focus quality evaluation result is obtained.

[0016] According to the above technical scheme, if the evaluation result shows that the focus difference between regions exceeds the preset tolerance range, the dynamic compensation algorithm of local region is re-executed according to the evaluation result, the focus offset is adjusted by the dynamic compensation algorithm, until all shadow regions and non-shadow regions reach the focus balance state, and the final clear image output is obtained, including: Obtain the pixel matrix data of the input image, identify the shadow region and non-shadow region boundary in the image by the edge detection algorithm, and determine the initial focus parameter of each region according to the light intensity distribution characteristics; The focus difference calculation is used to quantify the difference between the shadow region focus value and the non-shadow region focus value, and the focus deviation data between regions is obtained; If the focus difference value exceeds the preset tolerance threshold, the local region compensation mechanism is started, the focus distribution pattern of each local region is analyzed by the convolutional neural network model, and the specific region coordinates that need to be compensated are judged; According to the local area coordinate information, a focal point offset adjustment algorithm is used to calculate compensation parameters, and by adjusting the focal point offset of each area, an optimized focal point parameter matrix is obtained. The original image is subjected to pixel-level focal point correction through the focal point parameter matrix, and the focal point value of each pixel point is recalculated using a bilinear interpolation method to obtain intermediate image data after focal point balancing. The focal point difference detection is performed again on the intermediate image data, and if the focal point difference of all areas is within the tolerance range, the focal point balancing state verification is completed, and the final clear image output result is obtained. According to the clear image output result, processing data containing focal point compensation parameters, area distribution information and image quality evaluation indexes are generated, and the whole image focal point balancing processing flow is completed.

[0017] Compared with the prior art, the present application has the following beneficial effects: In the present application, through the shadow area segmentation and feature extraction algorithm, the target and background shadow such as aircraft fuselage, corridor bridge and vehicle are accurately distinguished, and the dynamic compensation focusing strategy is combined to solve the problems of overexposure caused by glare and low contrast caused by shadow.

[0018] The shadow edge enhancement algorithm and real-time contrast monitoring are used to accurately lock the nose wheel coordinates and speed parameters (continuous output from 0 to stop) during the aircraft taxiing process, and effectively identify the behavior of personnel and vehicles passing between the aircraft and the guiding equipment. With dynamic compensation closed-loop control, the real-time monitoring of the ROC system on the position of the apron equipment (such as fuel truck, baggage truck) and the retracted position of the corridor bridge is ensured without delay, and the response time of the illegal behavior alarm meets the airport safety management specifications. BRIEF DESCRIPTION OF DRAWINGS

[0019] Figure 1 A flowchart of an image processing method for improving the glare and shadow environment of the present application; Figure 2 One of the schematic diagrams of an image processing method for improving the glare and shadow environment of the present application; Figure 3 The second schematic diagram of an image processing method for improving the glare and shadow environment of the present application. DETAILED DESCRIPTION

[0020] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0021] Embodiment one As Figure 1-3 shown, a method for improving image processing in a glare and shadow environment can specifically include the following steps: S101, obtain original image data in a glare and shadow environment, accurately divide the shadow area and the non-shadow area of the image through a region segmentation algorithm, determine the boundary coordinates and region identification information of each region according to the gray distribution characteristics and neighborhood contrast difference of the pixel points. Specifically: Obtain the original image data in the glare environment, and perform noise filtering and brightness equalization processing on the image data through a preprocessing module to obtain standardized image data. Process the standardized image data using a gray scale conversion algorithm to calculate the gray value distribution of each pixel point and obtain complete pixel gray matrix information. Calculate the neighborhood contrast value between adjacent pixel points according to the pixel gray matrix information. If the neighborhood contrast value exceeds a preset threshold, it is determined that there is an obvious light change boundary in the region.

[0022] Perform clustering analysis on the pixel points with light change boundaries through a region growing algorithm, merge the pixel points with similar gray characteristics into the same region identification, and obtain the preliminary region segmentation result. Use a boundary detection method to extract the boundary coordinates of the preliminary region segmentation result, calculate the contour coordinate point sequence of each segmented region, and obtain accurate boundary coordinate data.

[0023] According to the boundary coordinate data and feature analysis, if the gray distribution in the region is uniform and the contrast difference is small, mark the region as a non-shadow region; if the gray value in the region is low and the contrast difference with the surrounding region is large, mark the region as a shadow region. Assign a unique identification code to all segmented regions through a region identification assignment mechanism, establish a corresponding relationship database between region identification and boundary coordinates, and complete the accurate division task of shadow regions and non-shadow regions.

[0024] S102, for the shadow regions in the region identification information, calculate the average gray value and gray variance of each shadow region using a feature extraction method, and obtain the quantization value of shadow intensity and depth recognition result by analyzing the statistical characteristics and histogram shape parameters of the gray distribution. Specifically: Obtain the coordinate range of the shadow regions in the region identification information, extract the gray pixel values in each shadow region through pixel traversal, and obtain the complete shadow region gray data set. Process the gray data set using a statistical calculation method to calculate the average gray value μ and the gray variance σ² of each shadow region, where μ represents the mean value of the pixel gray in the region, and σ² represents the dispersion degree of the gray value, and determine the basic statistical characteristics of the shadow region.

[0025] According to the statistical characteristics, a gray scale histogram of each shadow area is constructed, and shape parameters such as peak position, distribution width and skewness are obtained by histogram analysis to obtain a gray scale distribution mode of the shadow area. If the peak position in the shape parameter is lower than a preset threshold and the distribution width is relatively narrow, it is judged that the shadow area is a high-intensity shadow, and a corresponding intensity quantization value is obtained. The K-means clustering algorithm is used for classification processing of the quantization value, the shadow intensity level is divided according to the distance of the cluster center, and the depth level identifier of each shadow area is determined through level mapping.

[0026] Through the correlation analysis of the depth level identifier and the gray scale variance, if the variance value exceeds the preset range, the feature parameters of the area are recalculated, and the corrected shadow intensity evaluation result is obtained. According to the evaluation result, an intensity distribution map of the shadow area is generated, the quantization value and the depth level information of each area are marked, and complete shadow feature recognition data is obtained.

[0027] S103, according to the shadow intensity and depth recognition result, a parameter mapping relationship table between shadow features and focusing parameters is established, if the shadow intensity is lower than a preset shallow layer threshold, a small step focusing mode is used, and if the shadow intensity is higher than a preset deep layer threshold, a large step focusing mode is used. Specifically: The original image data collected by the image sensor is obtained, and the shadow intensity distribution matrix of each pixel point is obtained by calculating the gray value. According to the shadow intensity distribution matrix, the depth information of the shadow area is calculated by using the gradient algorithm, and the shadow depth feature vector is obtained. By comparing the shadow depth feature vector with the preset shallow layer threshold, if the depth feature value is less than the shallow layer threshold, it is determined that the current scene is in a shallow shadow state. According to the shallow shadow state judgment result, the focusing system automatically switches to the small step focusing mode to obtain the corresponding fine focusing parameter group. If the shadow depth feature value is greater than the preset deep layer threshold, it is judged that the current scene is in a deep shadow state, and the focusing system switches to the large step focusing mode.

[0028] The support vector machine algorithm is used to train the mapping relationship model of shadow features and focusing parameters, and the optimized parameter mapping table is obtained. The best focusing parameter corresponding to the current shadow state is queried through the parameter mapping table, and the focusing motor is driven to perform the corresponding focal length adjustment operation.

[0029] S104, by the focusing parameter configuration in the parameter mapping relationship table, the focal point offset calculation of different shadow areas is performed, and the focal point offset and convergence speed parameters of each area are determined according to the shadow depth level and area area weight. Specifically: The focusing configuration data in the preset parameter mapping relationship table is acquired, the basic focus parameter corresponding to each shadow area is parsed, and an initial focusing parameter set is obtained. An image segmentation algorithm is used to identify the shadow area of the input image, the boundary coordinates and pixel distribution of each shadow area are calculated, and the spatial position information of the shadow area is determined. According to the pixel gray value distribution characteristics of the shadow area, the depth level value of each area is calculated, if the average gray value is lower than the preset threshold, it is determined as a deep shadow area, and the depth level identifier is obtained. The area weight coefficient of each area is calculated by the ratio of the total number of pixels in the shadow area to the total number of pixels in the image, and the area weight parameter matrix is obtained. The focus offset value of each shadow area is calculated by using a weighted calculation method combined with the depth level value and the area weight coefficient, and the differentiated offset parameter is determined.

[0030] According to the change amplitude of the focus offset value, an adaptive adjustment strategy is used to calculate the convergence speed parameter, if the offset value exceeds the preset range, the convergence speed is reduced, and the final convergence control parameter is obtained. The focus offset value and the convergence speed parameter of each shadow area are grouped and optimized by using a clustering algorithm, and a regionalized precise adjustment control instruction set is generated.

[0031] S105, a dynamic compensation algorithm is used to adjust the focus offset in real time, the correctness of the current focusing direction and the suitability of the focusing amplitude are judged by monitoring the change trend of the contrast value and the convergence state of the definition index in the focusing process. Specifically: The pixel gray value distribution data of the current image frame is acquired, the contrast value and the definition index of the image frame are calculated by using the Laplace operator, and the initial focus state parameter is obtained. The contrast change trend sequence is established according to the initial focus state parameter, the contrast difference value between consecutive frames is recorded by using a sliding window method, and the change trend direction of the current focusing process is determined. If the change trend direction shows that the contrast value continues to rise, it is judged that the current focusing direction is correct, and a positive focusing instruction signal is obtained. If the change trend direction shows that the contrast value continues to decrease, it is judged that the current focusing direction is incorrect, and a focusing direction correction instruction is generated by using a reverse control algorithm. The definition convergence state parameter is calculated according to the focusing direction correction instruction, the adjustment step of the focus offset is optimized by using the gradient descent method, and the dynamic compensation coefficient is obtained.

[0032] The focus offset driven by the motor is adjusted in real time by the dynamic compensation coefficient, the influence degree of the focusing amplitude change on the definition index is monitored, and the suitability evaluation result of the focusing amplitude is judged. The final focus position control parameter is output according to the suitability evaluation result, and the closed-loop control of the whole dynamic compensation focusing process is completed.

[0033] S106: If the contrast value shows an upward trend and the clarity index continues to improve, the current focus parameters are maintained and fine-tuning is continued. If the contrast value decreases or the clarity index tends to be stable, the focus adjustment in the current direction is stopped and the shadow edge enhancement algorithm is introduced. Specifically: The image sensor acquires raw image data and uses the contrast detection module to calculate its contrast. Based on the contrast changes, a sharpness evaluation algorithm is used to calculate the sharpness of the current image and determine the trend of sharpness. If the contrast shows an upward trend and the sharpness continues to improve, the current focus parameter settings are maintained and the execution instruction for the fine-tuning operation is obtained.

[0034] Fine-tune the lens focus position, obtain the adjusted new image data, and determine the contrast change of the new image data. If the contrast value decreases or the clarity value stabilizes, a stop action command is generated to determine the termination condition for the current focus direction. Based on the stop action command, the shadow edge enhancement algorithm is activated to process the current image, obtaining edge-enhanced image data. Using this edge-enhanced image data, the contrast and clarity values ​​are recalculated to determine the degree of image quality improvement and determine the final focus parameter configuration.

[0035] S107: Analyze the transition characteristics between shadow and non-shadow areas through the shadow edge enhancement algorithm, dynamically adjust the direction and amplitude of the focus change, and obtain the real position locking result of the shadow edge. Specifically: Obtain the original image data and perform edge detection on the image using the Sobel operator to obtain the initial edge response image. Based on the gradient intensity distribution in the initial edge response image, calculate the gradient direction angle of each pixel point, specifically: θ=arctan(Gy / Gx) Where Gx represents the horizontal gradient, Gy represents the vertical gradient, and the direction angle matrix is ​​obtained.

[0036] The angular change rate of adjacent pixels is analyzed using a directional angle matrix. If the angular change rate exceeds a preset threshold, the region is judged to contain shadow transition features, resulting in a candidate shadow edge region. For candidate shadow edge regions, a grayscale statistical analysis method is used to calculate the mean and standard deviation of the pixel grayscale within the region. If the grayscale mean is lower than the overall image mean and the standard deviation is greater than a preset value, the region is determined to be a true shadow edge, resulting in a shadow edge marker map. Based on the distribution of edge pixels in the shadow edge marker map, the center coordinates and transformation radius of the focus transformation are calculated. The sensitivity parameters of edge detection are adjusted using the transformation radius to obtain optimized edge detection parameters.

[0037] Reprocess the original image with the optimized edge detection parameters, if the continuity index of the detected edge is higher than the threshold value, it is judged that the edge position is accurate, and the final shadow edge position coordinate set is obtained. The edge contour line is constructed through the final shadow edge position coordinate set, and the polynomial fitting method is used for smoothing processing of the contour line, and the accurate shadow edge positioning result is obtained.

[0038] S108, for the improved edge sharpness distribution parameter, the feature matching algorithm is used to verify the focus consistency of the whole image, and the evaluation result of the global focus quality is obtained by calculating the definition difference between different regions. Specifically: Obtain the edge sharpness value of each region in the image, calculate the gradient amplitude of each pixel point by gradient operator, and obtain the initial edge sharpness distribution data. According to the initial edge sharpness distribution data, the noise interference is eliminated by using Gaussian filter processing, if the gradient amplitude exceeds the preset threshold value, it is marked as effective edge point, and the optimized edge sharpness distribution parameter is obtained. By using the SIFT feature matching algorithm, the key feature points of the image are extracted by using the optimized edge sharpness distribution parameter, the Euclidean distance between the feature points is calculated, and the feature matching degree value is obtained. The image is divided into multiple sub-regions by using the feature matching degree value, if the difference between the adjacent regions is less than the preset difference threshold value, it is judged that the region focus consistency is good, and the region focus state identifier is determined. According to the focus state identifier of each region, the definition variance value between regions is calculated, and the definition difference degree of different regions is quantified by variance analysis method, and the region definition difference matrix is obtained. If the overall variance value is lower than the preset consistency threshold value, it is judged that the global focus quality is excellent, and the global focus quality evaluation score is obtained. Through the global focus quality evaluation score, the focus quality level mapping table is established, and the final focus quality level is determined according to the score range, and the complete image focus quality evaluation result is obtained.

[0039] S109, if the evaluation result shows that the focus difference between regions exceeds the preset tolerance range, the dynamic compensation algorithm of local region is reexecuted according to the evaluation result, the focus offset is adjusted by the dynamic compensation algorithm, until all shadow regions and non-shadow regions reach the focus balance state, and the final clear image output is obtained. Specifically: Obtain the pixel matrix data of the input image, identify the shadow region and non-shadow region boundary in the image by edge detection algorithm, and determine the initial focus parameter of each region according to the light intensity distribution characteristic. The focus value of the shadow region and the focus value of the non-shadow region are quantified by difference, and the formula is as follows: wherein The focus difference value represents the focus difference value, and the focus deviation data between the regions is obtained. If the focus difference value exceeds the preset tolerance threshold , the local area compensation mechanism is started, the focus distribution pattern of each local area is analyzed by the convolutional neural network model, and the specific area coordinates that need to be compensated are judged. According to the local area coordinate information, the focus offset adjustment algorithm is used to calculate the compensation parameters, and the focus offset of each area is adjusted by the formula, as follows: Wherein α is the adjustment coefficient, is the area weight factor, and the optimized focus parameter matrix is obtained. The original image is pixel-level focus corrected by the focus parameter matrix, the focus value of each pixel point is recalculated by using the bilinear interpolation method, and the intermediate image data after focus balancing is obtained. The focus difference detection is performed again on the intermediate image data, and if the focus difference of all areas is within the tolerance range, the focus balancing state verification is completed, and the final clear image output result is obtained. According to the clear image output result, the processing data containing the focus compensation parameters, the area distribution information and the image quality evaluation index are generated, and the whole image focus balancing processing flow is completed.

[0040] It should be noted that in this paper, the relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the term "includes", "contains" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or equipment.

[0041] Finally, it should be noted that: the above only describes the preferred embodiments of the present application, and does not limit the present application, although the present application has been described in detail with reference to the foregoing embodiments, and those skilled in the art can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for image processing to improve glare and shadow environments, characterized by: Methods include: Obtain original image data in a glare shadow environment, accurately divide the image into shadow and non-shadow areas using a region segmentation algorithm, and determine the boundary coordinates and region identification information of each region based on the grayscale distribution characteristics of the pixel points and the contrast difference of the neighborhood; For the shadow areas in the area identification information, the feature extraction method is used to calculate the average grayscale value and grayscale variance of each shadow area. By analyzing the statistical characteristics of the grayscale distribution and the histogram shape parameters, the quantitative value of the shadow intensity and the depth recognition result are obtained; Based on the shadow intensity and depth recognition results, a parameter mapping relationship table between shadow features and focusing parameters is established. If the shadow intensity is lower than the preset shallow threshold, a small step focusing mode is adopted. If the shadow intensity is higher than the preset deep threshold, a large step focusing mode is adopted. By configuring the focus parameters in the parameter mapping table, differentiated focus offset calculations are performed for different shadow areas. The focus offset and convergence speed parameters for each area are determined based on the shadow depth level and area weight. A dynamic compensation algorithm is used to adjust the focus offset in real time. By monitoring the changing trend of the contrast value and the convergence state of the clarity index during the focusing process, the correctness of the current focusing direction and the suitability of the focusing range are judged. If the contrast value shows an upward trend and the clarity index continues to improve, the current focus parameters are maintained and fine-tuning is continued. If the contrast value decreases or the clarity index tends to stabilize, the focus action in the current direction is stopped and the shadow edge enhancement algorithm is introduced; The shadow edge enhancement algorithm analyzes the transition characteristics between shadow and non-shadow areas, dynamically adjusts the direction and amplitude of focus change, and obtains the true position locking result of the shadow edge; Based on the improved edge sharpness distribution parameters, a feature matching algorithm is used to verify the focus consistency of the entire image. By calculating the difference in clarity between different areas, the global focus quality evaluation result is obtained; If the evaluation results show that the focus difference between areas exceeds the preset tolerance range, the dynamic compensation algorithm of the local area will be re-executed according to the evaluation results, and the focus offset will be adjusted through the dynamic compensation algorithm until all shadow areas and non-shadow areas reach a focus balance state to obtain the final clear image output.

2. The image processing method for improving glare and shadow environments according to claim 1, characterized in that: Obtain original image data in a glare and shadow environment, and use a region segmentation algorithm to accurately divide the image into shadow and non-shadow areas. Based on the grayscale distribution characteristics of the pixels and the contrast differences of the neighborhood, determine the boundary coordinates and region identification information of each region, including: Obtain the original image data in the glare environment, and perform noise filtering and brightness equalization on the image data through the preprocessing module to obtain standardized image data; The grayscale conversion algorithm is used to process the standardized image data, calculate the grayscale value distribution of each pixel, and obtain the complete pixel grayscale matrix information; Calculate the neighborhood contrast value between adjacent pixels based on the pixel grayscale matrix information. If the neighborhood contrast value exceeds a preset threshold, it is determined that there is an obvious illumination change boundary in the local neighborhood where the adjacent pixels whose neighborhood contrast value exceeds the preset threshold are located. Cluster analysis is performed on pixels with illumination change boundaries using the region growing algorithm, and pixels with similar grayscale features are grouped into the same region identifier to obtain preliminary region segmentation results. The boundary detection method is used to extract the boundary coordinates of the preliminary region segmentation results, and the contour coordinate point sequence of each segmented region is calculated to obtain accurate boundary coordinate data; According to the boundary coordinate data and feature analysis, if the grayscale distribution in the area is uniform and the contrast difference is small, the area is marked as a non-shadow area. If the grayscale value in the area is low and the contrast difference with the surrounding area is large, the area is marked as a shadow area. All segmented areas are uniquely identified and coded through the area identification allocation mechanism, and a database of correspondence between area identification and boundary coordinates is established to complete the task of accurately dividing shadow areas and non-shadow areas.

3. The image processing method for improving glare and shadow environments according to claim 1, characterized in that: For the shadow areas in the area identification information, the feature extraction method is used to calculate the average grayscale value and grayscale variance of each shadow area. By analyzing the statistical characteristics of the grayscale distribution and the histogram shape parameters, the quantitative value of the shadow intensity and the depth recognition results are obtained, including: Obtain the coordinate range of the shadow area in the area identification information, extract the grayscale pixel values ​​in each shadow area through pixel traversal, and obtain a complete shadow area grayscale dataset; The grayscale data set is processed using statistical calculation methods to calculate the average grayscale value μ and grayscale variance σ² of each shadow area, where μ represents the mean grayscale value of the pixels in the area and σ² represents the degree of dispersion of the grayscale value, thus determining the basic statistical characteristics of the shadow area. The grayscale histogram of each shadow area is constructed based on the statistical characteristics. The shape parameters such as peak position, distribution width and skewness are obtained through histogram analysis to obtain the grayscale distribution pattern of the shadow area. If the peak position in the shape parameter is lower than the preset threshold and the distribution width is narrow, the shadow area is judged to be a high-intensity shadow, and the corresponding intensity quantization value is obtained; The K-means clustering algorithm is used to classify the quantitative values, and the shadow intensity levels are divided according to the cluster center distance. The depth level of each shadow area is determined by level mapping. Through the correlation analysis between the depth level identification and the grayscale variance, if the variance value exceeds the preset range, the characteristic parameters of the area are recalculated to obtain the corrected shadow intensity assessment result; Based on the evaluation results, an intensity distribution map of the shadow area is generated, and the quantitative values ​​and depth level information of each area are marked to obtain complete shadow feature recognition data.

4. The image processing method for improving glare and shadow environments according to claim 1, characterized in that: Based on the shadow intensity and depth recognition results, a parameter mapping relationship table between shadow features and focusing parameters is established. If the shadow intensity is lower than the preset shallow threshold, a small step focusing mode is adopted. If the shadow intensity is higher than the preset deep threshold, a large step focusing mode is adopted, including: Obtain the original image data collected by the image sensor and calculate the shadow intensity distribution matrix of each pixel through grayscale value; According to the shadow intensity distribution matrix, the gradient algorithm is used to calculate the depth information of the shadow area and obtain the shadow depth feature vector; By comparing the shadow depth feature vector with the preset shallow threshold, if the depth feature value is less than the shallow threshold, the current scene is determined to be in a shallow shadow state; According to the shallow shadow state judgment result, the focusing system automatically switches to the small step focusing mode and obtains the corresponding fine focusing parameter group; If the shadow depth characteristic value is greater than the preset deep threshold, the current scene is judged to be in a deep shadow state, and the focusing system switches to a large step length focusing mode; The support vector machine algorithm is used to train the mapping relationship model between shadow features and focusing parameters to obtain the optimized parameter mapping table; The optimal focusing parameters corresponding to the current shadow state are queried through the parameter mapping table, and the focusing motor is driven to perform the corresponding focal length adjustment operation.

5. The image processing method for improving glare and shadow environments according to claim 1, characterized in that: By configuring the focus parameters in the parameter mapping table, differentiated focus offset calculations are performed for different shadow areas. Based on the shadow depth level and area weight, the focus offset and convergence speed parameters for each area are determined, including: Obtain the focus configuration data in the preset parameter mapping relationship table, parse the basic focus parameters corresponding to each shadow area, and obtain the initial focus parameter set; Use image segmentation algorithm to identify shadow areas in the input image, calculate the boundary coordinates and pixel distribution of each shadow area, and determine the spatial location information of the shadow area; According to the grayscale value distribution characteristics of the shadow area pixels, the depth level value of each area is calculated. If the grayscale mean value is lower than the preset threshold, it is determined to be a deep shadow area and the depth level identification is obtained; The area weight coefficient of each region is calculated by the ratio of the total number of pixels in the shadow area to the total number of pixels in the image, and the area weight parameter matrix is ​​obtained; A weighted calculation method is used to combine the depth level value and the area weight coefficient to calculate the focus offset value of each shadow area and determine the differentiated offset parameters; According to the change range of the focus offset value, an adaptive adjustment strategy is used to calculate the convergence speed parameter. If the offset value exceeds the preset range, the convergence speed is reduced to obtain the final convergence control parameter; The focus offset value and convergence speed parameters of each shadow area are grouped and optimized through a clustering algorithm to generate a regionalized set of precise adjustment control instructions.

6. The image processing method for improving glare and shadow environments according to claim 1, characterized in that: A dynamic compensation algorithm is used to adjust the focus offset in real time. By monitoring the changing trend of the contrast value and the convergence state of the clarity index during the focusing process, the correctness of the current focusing direction and the suitability of the focusing range are judged, including: Obtain the pixel grayscale distribution data of the current image frame, calculate the contrast value and clarity index of the image frame through the Laplace operator, and obtain the initial focus state parameters; A contrast change trend sequence is established based on the initial focus state parameters, and the contrast difference between consecutive frames is recorded using a sliding window method to determine the change trend direction of the current focusing process. If the trend direction shows that the contrast value continues to rise, it is determined that the current focus direction is correct and a forward focus command signal is obtained; If the trend shows that the contrast value continues to decrease, it is determined that the current focus direction is wrong, and a focus direction correction instruction is generated through the reverse control algorithm; The sharpness convergence state parameters are calculated according to the focus direction correction instruction, and the adjustment step size of the focus offset is optimized by the gradient descent method to obtain the dynamic compensation coefficient; The motor-driven focus offset is adjusted in real time through the dynamic compensation coefficient, the impact of the focus adjustment amplitude change on the clarity index is monitored, and the suitability evaluation results of the focus adjustment amplitude are judged; The final focus position control parameters are output according to the suitability evaluation results to complete the closed-loop control of the entire dynamic compensation focusing process.

7. The image processing method for improving glare and shadow environments according to claim 1, characterized in that: If the contrast value shows an upward trend and the clarity index continues to improve, the current focus parameters are maintained and fine-tuning is continued. If the contrast value decreases or the clarity index tends to stabilize, the focus action in the current direction is stopped and the shadow edge enhancement algorithm is introduced, including: Obtain the original image data collected by the image sensor and calculate the contrast value of the original image through the contrast detection module; According to the change of contrast value, the clarity value of the current image is calculated using the clarity evaluation algorithm to obtain the change trend of the clarity index; If the contrast value shows an upward trend and the clarity value continues to improve, the current focus parameter settings are maintained and an execution instruction for the fine-tuning operation is obtained; Adjust the focal length of the lens through fine-tuning operations, obtain new image data after adjustment, and determine the contrast value change status of the new image data; If the contrast value decreases or the clarity value tends to be stable, a stop action instruction is generated to determine the termination condition of the current focus direction; According to the stop action instruction, the shadow edge enhancement algorithm is enabled to process the current image to obtain the edge-enhanced image data; The edge-enhanced image data is used to recalculate the contrast and clarity values, determine the degree of image quality improvement, and determine the final focusing parameter configuration.

8. The image processing method for improving glare and shadow environments according to claim 1, characterized in that: The shadow edge enhancement algorithm analyzes the transition characteristics between shadow and non-shadow areas, dynamically adjusts the direction and amplitude of the focus change, and obtains the true position locking result of the shadow edge, including: Obtain the original image data, use the Sobel operator to perform edge detection on the image, and obtain the initial edge response image; According to the gradient intensity distribution in the initial edge response image, the gradient direction angle θ = arctan (Gy / Gx) of each pixel is calculated, where Gx represents the horizontal gradient and Gy represents the vertical gradient, and the direction angle matrix is ​​obtained; The angle change rate of adjacent pixels is analyzed through the direction angle matrix. If the angle change rate exceeds a preset threshold, it is determined that the local area where the adjacent pixels with the angle change rate exceeding the preset threshold are located has shadow transition features, and a candidate shadow edge area is obtained; For the candidate shadow edge area, the grayscale statistical analysis method is used to calculate the grayscale mean and standard deviation of the pixels in the area. If the grayscale mean is lower than the average of the entire image and the standard deviation is greater than the preset value, the area is determined to be a true shadow edge, and a shadow edge marker map is obtained; According to the edge pixel distribution in the shadow edge marker image, the center coordinates and transformation radius of the focus transformation are calculated, and the sensitivity parameters of the edge detection are adjusted by the transformation radius to obtain the optimized edge detection parameters; The original image is reprocessed using the optimized edge detection parameters. If the detected edge continuity index is higher than the threshold, the edge position is determined to be accurate, and the final shadow edge position coordinate set is obtained. The edge contour line is constructed by the final shadow edge position coordinate set, and the contour line is smoothed by using the polynomial fitting method to obtain the accurate shadow edge positioning result.

9. The image processing method for improving glare and shadow environments according to claim 1, characterized in that: Based on the improved edge sharpness distribution parameters, a feature matching algorithm is used to verify the focus consistency of the entire image. By calculating the difference in clarity between different areas, the global focus quality evaluation results are obtained, including: Obtain the edge sharpness value of each area in the image, calculate the gradient amplitude of each pixel through the gradient operator, and obtain the initial edge sharpness distribution data; Based on the initial edge sharpness distribution data, Gaussian filtering is used to eliminate noise interference. If the gradient amplitude exceeds the preset threshold, it is marked as a valid edge point to obtain the optimized edge sharpness distribution parameters; The SIFT feature matching algorithm is used to extract the key feature points of the image through the optimized edge sharpness distribution parameters, and the Euclidean distance between the feature points is calculated to obtain the feature matching metric value; The image is divided into multiple sub-regions using feature matching metrics. If the difference in feature matching metrics between adjacent regions is less than a preset difference threshold, the focus consistency of the region is judged to be good, and the region focus status is determined. According to the focus status identification of each area, the clarity variance value between regions is calculated, and the degree of clarity difference between different areas is quantified by variance analysis method to obtain the regional clarity difference matrix; Using the regional clarity difference matrix, if the overall variance value is lower than the preset consistency threshold, the global focus quality is judged to be excellent and a global focus quality evaluation score is obtained; A focus quality level mapping table is established based on the global focus quality evaluation score, and the final focus quality level is determined according to the score range to obtain a complete image focus quality evaluation result.

10. The image processing method for improving glare and shadow environments according to claim 1, characterized in that: If the evaluation results show that the focus difference between areas exceeds the preset tolerance range, the dynamic compensation algorithm for the local area is re-executed based on the evaluation results. The focus offset is adjusted by the dynamic compensation algorithm until all shadow areas and non-shadow areas reach a focus balance state, obtaining the final clear image output, including: Obtain pixel matrix data of the input image, identify the boundaries between shadow and non-shadow areas in the image using an edge detection algorithm, and determine the initial focus parameters of each area based on the light intensity distribution characteristics; Focus difference calculation is used to quantify the difference between the focus value of the shadow area and the focus value of the non-shadow area to obtain the focus deviation data between the areas; If the focus difference value exceeds the preset tolerance threshold, the local area compensation mechanism is activated. The focus distribution pattern of each local area is analyzed through the convolutional neural network model to determine the specific area coordinates that need compensation; According to the local area coordinate information, the focus offset adjustment algorithm is used to calculate the compensation parameters, and the optimized focus parameter matrix is ​​obtained by adjusting the focus offset of each area; Perform pixel-level focus correction on the original image using the focus parameter matrix, and recalculate the focus value of each pixel using the bilinear interpolation method to obtain the intermediate image data after focus equalization; Re-perform focus difference detection on the intermediate image data. If the focus differences in all areas are within the tolerance range, the focus balance state verification is completed and the final clear image output result is obtained; Based on the clear image output results, processing data including focus compensation parameters, regional distribution information and image quality evaluation indicators are generated to complete the entire image focus balance processing flow.

Citation Information

Patent Citations

  • Image processing apparatus, three-dimensional measurement system, and image processing method

    CN114341940A

  • Image shadow compensation method and device, equipment and storage medium

    CN120050535A

  • Image processing apparatus, imaging apparatus and image processing program

    JP2015149570A

Cited By

  • Top coal crushing degree prediction method based on image recognition

    CN121353866A

  • A roof coal fragmentation degree prediction method based on image recognition

    CN121353866B