Fish-eye lens correction method and system and storage medium

By preprocessing the fisheye lens image, identifying unimaged areas and luminance uniformity evaluation path planning, combined with shading correction, the problems of brightness unevenness and high-cost correction of the fisheye lens are solved, and more accurate and economical correction is achieved. Effect.

CN119211735AActive Publication Date: 2024-12-27深圳森云智能科技有限公司
View PDF 5 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

When used with traditional camera sensors, fisheye lenses often have problems of uneven brightness. Existing image analysis methods cannot accurately reflect their brightness uniformity, 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

By collecting fisheye lens image information, pre-processing and unimaged area identification, filtering out unimaged areas, planning the brightness uniformity evaluation path, setting reference points, judging brightness uniformity, and adjusting through shading until the expected uniformity is met sex.

Benefits of technology

It improves the accuracy of the brightness uniformity correction of fisheye lens image, reduces correction costs, solves the vibrator problem, and ensures improvement of imaging quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119211735A_ABST
    Figure CN119211735A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a fisheye lens correction method and system and a storage medium, and belongs to the technical field of image processing. The fisheye lens correction method is characterized by comprising the following steps: S10) preprocessing image information returned by a fisheye lens to be corrected; s20) filtering an unimaged area, and taking a residual image area as a brightness correction reference area; s30) determining a plurality of reference points on the brightness uniformity evaluation path at equal intervals; s40) judging whether the brightness uniformity of the current brightness correction reference area meets the expectation or not; and S50) if the brightness uniformity of the current brightness correction reference area does not meet the expectation, performing shading correction on the to-be-corrected fisheye lens, and repeating the steps S10)-S40) until the brightness correction reference area meeting the brightness uniformity expectation is obtained, thereby completing fisheye lens correction. The scheme of the invention not only solves the dark corner problem of the fisheye lens, but also greatly reduces the error in the brightness correction, and ensures the improvement of the 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 in particular to a fisheye lens correction method, a fisheye lens correction system and a storage medium. Background Art

[0002] With the rapid development of camera technology, wide-angle lenses, especially fisheye lenses, have been widely used in many fields, such as security monitoring, panoramic photography, virtual reality, etc. Fisheye lenses are characterized by their large field of view and wide coverage, and can capture images with ultra-wide viewing angles at one time. However, since the field of view of fisheye lenses is usually more than 180 degrees, this poses a challenge to the calculation and analysis of image uniformity, especially when used with traditional camera sensors, uneven brightness often occurs.

[0003] When a fisheye lens is used with a sensor, vignetting usually occurs at the edge of the image. This is because the optical structure of the fisheye lens prevents light from some areas from entering the sensor, resulting in these areas not being imaged correctly. 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 are not actually part of 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 perform analysis based on a square frame selection area, while the edges of a fisheye lens are curved, resulting in the top, bottom, left, and right corners of the square not actually containing valid image information. This approach introduces inaccurate data when calculating image uniformity and cannot truly reflect the brightness uniformity of the fisheye lens.

[0004] In addition, existing high-end image analysis software, such as Imatest, is powerful but expensive. For some small businesses or studios that do not have professional image laboratories, the cost of purchasing and using these software is very high, which leads to difficulties in detecting and correcting the image quality of fisheye 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 the correction of fisheye lens imaging quality, 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 uniformity of fisheye lens images, eliminate the influence of invalid areas, and simultaneously reduce the high cost of fisheye lens correction. Summary of the invention

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

[0007] In order to achieve the above-mentioned purpose, the first aspect of the present invention provides a fisheye lens correction method, the method comprising: S10) collecting image information sent back by the fisheye lens to be corrected, and preprocessing the image information; S20) performing non-imaged area identification based on the preprocessed image information, and filtering the non-imaged area, and using the remaining image area as a brightness correction reference area; S30) performing brightness uniformity evaluation path planning in the brightness correction reference area, and determining multiple reference points at equal intervals on the brightness uniformity evaluation path; S40) based on the brightness of each reference point, judging whether the brightness uniformity of the current brightness correction reference area meets expectations; S50) if the brightness uniformity of the current brightness correction reference area does not meet expectations, performing shading correction on the fisheye lens to be corrected, and repeating steps S10) to S40) until a brightness correction reference area that meets the expected brightness uniformity is obtained, and the fisheye lens correction is completed.

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

[0009] Optionally, the method of identifying the non-imaged area based on the preprocessed image information, filtering the non-imaged area, and using the remaining image area as a reference area for brightness correction includes: identifying the mechanical vignetting corresponding to the image acquisition of the fisheye lens to be corrected based on the matching relationship between the fisheye lens to be corrected and the sensor; using the corresponding area of ​​the mechanical vignetting in the image information as the non-imaged area; filtering the non-imaged area, and using the remaining image area as a reference area for brightness correction.

[0010] Optionally, the brightness uniformity evaluation path planning in the brightness correction reference area includes: in the brightness correction reference area, performing region segmentation based on feature information of each region to obtain multiple segmented regions whose feature differences are greater than a preset feature difference threshold; identifying the boundaries of each segmented region to determine whether there is a segmented region including an image center point and an image boundary point within the boundary; if so, performing brightness uniformity evaluation path planning based on the segmented region including the image center point and the image boundary point within the boundary; if not, performing evaluation path planning based on the principle of minimizing the number of segmented regions by a straight line connection from the image center point to the image boundary point.

[0011] Optionally, brightness uniformity evaluation path planning is performed based on a segmented area including an image center point and an image boundary point within the boundary, including: within a segmented area including an image center point and an image boundary point within the boundary, taking the image center point as the starting point, optionally taking at least one image boundary point within the boundary as the focus, and taking a straight line connecting the starting point and the end point as the planned brightness uniformity evaluation path.

[0012] Optionally, the evaluation path planning is carried out based on the principle of minimizing the segmentation area of ​​the straight line path from the image center point to the image boundary point, including: taking the image center point as the starting point, taking the boundary point corresponding to the least segmentation area of ​​the straight line path as the end point, and taking each segmentation area of ​​the straight line path between the starting point and the end point as the area to be corrected; performing brightness interference factor removal on the area to be corrected under the same path based on the adaptive histogram equalization method to obtain the segmentation area of ​​the path after the brightness interference factor is removed; combining the segmentation areas based on the segmentation area of ​​the path after the brightness interference factor is removed to obtain a unified area; within the unified area, taking the image center point as the starting point, optionally selecting at least one image boundary point within the boundary as the focus, and taking the straight line connecting the starting 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 area meets expectations, including: based on the brightness of each reference point and the center point of the image, respectively calculate the minimum brightness uniformity value and the maximum brightness difference 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 of the current brightness correction reference area is less than the preset difference threshold, then determine 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 of the current brightness correction reference area is not less than the preset difference threshold, then determine that the brightness uniformity of the current brightness correction reference area does not meet expectations.

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

[0015]

[0016] 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:

[0017]

[0018] Among them, difference maxis the maximum brightness difference.

[0019] The second aspect of the present invention provides a fisheye lens correction system, the system comprising: an acquisition unit, used to acquire image information transmitted back by a fisheye lens to be corrected, and preprocess the image information; a filtering unit, used to identify unimaged areas based on the preprocessed image information, and filter the unimaged areas, and use the remaining image areas as brightness correction reference areas; a planning unit, used to plan a 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; a judgment unit, used to judge whether the brightness uniformity of a current brightness correction reference area meets expectations 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 expectations, performs shading correction on the fisheye lens to be corrected, and re-judges whether the brightness uniformity of a 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.

[0020] On the other hand, the present invention provides a computer-readable storage medium, on which instructions are stored, which, when executed on a computer, enable the computer to execute the above-mentioned fisheye lens correction method.

[0021] Through the above technical scheme, the scheme of the present invention realizes the brightness uniformity correction of the fisheye lens image through multiple steps, which effectively improves the accuracy of the correction. First, the fisheye lens image information to be corrected is collected and preprocessed to ensure data quality. Then, the unimaged area is identified and filtered, so that the brightness uniformity analysis is only performed on the actual imaging area, avoiding the interference of invalid areas on the results. Planning the brightness uniformity evaluation path in the brightness correction reference area, and setting multiple reference points at equal intervals, helps to accurately evaluate the brightness distribution in the area. If it is judged that the brightness uniformity does not meet expectations, the scheme also provides automatic adjustment based on shading correction until the brightness uniformity meets the requirements. This scheme not only solves the vignetting problem of the fisheye lens, but also greatly reduces the error in brightness correction, ensuring the improvement of imaging quality.

[0022] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0024] Figure 1is a flow chart of the steps of a fisheye lens correction method provided by an embodiment of the present invention;

[0025] Figure 2 It is a system structure diagram of a fisheye lens correction system provided by one embodiment of the present invention. DETAILED DESCRIPTION

[0026] The specific implementation of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the present invention, and is not used to limit the present invention.

[0027] Figure 1 FIG. 1 is a flow chart of a method for correcting a fisheye lens provided by an embodiment of the present invention. Figure 1 As shown, an embodiment of the present invention provides a fisheye lens correction method, the method comprising:

[0028] Step S10: collecting image information sent back by the fisheye lens to be calibrated, and preprocessing the image information.

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

[0030] In an embodiment of the present invention, the first step of preprocessing is denoising. When the fisheye lens collects images, especially in low light or complex environments, the sensor is prone to noise. These noises will cause deviations in the brightness value in the image, affecting the evaluation of brightness uniformity. By adopting a denoising algorithm (such as Gaussian filtering, mean filtering or median filtering, etc.), the random noise 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, the fisheye lens often causes significant image distortion, especially bending deformation (barrel distortion) at the edge 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 of the distorted part does not represent the real scene. Through distortion correction technology (such as a geometric correction algorithm or a model-based correction method), the curved image generated by the fisheye lens can be restored to a planar image close to the real scene, thereby improving the accuracy of image analysis.

[0031] Furthermore, the image quality is greatly improved through the preprocessing of the fisheye lens image, including denoising and distortion correction. First, the denoising process eliminates the interference of sensor noise on the brightness analysis, making the brightness value more real and reliable. Secondly, the distortion correction corrects the image distortion caused by the fisheye lens to ensure a more reasonable brightness distribution in the correction area. Combining these two preprocessing steps, the system can perform subsequent brightness uniformity correction on the basis of a more realistic and stable image, thereby ensuring the accuracy of brightness analysis and improving the imaging quality of the fisheye 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: performing non-imaged area recognition based on the pre-processed image information, and filtering the non-imaged area, and using the remaining image area as a reference area for brightness correction.

[0033] Specifically, 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 used as the unimaged area; the unimaged area is filtered, and the remaining image area is used as the reference area for brightness correction.

[0034] In an embodiment of the present invention, when a fisheye lens is used in combination with a sensor, an excessively large field of view angle often leads to a mechanical vignetting problem during the imaging process. Mechanical vignetting refers to the fact that part of the light cannot enter the sensor because the field of view angle of the fisheye lens exceeds the effective imaging range of the sensor, resulting in the failure of imaging in these areas. These unimaged areas will form dark corners or black edges at the edge of the image. If these areas are included in the brightness uniformity calculation, it will have a negative impact on the accuracy of the image analysis. Therefore, in the brightness uniformity correction process, it is necessary to identify and filter these unimaged areas to ensure the accuracy and effectiveness of the brightness correction.

[0035] Furthermore, based on the coordination between the fisheye lens and the sensor, the presence of mechanical vignetting in the image can be identified. The ultra-wide-angle design of the fisheye lens makes its imaging range far beyond the field of view of an ordinary lens, and the sensor usually cannot completely cover the entire imaging area of ​​the fisheye lens, so 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, unimaged areas.

[0036] Furthermore, after mechanical vignetting is identified, these areas are removed from the image, i.e., filtering is performed. This step is very important because the unimaged areas do not reflect any actual scene information, and directly including these areas for brightness uniformity analysis will result in serious errors. For example, the brightness value of the unimaged areas is usually zero or very close to zero, resulting in the calculated brightness uniformity data not matching the actual scene. By filtering the unimaged areas, only those parts that actually receive light and reflect the real scene information are retained, which ensures a more accurate assessment of brightness uniformity.

[0037] Furthermore, after filtering the unimaged areas, the remaining image areas are valid reference areas for brightness correction. These areas are the effective areas for actual imaging after the fisheye lens is matched with the sensor, and represent the true brightness distribution. Based on these reference areas, the brightness uniformity evaluation path can be planned to evaluate the overall brightness uniformity of the image. This method ensures the accuracy of brightness analysis and eliminates the interference caused by mechanical vignetting.

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

[0039] Specifically, 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; identifying the boundaries 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 so, 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 not, performing evaluation path planning based on the principle of minimizing the number of segmented areas by a straight line connecting the image center point to the image boundary point.

[0040] In the embodiment of the present invention, due to the ultra-wide-angle field of view and complex optical distortion of the fisheye lens, 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 the content in the brightness correction reference area and segmenting the area, the influence of these interference factors on the brightness uniformity evaluation path can be effectively avoided.

[0041] Specifically, the first step in brightness uniformity evaluation path planning is to perform feature-based region segmentation on the brightness correction reference area. 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 changes in the same region are relatively uniform, while the brightness differences between different regions are large. Specifically, the feature differences of each region are detected, and segmentation is performed based on a preset feature difference threshold. Regions where the feature difference exceeds the threshold are considered different regions. In this way, the brightness differences caused by different colors or textures can be effectively eliminated, reducing the impact of these interfering features on the brightness uniformity analysis.

[0042] In a possible implementation, feature differences may include differences in color, texture, brightness, etc., and region segmentation based on feature difference thresholds can effectively identify different features of each part of the image and avoid content interference. For example, suppose we are processing an image containing a natural landscape, and the image content includes the sky, trees, and grass. We will perform region segmentation based on color and texture features. Consider an image containing the following main elements:

[0043] 1) Sky area: This part is usually dominated by light blue, with a more uniform color, less texture variation, and higher brightness.

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

[0045] 3) Grassland area: The color of the grass is light green, and the color changes are relatively uniform, but compared to the sky, the grass has a richer texture and moderate brightness.

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

[0047] Color features: Color information can be represented by RGB or HSV color models. In this image, the color of the sky is concentrated in the light blue range, while the colors of the trees and grass 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 (for example, 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 of the sky is significantly different from that of the trees and grass, so when a color change exceeding a preset threshold (e.g., more than a 20% hue difference) is detected, the system can separate the sky from the tree area.

[0049] Texture features: Texture information can be calculated using methods such as gradient, SIFT (Scale Invariant Feature Transform) or GLCM (Gray Level Co-occurrence Matrix). The texture of the sky is relatively simple, with almost no details, while the texture of trees and grass is complex, containing many tiny details. We can set a texture difference threshold, for example, if the texture complexity of adjacent pixels changes by more than a certain value, we can determine that they belong to different regions.

[0050] In this example, the complex texture of the trees differs significantly from the simple texture of the sky, and by detecting the difference in texture complexity, the system is able to identify the boundary between the tree and sky areas.

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

[0052] 1) It is detected that the color and texture differences between the sky area and the tree area exceed the preset threshold (the color difference exceeds 20%, and the texture complexity difference exceeds the set threshold), so the system divides the two parts into two independent areas.

[0053] 2) Similarly, the grass area has significant color and texture differences from the tree area, and these differences exceed the threshold, so the grass is also divided into a separate area.

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

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

[0056] Preferably, brightness uniformity evaluation path planning is performed based on a segmented area including an image center point and an image boundary point within the boundary, including: within a segmented area including an image center point and an image boundary point within the boundary, taking the image center point as the starting point, optionally taking at least one image boundary point within the boundary as the focus, and taking the straight line connecting the starting point and the end point as the planned brightness uniformity evaluation path.

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

[0058] 1) Continuity: The path from the center point of the image to the edge point of the image 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 fisheye lenses, where the edge area often has uneven brightness.

[0059] 2) Avoid interference between segmented areas: By planning the path 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 difference in image features in different areas may cause large changes in brightness, this change does not reflect the uniformity of the imaging, but the difference in content. Therefore, ensuring that the path is within the same segmented area can more realistically reflect the brightness uniformity of the area.

[0060] Preferably, the evaluation path planning is carried out based on the principle of minimizing the segmentation area of ​​the straight line path from the image center point to the image boundary point, including: taking the image center point as the starting point, taking the boundary point corresponding to the least segmentation area of ​​the straight line path as the end point, and taking each segmentation area of ​​the straight line path between the starting point and the end point as the area to be corrected; performing brightness interference factor removal on the area to be corrected under the same path based on the adaptive histogram equalization method to obtain the segmentation area of ​​the path after the brightness interference factor is removed; combining the segmentation areas based on the segmentation area of ​​the path after the brightness interference factor is removed to obtain a unified area; within the unified area, taking the image center point as the starting point, and optionally selecting at least one image boundary point within the boundary as the focus, and taking the straight line connecting the starting point and the end point as the planned brightness uniformity evaluation path.

[0061] In an 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, and the number of segmented areas passed by the path is the least. This means that the path spans the least between different feature areas, thereby reducing the impact of different image contents on brightness analysis. Each segmented area passed by the line connecting the starting point and the end point will be marked as an area to be corrected. After obtaining the area to be corrected, an adaptive histogram equalization method (CLAHE) is applied to adjust the brightness of the segmented areas of the path. CLAHE is an image processing technology that performs equalization in a small area, which can effectively remove brightness interference factors caused by image content or ambient light. Through this method, the brightness difference of each segmented area on the path is suppressed, ensuring that the brightness distribution under the same path is more uniform, thereby improving the accuracy of brightness uniformity evaluation.

[0062] Furthermore, after performing the removal of brightness interference factors, the system combines the processed segmented areas of the path to form a unified area. This step integrates the segmented areas that have undergone brightness correction so that the brightness of each area on the path tends to be consistent, avoiding the impact of brightness differences in different areas on uniformity analysis. Then, the brightness uniformity evaluation path is replanned within this unified area. At this time, the path still starts from the center point of the image and ends at at least one image boundary point within the arbitrary boundary to ensure that the brightness consistency of all areas passed by the path has been adjusted. This path will provide a more accurate brightness uniformity evaluation result after removing brightness interference.

[0063] Based on the scheme of the present invention, by combining the path planning principle of passing through the least segmented areas and the adaptive histogram equalization technology, an efficient brightness uniformity evaluation is achieved. First, in the path planning process, the path passing through the least segmented areas is given priority, which reduces the interference of different feature areas on the brightness analysis and improves the accuracy of the evaluation. Secondly, the brightness interference of each area on the path is removed by the CLAHE method, ensuring that the brightness distribution within the path is smoother and more consistent. Finally, replanning the path on a unified brightness segmentation area can effectively improve the stability and accuracy of the brightness uniformity analysis.

[0064] Furthermore, 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 end point of the path. The path usually extends from the center point of the image to the boundary point of the image. Then, multiple reference points are set at equal intervals along this path. The equal spacing can be set based on the resolution or 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 along 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 that location and compare it with the data at other reference points. This evenly distributed sampling method can cover the brightness changes along the entire path and ensure 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 expectations.

[0067] Specifically, based on the brightness of each reference point and the center point of the image, the minimum brightness uniformity value and the maximum brightness difference value of the current brightness correction reference area are calculated 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 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.

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

[0069]

[0070] 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:

[0071]

[0072] Among them, difference max is the maximum brightness difference.

[0073] In an embodiment 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 in the reference point to the brightness of the center point. If the ratio is too small, it means that the brightness of the reference area is uneven, especially the edge part may have a lower brightness. The maximum brightness difference reflects the brightness change amplitude between the reference points. The larger the difference, the more significant the brightness difference in the image and the worse the uniformity. The uniformity of the image brightness can be comprehensively evaluated based on the minimum brightness uniformity value and the maximum brightness difference. 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 the 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 expectations, perform shading correction on the fisheye lens to be corrected, and repeat steps S10 to S40 until a brightness correction reference area that meets expectations for brightness uniformity is obtained, and the fisheye lens correction is completed.

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

[0076] 1) Analyze the image brightness distribution: First, the system uses the reference point data that has been collected to analyze which areas have higher brightness and which areas have lower brightness. Especially for fisheye lenses, the brightness of the center area is usually higher, while the brightness of the edge area will decrease due to the angle of light entering.

[0077] 2) Calculate correction factors: Based on the brightness difference of the reference points, the system calculates correction factors for different areas. The edge areas are usually given higher brightening factors, while the center areas may remain unchanged or slightly adjusted.

[0078] 3) Apply correction factors: Through image processing algorithms, the system adjusts the brightness of each area accordingly, making the brightness transition from the center to the edge of the image smoother. Specific correction methods can include image processing technologies such as histogram equalization and adaptive equalization to ensure that the brightness is evenly distributed throughout the image area.

[0079] After completing the shading correction, the system will re-execute the previous brightness uniformity detection steps (ie, steps S10 to S40). Specifically, the system will collect image information again, pre-process the image, analyze the brightness uniformity, and re-plan the brightness uniformity evaluation path. Through this cyclic detection and correction process, 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 to ultimately achieve the effect of uniform overall brightness of the image. This process can not only significantly improve image quality, but also effectively solve inherent problems in fisheye lens imaging, such as edge vignetting effects.

[0080] Based on the scheme 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 process ensures that the image gradually tends to the ideal state at different correction stages, and finally obtains a brightness distribution that meets the uniformity requirements. Shading correction effectively solves the common dark corner problem in fisheye lens imaging, especially in the edge area of ​​the image. The brightness adjustment makes the brightness transition from the center to the edge of the image smoother and more natural. Finally, the brightness uniformity of the entire image is significantly improved, ensuring that the imaging quality meets the requirements of practical applications.

[0081] Figure 2 FIG. 1 is a system structure diagram of a fisheye lens correction system provided by an embodiment of the present invention. Figure 2 As shown, an embodiment of the present invention provides a fisheye lens correction system, the system comprising: an acquisition unit, used to acquire image information sent back by a fisheye lens to be corrected, and preprocess the image information; a filtering unit, used to perform non-imaged area recognition based on the preprocessed image information, and perform filtering on the non-imaged area, and use the remaining image area as a brightness correction reference area; a planning unit, used to perform brightness uniformity evaluation path planning in the brightness correction reference area, and determine multiple reference points at equal intervals on the brightness uniformity evaluation path; a judgment unit, used to judge whether the brightness uniformity of the current brightness correction reference area meets expectations 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 expectations, then perform shading correction on the fisheye lens to be corrected, and re-judge 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.

[0082] The embodiment of the present invention further provides a computer-readable storage medium, on which instructions are stored, which, when executed on a computer, enable the computer to execute the above-mentioned fisheye lens correction method.

[0083] Those skilled in the art will understand that all or part of the steps in the method for implementing the above-mentioned embodiments can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including several instructions for making a single-chip microcomputer, a chip or a processor (processor) perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0084] The optional embodiments of the present invention are described in detail above in conjunction with the accompanying drawings. However, the embodiments of the present invention are not limited to the specific details in the above embodiments. Within the technical concept of the embodiments of the present invention, the technical scheme of the embodiments of the present invention can be subjected to a variety of simple modifications, and these simple modifications all belong to the protection scope of the embodiments of the present invention. It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the embodiments of the present invention will not further describe various possible combinations.

[0085] In addition, various embodiments of the present invention may be arbitrarily combined, and as long as they do not violate the concept of the embodiments of the present invention, they should also be regarded as the contents disclosed in 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; S40) judging whether the brightness uniformity of the current brightness correction reference area meets expectations based on the brightness of each reference point; 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 in the brightness correction reference area includes: In the brightness correction reference area, region segmentation is performed based on feature information of each region to obtain multiple segmented regions whose feature differences are greater than a preset feature difference threshold; Identify the boundaries of each segmented area to determine whether there is a segmented area that includes the image center point and the image boundary point within the boundary; If it exists, then a 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; If it does not exist, the evaluation path planning is carried out based on the principle of the least segmented area by the straight line connecting the center point of the image to the boundary point of the image.

5. The method according to claim 4, 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 focus, and the straight line connecting the starting point and the end point is used as the planned brightness uniformity evaluation path.

6. The method according to claim 4, 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 has the least segmented area, including: Taking the midline point of the image as the starting point and the boundary point with the least corresponding segmentation area of ​​the straight line connection path as the end point, the segmentation area of ​​each path of the straight line connection path between the starting point and the end point is taken 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 path segmentation area after the brightness interference factor is removed is obtained; Based on the path segmentation area after the brightness interference factor is removed, the segmentation area is 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 focus, and the straight line connecting the starting point and the end point is taken as the planned brightness uniformity evaluation path.

7. The method according to claim 4, characterized in that Based on the brightness of each reference point, determine whether the brightness uniformity of the current brightness correction reference area meets expectations, including: Based on the brightness of each reference point and the center point of the image, the minimum brightness uniformity value and the maximum brightness difference value of the current brightness correction reference area are calculated 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 value 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 expectations; On the contrary, 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 expectations.

8. The method according to claim 7, 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; umiformity 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.

9. A fisheye lens correction system, characterized in that: The system comprises: A collection unit, used to collect image information sent back 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, used to plan a brightness uniformity evaluation path in a brightness correction reference area, and to determine a plurality of reference points at equal intervals on the brightness uniformity evaluation path; A judging unit, configured to judge whether the brightness uniformity of the current brightness correction reference area meets expectations based on the brightness of each reference point; 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.

10. 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 8.

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

  • Optical center positioning method and device of fish-eye lens and quality detection method of camera module

    CN109859261A

  • Video projection system

    JP2008288714A

  • On-vehicle imaging system

    JP2019068340A