Head-up display stray light test method, device, equipment, medium and product
By simulating an external light source within the preset light bar angle collection range, controlling the camera movement and shooting angle within the preset eye box range, obtaining the picture to be tested, and judging stray light based on the preset parameter threshold, the existing test is solved, and more efficient and accurate stray light testing is achieved.
Patent Information
- Application Number
- CN202411984221.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-08
AI Technical Summary
The existing stray light testing methods for head-up displays are incomplete and have low efficiency and accuracy.
Multiple pictures to be tested are obtained by simulating external light sources within the preset light bar angle collection range and controlling camera movement and shooting angle with preset steps within the preset eye box range. Based on the preset stray light parameter threshold, the target picture and information of stray light are determined.
It realizes a more comprehensive capture of the head-up display under different lighting conditions, improving the comprehensiveness and efficiency of the test and improving the accuracy of stray light tests.
Smart Images

Figure CN119779642A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of head-up display testing, and in particular to a head-up display stray light testing method, device, equipment, medium and product. Background Art
[0002] With the continuous development of automobile technology and consumers' increasing attention to driving safety and comfort, the functionality and intelligence level of vehicle-mounted equipment are also constantly improving. Among them, the head-up display (HUD) is an innovative technology that projects driving information directly onto the windshield in front of the driver, effectively reducing the frequency of the driver's line of sight shifting, thereby improving the safety and convenience of driving. However, the performance of the head-up display, especially its ability to control stray light in complex lighting environments, is directly related to its actual use effect and the driver's visual experience.
[0003] For stray light testing of head-up displays, the current mainstream testing methods are mainly to simulate light irradiation outside the windshield of a real car, fix a camera at the driver's position or use manual observation to observe the stray light generated by the head-up display. However, these methods have the problems of incomplete testing, low testing efficiency and accuracy. Summary of the invention
[0004] The present invention provides a head-up display stray light testing method, device, equipment, medium and product to solve the problems of incomplete testing, low testing efficiency and low accuracy in existing stray light testing methods.
[0005] According to one aspect of the present invention, a head-up display stray light test method is provided, which is applied to a head-up display stray light test system, wherein the head-up display stray light test system comprises a light bar, a windshield, a head-up display and a camera, wherein the light bar is arranged above the windshield to simulate an external light source, and the head-up display is used to project simulated vehicle driving information onto the windshield to form a virtual image, and the method comprises:
[0006] When the light bar is at any angle within a preset light bar angle set, control the camera to move to a shooting position within a preset eye box range with a preset step length, and after adjusting the shooting angle of the camera, shoot the virtual image to obtain a plurality of pictures to be tested;
[0007] Based on a preset stray light parameter threshold, a target picture with stray light in the multiple pictures to be tested and information corresponding to the target picture are determined, wherein the information corresponding to the target picture includes the light bar angle when the target picture is taken and the shooting position of the camera.
[0008] According to another aspect of the present invention, a head-up display stray light test device is provided, which is applied to a head-up display stray light test system. The head-up display stray light test system comprises a light bar, a windshield, a head-up display and a camera. The light bar is arranged above the windshield to simulate an external light source. The head-up display is used to project simulated vehicle driving information onto the windshield to form a virtual image. The device comprises:
[0009] A picture shooting module, used for controlling the camera to move to a shooting position with a preset step length within a preset eye box range when the light bar is at any angle within a preset light bar angle set, and shooting the virtual image after adjusting the shooting angle of the camera to obtain a plurality of pictures to be tested;
[0010] An information determination module is used to determine a target image with stray light among the multiple images to be tested and information corresponding to the target image based on a preset stray light parameter threshold, wherein the information corresponding to the target image includes the light bar angle when the target image was taken and the shooting position of the camera.
[0011] According to another aspect of the present invention, an electronic device is provided, wherein the electronic device is configured in a head-up display stray light test system and comprises:
[0012] at least one processor; and
[0013] a memory communicatively connected to the at least one processor; wherein,
[0014] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the head-up display stray light testing method described in any embodiment of the present invention.
[0015] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the head-up display stray light testing method described in any embodiment of the present invention when executed.
[0016] According to another aspect of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the head-up display stray light testing method according to any embodiment of the present invention is implemented.
[0017] A head-up display stray light test method provided by an embodiment of the present invention is applied to a head-up display stray light test system, wherein the head-up display stray light test system comprises a light bar, a windshield, a head-up display and a camera, wherein the light bar is arranged above the windshield and is used to simulate an external light source, and the head-up display is used to project simulated vehicle driving information onto the windshield to form a virtual image, and the method comprises: when the light bar is at any angle within a preset light bar angle set, controlling the camera to move to a shooting position with a preset step length within a preset eye box range, and after adjusting the shooting angle of the camera, shooting the virtual image to obtain a plurality of pictures to be tested; and based on a preset stray light parameter threshold, determining a target picture with stray light among the plurality of pictures to be tested and information corresponding to the target picture, wherein the information corresponding to the target picture comprises the light bar angle when the target picture is shot and the shooting position of the camera. By simulating external light sources at any angle within the preset light bar angle set range, and controlling the camera movement and shooting angle with a preset step size within the preset eye box range, it is possible to more comprehensively capture the image projected by the head-up display under different lighting conditions, viewing positions and viewing angles, ensuring the comprehensiveness of the test without the need for a real vehicle, effectively improving the efficiency of stray light testing; in addition, the preset stray light parameter threshold is used to judge the stray light information, effectively improving the accuracy of the stray light test.
[0018] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0020] Figure 1 is a flow chart of a stray light testing method for a head-up display provided in Embodiment 1 of the present invention;
[0021] Figure 2 is a flow chart of a stray light testing method for a head-up display provided in Embodiment 2 of the present invention;
[0022] Figure 3 A schematic diagram of a camera viewing angle provided by an embodiment of the present invention;
[0023] Figure 4 A schematic diagram of eye position distribution provided by an embodiment of the present invention;
[0024] Figure 5 is a structural schematic diagram of a stray light testing device for a head-up display provided in a third embodiment of the present invention;
[0025] Figure 6 It is a structural schematic diagram of an electronic device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] Embodiment 1
[0029] Figure 1 This is a flow chart of a stray light test method for a head-up display provided in the first embodiment of the present invention. This embodiment is applicable to the case of performing stray light test on a head-up display. The method can be performed by a head-up display stray light test device. The head-up display stray light test device can be implemented in the form of hardware and / or software. The head-up display stray light test device can be configured in an electronic device. The electronic device can be configured in a head-up display stray light test system. The head-up display stray light test system includes a light bar, a windshield, a head-up display and a camera. The light bar is arranged above the windshield to simulate an external light source. The head-up display is used to project simulated vehicle driving information onto the windshield to form a virtual image. The external light source can include but is not limited to sunlight, street lights or other vehicle lights.
[0030] like Figure 1 As shown, the method includes:
[0031] S110. When the light bar is at any angle within a preset light bar angle set, control the camera to move to a shooting position within a preset eye box range with a preset step length, and after adjusting the shooting angle of the camera, shoot the virtual image to obtain a plurality of pictures to be tested.
[0032] In this embodiment, the preset light bar angle set can be understood as a series of preset specific angle values to which the light bars can be adjusted. Among them, the preset light bar angle set can be determined according to the test item requirements. The difference between the angles of adjacent light bars within the preset light bar angle range is the preset angle difference. For example, the preset angle difference can be 2 degrees. The preset eye box range can be understood as a pre-set three-dimensional space area, which limits the shooting position that the camera may take when performing a head-up display stray light test. The virtual image can be understood as the image formed by the head-up display projecting the simulated vehicle driving information onto the windshield. The preset step size is used to control the length of each movement of the camera within the preset eye box range. The preset step size can be set according to actual conditions.
[0033] Specifically, according to the requirements of the test items, the windshield in the head-up display stray light test system is adjusted to a specified angle, and the head-up display is moved to a specified position. Next, a preset light bar angle set and a preset eye box range are set according to the requirements of the test items. Then, the light bar angle is adjusted to the starting angle in the preset light bar angle set, and the camera is adjusted to the starting position in the preset eye box range. Turn on the light bar light source so that it shines on the virtual image projected by the windshield head-up display. Control the camera to move and take pictures within the preset eye box range with a preset step length. It is worth noting that each time the camera moves to a shooting position, the camera's shooting angle needs to be adjusted, and then the virtual image on the windshield is taken. In this way, the test picture within the entire preset eye box range is obtained at the starting angle of the light bar.
[0034] Then, the light bar angle is adjusted in sequence, and the above camera shooting process is repeated to obtain a series of test pictures corresponding to each angle of the light bar within the preset light bar angle set.
[0035] It is worth noting that in order to ensure the comprehensiveness of the test, the range of the preset light bar angle set can be set greater than or equal to the light bar angle test range specified in the test item requirements, and / or the preset eye box range can be set greater than or equal to the eye box test range specified in the test item requirements.
[0036] For example, in the stray light test of the windshield head-up display of a left-hand-drive vehicle, according to the test item requirements, the head-up display is moved to the position with coordinates (500, 690, 1200), and the inclination angle of the windshield is adjusted to 35.5° to ensure the accuracy of the test environment. Then, according to the light bar angle test range of 15° to 130° specified in the test item requirements, the preset light bar angle set is set to start from 15° and increase in steps of 2° until 130°; at the same time, according to the eye box test range of 130mm x50mm specified in the test item requirements, the preset eye box range is set to 300mm x300mm, and the preset step size is set to 10mm.
[0037] S120. Based on a preset stray light parameter threshold, determine a target picture with stray light among the multiple pictures to be tested and information corresponding to the target picture, wherein the information corresponding to the target picture includes a light bar angle when the target picture is taken and a shooting position of the camera.
[0038] In this embodiment, the preset stray light parameter threshold is pre-set and is used to determine whether there is stray light in the image to be tested. The preset stray light parameter threshold can be determined according to the test item requirements or according to an empirical value. In this embodiment, the preset stray light threshold can include a pixel maximum brightness threshold and a color deviation threshold, etc., wherein the color deviation threshold can be understood as an allowable color deviation range. For example, in a picture to be tested, if the color of a certain area is obviously redder or bluer than other areas, and the color deviation of the area exceeds the preset stray light threshold, it can be determined that the color photo has stray light.
[0039] Specifically, after obtaining multiple pictures to be tested, for each picture to be tested, a preset stray light parameter threshold is used to determine whether the current picture has stray light, and the picture to be tested with stray light is used as the target picture, and the target picture and the light bar angle and the shooting position of the camera when the camera takes the target picture are recorded.
[0040] A head-up display stray light test method provided in a first embodiment of the present invention is applied to a head-up display stray light test system, wherein the head-up display stray light test system comprises a light bar, a windshield, a head-up display and a camera, wherein the light bar is arranged above the windshield and is used to simulate an external light source, and the head-up display is used to project simulated vehicle driving information onto the windshield to form a virtual image, and the method comprises: when the light bar is at any angle within a preset light bar angle set, controlling the camera to move to a shooting position with a preset step length within a preset eye box range, and after adjusting the shooting angle of the camera, shooting the virtual image to obtain a plurality of pictures to be tested; and determining a target picture with stray light among the plurality of pictures to be tested and information corresponding to the target picture based on a preset stray light parameter threshold, wherein the information corresponding to the target picture comprises the light bar angle when the target picture is shot and the shooting position of the camera. By simulating external light sources at any angle within the preset light bar angle set range, and controlling the camera movement and shooting angle with a preset step size within the preset eye box range, it is possible to more comprehensively capture the image projected by the head-up display under different lighting conditions, viewing positions and viewing angles, ensuring the comprehensiveness of the test without the need for a real vehicle, effectively improving the efficiency of stray light testing; in addition, the preset stray light parameter threshold is used to judge the stray light information, effectively improving the accuracy of the stray light test.
[0041] Optionally, when the light bar is at any angle within the preset light bar angle set, after obtaining a test picture through the camera, it is possible to directly determine whether there is stray light in the test picture based on the preset stray light parameter threshold. If so, it is determined to be a target picture, and the target picture and the information corresponding to the target picture are recorded, and then the camera is moved to take a picture and the above process is repeated.
[0042] In some embodiments, determining a target picture with stray light among the multiple pictures to be tested based on a preset stray light parameter threshold includes: calculating, for each picture to be tested among the multiple pictures to be tested, a value of a target parameter corresponding to the current picture to be tested, and judging whether the current picture to be tested has stray light based on the value of the target parameter and the preset stray light parameter threshold; and determining the picture to be tested with stray light as the target picture.
[0043] Specifically, for each of the multiple images to be tested, the current image to be tested can be preprocessed, wherein the preprocessing includes but is not limited to removing noise and adjusting image contrast, etc., to improve the image quality. Then, the value of the target parameter corresponding to the preprocessed image is calculated, such as brightness unevenness and brightness value of a specific area. Then, based on the value of the target parameter and the preset stray light parameter threshold, a preset stray light determination algorithm is used to determine whether there is stray light in the current image to be tested. In this embodiment, the specific preset stray light determination algorithm is not limited, for example, it can be a threshold judgment algorithm based on a statistical method, or it can be a classification algorithm based on machine learning.
[0044] Then, the image to be tested with stray light is determined as the target image.
[0045] Through the above technical solution, it is possible to identify pictures containing stray light from multiple pictures to be tested, effectively improving the efficiency and reliability of stray light detection, and providing strong data support for the optimization and quality control of the head-up display system.
[0046] In some embodiments, the preset stray light parameter threshold includes a preset pixel maximum brightness threshold, a preset pixel minimum brightness threshold, a preset image brightness standard deviation threshold and a preset image grayscale ratio threshold, and the value of the target parameter includes the maximum brightness value of the pixel in the current image to be tested, the brightness standard deviation value of the current image to be tested and the grayscale ratio of the current image to be tested; judging whether there is stray light in the current image to be tested based on the value of the target parameter and the preset stray light parameter threshold includes: when the maximum brightness value of the pixel in the current image to be tested is greater than or equal to the preset pixel minimum brightness threshold, if any one of the first preset condition, the second preset condition and the third preset condition is met, then Determine whether stray light exists in the current picture to be tested. If the first preset condition, the second preset condition and the third preset condition are all not met, determine that there is no stray light in the current picture to be tested, wherein the first preset condition is that the brightness standard deviation value of the current picture to be tested is greater than the preset picture brightness standard deviation threshold, the second preset condition is that the maximum brightness value of the pixel in the current picture to be tested is greater than the preset pixel maximum brightness threshold, and the third preset condition is that the grayscale ratio of the current picture to be tested is greater than the preset picture grayscale ratio threshold; when the maximum brightness value of the pixel in the current picture to be tested is less than the preset pixel minimum brightness threshold, determine that there is no stray light in the current picture to be tested.
[0047] In this embodiment, the first preset condition, the second preset condition, and the third preset condition are all pre-set conditions. Among them, the first preset condition is that the standard deviation of brightness std1 of the currently measured picture is greater than the standard deviation threshold of picture brightness std0, the second preset condition is that the maximum brightness value max1 of the pixel points in the currently measured picture is greater than the maximum brightness threshold of pixel points max0, and the third preset condition is that the gray-scale ratio k1 of the currently measured picture is greater than the preset picture gray-scale ratio threshold k0.
[0048] Specifically, it is determined whether the maximum brightness value max1 of the pixel points in the currently measured picture is greater than or equal to the minimum brightness threshold of pixel points min0. If so, it indicates that there may be stray light in the currently measured picture. Further, if the value of the target parameter of the currently measured picture satisfies any one of the first preset condition, the second preset condition, and the third preset condition, it is determined that there is stray light in the currently measured picture; if none of the three conditions are satisfied, it is determined that there is no stray light in the currently measured picture.
[0049] It should be noted that if the maximum brightness value max1 of the pixel points in the currently measured picture is less than the minimum brightness threshold of pixel points min0, it indicates that there is no stray light in the currently measured picture.
[0050] Exemplarily, the preset stray light parameter thresholds include the maximum brightness threshold of pixel points max0 = 150, the minimum brightness threshold of pixel points min0 = 80, the standard deviation threshold of picture brightness std0 = 4, and the preset picture gray-scale ratio threshold k0 = 0.1. The maximum brightness value max1 = 213 of the pixel points in the currently measured picture, the standard deviation of brightness std1 = 6.36890975100164 of the currently measured picture, and the gray-scale ratio k1 = 0.030700063160459628 of the currently measured picture are calculated. It can be judged that max1>min0, that is, there may be stray light in the currently measured picture. Moreover, since max1<max0, std1>std0, and k1<k0, it can be determined that there is stray light in the currently measured picture.
[0051] Through the above technical solution, the detection of stray light in pictures is realized, effectively improving the detection efficiency and the accuracy of detection.
[0052] In some embodiments, the calculation of the value of the target parameter corresponding to the current picture to be tested includes: calculating the brightness value of each pixel in the current picture to be tested; determining the brightness mean of the current picture to be tested based on the brightness value of each pixel; determining the maximum brightness value of the pixel in the current picture to be tested based on the brightness value of each pixel; calculating the brightness standard deviation value of the current picture to be tested based on the brightness mean; determining the grayscale ratio of the current picture to be tested based on the ratio of the brightness mean and the maximum brightness value of the pixel in the current picture to be tested.
[0053] Specifically, the grayscale value of each pixel is calculated by the following formula, and the grayscale value of each pixel is used as the brightness value of each pixel:
[0054] Gray n =R n *0.299+G n *0.587+B n *0.114
[0055] Among them, Gray n Represents the brightness value of the n-th pixel, R represents the value of the red channel of the n-th pixel, G represents the value of the green channel of the n-th pixel, and B represents the value of the blue channel of the n-th pixel.
[0056] Through the preset search algorithm, the maximum brightness value of the pixel is found from the brightness values of each pixel of the current image to be tested, which is recorded as max1. It is worth noting that the specific preset search algorithm is not limited in this embodiment. For example, the preset search algorithm can be a direct search method, a sorting method or a hash table method.
[0057] According to the brightness value of each pixel, calculate the brightness mean of the current image to be tested:
[0058]
[0059] According to the brightness value of each pixel and the average brightness of the current image to be tested, calculate the brightness standard deviation value std1 of the current image to be tested:
[0060]
[0061] Based on the ratio of the brightness mean of the current image to be tested and the maximum brightness value of the pixels in the current image to be tested, the grayscale ratio k1 of the current image to be tested is calculated as shown in the following formula:
[0062]
[0063] Through the above technical solution, the values of various target parameters of the current image to be tested are accurately calculated, providing important data support for evaluating the stray light of the current image to be tested.
[0064] Embodiment 2
[0065] Figure 2 This is a flow chart of a stray light testing method for a head-up display provided in Embodiment 2 of the present invention. This embodiment is optimized and expanded on the basis of the above-mentioned optional embodiments. Optionally, adjusting the shooting angle of the camera includes: calculating the angle offset of the camera based on the position coordinates of the last shooting position of the camera, the position coordinates of the current shooting position and the coordinates of the virtual image center point of the virtual image; and adjusting the shooting angle of the camera according to the angle offset.
[0066] like Figure 2 As shown, the method includes:
[0067] S210. When the light bar is at any angle within a preset light bar angle set, control the camera to move to a shooting position within a preset eye box range with a preset step length, and calculate the angle offset of the camera based on the position coordinates of the previous shooting position of the camera, the position coordinates of the current shooting position and the coordinates of the virtual image center point of the virtual image. After adjusting the shooting angle of the camera according to the angle offset, shoot the virtual image to obtain multiple pictures to be tested.
[0068] In this embodiment, the angle offset of the camera is used to indicate the shooting angle that needs to be adjusted after the camera moves from the previous shooting position to the current shooting position.
[0069] Specifically, when the light bar is at any angle within the preset light bar angle set, the camera is controlled to move to the current shooting position within the preset eye box range according to the preset step length. At this time, the shooting angle of the camera at the current shooting position is still consistent with the shooting angle of the previous shooting position, which will cause the camera's shooting range to be unable to accurately focus on the virtual image. Therefore, the camera's previous shooting position, the position coordinates of the current shooting position and the coordinates of the center point of the virtual image are used to calculate the camera's angle offset using the preset angle offset algorithm. Then, based on the angle offset, the camera's shooting angle is adjusted to ensure that the camera is always aimed at the virtual image. The preset angle offset algorithm in this embodiment is an algorithm set based on actual conditions, for example, it can be a geometric algorithm based on trigonometric functions or an algorithm based on a machine learning model.
[0070] S220. Based on a preset stray light parameter threshold, determine a target image with stray light among the multiple images to be tested and information corresponding to the target image, wherein the information corresponding to the target image includes a light bar angle when the target image is taken and a shooting position of the camera.
[0071] The technical solution provided in the second embodiment of the present invention can ensure that the camera always accurately captures the virtual image of the head-up display, thereby improving the quality of the acquired pictures to be tested, by controlling the camera to move with a preset step length within a preset eye box range and accurately calculating and adjusting the angle offset of the camera when the light bar is at any angle within the preset angle set. Furthermore, by using the preset stray light parameter threshold, the target pictures with stray light can be accurately identified, and the light bar angle and the specific position of the camera when these pictures were taken can be recorded, without the involvement of the actual vehicle, thereby effectively improving the efficiency and accuracy of the stray light test.
[0072] In some embodiments, the calculating the angular offset of the camera based on the position coordinates of the last shooting position of the camera, the position coordinates of the current shooting position and the coordinates of the center point of the virtual image comprises: determining a first lower viewing angle and a second lower viewing angle of the camera based on the position coordinates of the last shooting position of the camera, the position coordinates of the current shooting position and the coordinates of the center point of the virtual image, wherein the first lower viewing angle is the lower viewing angle of the camera relative to the center point of the virtual image when the camera is in the last shooting position, and the second lower viewing angle is the lower viewing angle of the camera relative to the center point of the virtual image when the camera is in the current shooting position; when the preset step length is greater than the vertical distance, taking the sum of the first lower viewing angle and the second lower viewing angle as the angular offset of the camera; when the preset step length is less than the vertical distance, taking the absolute value of the difference between the first lower viewing angle and the second lower viewing angle as the angular offset of the camera; and when the preset step length is equal to the vertical distance, taking the first lower viewing angle as the angular offset of the camera, wherein the vertical distance is determined based on the position coordinates of the last shooting position and the coordinates of the center point of the virtual image.
[0073] In this embodiment, the downward viewing angle can be understood as the angle between the line between the camera and the center point of the virtual image and a reference line. When the camera moves up and down, the reference line is a horizontal line, and when the camera moves left and right, the reference line is a vertical line. This embodiment is described by taking the camera moving up and down as an example.
[0074] The first downward viewing angle is the downward viewing angle of the camera relative to the center point of the virtual image when the camera is at the previous shooting position, and the second downward viewing angle is the downward viewing angle of the camera relative to the center point of the virtual image when the camera is at the current shooting position. Figure 3 A schematic diagram of a camera viewing angle provided by an embodiment of the present invention, such as Figure 3 As shown, the angle α between the line connecting the previous shooting position A of the camera and the center point O of the virtual image and the horizontal line is the first lower viewing angle, and the angle β between the line connecting the current shooting position B of the camera and the center point O of the virtual image and the horizontal line is the second lower viewing angle.
[0075] Specifically, as Figure 3 shown, the distance x between the previous shooting position A and the current shooting position B is the preset step length. According to the position coordinates of the previous shooting position of the camera and the coordinates of the virtual image center point, the horizontal distance d1 from the virtual image center point to the previous shooting position and the vertical distance h from the virtual image center to the previous shooting position can be calculated. Similarly, according to the current shooting position of the camera and the coordinates of the virtual image center point, the horizontal distance d2 from the current shooting position to the virtual image center point can be calculated. In this embodiment, d1 is equal to d2. Furthermore, the first lower viewing angle α and the second lower viewing angle β can be calculated respectively through the following formulas:
[0076] α = arctan(h / d1)
[0077] β = arctan((|x - h|) / d1)
[0078] Furthermore, when the preset step length x is greater than the vertical distance h, the angle offset Δ is calculated in the following manner:
[0079] Δ = α + β
[0080] When the preset step length x is less than the vertical distance h, the angle offset Δ is calculated in the following manner:
[0081] Δ = |α - β|
[0082] When the preset step length x is equal to the vertical distance h, the angle offset Δ is calculated in the following manner:
[0083] Δ = α
[0084] Exemplarily, taking the preset eye box range of 300mm x 300mm and the preset step length of 10mm as an example for illustration, Figure 4 This is a schematic diagram of the eye position distribution provided by the embodiment of the present invention. As Figure 4 shown, both the length and the width are 300mm, where each table represents the serial number of the eye position.
[0085] Assume that the horizontal distance d1 from the previous shooting position to the virtual image center point is 5000mm, the vertical distance h from the virtual image center point to the previous shooting position is 150mm, the camera moves from the 0th eye position to the 1st eye position, and the preset step length x is 10mm. Then, the first lower viewing angle can be calculated as 1.71°, and the second lower viewing angle is 1.6°. Since x < h, the angle offset is 0.11°. That is, when the camera moves from the 0th eye position to the 1st eye position, the angle needs to be rotated upward by 0.11°.
[0086] Through the above technical solution, the angular offset of the camera during movement can be accurately calculated to ensure that the camera is always aimed at the virtual image of the head-up display and maintain the optimal shooting angle, thereby improving the accuracy and consistency of the head-up display virtual image shooting and providing a solid data foundation for the accurate evaluation of stray light.
[0087] Embodiment 3
[0088] Figure 5 1 is a schematic diagram of the structure of a head-up display stray light test device provided in the third embodiment of the present invention. The head-up display stray light test device is applied to a head-up display stray light test system, the head-up display stray light test system comprises a light bar, a windshield, a head-up display and a camera, the light bar is arranged above the windshield to simulate an external light source, and the head-up display is used to project simulated vehicle driving information onto the windshield to form a virtual image. Figure 5 As shown, the device comprises:
[0089] The picture shooting module 31 is used to control the camera to move to the shooting position with a preset step length within the preset eye box range when the light bar is at any angle within the preset light bar angle set, and to shoot the virtual image after adjusting the shooting angle of the camera to obtain multiple pictures to be tested;
[0090] The information determination module 32 is used to determine the target image with stray light in the multiple images to be tested and the information corresponding to the target image based on a preset stray light parameter threshold, wherein the information corresponding to the target image includes the light bar angle when the target image is taken and the shooting position of the camera.
[0091] The technical solution provided in the third embodiment of the present invention effectively ensures the comprehensiveness of the test without the need for a real vehicle, effectively improves the efficiency of the stray light test, and further improves the accuracy of the stray light test.
[0092] Optionally, the information determination module 32 includes:
[0093] A picture judgment unit, configured to calculate, for each of the plurality of pictures to be tested, a value of a target parameter corresponding to the current picture to be tested, and judge whether there is stray light in the current picture to be tested based on the value of the target parameter and the preset stray light parameter threshold;
[0094] The picture determination unit is used to determine the picture to be tested with stray light as the target picture.
[0095] Optionally, the preset stray light parameter threshold includes a preset pixel maximum brightness threshold, a preset pixel minimum brightness threshold, a preset image brightness standard deviation threshold, and a preset image grayscale ratio threshold, and the value of the target parameter includes the maximum brightness value of the pixel in the current image to be tested, the brightness standard deviation value of the current image to be tested, and the grayscale ratio value of the current image to be tested;
[0096] Optionally, the image judgment unit includes:
[0097] A first determination subunit is used for, when the maximum brightness value of the pixel points in the current image to be tested is greater than or equal to the preset pixel point minimum brightness threshold, if any one of the first preset condition, the second preset condition and the third preset condition is met, then determining that the current image to be tested has stray light, if the first preset condition, the second preset condition and the third preset condition are all not met, then determining that the current image to be tested does not have stray light, wherein the first preset condition is that the brightness standard deviation value of the current image to be tested is greater than the preset image brightness standard deviation threshold, the second preset condition is that the maximum brightness value of the pixel points in the current image to be tested is greater than the preset pixel point maximum brightness threshold, and the third preset condition is that the grayscale ratio of the current image to be tested is greater than the preset image grayscale ratio threshold;
[0098] The second determining subunit is used to determine that there is no stray light in the current picture to be tested when the maximum brightness value of the pixel points in the current picture to be tested is less than the preset minimum brightness threshold of the pixel points.
[0099] Optionally, the image judgment unit includes:
[0100] A first calculation unit, used to calculate the brightness value of each pixel in the current image to be tested;
[0101] A second calculation unit, configured to determine a brightness mean of the current image to be tested based on the brightness values of the pixels;
[0102] A third calculation unit, configured to determine a maximum brightness value of pixels in the current image to be tested based on the brightness values of the pixels;
[0103] A fourth calculation unit, configured to calculate a brightness standard deviation value of the current image to be tested based on the brightness mean value;
[0104] The fifth calculation unit is used to determine the grayscale ratio of the current image to be tested based on the ratio of the brightness mean value to the maximum brightness value of the pixel points in the current image to be tested.
[0105] Optionally, the picture shooting module 31 includes:
[0106] an offset calculation unit, used to calculate the angular offset of the camera based on the position coordinates of the last shooting position of the camera, the position coordinates of the current shooting position and the coordinates of the virtual image center point of the virtual image;
[0107] An angle adjustment unit is used to adjust the shooting angle of the camera according to the angle offset.
[0108] Optionally, the offset calculation unit includes:
[0109] a lower viewing angle determining subunit, configured to determine a first lower viewing angle and a second lower viewing angle of the camera based on the position coordinates of the last shooting position of the camera, the position coordinates of the current shooting position and the coordinates of the center point of the virtual image, wherein the first lower viewing angle is the lower viewing angle of the camera relative to the center point of the virtual image when the camera is at the last shooting position, and the second lower viewing angle is the lower viewing angle of the camera relative to the center point of the virtual image when the camera is at the current shooting position;
[0110] An offset determination subunit is used to use the sum of the first lower viewing angle and the second lower viewing angle as the angle offset of the camera when the preset step length is greater than the vertical distance, use the absolute value of the difference between the first lower viewing angle and the second lower viewing angle as the angle offset of the camera when the preset step length is less than the vertical distance, and use the first lower viewing angle as the angle offset of the camera when the preset step length is equal to the vertical distance, wherein the vertical distance is determined based on the position coordinates of the previous shooting position and the coordinates of the center point of the virtual image.
[0111] The head-up display stray light testing device provided in the embodiment of the present invention can execute the head-up display stray light testing method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0112] Embodiment 4
[0113] Figure 6 : is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. The electronic device can be configured in a head-up display stray light test system, and is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, 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 examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0114] like Figure 6 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0115] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0116] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a head-up display stray light test method.
[0117] In some embodiments, the head-up display stray light test method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the head-up display stray light test method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the head-up display stray light test method in any other appropriate manner (e.g., by means of firmware).
[0118] Various implementations 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 chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0119] Computer programs for implementing the methods of the present invention 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, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0120] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0121] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0122] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0123] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0124] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0125] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
[0126] An embodiment of the present invention further provides a computer program product, including a computer program and / or instructions, which, when executed by a processor, implements the head-up display stray light testing method provided in any embodiment of the present application.
[0127] In the process of implementation, the computer program product can be written in one or more programming languages or a combination thereof to perform the computer program code of the present invention, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
[0128] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A head-up display stray light testing method, characterized in that: The method is applied to a stray light test system for a head-up display, the head-up display stray light test system comprising a light bar, a windshield, a head-up display and a camera, the light bar being arranged above the windshield for simulating an external light source, the head-up display being used for projecting simulated vehicle driving information onto the windshield to form a virtual image, and the method comprising: When the light bar is at any angle within a preset light bar angle set, control the camera to move to a shooting position within a preset eye box range with a preset step length, and after adjusting the shooting angle of the camera, shoot the virtual image to obtain a plurality of pictures to be tested; Based on a preset stray light parameter threshold, a target picture with stray light in the multiple pictures to be tested and information corresponding to the target picture are determined, wherein the information corresponding to the target picture includes the light bar angle when the target picture is taken and the shooting position of the camera.
2. The method according to claim 1, characterized in that The step of determining a target image having stray light among the plurality of images to be tested based on a preset stray light parameter threshold comprises: For each of the multiple pictures to be tested, calculating a value of a target parameter corresponding to the current picture to be tested, and judging whether there is stray light in the current picture to be tested based on the value of the target parameter and the preset stray light parameter threshold; The image to be tested with stray light is determined as the target image.
3. The method according to claim 2, characterized in that The preset stray light parameter threshold includes a preset pixel maximum brightness threshold, a preset pixel minimum brightness threshold, a preset image brightness standard deviation threshold, and a preset image grayscale ratio threshold, and the value of the target parameter includes the maximum brightness value of the pixel in the current image to be tested, the brightness standard deviation value of the current image to be tested, and the grayscale ratio value of the current image to be tested; The determining whether the current image to be tested has stray light based on the value of the target parameter and the preset stray light parameter threshold comprises: When the maximum brightness value of the pixel in the current picture to be tested is greater than or equal to the preset pixel minimum brightness threshold, if any one of the first preset condition, the second preset condition and the third preset condition is met, it is determined that the current picture to be tested has stray light; if the first preset condition, the second preset condition and the third preset condition are not met, it is determined that the current picture to be tested does not have stray light, wherein the first preset condition is that the brightness standard deviation value of the current picture to be tested is greater than the preset picture brightness standard deviation threshold, the second preset condition is that the maximum brightness value of the pixel in the current picture to be tested is greater than the preset pixel maximum brightness threshold, and the third preset condition is that the grayscale ratio of the current picture to be tested is greater than the preset picture grayscale ratio threshold; When the maximum brightness value of the pixel points in the current image to be tested is less than the preset minimum brightness threshold of the pixel points, it is determined that there is no stray light in the current image to be tested.
4. The method according to claim 3, characterized in that The calculating the value of the target parameter corresponding to the current image to be tested includes: Calculate the brightness value of each pixel in the current image to be tested; Based on the brightness values of the pixels, determine the average brightness of the current image to be tested; Based on the brightness values of the pixels, determine the maximum brightness value of the pixels in the current image to be tested; Based on the brightness mean, calculate the brightness standard deviation of the current image to be tested; Based on the ratio of the brightness mean value to the maximum brightness value of the pixel points in the current image to be tested, the grayscale ratio of the current image to be tested is determined.
5. The method according to claim 1, characterized in that Adjust the camera's shooting angle, including: Calculating the angular offset of the camera based on the position coordinates of the last shooting position of the camera, the position coordinates of the current shooting position and the coordinates of the virtual image center point of the virtual image; The shooting angle of the camera is adjusted according to the angle offset.
6. The method according to claim 5, characterized in that The calculating the angle offset of the camera based on the position coordinates of the last shooting position of the camera, the position coordinates of the current shooting position and the coordinates of the virtual image center point of the virtual image comprises: Determine a first lower viewing angle and a second lower viewing angle of the camera based on the position coordinates of the last shooting position of the camera, the position coordinates of the current shooting position and the coordinates of the center point of the virtual image, wherein the first lower viewing angle is the lower viewing angle of the camera relative to the center point of the virtual image when the camera is at the last shooting position, and the second lower viewing angle is the lower viewing angle of the camera relative to the center point of the virtual image when the camera is at the current shooting position; When the preset step length is greater than the vertical distance, the sum of the first lower viewing angle and the second lower viewing angle is used as the angle offset of the camera; when the preset step length is less than the vertical distance, the absolute value of the difference between the first lower viewing angle and the second lower viewing angle is used as the angle offset of the camera; when the preset step length is equal to the vertical distance, the first lower viewing angle is used as the angle offset of the camera, wherein the vertical distance is determined based on the position coordinates of the previous shooting position and the coordinates of the center point of the virtual image.
7. A head-up display stray light testing device, characterized in that: Applicable to a head-up display stray light test system, the head-up display stray light test system comprises a light bar, a windshield, a head-up display and a camera, the light bar is arranged above the windshield to simulate an external light source, the head-up display is used to project simulated vehicle driving information onto the windshield to form a virtual image, the device comprises: A picture shooting module, used for controlling the camera to move to a shooting position with a preset step length within a preset eye box range when the light bar is at any angle within a preset light bar angle set, and shooting the virtual image after adjusting the shooting angle of the camera to obtain a plurality of pictures to be tested; An information determination module is used to determine a target image with stray light among the multiple images to be tested and information corresponding to the target image based on a preset stray light parameter threshold, wherein the information corresponding to the target image includes the light bar angle when the target image was taken and the shooting position of the camera.
8. An electronic device, characterized in that: The electronic device is configured in a head-up display stray light test system, and includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the head-up display stray light testing method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the head-up display stray light testing method as described in any one of claims 1 to 6 is implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the computer program implements the head-up display stray light testing method according to any one of claims 1 to 6.