A method and apparatus for determining the position of a calibration point for distortion correction

CN122888023APending Publication Date: 2026-10-09NANJING CHIEF TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611114839.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-24
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

[0004]本申请提供了一种用于畸变矫正的确定标定点位置的方法和装置,用以解决相关技术确定点阵图中的各个标定点的位置信息的准确性较差的问题

Benefits of technology

相关技术中一般采用全局阈值对点阵图二值化提取标定点的技术方案来确定标定点的位置信息。但是在使用摄像设备采集标准点阵图像的虚像时,采集到的点阵图往往有重影,杂散光等问题。重影会使得原本锐利的标定点变成核心实像与外围渐变虚影的灰度分布。全局阈值设置偏低,会把整个重影都划入前景,导致外接矩形偏大,标定点的中心向虚影方向偏移;全局阈值设置偏高,会切掉真实核心的边缘,也会造成标定点的中心偏移。杂散光会造成整幅图像背景灰度不均匀,还会引入零散的伪亮斑或伪暗斑干扰。重影和杂散光都会导致出现全局灰度不均匀的干扰,因此全局二值化无法适配全局的灰度漂移,要么把偏亮区域的背景误判为标定点前景,要么把偏暗区域的真实标定点误判为背景。因此,相关技术的方案确定的标定点的位置信息的准确性无法保证。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122888023A_ABST
    Figure CN122888023A_ABST
Patent Text Reader

Abstract

The application discloses a method and device for determining the position of a calibration point for distortion correction, and relates to the technical field of image recognition. A first gray threshold corresponding to a first dot matrix to be processed is determined, the first gray threshold satisfying a first condition; a binary image of the first dot matrix is obtained based on the first gray threshold, and the number of first circumscribed rectangular regions of contours contained in the binary image is the same as the number of calibration points; each first sub-image corresponding to the position of each first circumscribed rectangular region in the first dot matrix is determined; for each first sub-image, a binary sub-image of the first sub-image is obtained based on a second gray threshold corresponding to the first sub-image, and the position information of a calibration point in the first sub-image is determined according to the position information of the center point of a second circumscribed rectangular region of a contour contained in the binary sub-image. Therefore, the accuracy of the determined position information of the calibration point can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image recognition technology, and in particular to a method and apparatus for determining the location of calibration points for distortion correction. Background Technology

[0002] In head-up display (HUD) systems, the displayed image typically needs to pass through multiple optical paths, including the display panel, projection optics system, and windshield, inevitably resulting in geometric distortion. Existing distortion correction technologies are mainly divided into hardware distortion correction and software distortion correction. Hardware methods suffer from problems such as complex optical system structures, high costs, and difficulty in flexibly adapting to different vehicle models or windshield shapes. Therefore, software is typically used to pre-distort the image.

[0003] Existing software distortion correction methods often suffer from ghosting and stray light issues when capturing virtual images of standard bitmap images using camera equipment. This problem makes it impossible to accurately determine the positions of the calibration points in the bitmap, thus affecting the accuracy of subsequent distortion image fusion. Therefore, providing a technical solution to accurately determine the positions of the calibration points in the bitmap is a technical problem that needs to be solved. Summary of the Invention

[0004] This application provides a method and apparatus for determining the location of calibration points for distortion correction, thereby solving the problem of poor accuracy in determining the location information of each calibration point in a dot matrix diagram in related technologies.

[0005] In a first aspect, this application provides a method for determining the location of calibration points for distortion correction, the method comprising: A first grayscale threshold is determined for the first bitmap to be processed. The first grayscale threshold satisfies a first condition: a binarized image of the first bitmap is obtained based on the first grayscale threshold, and the number of first bounding rectangle regions of the contour contained in the binarized image is the same as the number of calibration points. Each first sub-image in the first dot matrix image corresponds to the position of each first bounding rectangle region. For each first sub-image, a binarized sub-image of the first sub-image is obtained based on the second grayscale threshold corresponding to the first sub-image. The position information of the calibration point in the first sub-image is determined according to the position information of the center point of the second bounding rectangle region of the contour contained in the binarized sub-image. Wherein, the second grayscale threshold is greater than the first grayscale threshold.

[0006] The above technical solution has the following advantages or beneficial effects: In related technologies, a global threshold is generally used for the dot matrix. Figure 2Global binarization is a technique used to extract calibration points to determine their location. However, when capturing virtual images of standard dot matrix images using camera equipment, the captured dot matrix images often suffer from ghosting and stray light. Ghosting transforms what should be a sharp calibration point into a grayscale distribution of a core real image and a gradually fading ghost image. A low global threshold setting will include the entire ghost image in the foreground, resulting in an oversized bounding rectangle and a shift in the center of the calibration point towards the ghost image; a high global threshold setting will cut off the edges of the real core, also causing a shift in the center of the calibration point. Stray light causes uneven grayscale in the background of the entire image and introduces scattered false bright or dark spots. Both ghosting and stray light contribute to global grayscale unevenness, making global binarization unable to adapt to global grayscale shifts. This leads to either misclassifying brighter background areas as foreground calibration points or misclassifying darker real calibration points as background. Therefore, the accuracy of the calibration point location information determined by related techniques cannot be guaranteed.

[0007] To address the aforementioned technical problems in related technologies, this application proposes a step-by-step solution for determining the location information of calibration points. First, a first bitmap is binarized using a first grayscale threshold (global grayscale threshold) to determine each first sub-image within the first bitmap. Each first sub-image is a coarse region image containing the calibration point. Second, within each coarse region image, a second grayscale threshold (local grayscale threshold) is further used to binarize the first sub-image to determine a second bounding rectangle region. This second bounding rectangle region is the detailed region of the calibration point. The second grayscale threshold used to determine the detailed region corresponds to the coarse image to which it belongs. Finally, the location information of the calibration point within the corresponding first sub-image is determined based on the location information of the center point of the second bounding rectangle region. Compared to using a global threshold to binarize the first bitmap... Figure 2 The technical solution for extracting calibration points by quantification improves the accuracy of determining the location information of calibration points.

[0008] Specifically, this application utilizes a global threshold (first grayscale threshold) for coarse binarization to extract the first circumscribed rectangular region, thereby achieving a rough selection of the calibration point region, narrowing the processing range for subsequent calibration point localization, and reducing interference from the background region corresponding to the calibration point localization. It should be noted that the determination of the first grayscale threshold must ensure that the number of subsequently determined first circumscribed rectangular regions is the same as the number of calibration points. For each first sub-image, a second grayscale threshold corresponding to the first sub-image is used to binarize the first sub-image, resulting in a binarized sub-image. In the binarized sub-image, the calibration points (second circumscribed rectangular region) and the background are further distinguished, reducing global grayscale inhomogeneity interference caused by stray light and ghosting. This allows for more precise identification of the original calibration point positions, improving the accuracy of the determined calibration point position information.

[0009] Secondly, this application provides a device for determining the location of calibration points for distortion correction, the device comprising: The first determining module is used to determine the first grayscale threshold corresponding to the first dot matrix image to be processed. The first grayscale threshold satisfies the first condition: a binarized image of the first dot matrix image is obtained based on the first grayscale threshold, and the number of the first bounding rectangle regions of the contour contained in the binarized image is the same as the number of calibration points. The second determining module is used to determine each first sub-image in the first dot matrix image corresponding to the positions of each first circumscribed rectangular region; for each first sub-image, a binarized sub-image of the first sub-image is obtained based on a second grayscale threshold corresponding to the first sub-image, and the position information of the calibration point in the first sub-image is determined according to the position information of the center point of the second circumscribed rectangular region of the contour contained in the binarized sub-image; wherein, the second grayscale threshold is greater than the first grayscale threshold.

[0010] Thirdly, this application provides a head-up display, the head-up display comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the method.

[0011] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described herein.

[0012] Fifthly, this application provides a computer program product comprising an executable program that is executed by a processor to implement the method described. Attached Figure Description

[0013] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0014] Figure 1 A schematic diagram illustrating the process for determining the location of calibration points for the first type of distortion correction provided in this application; Figure 2 A schematic diagram illustrating the process for determining the location of calibration points for the second type of distortion correction provided in this application; Figure 3 A schematic diagram illustrating the process of determining the first grayscale threshold corresponding to the first bitmap to be processed, as provided in this application; Figure 4 Flowchart of the first scheme for determining the location information of calibration points within a first sub-image provided in this application; Figure 5 Flowchart of the second scheme for determining the position information of the calibration points in the first sub-image provided in this application; Figure 6 A schematic diagram illustrating the process of determining a rough region in a dot matrix diagram provided in this application; Figure 7 A schematic diagram illustrating the process of determining the detailed area within the coarse region provided in this application; Figure 8 This is a schematic diagram of the dot matrix provided in this application; Figure 9 A schematic diagram illustrating the location information of the calibration points within the first sub-image provided in this application; Figure 10 A schematic diagram of the device for determining the location of calibration points for distortion correction provided in this application; Figure 11 A schematic diagram of the head-up display structure provided in this application. Detailed Implementation

[0015] To make the objectives and implementation methods of this application clearer, the exemplary implementation methods of this application will be clearly and completely described below with reference to the accompanying drawings of the exemplary embodiments of this application. Obviously, the exemplary embodiments described are only some embodiments of this application, and not all embodiments.

[0016] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.

[0017] The terms "first," "second," "third," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar or related objects or entities, and do not necessarily imply a specific order or sequence, unless otherwise specified. It should be understood that such terms are interchangeable where appropriate.

[0018] The terms “comprising” and “having”, and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device that includes a range of components is not necessarily limited to all of the components that are clearly listed, but may include other components that are not clearly listed or that are inherent to such product or device.

[0019] The term "module" refers to any known or subsequently developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that is capable of performing the functions associated with that element.

[0020] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

[0021] For ease of explanation, the above description has been provided in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. Various modifications and variations can be obtained based on the above teachings. The selection and description of the above embodiments are for the purpose of better explaining the principles and practical applications, thereby enabling those skilled in the art to better utilize the described embodiments and various different variations of embodiments suitable for specific use considerations.

[0022] When using camera equipment to capture virtual images of standard calibration patterns, the captured bitmap (virtual image) often suffers from ghosting, stray light, and other problems, making effective calibration impossible. Related technologies often require fine-tuning the angle and re-capturing the virtual image, or adjusting algorithm parameters based on the environment, until the captured image meets the calibration requirements. Further research proposes using Hough transform to identify circles within the image and setting appropriate thresholds based on the circle size in the whiteboard standard image to remove non-compliant circles, thus filtering out ghosting and finding the current display position of the actual circle. However, sometimes points on the edge of the virtual image, especially corner points, are significantly smaller than points inside the virtual image, which may incorrectly filter out points that should be identified. Furthermore, when ghosting is severe, this method is more likely to identify incorrect positions, degrading the quality of distortion correction.

[0023] To address the aforementioned technical problems in related technologies, this application proposes a step-by-step solution for determining the location information of calibration points. First, a first dot matrix image is binarized using a global grayscale threshold to determine each first sub-image within the first dot matrix image. Each first sub-image is a coarse region image containing the calibration point. Second, within each coarse region image, the first sub-image is further binarized using a second grayscale threshold (local grayscale threshold) corresponding to the first sub-image to determine a second circumscribed rectangular region. This second circumscribed rectangular region is the detailed region of the calibration point. Finally, the location information of the calibration point within the corresponding first sub-image is determined based on the location information of the center point of the second circumscribed rectangular region. The technical solution provided by this application can reduce global grayscale inhomogeneity interference caused by stray light and ghosting. This allows for the identification of a more precise location of the original calibration point, improving the accuracy of the determined calibration point location information.

[0024] Figure 1 A schematic diagram of the first process for determining the location of calibration points for distortion correction provided in this application, the process including the following steps: S101: Determine the first grayscale threshold corresponding to the first bitmap to be processed. The first grayscale threshold satisfies the first condition: a binarized image of the first bitmap is obtained based on the first grayscale threshold. The number of the first bounding rectangle regions of the contour contained in the binarized image is the same as the number of calibration points. S102: Determine each first sub-image in the first dot matrix image corresponding to the positions of each first bounding rectangle region; for each first sub-image, obtain a binarized sub-image of the first sub-image based on the second grayscale threshold corresponding to the first sub-image, and determine the position information of the calibration point in the first sub-image according to the position information of the center point of the second bounding rectangle region of the contour contained in the binarized sub-image. Wherein, the second grayscale threshold is greater than the first grayscale threshold.

[0025] The method for determining calibration point positions for distortion correction provided in this application is applied to a head-up display (HUD). The HUD first determines a first bitmap to be processed. Optionally, the original virtual image of a captured standard calibration pattern can be directly used as the first bitmap to be processed, and then a first grayscale threshold corresponding to the first bitmap to be processed is determined. When determining the first grayscale threshold, a grayscale range can be preset, and a grayscale value within the grayscale range can be randomly selected as the first grayscale threshold. The first grayscale threshold needs to satisfy the following first condition: the first bitmap is binarized based on the first grayscale threshold to obtain a binarized image of the first bitmap; then, each contour contained in the binarized image is determined, and the minimum bounding rectangle of each contour is determined as the first bounding rectangle region. The number of calibration points contained in the first bitmap is known. The number of first bounding rectangle regions contained in the determined binarized image needs to be the same as the number of calibration points to ensure that the position information of each calibration point is subsequently determined. If the number of first bounding rectangle regions is not the same as the number of calibration points, the first grayscale threshold needs to be re-determined until the requirement is met.

[0026] In this application, a binarized image of the first dot matrix is ​​obtained based on a first grayscale threshold, and each first bounding rectangle region contained in the binarized image is determined. Since the first dot matrix and the binarized image have the same resolution, each first bounding rectangle region can be mapped to the first dot matrix image according to its position, thus determining each first sub-image in the first dot matrix image corresponding to the position of each first bounding rectangle region. Considering the information distortion inherent in the binarized image, this application does not directly use the result of global binarization for the localization of calibration points. Instead, it returns to the first dot matrix image and determines each first sub-image based on the position obtained from global coarse localization, preserving the original grayscale information of each coarse region, i.e., preserving the grayscale distribution characteristics of each calibration point itself, providing an accurate data foundation for subsequent precise segmentation.

[0027] This application considers that color information in color images can introduce additional chromatic noise due to optical scattering, which can affect the accuracy of calibration point localization. Therefore, this application proposes to perform grayscale processing on the original bitmap to obtain a first bitmap to be processed. After conversion to grayscale, only grayscale (brightness), the core feature distinguishing calibration points from the background, is retained, eliminating the interference of chromatic noise. This provides a fundamental condition for accurate subsequent calibration point localization.

[0028] To further improve the accuracy of subsequent calibration point positioning, this application proposes that, before determining the first grayscale threshold corresponding to the first dot matrix image to be processed, the method further includes: performing grayscale processing and dilation processing on the original dot matrix image to obtain the first dot matrix image to be processed.

[0029] First, the original bitmap is processed into grayscale to eliminate chromatic noise. Then, the resulting grayscale image is dilated. Dilation is an operation that expands the foreground (white area) in a grayscale image to fill small holes and connect separated objects. After dilation, several ghosted points will be connected together, further ensuring accurate positioning of calibration points in subsequent steps.

[0030] Figure 2 A schematic diagram of a second process for determining calibration point locations for distortion correction provided in this application, the process including the following steps: S201: Perform grayscale processing and dilation processing on the original bitmap to obtain the first bitmap to be processed; S202: Determine the first grayscale threshold corresponding to the first bitmap to be processed. The first grayscale threshold satisfies the first condition: a binarized image of the first bitmap is obtained based on the first grayscale threshold. The number of the first bounding rectangle regions of the contour contained in the binarized image is the same as the number of calibration points. S203: Determine each first sub-image in the first dot matrix image corresponding to the positions of each first circumscribed rectangular region; for each first sub-image, obtain a binarized sub-image of the first sub-image based on the second grayscale threshold corresponding to the first sub-image, and determine the position information of the calibration point in the first sub-image according to the position information of the center point of the second circumscribed rectangular region of the contour contained in the binarized sub-image.

[0031] In this application, the above-mentioned technical solution uses gray values ​​that meet certain conditions as the first grayscale threshold when determining the first grayscale threshold corresponding to the first dot matrix image to be processed. However, the input dot matrix image for calibration point positioning usually suffers from interference such as sensor noise, uneven illumination, and imaging grayscale fluctuations. Even small grayscale fluctuations in the dot matrix image may cause the selected first grayscale threshold to fail to meet the first condition, requiring the first grayscale threshold to be re-determined. This affects the overall processing efficiency of the solution. To ensure that the determined first grayscale threshold can adapt to small grayscale fluctuations in the dot matrix image, Figure 3 This application provides a schematic diagram of the process for determining a first grayscale threshold corresponding to a first bitmap to be processed. The process for determining the first grayscale threshold corresponding to the first bitmap to be processed includes: S301: Within a preset first grayscale value range, the grayscale values ​​are traversed sequentially in ascending order, and the first grayscale value that satisfies the first condition is determined as the first candidate grayscale value; within the grayscale value range that is greater than the first candidate grayscale value within the first grayscale value range, the grayscale values ​​are traversed again in ascending order, and the first grayscale value that does not satisfy the first condition is determined, and the previous grayscale value of that grayscale value is determined as the second candidate grayscale value; S302: Determine the first grayscale threshold corresponding to the first dot matrix based on the first candidate grayscale value and the second candidate grayscale value.

[0032] The preset first grayscale value range is, for example, a grayscale value range of 0 to 255, or a grayscale value range of 0 to 200, or a grayscale value range of 20 to 180, etc. The grayscale values ​​are traversed sequentially in ascending order. Taking the preset first grayscale value range of 0 to 255 as an example, starting with grayscale value 0, a binary image of the first bitmap is obtained based on grayscale value 0. It is then determined whether the number of bounding rectangle regions of the contours contained in the binary image is the same as the number of calibration points. If they are the same, grayscale value 0 is the first candidate grayscale value. If they are not the same, a binary image of the first bitmap is obtained based on grayscale value 1. The same process is repeated, determining whether the number of bounding rectangle regions of the contours contained in the binary image is the same as the number of calibration points. If they are the same, grayscale value 1 is the first candidate grayscale value. If they are not the same, the traversal continues until the first grayscale value that satisfies the first condition is determined as the first candidate grayscale value. Then, within the range of gray values ​​greater than the first candidate gray value within the first gray value range, the process continues to traverse in ascending order of gray values ​​to determine the first gray value that does not meet the first condition. For example, during the continued traversal, gray values ​​from the first candidate gray value to gray value 50 all meet the first condition, while gray value 51 does not meet the first condition; therefore, gray value 50 is determined as the first candidate gray value.

[0033] A first grayscale threshold corresponding to the first dot matrix image is determined based on the first candidate grayscale value and the second candidate grayscale value. Optionally, the average of the first candidate grayscale value and the second candidate grayscale value is determined as the first grayscale threshold corresponding to the first dot matrix image.

[0034] In one optional implementation, determining the first grayscale threshold corresponding to the first dot matrix image based on the first candidate grayscale value and the second candidate grayscale value includes: Based on the first candidate grayscale value, the second candidate grayscale value, and their respective preset weight values, the first candidate grayscale value and the second candidate grayscale value are weighted to obtain the first grayscale threshold corresponding to the first dot matrix.

[0035] The preset weight values ​​corresponding to the first candidate grayscale value and the second candidate grayscale value can be set based on experience. For example, the weight value corresponding to the lower grayscale value is larger, and the weight value corresponding to the higher grayscale value is smaller; or the weight value corresponding to the lower grayscale value is smaller, and the weight value corresponding to the higher grayscale value is larger; or the preset weight values ​​corresponding to the first candidate grayscale value and the second candidate grayscale value are equal.

[0036] This application defines a continuous grayscale value range that meets the first condition by sequentially traversing the range. Finally, it performs weighted processing based on the grayscale values ​​at the two endpoints of the range and their respective preset weight values ​​to obtain the first grayscale threshold. This application is equivalent to selecting the grayscale value at a position within the effective range as the first grayscale threshold, and reserves fault tolerance space from both the upper and lower boundaries. Even if the image has certain noise or grayscale fluctuations, the threshold will still fall within the effective range, improving the adaptability of the method to different imaging environments.

[0037] In another alternative approach, within a preset first grayscale value range, grayscale values ​​are traversed sequentially in descending order to determine the first grayscale value that satisfies the first condition as the first candidate grayscale value. Within the grayscale value range smaller than the first candidate grayscale value, the grayscale values ​​are traversed again in descending order to determine the first grayscale value that does not satisfy the first condition, and the previous grayscale value of that grayscale value is determined as the second candidate grayscale value. Based on the first candidate grayscale value and the second candidate grayscale value, the first grayscale threshold corresponding to the first dot matrix is ​​determined.

[0038] It's important to note that the effective grayscale range that meets the first condition is typically located in the lower to middle range of the grayscale distribution. The ascending grayscale traversal method only requires starting from grayscale value 0 and traversing to the left endpoint of the effective range to obtain the first candidate grayscale value, resulting in fewer average traversal steps. However, the descending grayscale traversal method requires starting from 255 and traversing to the right endpoint of the effective range to obtain the first candidate grayscale value, resulting in more average traversal steps and unnecessary computational time. For scenarios requiring high processing speed, such as real-time camera calibration and online distortion correction, the ascending grayscale traversal method offers a more significant efficiency advantage.

[0039] In this application, the process of determining the second grayscale threshold corresponding to each of the first sub-images includes: For each of the first sub-images, within a preset second grayscale value range, the grayscale values ​​are traversed sequentially in order of their magnitude, and the grayscale value that satisfies the second condition is determined as the second grayscale threshold corresponding to the first sub-image.

[0040] Optionally, the gray values ​​can be traversed sequentially in ascending order, and any gray value that satisfies the second condition can be determined as the second gray threshold corresponding to the first sub-image; or the gray values ​​can be traversed sequentially in ascending order, and the last gray value that satisfies the second condition can be determined as the second gray threshold corresponding to the first sub-image.

[0041] Preferably, the step of sequentially traversing the gray values ​​according to their magnitude and determining the gray value that satisfies the second condition as the second gray value threshold corresponding to the first sub-image includes: The gray values ​​are traversed sequentially from largest to smallest, and the first gray value that satisfies the second condition is determined as the second gray threshold corresponding to the first sub-image.

[0042] The second condition is: a binarized sub-image of the first sub-image is obtained based on the second grayscale threshold, and the area of ​​the second bounding rectangle region of the contour contained in the binarized sub-image is greater than a preset area threshold.

[0043] The preset second grayscale value range is, for example, a grayscale value range from 0 to 255, but it can also be other grayscale value ranges. Taking the preset second grayscale value range of 0 to 255 as an example, starting from grayscale value 255, for each first sub-image, a binarized sub-image of the first sub-image is obtained based on grayscale value 255. It is then determined whether the area of ​​the bounding rectangle region of the contour contained in the binarized sub-image is greater than a preset area threshold. If yes, then grayscale value 255 is the second grayscale threshold. If not, a binarized sub-image of the first sub-image is obtained based on grayscale value 254. It is then determined whether the area of ​​the bounding rectangle region of the contour contained in the binarized sub-image is greater than a preset area threshold. If yes, then grayscale value 254 is the second grayscale threshold. If not, the process continues, and the first grayscale value that satisfies the second condition is determined as the second grayscale threshold. It should be noted that if the binarized sub-image contains two bounding rectangle regions, then it is determined whether the area of ​​the bounding rectangle region with the larger area is greater than the preset area threshold. This application considers that when the area of ​​the circumscribed rectangular region is small, it is likely to be an interference region. Therefore, the second condition stipulates that the area of ​​the second circumscribed rectangular region of the contour contained in the binarized sub-image is greater than a preset area threshold. The preset area threshold is determined based on the area of ​​the region where the calibration point is located, where the area of ​​the region where the calibration point is located refers to the area of ​​the region where the calibration point is located in the pre-saved standard dot matrix image.

[0044] This application determines the second grayscale threshold by traversing grayscale values ​​in descending order. The first threshold that satisfies the condition is theoretically just below the grayscale of all pixels at the calibration point. This allows the entire calibration point to be completely included in the foreground without truncating its edges. The resulting contour perfectly matches the true shape of the calibration point, resulting in a smaller error in the center point position of the calculated second circumscribed rectangle and higher positioning accuracy. The residual bright noise grayscale in the background of the first sub-image is generally lower than that of the true calibration point. During the traversal from largest to smallest, the complete calibration point contour is detected, the second condition is met, and the process terminates before the threshold drops to the noise grayscale. This prevents noise from being included in the foreground and forming redundant contours, avoiding the error of mistakenly identifying noise as a calibration point, thus enhancing robustness.

[0045] In this application, when determining the first grayscale threshold using the global scheme, the grayscale values ​​are traversed in ascending order; while when determining the second grayscale threshold using the local scheme, the grayscale values ​​are traversed in descending order.

[0046] The core challenge in the global phase is resisting bright interference from the background (bright stains, sensor bright spots) to ensure the finding of an effective range satisfying "contour count = N". The global solution uses a traversal from smallest to largest, with the threshold increasing from low to high. Only when the threshold rises to just below the lowest (darkest) true calibration point will all N calibration points be included in the foreground. Bright interference with even lower grayscale has not yet reached the threshold requirement and will not be included in the foreground. At this point, the contour count is exactly equal to N, satisfying the first condition. The interference will not affect the definition of the effective range, fundamentally avoiding the problem of bright interference causing the first condition to be unsatisfactory throughout the process. The core challenge in the local phase is avoiding premature termination, suppressing local noise, and ensuring accurate segmentation of individual calibration points. The local solution uses a traversal from largest to smallest grayscale value, adapting to the characteristics of locally bright calibration points, solving the problem of premature termination and mistaking the entire sub-image as a calibration point during the traversal from smallest to largest. The global and local solutions traverse grayscale values ​​in opposite directions, addressing the core pain points of the two stages respectively. The overall failure probability is lower than that of the solution that uses the same traversal order throughout the entire process, significantly improving overall robustness.

[0047] In the global stage, the global scheme iterates through and defines all continuous gray-level intervals that meet the first condition. Finally, the gray-level values ​​at the two endpoints of each interval are used as the first gray-level threshold. This threshold falls within the effective range, away from boundary fluctuations, ensuring the accuracy of the number and position of the first bounding rectangle. It avoids missing low-gray-level calibration points and preventing over-detection of bright areas, thus avoiding multiple calibration points being incorrectly assigned to the same first sub-image and providing an accurate foundation for local processing. In the local stage, the second gray-level threshold output by the local scheme perfectly encompasses the entire calibration point contour, without truncating edges or introducing unnecessary noise. The resulting contour more closely resembles the true shape of the calibration points, with smaller errors in center point calculation. With accurate output at both stages, the final calibration point positions are more precise, providing more accurate calibration data for subsequent distortion correction parameter calculations, and thus improving the overall distortion correction effect.

[0048] In the global stage, the effective interval satisfying the first condition is located in the mid-to-high grayscale range (the grayscale of the calibration point is higher than that of the background). Traversing from smallest to largest only requires reaching the left endpoint of the interval to obtain the first candidate, resulting in the minimum average traversal steps. In the local stage, the effective threshold satisfying the second condition is located in the high grayscale range. Traversing from largest to smallest only requires reaching the right endpoint of the interval to obtain the threshold, also resulting in the minimum average traversal steps. Combining the two approaches minimizes the total number of traversal steps throughout the entire process. Stable and accurate results can be obtained without introducing a more computationally complex threshold search algorithm. The overall computational load is small and the processing speed is fast, which can meet the application scenarios with high latency requirements, such as industrial online calibration and real-time visual distortion correction.

[0049] In this application, for each first sub-image, a binarization process is performed on the first sub-image based on the second grayscale threshold corresponding to the first sub-image to obtain a binarized sub-image of the first sub-image. Optionally, a grayscale value can be randomly selected as the second grayscale threshold within a preset grayscale range. Considering that the grayscale values ​​of the pixels in the region where the calibration point is located are relatively large, the preset grayscale range is, for example, a range containing large grayscale values ​​such as 150 to 200 or 180 to 250. The contours contained in the binarized sub-image are determined, and then the smallest bounding rectangle of the contour is determined as the second bounding rectangle region. The position information of the calibration point in the first sub-image is determined based on the position information of the center point of the second bounding rectangle region. Optionally, if the binarized sub-image contains a second bounding rectangle region, the position information of the center point of the second bounding rectangle region is determined as the position information of the calibration point in the first sub-image.

[0050] If the binarized sub-image contains at least two second bounding rectangular regions, this application provides two schemes for determining the position information of the calibration points within the first sub-image.

[0051] Option 1: The process of determining the position information of the calibration points within the first sub-image includes: If the binarized sub-image contains at least two second bounding rectangle regions, the position information of the center point of the second bounding rectangle region with the largest area is determined as the position information of the calibration point in the first sub-image.

[0052] Figure 4 The flowchart of the first scheme for determining the location information of the calibration points in the first sub-image provided in this application includes the following steps: S401: Determine the first grayscale threshold corresponding to the first bitmap to be processed. The first grayscale threshold satisfies the first condition: a binarized image of the first bitmap is obtained based on the first grayscale threshold. The number of the first bounding rectangle regions of the contour contained in the binarized image is the same as the number of calibration points. S402: Determine each first sub-image in the first dot matrix image corresponding to the positions of each first bounding rectangle region; for each first sub-image, obtain a binarized sub-image of the first sub-image based on the second grayscale threshold corresponding to the first sub-image; if the binarized sub-image contains at least two second bounding rectangle regions, determine the position information of the center point of the second bounding rectangle region with the largest area as the position information of the calibration point in the first sub-image.

[0053] In this application, if the binarized sub-image contains at least two second bounding rectangular regions, the areas of these at least two second bounding rectangular regions are determined respectively, and the second bounding rectangular region with the largest area is selected by comparison. Then, the position information of the center point of the second bounding rectangular region with the largest area is obtained, and the position information of the center point is determined as the position information of the calibration point in the first sub-image.

[0054] Option 2: The process of determining the position information of the calibration points within the first sub-image includes: Based on the position information of the center points of the at least two second circumscribed rectangular regions, the average position information of the at least two center points is determined as the position information of the calibration point within the first sub-image.

[0055] Figure 5 The flowchart of the second scheme for determining the position information of the calibration points in the first sub-image provided in this application includes the following steps: S501: Determine the first grayscale threshold corresponding to the first bitmap to be processed. The first grayscale threshold satisfies the first condition: a binarized image of the first bitmap is obtained based on the first grayscale threshold. The number of the first bounding rectangle regions of the contour contained in the binarized image is the same as the number of calibration points. S502: Determine each first sub-image in the first dot matrix image corresponding to the positions of each first bounding rectangle region; for each first sub-image, obtain a binarized sub-image of the first sub-image based on the second grayscale threshold corresponding to the first sub-image; if the binarized sub-image contains at least two second bounding rectangle regions, determine the position information of the calibration point within the first sub-image based on the position information of the center points of each of the at least two second bounding rectangle regions and the average position information of the position information of the at least two center points.

[0056] In this application, if the binarized sub-image contains at least two second bounding rectangular regions, the position information of the center points of each of these at least two second bounding rectangular regions is determined; then, the average value of the position information of these two center points is calculated. That is, the average value of the x-coordinate and the average value of the y-coordinate of these two center points are calculated. The position information composed of these two average values ​​is the position information of the calibration point within the first sub-image.

[0057] This application addresses the issues of ghosting and stray light often found in virtual images (bitmaps) to be calibrated, proposing a calibration point identification algorithm for distortion correction calibration. The identification process consists of two steps: first, calculating the coarse region of the point to be identified based on the bitmap; second, extracting images of each coarse region from the bitmap and calculating the detailed region within that image. Both the coarse and detailed regions are bounded rectangles. Finally, the center point of the detailed region can be considered as the specific coordinates of the calibration point.

[0058] Figure 6 The process of determining a rough region in a bitmap provided in this application includes the following steps: S601: Perform grayscale processing and dilation processing on the original bitmap to obtain the first bitmap to be processed; S602: Within the preset first gray value range of 0 to 255, the gray values ​​are traversed sequentially in ascending order, and a binarized image of the first bitmap is obtained based on the currently selected gray value, and the number of the first bounding rectangle regions of the contour contained in the binarized image is determined. S603: If the number of the first bounding rectangle region is the same as the number of calibration points, the currently selected gray value is determined as the first candidate gray value. If they are not the same, continue to traverse until the first candidate gray value is determined. S604: Within the range of gray values ​​greater than the first candidate gray value in the first gray value range, continue traversing in ascending order of gray values ​​to determine the first gray value that does not meet the first condition, and determine the previous gray value of that gray value as the second candidate gray value. S605: The first grayscale threshold corresponding to the first dot matrix will be determined based on the average of the first candidate grayscale value and the second candidate grayscale value. S606: Binarize the first dot matrix image based on the first grayscale threshold to obtain a binarized image; determine each first bounding rectangular region contained in the binarized image; S607: Determine each first sub-image in the first dot matrix image corresponding to the position of each first bounding rectangle region, that is, the image of each coarse region.

[0059] Figure 7 This application provides a schematic diagram illustrating the process of determining detailed regions within a coarse region. For each first sub-image, the location information of the calibration points in that first sub-image is determined through the following steps: S701: Within the preset second grayscale value range of 0 to 255, traverse the grayscale values ​​sequentially in descending order of grayscale value; S702: Binarize the first sub-image based on the currently selected grayscale value to obtain a binarized sub-image; S703: Determine the area of ​​the largest second bounding rectangle region contained in the binarized sub-image; S704: If the area of ​​the largest second bounding rectangle is greater than the preset area threshold, the position information of the center point of the largest second bounding rectangle is determined as the position information of the calibration point in the first sub-image; if the area of ​​the largest second bounding rectangle is not greater than the preset area threshold, the new gray values ​​are traversed within the preset second gray value range until the position information of the calibration point is determined.

[0060] The method for determining calibration point locations for distortion correction provided in this application is based on the principle that, in the virtual image (dot matrix) captured during HUD calibration, the brightness of the origin (calibration point) is generally higher than that of ghosting and stray light. However, the overall brightness of the dot matrix obtained under different environments and angles is not fixed, and the brightness of different areas within the same dot matrix may also vary significantly. Therefore, using a preset grayscale threshold often fails to meet the requirements. This application first tests the ghost image using an increasing dynamic threshold to obtain a continuous first grayscale threshold that makes the number of circumscribed rectangular regions equal to the number of calibration points. This filters out other bright parts outside the areas caused by stray light. Then, for the coarse area of ​​each calibration point, a decreasing dynamic threshold is used for testing. The largest circumscribed rectangular region that first appears, exceeding the preset area threshold, is the brightest part in that region. The advantage of this approach is that the average brightness of different calibration points on the same dot matrix is ​​generally different. This application can more accurately find the brightest part in the current region, that is, more accurately determine the location information of the calibration points in each detailed region.

[0061] Additionally, it should be noted that the grayscale threshold involved in this application refers to a segmentation threshold used for binarizing grayscale images. The process of binarizing a grayscale image based on the grayscale threshold can be as follows: setting the grayscale values ​​of pixels in the grayscale image that are greater than the grayscale threshold to 255, and setting the grayscale values ​​of pixels in the grayscale image that are not greater than the grayscale threshold to 0; or it can be as follows: setting the grayscale values ​​of pixels in the grayscale image that are greater than the grayscale threshold to 0, and setting the grayscale values ​​of pixels in the grayscale image that are not greater than the grayscale threshold to 255.

[0062] Figure 8 This is a schematic diagram of the dot matrix provided in this application, such as... Figure 8 As mentioned above, the calibration points in the dot matrix diagram exhibit ghosting and stray light. Figure 9 This is a schematic diagram illustrating the location information of the calibration points in the first sub-image provided in this application. Figure 9Each large bounding box region corresponds to the region of the first sub-image, and each small bounding box region within the large bounding box region is the second largest bounding rectangle region in the first sub-image. The position information of the center point of each small bounding box region is the position information of the calibration point in the first sub-image. Figure 9 This is only a schematic diagram of a partial bitmap.

[0063] Figure 10 The schematic diagram of the device for determining the location of calibration points for distortion correction provided in this application includes: The first determining module 21 is used to determine the first grayscale threshold corresponding to the first dot matrix image to be processed. The first grayscale threshold satisfies the first condition: a binarized image of the first dot matrix image is obtained based on the first grayscale threshold, and the number of the first bounding rectangle regions of the contour contained in the binarized image is the same as the number of calibration points. The second determining module 22 is used to determine each first sub-image in the first dot matrix image corresponding to the positions of each first circumscribed rectangular region; for each first sub-image, a binarized sub-image of the first sub-image is obtained based on the second grayscale threshold corresponding to the first sub-image, and the position information of the calibration point in the first sub-image is determined according to the position information of the center point of the second circumscribed rectangular region of the contour contained in the binarized sub-image; wherein, the second grayscale threshold is greater than the first grayscale threshold.

[0064] The first determining module 21 is specifically used to: within the preset first grayscale value range, sequentially traverse grayscale values ​​in ascending order of grayscale value, and determine the first grayscale value that satisfies the first condition as the first candidate grayscale value; within the grayscale value range greater than the first candidate grayscale value within the first grayscale value range, continue traversing in ascending order of grayscale value, determine the first grayscale value that does not satisfy the first condition, and determine the previous grayscale value of the grayscale value as the second candidate grayscale value; and determine the first grayscale threshold corresponding to the first dot matrix based on the first candidate grayscale value and the second candidate grayscale value.

[0065] The second determining module 22 is further configured to, for each of the first sub-images, sequentially traverse the gray values ​​in the order of their magnitudes within a preset second gray value range, and determine the gray value that satisfies the second condition as the second gray value threshold corresponding to the first sub-image.

[0066] The second determining module 22 is specifically used to traverse gray values ​​sequentially in descending order within a preset second gray value range; and to determine the first gray value that satisfies the second condition as the second gray threshold corresponding to the first sub-image.

[0067] The second condition is: a binarized sub-image of the first sub-image is obtained based on the second grayscale threshold, and the area of ​​the second bounding rectangle region of the contour contained in the binarized sub-image is greater than a preset area threshold.

[0068] The second determining module 22 is specifically used to determine the position information of the center point of the second outer rectangular region with the largest area as the position information of the calibration point in the first sub-image if the binarized sub-image contains at least two second outer rectangular regions.

[0069] The second determining module 22 is specifically used to determine the position information of the calibration point in the first sub-image based on the average position information of the position information of the at least two center points, if the binarized sub-image contains at least two second bounding rectangle regions.

[0070] The first determining module 21 is also used to perform grayscale processing and dilation processing on the original dot matrix image to obtain the first dot matrix image to be processed.

[0071] Figure 11 This is a schematic diagram of the structure of a head-up display (HUD) provided in this application. The HUD 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, head-up displays, blade head-up displays, mainframe computers, and other suitable computers. The HUD can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present application described and / or claimed herein.

[0072] like Figure 11 As shown, the head-up display 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded into the RAM 13 from storage unit 18. The RAM 13 can also store various programs and data required for the operation of the head-up display 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0073] Multiple components in the head-up display 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, optical disk, etc.; and a communication unit 19, such as a network card, modem, wireless transceiver, etc. The communication unit 19 allows the head-up display 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0074] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as image processing methods.

[0075] In some embodiments, the image processing method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on a heterogeneous hardware accelerator via ROM and / or a communication unit. When the computer program is loaded into RAM and executed by a processor, one or more steps of the image processing method described above may be performed. Alternatively, in other embodiments, the processor may be configured to perform the image processing method by any other suitable means (e.g., by means of firmware).

[0076] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0077] Computer programs used to implement the methods of this application may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0078] In the context of this application, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0079] To provide interaction with a user terminal, the systems and techniques described herein can be implemented on a heterogeneous hardware accelerator, which includes: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user terminal; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user terminal provides input to the heterogeneous hardware accelerator. Other types of devices can also be used to provide interaction with the user terminal; for example, the feedback provided to the user terminal can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or haptic feedback); and input from the user terminal can be received in any form (including sound input, voice input, or haptic input).

[0080] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., client computers with graphical user interfaces or web browsers through which client computers can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0081] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0082] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this application can be achieved, and this is not limited herein.

[0083] This application also provides a computer-readable storage medium storing a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform any of the above method steps.

[0084] This application provides a computer program product, which includes an executable program that, when executed by a processor, implements the method described herein.

[0085] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0086] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A method for determining the location of calibration points for distortion correction, characterized in that, The method includes: A first grayscale threshold is determined for the first bitmap to be processed. The first grayscale threshold satisfies a first condition: a binarized image of the first bitmap is obtained based on the first grayscale threshold, and the number of first bounding rectangle regions of the contour contained in the binarized image is the same as the number of calibration points. Each first sub-image in the first dot matrix image corresponds to the position of each first bounding rectangle region. For each first sub-image, a binarized sub-image of the first sub-image is obtained based on the second grayscale threshold corresponding to the first sub-image. The position information of the calibration point in the first sub-image is determined according to the position information of the center point of the second bounding rectangle region of the contour contained in the binarized sub-image. Wherein, the second grayscale threshold is greater than the first grayscale threshold.

2. The method as described in claim 1, characterized in that, The determination of the first grayscale threshold corresponding to the first bitmap to be processed includes: Within the preset first grayscale value range, grayscale values ​​are traversed sequentially in ascending order of grayscale value, and the first grayscale value that satisfies the first condition is determined as the first candidate grayscale value; within the grayscale value range of the first grayscale value range that is greater than the first candidate grayscale value, the grayscale value is traversed again in ascending order of grayscale value, and the first grayscale value that does not satisfy the first condition is determined, and the previous grayscale value of the grayscale value is determined as the second candidate grayscale value; Based on the first candidate grayscale value and the second candidate grayscale value, a first grayscale threshold corresponding to the first dot matrix is ​​determined.

3. The method as described in claim 1, characterized in that, For each of the first sub-images, the process of determining the second grayscale threshold corresponding to the first sub-image includes: For each of the first sub-images, within a preset second grayscale value range, the grayscale values ​​are traversed sequentially in order of their magnitude, and the grayscale value that satisfies the second condition is determined as the second grayscale threshold corresponding to the first sub-image.

4. The method as described in claim 3, characterized in that, The step of sequentially traversing gray values ​​according to their magnitude and determining the gray value that satisfies the second condition as the second gray threshold corresponding to the first sub-image includes: The gray values ​​are traversed sequentially from largest to smallest, and the first gray value that satisfies the second condition is determined as the second gray threshold corresponding to the first sub-image.

5. The method as described in claim 3 or 4, characterized in that, The second condition is: a binarized sub-image of the first sub-image is obtained based on the second grayscale threshold, and the area of ​​the second bounding rectangle region of the contour contained in the binarized sub-image is greater than a preset area threshold.

6. The method as described in claim 5, characterized in that, The process of determining the location information of the calibration points within the first sub-image includes: If the binarized sub-image contains at least two second bounding rectangle regions, the position information of the center point of the second bounding rectangle region with the largest area is determined as the position information of the calibration point in the first sub-image.

7. The method as described in claim 5, characterized in that, The process of determining the location information of the calibration points within the first sub-image includes: If the binarized sub-image contains at least two second bounding rectangle regions, the average position information of the position information of the at least two bounding rectangle regions is determined as the position information of the calibration point in the first sub-image based on the position information of the center point of each of the at least two second bounding rectangle regions.

8. The method as described in claim 1, characterized in that, Before determining the first grayscale threshold corresponding to the first bitmap to be processed, the method further includes: The original bitmap is subjected to grayscale processing and dilation processing to obtain the first bitmap to be processed.

9. A device for determining the location of calibration points for distortion correction, characterized in that, The device includes: The first determining module is used to determine the first grayscale threshold corresponding to the first dot matrix image to be processed. The first grayscale threshold satisfies the first condition: a binarized image of the first dot matrix image is obtained based on the first grayscale threshold, and the number of the first bounding rectangle regions of the contour contained in the binarized image is the same as the number of calibration points. The second determining module is used to determine each first sub-image in the first dot matrix image corresponding to the positions of each first circumscribed rectangular region; for each first sub-image, a binarized sub-image of the first sub-image is obtained based on a second grayscale threshold corresponding to the first sub-image, and the position information of the calibration point in the first sub-image is determined according to the position information of the center point of the second circumscribed rectangular region of the contour contained in the binarized sub-image; wherein, the second grayscale threshold is greater than the first grayscale threshold.

10. A heads-up display, characterized in that, The head-up display includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1 to 8.

12. A computer program product, characterized in that, The computer program product includes an executable program that is executed by a processor to implement the method of any one of claims 1 to 8.