Fish-eye lens correction method, system and storage medium

Through a fisheye lens correction method including image preprocessing, unimaged area filtering, brightness uniformity evaluation path planning and shading correction, the problem of low accuracy and high cost of image uniformity calculation of fisheye lenses is solved, and efficient and accurate fisheye lens correction is achieved.

CN119211735BActive Publication Date: 2025-06-03深圳森云智能科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411483694.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-23
Publication Date
2025-06-03
Estimated Expiration
2044-10-23

AI Technical Summary

Technical Problem

The prior art has problems of low accuracy and high cost in the calculation of image uniformity of fisheye lenses. Especially when dealing with the viscera of fisheye lenses, inaccurate data is often introduced, and the high cost of high-end image analysis software makes it difficult for small and medium-sized enterprises to make effective corrections.

Method used

A fisheye lens correction method is proposed, including collecting image information, preprocessing, identifying and filtering unimaged areas, planning evaluation paths in brightness correction reference areas, judging brightness uniformity and shading correction until the expected uniformity is met.

Benefits of technology

This method can accurately calculate the brightness uniformity of the fisheye lens image, reduce the interference of the invalid area on the results, significantly improve the accuracy of the correction, and reduce the cost, and is suitable for the fisheye lens correction requirements of small and medium-sized enterprises.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119211735B_ABST
    Figure CN119211735B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention provides a fish-eye lens correction method, system and storage medium, belonging to the technical field of image processing. The fish-eye lens correction method is characterized in that the method includes: S10) preprocessing the image information transmitted back by the fish-eye lens to be corrected; S20) filtering the un-imaged area and using the remaining image area as the brightness correction reference area; S30) determining a plurality of reference points at equal intervals on the brightness uniformity evaluation path; S40) judging whether the brightness uniformity of the current brightness correction reference area meets the expectation; S50) if the brightness uniformity of the current brightness correction reference area does not meet the expectation, perform shading correction on the fish-eye lens to be corrected, and repeat steps S10)-S40) until a brightness correction reference area that meets the brightness uniformity expectation is obtained, and the fish-eye lens correction is completed. The solution of the present invention not only solves the vignetting problem of the fish-eye lens, but also greatly reduces the error in brightness correction, ensuring the improvement of imaging quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and particularly to a fish-eye lens correction method, a fish-eye lens correction system, and a storage medium. Background Art

[0002] With the rapid development of imaging technology, wide-angle lenses, especially fish-eye lenses, are widely used in many fields, such as security monitoring, panoramic photography, virtual reality, etc. The fish-eye lens can capture an image with an ultra-wide viewing angle at one time due to its large viewing angle and wide coverage range. However, since the viewing angle of the fish-eye lens usually exceeds 180 degrees, this brings challenges to the calculation and analysis of image uniformity. Especially when used in combination with a traditional camera sensor, there is often a problem of uneven brightness.

[0003] When a fish-eye lens is used in combination with a sensor, there is usually a vignetting phenomenon at the image edge. This is because the optical structure of the fish-eye lens makes the light in some areas unable to enter the sensor, resulting in these areas not being correctly imaged. This optical characteristic leads to the so-called "mechanical vignetting" problem, that is, some parts of the lens do not project the image onto the sensor, so these areas actually do not belong to the imaging area. However, in existing image analysis methods, especially when using general image analysis software (such as Imatest), the entire image, including these invalid edge areas, is often included in the brightness uniformity calculation range. Tools such as Imatest usually analyze based on a square selection area, and the edge of the fish-eye lens is curved, resulting in the four corners of the square not actually containing valid image information. This approach introduces inaccurate data in calculating image uniformity and cannot truly reflect the brightness uniformity of the fish-eye lens.

[0004] In addition, existing high-end image analysis software, such as Imatest, although powerful, is expensive. For some small enterprises or studios without a professional image laboratory, the cost of purchasing and using such software is very high, resulting in difficulties in detecting and correcting the image quality of fish-eye lenses. Such software usually requires professional hardware and environmental support, further increasing the overall investment. This makes it difficult for many small and medium-sized enterprises to afford to correct the imaging quality of fish-eye lenses, thus affecting the imaging effect and user experience of their products.

[0005] Therefore, there is an urgent need for a solution that can accurately calculate the image uniformity of fish-eye lenses, exclude the influence of invalid areas, and at the same time reduce the high cost of fish-eye lens correction. Summary of the Invention

[0006] The objective of the embodiments of the present invention is to provide a fish-eye lens correction method, system, and storage medium, so as to at least solve the problems of low accuracy and high cost existing in the existing fish-eye lens correction.

[0007] To achieve the above objective, the first aspect of the present invention provides a fish-eye lens correction method, and the method includes: S10) Collect the image information transmitted back by the fish-eye lens to be corrected, and perform preprocessing on the image information; S20) Based on the preprocessed image information, perform un-imaged area recognition, and filter the un-imaged area, and use the remaining image area as the brightness correction reference area; S30) Perform brightness uniformity evaluation path planning in the brightness correction reference area, and determine a plurality of reference points at equal intervals on the brightness uniformity evaluation path; S40) Based on the brightness of each reference point, determine whether the brightness uniformity of the current brightness correction reference area meets the expectation; S50) If the brightness uniformity of the current brightness correction reference area does not meet the expectation, perform shading correction on the fish-eye lens to be corrected, and repeat steps S10)-S40) until a brightness correction reference area that meets the brightness uniformity expectation is obtained, and the fish-eye lens correction is completed.

[0008] Optionally, the performing preprocessing on the image information includes: sequentially performing denoising and distortion correction processing on the image information.

[0009] Optionally, the performing un-imaged area recognition based on the preprocessed image information, filtering the un-imaged area, and using the remaining image area as the brightness correction reference area includes: Based on the cooperation relationship between the fish-eye lens to be corrected and the sensor, recognize the mechanical vignetting for image acquisition corresponding to the fish-eye lens to be corrected; use the corresponding area of the mechanical vignetting in the image information as the un-imaged area; filter the un-imaged area, and use the remaining image area as the brightness correction reference area.

[0010] Optionally, the performing brightness uniformity evaluation path planning in the brightness correction reference area includes: In the brightness correction reference area, perform area segmentation based on the feature information of each area to obtain a plurality of segmentation areas with a feature difference greater than a preset feature difference threshold; perform boundary recognition on each segmentation area, and determine whether there is a segmentation area whose boundary includes the image center point and the image boundary point; if so, perform brightness uniformity evaluation path planning based on the segmentation area whose boundary includes the image center point and the image boundary point; if not, perform evaluation path planning based on the principle that the straight line connection from the image center point to the image boundary point passes through the fewest segmentation areas.

[0011] Optionally, perform brightness uniformity evaluation path planning based on a segmentation region that includes the image center point and the image boundary point within the boundary, including: within the segmentation region that includes the image center point and the image boundary point within the boundary, starting from the image center point, arbitrarily select at least one image boundary point within the boundary as the end point, and use the straight line connection between the start point and the end point as the planned brightness uniformity evaluation path.

[0012] Optionally, perform evaluation path planning based on the principle of minimizing the number of segmentation regions passed through by the straight line connection from the image center point to the image boundary point, including: starting from the image center line point, using the boundary point corresponding to the least number of segmentation regions passed through by the straight line connection as the end point, and using each segmentation region passed through by the straight line connection between the start point and the end point as the region to be corrected; based on the adaptive histogram equalization method, remove the brightness interference factors for the regions to be corrected under the same path to obtain the segmentation regions after removing the brightness interference factors; perform segmentation region combination based on the segmentation regions after removing the brightness interference factors to obtain a unified region; within the unified region, starting from the image center point, arbitrarily select at least one image boundary point within the boundary as the end point, and use the straight line connection between the start point and the end point as the planned brightness uniformity evaluation path.

[0013] Optionally, based on the brightness of each reference point, determine whether the brightness uniformity of the current brightness correction reference region meets the expectation, including: respectively calculate the minimum brightness uniformity value and the maximum brightness difference of the current brightness correction reference region based on the brightness of each reference point and the image center point; if the minimum brightness uniformity value of the current brightness correction reference region is greater than the preset uniformity threshold, and the maximum brightness difference of the current brightness correction reference region is less than the preset difference threshold, then determine that the brightness uniformity of the current brightness correction reference region meets the expectation; otherwise, if the minimum brightness uniformity value of the current brightness correction reference region is not greater than the preset uniformity threshold, or the maximum brightness difference of the current brightness correction reference region is not less than the preset difference threshold, then determine that the brightness uniformity of the current brightness correction reference region does not meet the expectation.

[0014] Optionally, the calculation rule for the minimum brightness uniformity value of the current brightness correction reference region is:

[0015]

[0016] where Y n is the brightness of the nth reference point; Y 0 is the brightness of the image center point; uniformity min is the minimum brightness uniformity value; the calculation rule for the maximum brightness difference of the current brightness correction reference region is:

[0017]

[0018] where differencemax is the maximum brightness difference.

[0019] A second aspect of the present invention provides a fish-eye lens correction system, the system comprising: an acquisition unit, configured to acquire image information transmitted back by a fish-eye lens to be corrected and perform preprocessing on the image information; a filtering unit, configured to perform un-imaged area recognition based on the preprocessed image information, filter the un-imaged area, and use the remaining image area as a brightness correction reference area; a planning unit, configured to perform a brightness uniformity evaluation path planning in the brightness correction reference area and determine a plurality of reference points at equal intervals on the brightness uniformity evaluation path; a judgment unit, configured to judge whether the brightness uniformity of the current brightness correction reference area meets the expectation based on the brightness of each reference point; a correction unit, if the brightness uniformity of the current brightness correction reference area does not meet the expectation, perform shading correction on the fish-eye lens to be corrected, and re-judge whether the brightness uniformity of the new brightness correction reference area meets the expectation until a brightness correction reference area that meets the brightness uniformity expectation is obtained, and complete the fish-eye lens correction.

[0020] On the other hand, the present invention provides a computer-readable storage medium, on which instructions are stored, and when the instructions run on a computer, the computer is made to execute the above-mentioned fish-eye lens correction method.

[0021] Through the above technical solutions, the solution of the present invention realizes the brightness uniformity correction of the fish-eye lens image through multiple steps, effectively improving the accuracy of the correction. First, the image information of the fish-eye lens to be corrected is acquired and preprocessed to ensure the data quality. Then, the un-imaged area is identified and filtered, so that the brightness uniformity analysis is only performed on the actual imaged area, avoiding the interference of invalid areas on the results. The brightness uniformity evaluation path is planned in the brightness correction reference area, and a plurality of reference points are set at equal intervals, which helps to accurately evaluate the brightness distribution in the area. If it is judged that the brightness uniformity does not reach the expectation, the solution also provides an automatic adjustment based on shading correction until the brightness uniformity meets the requirements. This solution not only solves the vignetting problem of the fish-eye lens, but also greatly reduces the error in brightness correction, ensuring the improvement of the imaging quality.

[0022] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent specific embodiments section. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The drawings are used to provide a further understanding of the embodiments of the present invention, and constitute a part of the specification, and are used together with the following specific embodiments to explain the embodiments of the present invention, but do not constitute a limitation to the embodiments of the present invention. In the drawings:

[0024] Figure 1It is a flowchart of the steps of a fish-eye lens correction method provided by an embodiment of the present invention;

[0025] Figure 2 It is a system structure diagram of a fish-eye lens correction system provided by an embodiment of the present invention. Specific Embodiments

[0026] The following will describe in detail the specific embodiments of the present invention with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for the purpose of illustrating and explaining the present invention, and are not intended to limit the present invention.

[0027] Figure 1 It is a method flowchart of a fish-eye lens correction method provided by an embodiment of the present invention. As Figure 1 shown, an embodiment of the present invention provides a fish-eye lens correction method, and the method includes:

[0028] Step S10: Collect the image information transmitted back by the fish-eye lens to be corrected, and preprocess the image information.

[0029] Specifically, the preprocessing of the image information includes: sequentially performing denoising and distortion correction processing on the image information.

[0030] In an embodiment of the present invention, the first step of preprocessing is denoising. When a fish-eye lens collects images, especially in low-light or complex environments, the sensor is prone to generate noise. These noises will cause deviations in the brightness values in the image, affecting the evaluation of brightness uniformity. By using denoising algorithms (such as Gaussian filtering, mean filtering, or median filtering, etc.), the random noises in the image can be effectively eliminated, making the image data clearer and more stable, thereby providing a cleaner basis for subsequent uniformity analysis. The second is distortion correction processing. Due to its ultra-wide-angle design, a fish-eye lens often brings significant image distortion, especially the bending deformation (barrel distortion) appears in the edge part of the image. This distortion not only affects the visual effect of the image, but also causes errors in the brightness uniformity analysis, because the image content in the distorted part does not represent the real scene. Through distortion correction techniques (such as geometric correction algorithms or model-based correction methods), the curved image generated by the fish-eye lens can be restored to a planar image close to the real scene, thereby improving the accuracy of image analysis.

[0031] Furthermore, through the preprocessing of the fish-eye lens image, including denoising and distortion correction, the image quality is greatly improved. First of all, the denoising process eliminates the interference of sensor noise on brightness analysis, making the brightness values more real and reliable. Secondly, the distortion correction corrects the image distortion caused by the fish-eye lens, ensuring that the brightness distribution within the corrected area is more reasonable. Combining these two preprocessing steps, the system can perform subsequent brightness uniformity correction on a more real and stable image basis, thereby ensuring the accuracy of brightness analysis and the improvement of the imaging quality of the fish-eye lens. This technology can significantly improve the efficiency and accuracy of image processing, and is particularly suitable for application scenarios with high requirements for image quality, such as monitoring, panoramic photography, etc.

[0032] Step S20: Identify the un-imaged area based on the preprocessed image information, filter the un-imaged area, and use the remaining image area as the brightness correction reference area.

[0033] Specifically, based on the cooperation relationship between the fish-eye lens to be corrected and the sensor, identify the mechanical vignetting corresponding to the fish-eye lens to be corrected for image acquisition; use the corresponding area of the mechanical vignetting in the image information as the un-imaged area; filter the un-imaged area, and use the remaining image area as the brightness correction reference area.

[0034] In the embodiment of the present invention, when the fish-eye lens and the sensor are used in combination, the excessively large field of view angle often causes the problem of mechanical vignetting during the imaging process. Mechanical vignetting refers to the situation where, due to the field of view angle of the fish-eye lens exceeding the effective imaging range of the sensor, some light rays cannot enter the sensor, resulting in these areas not being imaged. These un-imaged areas will form vignetting or black edges at the image edges. If these areas are included in the brightness uniformity calculation, it will have a negative impact on the accuracy of image analysis. Therefore, during the brightness uniformity correction process, it is necessary to identify and filter these un-imaged areas to ensure the accuracy and effectiveness of brightness correction.

[0035] Furthermore, based on the cooperation relationship between the fish-eye lens and the sensor, the presence of mechanical vignetting in the image can be identified. The ultra-wide-angle design of the fish-eye lens makes its imaging range far exceed the field of view of ordinary lenses, and the sensor usually cannot completely cover the entire imaging area of the fish-eye lens. Therefore, mechanical vignetting will occur at the four corners or edges of the image. By analyzing the imaging characteristics of the lens and combining the size and layout of the sensor, it is possible to accurately identify which areas in the image belong to mechanical vignetting, that is, un-imaged areas.

[0036] Further, after identifying the mechanical vignetting, these areas are removed from the image, i.e., filtering processing is performed. This step is very important because the un-imaged areas do not reflect any actual scene information. Directly including these areas in the brightness uniformity analysis will lead to serious errors. For example, the brightness values of the un-imaged areas are usually zero or very close to zero, resulting in the calculated brightness uniformity data not matching the actual scene. By filtering the un-imaged areas and only retaining those parts that actually receive light and reflect the real scene information, the evaluation of brightness uniformity can be ensured to be more accurate.

[0037] Further, after filtering the un-imaged areas, the remaining image areas are the effective brightness correction reference areas. These areas are the effective areas where the fish-eye lens and the sensor are matched and actually imaged, representing the real brightness distribution. Based on these reference areas, the brightness uniformity evaluation path can be planned, and then the overall brightness uniformity of the image can be evaluated. This method ensures the accuracy of the brightness analysis and eliminates the interference caused by the mechanical vignetting.

[0038] Step S30: Plan the brightness uniformity evaluation path in the brightness correction reference area, and determine a plurality of reference points at equal intervals on the brightness uniformity evaluation path.

[0039] Specifically, the planning of the brightness uniformity evaluation path in the brightness correction reference area includes: in the brightness correction reference area, based on the feature information of each area, perform area segmentation to obtain a plurality of segmentation areas with a feature difference greater than a preset feature difference threshold; perform boundary recognition on each segmentation area to determine whether there is a segmentation area whose boundary includes the image center point and the image boundary point; if so, plan the brightness uniformity evaluation path based on the segmentation area whose boundary includes the image center point and the image boundary point; if not, plan the evaluation path based on the principle that the straight line connecting the image center point and the image boundary point passes through the fewest segmentation areas.

[0040] In the embodiment of the present invention, for the imaging of the fish-eye lens, due to its ultra-wide-angle field of view and complex optical distortion, the brightness distribution of each area of the image is easily affected by the image content (such as color, texture), resulting in deviations in the results of the brightness uniformity analysis. Therefore, by analyzing and segmenting the content in the brightness correction reference area, these interference factors on the brightness uniformity evaluation path can be effectively avoided.

[0041] Specifically, the first step in the path planning for brightness uniformity evaluation is to perform feature-based region segmentation on the brightness correction reference region. This step divides the image into multiple regions by analyzing the feature information of the image (such as color, texture, etc.), ensuring that the brightness change within the same region is relatively uniform, while the brightness difference between different regions is relatively large. Specifically, the feature differences of each region are detected and segmented based on a preset feature difference threshold. Regions with feature differences exceeding this threshold are considered different regions. In this way, the brightness differences caused by different colors or textures can be effectively removed, reducing the impact of these interfering features on the brightness uniformity analysis.

[0042] In a possible implementation, the feature differences can include differences in aspects such as color, texture, and brightness. By performing region segmentation based on the feature difference threshold, the different features of each part of the image can be effectively identified, avoiding content interference. For example, assume we are processing an image of a natural landscape. The image content includes the sky, trees, and grassland. We will perform region segmentation based on color and texture features. Consider an image containing the following main elements:

[0043] 1) Sky region: This part is usually mainly light blue, with relatively uniform color, small texture changes, and high brightness.

[0044] 2) Tree region: The color of the trees is dark green or brown, and due to the differences between the leaves and the trunks, the color change is relatively obvious. At the same time, the texture of the leaves is relatively complex, with more details.

[0045] 3) Grassland region: The color of the grassland is light green, with relatively uniform color change, but compared to the sky, the texture of the grassland is relatively rich, and the brightness is moderate.

[0046] In this example, we can choose two main features for region segmentation: color and texture.

[0047] Color feature: The color information can be represented by the RGB or HSV color model. In this image, the color of the sky part is concentrated in the light blue range, while the colors of the trees and the grassland are concentrated in the green or brown range. Therefore, when performing region segmentation, we can set a color difference threshold. For example, when the color difference between adjacent pixels is greater than the set threshold (such as when the color value changes by more than a certain percentage), it can be determined that these pixels belong to different regions.

[0048] In this image, the color difference between the sky and the trees and the grassland is obvious. Therefore, when it is detected that the color change exceeds the preset threshold (such as more than 20% hue difference), the system can separate the sky from the tree region.

[0049] Texture features: Texture information can be calculated by using methods such as gradients, SIFT (Scale-Invariant Feature Transform), or GLCM (Gray-Level Co-Occurrence Matrix). The texture of the sky is relatively simple with few details, while the textures of trees and grass are complex, containing many tiny details. We can set a texture difference threshold. For example, if the change in texture complexity between adjacent pixels exceeds a certain specific value, they can be determined to belong to different regions.

[0050] In this example, the complex texture of the trees is significantly different from the simple texture of the sky. By detecting the difference in texture complexity, the system can identify the boundary between the tree and sky regions.

[0051] Once the thresholds for color and texture features are defined, the system can sequentially check the feature differences in each region of the image. In this natural scenery image, the segmentation process might be as follows:

[0052] 1) It is detected that both the color and texture differences between the sky region and the tree region exceed the preset thresholds (the color difference exceeds 20%, and the texture complexity difference exceeds the set threshold). Therefore, the system divides these two parts into two independent regions.

[0053] 2) Similarly, there are significant color and texture differences between the grass region and the tree region, and these differences exceed the thresholds. Therefore, the grass will also be separately divided into a region.

[0054] Furthermore, after completing the region segmentation, the system needs to perform boundary recognition. The purpose of this step is to determine whether the segmented regions contain the image center point and the image boundary point. If a segmented region includes both the image center point and the image boundary point, it means that this region extends from the center to the edge of the image and can better reflect the brightness distribution of the entire image region. In this case, a path planning for brightness uniformity evaluation is based on this segmented region. This path planning method can ensure that the brightness uniformity analysis covers the effective part of the entire region, avoiding the brightness fluctuations caused by the path crossing different feature regions.

[0055] Furthermore, if no single segmented region extending from the center point to the image boundary is found, the system will choose an alternative path planning method. This method uses the straight-line connection passing through the fewest segmented regions as the criterion for the evaluation path. This means that the system will try to avoid the path crossing too many segmented regions, thereby reducing the interference of feature differences between different regions on the brightness uniformity evaluation. Through this path planning method, the system can better maintain the continuity and consistency of the brightness data within the path.

[0056] Preferably, the path planning for the brightness uniformity evaluation is based on a segmented area that includes the image center point and the image boundary point, and it includes: within the segmented area that includes the image center point and the image boundary point, taking the image center point as the starting point, arbitrarily selecting at least one image boundary point within the boundary as the ending point, and taking the straight-line connection between the starting point and the ending point as the planned path for the brightness uniformity evaluation.

[0057] In the embodiment of the present invention, the system takes the image center point as the starting point, selects at least one image boundary point within the segmented area as the ending point, and then draws a straight line between these two points. This straight line will be used as the path for the brightness uniformity evaluation. This path planning has two important characteristics:

[0058] 1) Continuity: The path from the image center point to the image boundary point can cover the core part of the image, while ensuring that the brightness distribution from the center to the edge is fully sampled. In this way, the brightness change from the center to the edge of the image can be effectively evaluated. Especially in imaging devices such as fish-eye lenses, the brightness is often uneven in the edge area.

[0059] 2) Avoiding interference between segmented areas: By performing path planning within the segmented area, the system avoids the interference caused by the brightness uniformity path crossing different image feature areas (such as color, texture, etc.). Because the image feature differences in different areas may lead to large brightness changes, and this kind of change does not reflect the uniformity of imaging, but the difference in content. Therefore, ensuring that the path is within the same segmented area can more truly reflect the brightness uniformity situation of this area.

[0060] Preferably, the path planning for the evaluation is based on the principle of minimizing the number of segmented areas passed through by the straight-line connection from the image center point to the image boundary point, and it includes: taking the midpoint of the image as the starting point, taking the boundary point corresponding to the least number of segmented areas passed through by the straight-line connection as the ending point, taking each segmented area passed through by the straight-line connection between the starting point and the ending point as the area to be corrected; removing the brightness interference factors for the area to be corrected under the same path based on the adaptive histogram equalization method to obtain the segmented area after removing the brightness interference factors; performing segmented area combination based on the segmented area after removing the brightness interference factors to obtain a unified area; within the unified area, taking the image center point as the starting point, arbitrarily selecting at least one image boundary point within the boundary as the ending point, and taking the straight-line connection between the starting point and the ending point as the planned path for the brightness uniformity evaluation.

[0061] In the embodiment of the present invention, the center point of the image is used as the starting point of path planning, and a straight-line path from the center to the boundary is selected, which passes through the fewest number of segmented regions. This means that the path crosses the fewest different feature regions, thereby reducing the influence of different image contents on brightness analysis. Each segmented region passed by the connection line between the starting point and the ending point will be marked as a region to be corrected. After obtaining the regions to be corrected, the adaptive histogram equalization method (CLAHE) is applied to adjust the brightness of the segmented regions passed by. CLAHE is an image processing technology for equalization within small regions, which can effectively remove the brightness interference factors caused by image content or ambient light. Through this method, the brightness differences of each segmented region on the path are suppressed, ensuring a more uniform brightness distribution under the same path, thereby improving the accuracy of brightness uniformity evaluation.

[0062] Further, after removing the brightness interference factors, the system combines the processed segmented regions passed by to form a unified region. This step integrates the segmented regions after brightness correction, making the brightness of each region on the path tend to be consistent and avoiding the influence of brightness differences between different regions on uniformity analysis. Then, a brightness uniformity evaluation path is re-planned within this unified region. At this time, the path still starts from the center point of the image, and at least one image boundary point within the boundary is selected as the ending point, ensuring that the brightness consistency of all regions passed by the path has been adjusted. This path will provide a more accurate brightness uniformity evaluation result after removing the brightness interference.

[0063] Based on the solution of the present invention, by combining the path planning principle of passing through the fewest segmented regions and the adaptive histogram equalization technology, efficient brightness uniformity evaluation is achieved. First, during the path planning process, a path passing through the fewest segmented regions is preferentially selected, reducing the interference of different feature regions on brightness analysis and improving the accuracy of evaluation. Second, the brightness interference of each region on the path is removed by the CLAHE method, ensuring a smoother and more consistent brightness distribution within the path. Finally, re-planning the path on the unified brightness segmented region can effectively improve the stability and accuracy of brightness uniformity analysis.

[0064] Further, a plurality of reference points are determined at equal intervals on the brightness uniformity evaluation path.

[0065] Specifically, on the brightness uniformity evaluation path, the system first determines the starting point and the ending point of the path. This path usually extends from the center point of the image to the boundary point of the image. Then, a plurality of reference points are set along this path at equal intervals. The equal interval setting can be based on the resolution or the number of pixels of the image. For example, if the path length is 1000 pixels, the system can set a reference point every 50 pixels, thereby generating multiple measurement points on the entire path. These reference points will be used to collect the brightness values of the image on the path. At each reference point, the system will record the brightness information at this position and compare it with the data of other reference points. This uniformly distributed sampling method can cover the brightness changes on the entire path, ensuring the comprehensiveness of the brightness analysis.

[0066] Step S40: Based on the brightness of each reference point, determine whether the brightness uniformity of the current brightness correction reference area meets the expectation.

[0067] Specifically, based on the brightness of each reference point and the center point of the image, calculate the minimum brightness uniformity value and the maximum brightness difference of the current brightness correction reference area respectively; if the minimum brightness uniformity value of the current brightness correction reference area is greater than the preset uniformity threshold, and the maximum brightness difference of the current brightness correction reference area is less than the preset difference threshold, it is determined that the brightness uniformity of the current brightness correction reference area meets the expectation; otherwise, if the minimum brightness uniformity value of the current brightness correction reference area is not greater than the preset uniformity threshold, or the maximum brightness difference of the current brightness correction reference area is not less than the preset difference threshold, it is determined that the brightness uniformity of the current brightness correction reference area does not meet the expectation.

[0068] Furthermore, the calculation rule for the minimum brightness uniformity value of the current brightness correction reference area is:

[0069]

[0070] where Y n is the brightness of the nth reference point; Y 0 is the brightness of the center point of the image; uniformity min is the minimum brightness uniformity value; the calculation rule for the maximum brightness difference of the current brightness correction reference area is:

[0071]

[0072] where difference max is the maximum brightness difference.

[0073] In the embodiments of the present invention, the minimum brightness uniformity value of the brightness correction reference area represents the ratio of the brightness of the darkest area among the reference points to the brightness of the center point. If this ratio is too small, it indicates that the brightness of the reference area is uneven, and in particular, the brightness may be relatively low at the edge part. The maximum brightness difference reflects the amplitude of the brightness change among the reference points. The larger the difference, the more significant the brightness difference in the image and the worse the uniformity. Based on the minimum brightness uniformity value and the maximum brightness difference, the uniformity of the image brightness can be comprehensively evaluated. If the minimum uniformity value is lower than the preset uniformity threshold, or the maximum brightness difference is higher than the preset difference threshold, it is determined that the brightness uniformity of this area does not meet the requirements and further correction processing is required.

[0074] Step S50: If the brightness uniformity of the current brightness correction reference area does not meet the expectation, perform shading correction on the fish-eye lens to be corrected, and repeat Steps S10 - S40 until a brightness correction reference area that meets the brightness uniformity expectation is obtained, and the fish-eye lens correction is completed.

[0075] In the embodiments of the present invention, when the brightness uniformity detection result does not meet the expectation, the system will correct the shading phenomenon of the fish-eye lens imaging. The basic principle of shading correction is to adjust the brightness of different areas in the image through an algorithm to make the brightness distribution of the entire image more uniform. The specific steps include:

[0076] 1) Analyze the image brightness distribution: First, the system analyzes which areas have higher brightness and which areas have lower brightness based on the reference point data that has been collected. Especially for a fish-eye lens, usually the brightness of the central area is higher, while the brightness of the edge area will decrease due to the problem of the light entry angle.

[0077] 2) Calculate the correction factor: According to the brightness difference of the reference points, the system calculates the correction factor for different areas. Usually, a higher brightening factor is given to the edge area, while the central area may remain unchanged or be slightly adjusted.

[0078] 3) Apply the correction factor: Through the image processing algorithm, the system adjusts the brightness of each area accordingly to make the brightness transition from the center to the edge of the image smoother. Specific correction methods can include image processing techniques such as histogram equalization and adaptive equalization to ensure that the brightness reaches a uniform distribution effect in the entire image area.

[0079] After completing the shading correction, the system will re-execute the previous brightness uniformity detection steps (i.e., steps S10 to S40). Specifically, the system will collect image information again, preprocess the image, analyze the brightness uniformity, and re-plan the brightness uniformity evaluation path. Through this process of cyclic detection and correction, the system can gradually optimize the brightness distribution of the image to ensure that the final correction result meets the set uniformity standard. This cyclic correction process will continue until the brightness uniformity of the brightness correction reference area meets the expected requirements. That is, after multiple corrections, the system gradually adjusts and optimizes the brightness distribution, and finally achieves the effect of overall brightness uniformity of the image. This process can not only significantly improve the image quality but also effectively solve the inherent problems in fish-eye lens imaging, such as the vignetting effect at the edges.

[0080] Based on the solution of the present invention, through the automated cyclic correction process, the system can gradually improve the brightness distribution of the image, avoiding the complexity of manual intervention. At the same time, the repeated detection and correction processes ensure that the image gradually approaches the ideal state at different correction stages, and finally obtains a brightness distribution that meets the uniformity requirements. The shading correction effectively solves the common vignetting problem in fish-eye lens imaging, especially in the edge area of the image. By adjusting the brightness, the brightness transition from the center to the edge of the image becomes smoother and more natural. Finally, the brightness uniformity of the entire image is significantly improved, ensuring that the imaging quality meets the requirements in practical applications.

[0081] Figure 2 It is the system structure diagram of the fish-eye lens correction system provided by an embodiment of the present invention. As Figure 2 shown, an embodiment of the present invention provides a fish-eye lens correction system, which includes: a collection unit for collecting image information transmitted back by the fish-eye lens to be corrected and preprocessing the image information; a filtering unit for performing un-imaged area recognition based on the preprocessed image information, filtering the un-imaged area, and taking the remaining image area as the brightness correction reference area; a planning unit for planning the brightness uniformity evaluation path in the brightness correction reference area and equally spacing and determining a plurality of reference points on the brightness uniformity evaluation path; a judgment unit for judging whether the brightness uniformity of the current brightness correction reference area meets the expectation based on the brightness of each reference point; a correction unit, if the brightness uniformity of the current brightness correction reference area does not meet the expectation, performing shading correction on the fish-eye lens to be corrected and re-judging whether the brightness uniformity of the new brightness correction reference area meets the expectation until a brightness correction reference area that meets the brightness uniformity expectation is obtained, and completing the fish-eye lens correction.

[0082] An embodiment of the present invention also provides a computer-readable storage medium, on which instructions are stored, and when the instructions run on a computer, the computer is caused to execute the above-mentioned fisheye lens correction method.

[0083] Those skilled in the art can understand that all or part of the steps in the method for implementing the above embodiments can be completed by instructing relevant hardware through a program, and the program is stored in a storage medium, including several instructions for causing a single-chip microcomputer, a chip or a processor to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks or optical discs.

[0084] The optional embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the embodiments of the present invention are not limited to the specific details in the above embodiments. Within the scope of the technical concept of the embodiments of the present invention, various simple modifications can be made to the technical solutions of the embodiments of the present invention, and these simple modifications all fall within the protection scope of the embodiments of the present invention. In addition, it should be noted that, in the above specific embodiments, the various specific technical features described can be combined in any appropriate manner without conflict. To avoid unnecessary repetition, the embodiments of the present invention will not separately describe various possible combination manners.

[0085] In addition, any combination can be made between various different embodiments of the present invention, as long as it does not violate the idea of the embodiments of the present invention, and it should also be regarded as the content disclosed by the embodiments of the present invention.

Claims

1. A fisheye lens correction method, characterized in that: The method comprises: S10) collecting image information transmitted by the fisheye lens to be corrected, and preprocessing the image information; S20) performing non-imaged area recognition based on the pre-processed image information, filtering the non-imaged area, and using the remaining image area as a reference area for brightness correction; S30) performing brightness uniformity evaluation path planning in the brightness correction reference area, and determining a plurality of reference points at equal intervals on the brightness uniformity evaluation path; wherein, The brightness uniformity evaluation path planning in the brightness correction reference area includes: in the brightness correction reference area, performing area segmentation based on feature information of each area to obtain multiple segmented areas whose feature differences are greater than a preset feature difference threshold; performing boundary identification of each segmented area to determine whether there is a segmented area including an image center point and an image boundary point within the boundary; if there is, performing brightness uniformity evaluation path planning based on the segmented area including the image center point and the image boundary point within the boundary; if there is not, performing evaluation path planning based on the principle that a straight line connecting the image center point to the image boundary point passes through the least segmented area; S40) based on the brightness of each reference point and the center point of the image, respectively calculating the minimum brightness uniformity value and the maximum brightness difference value of the current brightness correction reference area; if the minimum brightness uniformity value of the current brightness correction reference area is greater than a preset uniformity threshold, and the maximum brightness difference value of the current brightness correction reference area is less than the preset difference threshold, then it is determined that the brightness uniformity of the current brightness correction reference area meets expectations; otherwise, if the minimum brightness uniformity value of the current brightness correction reference area is not greater than the preset uniformity threshold, or the maximum brightness difference value of the current brightness correction reference area is not less than the preset difference threshold, then it is determined that the brightness uniformity of the current brightness correction reference area does not meet expectations; S50) If the brightness uniformity of the current brightness correction reference area does not meet expectations, shading correction is performed on the fisheye lens to be corrected, and steps S10) to S40) are repeated until a brightness correction reference area that meets expectations for brightness uniformity is obtained, and the fisheye lens correction is completed.

2. The method according to claim 1, characterized in that The preprocessing of the image information comprises: De-noising and distortion correction processing are sequentially performed on the image information.

3. The method according to claim 1, characterized in that The method of identifying the unimaged area based on the preprocessed image information, filtering the unimaged area, and using the remaining image area as a reference area for brightness correction includes: Based on the matching relationship between the fisheye lens to be corrected and the sensor, the mechanical vignetting of the image captured by the fisheye lens to be corrected is identified; The corresponding area of ​​the mechanical vignetting in the image information is regarded as the unimaged area; Filtering is performed on the unimaged area, and the remaining image area is used as the reference area for brightness correction.

4. The method according to claim 1, characterized in that: The brightness uniformity evaluation path planning is performed based on the segmented area including the image center point and the image boundary point within the boundary, including: In the segmented area including the image center point and the image boundary point within the boundary, the image center point is taken as the starting point, at least one image boundary point within the boundary is selected as the end point, and the straight line connecting the starting point and the end point is used as the planned brightness uniformity evaluation path.

5. The method according to claim 1, characterized in that The evaluation path planning is carried out based on the principle that the straight line connecting the center point of the image to the edge point of the image passes through the least segmented area, including: Take the center point of the image as the starting point, take the boundary point with the least number of corresponding points in the segmented area passed by the straight line as the end point, and take each segmented area passed by the straight line connecting the starting point and the end point as the area to be corrected; Based on the adaptive histogram equalization method, the brightness interference factor is removed from the area to be corrected under the same path, and the segmented area after the brightness interference factor is removed is obtained; Based on the segmented areas after the brightness interference factor is removed, the segmented areas are combined to obtain a unified area; In a unified area, the center point of the image is taken as the starting point, at least one image boundary point within the arbitrary boundary is taken as the end point, and the straight line connecting the starting point and the end point is taken as the planned brightness uniformity evaluation path.

6. The method according to claim 1, characterized in that The calculation rule for the minimum brightness uniformity value of the current brightness correction reference area is: Among them, Y n is the brightness of the nth reference point; Y0 is the brightness of the center point of the image; uniformity min is the minimum uniformity value of brightness; The calculation rule for the maximum brightness difference of the current brightness correction reference area is: Among them, difference max is the maximum brightness difference.

7. A fisheye lens correction system, characterized in that: The system comprises: A collection unit, used to collect image information returned by the fisheye lens to be calibrated, and pre-process the image information; A filtering unit, used to identify the unimaged area based on the preprocessed image information, and to filter the unimaged area, and to use the remaining image area as a reference area for brightness correction; A planning unit is used to plan a brightness uniformity evaluation path in the brightness correction reference area, and to determine a plurality of reference points at equal intervals on the brightness uniformity evaluation path; wherein, The brightness uniformity evaluation path planning in the brightness correction reference area includes: in the brightness correction reference area, performing area segmentation based on feature information of each area to obtain multiple segmented areas whose feature differences are greater than a preset feature difference threshold; performing boundary identification of each segmented area to determine whether there is a segmented area including an image center point and an image boundary point within the boundary; if there is, performing brightness uniformity evaluation path planning based on the segmented area including the image center point and the image boundary point within the boundary; if there is not, performing evaluation path planning based on the principle that a straight line connecting the image center point to the image boundary point passes through the least segmented area; A judgment unit, for respectively calculating the minimum uniformity value of brightness and the maximum difference value of brightness of the current brightness correction reference area based on the brightness of each reference point and the center point of the image; if the minimum uniformity value of brightness of the current brightness correction reference area is greater than a preset uniformity threshold, and the maximum difference value of brightness of the current brightness correction reference area is less than the preset difference threshold, then it is determined that the brightness uniformity of the current brightness correction reference area meets expectations; otherwise, if the minimum uniformity value of brightness of the current brightness correction reference area is not greater than the preset uniformity threshold, or the maximum difference value of brightness of the current brightness correction reference area is not less than the preset difference threshold, then it is determined that the brightness uniformity of the current brightness correction reference area does not meet expectations; The correction unit performs shading correction on the fisheye lens to be corrected if the brightness uniformity of the current brightness correction reference area does not meet expectations, and re-judges whether the brightness uniformity of the new brightness correction reference area meets expectations, until a brightness correction reference area that meets the brightness uniformity expectations is obtained, and the fisheye lens correction is completed.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the fisheye lens correction method described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Pixel brightness calibration method and device for panoramic image, panoramic camera and memory medium

    CN109361855A

  • Fisheye imaging picture center detection method and device and terminal equipment

    CN109801213A