Virtual image distance detection method and system

By controlling the electric drive lens of the test camera to acquire virtual images of the optical display module under different driving steps, and calculate virtual image distance based on clarity and driving steps, the problem of virtual image distance detection of virtual image distance of the optical display module is solved and the user experience is improved.

CN120253182APending Publication Date: 2025-07-04BEIJING JINGWEI HIRAIN TECH CO INC
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510465470.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-14
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

The prior art is difficult to effectively detect the virtual image distance of the optical display module, resulting in user visual fatigue and poor results when viewing virtual images.

Method used

By controlling the electric drive lens of the test camera to acquire the test virtual image on the image display panel under different driving steps, determine the sharpness of the reference image, and determine the focus position of the electric drive lens based on the sharpness and driving steps, and then calculate the virtual image distance.

Benefits of technology

It realizes accurate detection of virtual image distance of optical display modules, improving user viewing comfort and effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120253182A_ABST
    Figure CN120253182A_ABST
Patent Text Reader

Abstract

The invention discloses a virtual image distance detection method and system, and relates to the technical field of optical image processing, and the method comprises the steps: controlling an electric drive lens of a test camera to collect test virtual images presented on an image display panel under different drive steps, and obtaining multiple frames of reference images collected by the test camera, different reference images correspond to different driving step numbers of the electric driving lens, and the test virtual image is a virtual image output by the optical display module to be tested to the image display panel; determining the definition of the reference image; based on the definition of each reference image and the driving step number corresponding to each reference image, determining a target driving step number corresponding to the focus position of the electric driving lens; and determining a target virtual image distance corresponding to the target driving step number based on a mapping relationship between the driving step number and the virtual image distance, and determining the target virtual image distance as a virtual image distance corresponding to the optical display module. According to the scheme, the virtual image distance of the optical display module can be detected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of optical image processing technology, and particularly to a method and system for detecting virtual image distance. Background Art

[0002] The virtual image distance is the distance between the virtual image output by the optical display module and presented on the image display board and the human eye pupil.

[0003] As an important parameter of the optical display module, the virtual image distance can affect the viewing effect of the virtual image output by the optical display module. For example, taking the optical display module as the Head Up Display (HUD) in a car as an example, if the virtual image distance of the image projected by the HUD is small, the driver needs to contract the ciliary muscle to make the convexity of the eye lens larger; if the virtual image distance of the image projected by the HUD is large, the driver needs to relax the ciliary muscle to make the convexity of the lens smaller. Frequent switching of the binocular focus points of the driver at different distances will exacerbate the driver's visual fatigue and also result in poor viewing effect of the image projected by the HUD.

[0004] Based on this, in order to reasonably control the virtual image distance corresponding to the optical display module, it is necessary to test the virtual image distance corresponding to the optical module before the optical display module leaves the factory. Summary of the Invention

[0005] In view of the above problems, this application provides a method and system for detecting virtual image distance, so as to be able to detect the virtual image distance corresponding to the optical display module.

[0006] The first aspect of this application provides a method for detecting virtual image distance, including:

[0007] Controlling the electric drive lens of the test camera to collect the test virtual images presented on the image display board at different drive steps, obtaining multiple frames of reference images collected by the test camera, where different reference images correspond to different drive steps of the electric drive lens, and the test virtual image is the virtual image output by the optical display module to be tested to the image display board;

[0008] Determining the clarity of the reference images;

[0009] Based on the clarity of each reference image and the drive step corresponding to each reference image, determining the target drive step corresponding to the focal position of the electric drive lens;

[0010] Based on the mapping relationship between the drive step and the virtual image distance, determining the target virtual image distance corresponding to the target drive step, and determining the target virtual image distance as the virtual image distance corresponding to the optical display module.

[0011] In a possible implementation, determining the clarity of the reference image includes:

[0012] Determining a target image area within a set region of interest in the reference image, where the target image area includes a first image area, a second image area, and an edge line between the first image area and the second image area. The first image area consists of a plurality of pixel points with a first gray value, the second image area consists of a plurality of pixel points with a second gray value, and the difference between the first gray value and the second gray value is greater than a set threshold;

[0013] Determining the clarity of the target image area and determining the clarity of the reference image as the clarity of the target image area.

[0014] In another possible implementation, the test virtual image is a checkerboard pattern rotated by a set angle clockwise or counterclockwise;

[0015] Before determining the target image area within the set region of interest in the reference image, it further includes:

[0016] Displaying the acquired target reference image on the display interface, where the target reference image is any one of the multiple reference images;

[0017] Determining the region of interest marked by the user in the target reference image to obtain the coordinate region corresponding to the region of interest. The region of interest includes partial edge lines of two adjacent squares in the checkerboard pattern of the target reference image, and partial regions of each of the two adjacent squares;

[0018] The determining the target image area within the set region of interest in the reference image includes:

[0019] Based on the coordinate region of the region of interest, determining the target image area within the region of interest in the reference image.

[0020] In another possible implementation, the determining the target drive step corresponding to the focus position of the electric drive lens based on the clarity of each reference image and the drive step corresponding to each reference image includes:

[0021] Based on the clarity and drive step corresponding to each reference image, using polynomial fitting to fit a curve function between the clarity of the reference image and the drive step;

[0022] Based on the curve function, determining the target drive step corresponding to the focus position of the electric drive lens.

[0023] In yet another possible implementation, the electric drive lens of the control test camera respectively captures test virtual images presented on the image display board at different drive steps, obtaining multiple frames of reference images captured by the test camera, including:

[0024] Based on the first adjustment step size, within a set initial drive step range, the drive steps of the electric drive lens of the test camera are sequentially adjusted, and the electric drive lens is controlled to capture the test virtual images presented on the image display board at multiple different drive steps, obtaining multiple frames of candidate images captured by the test camera. Different candidate images correspond to different drive steps of the electric drive lens;

[0025] Determine the sharpness of the candidate images;

[0026] Based on the sharpness of the candidate images and the drive steps corresponding to each of the multiple frames of candidate images, within the initial drive step range, determine the target drive step range corresponding to the motor drive lens being at the focal position;

[0027] Based on the second adjustment step size, within the target drive step range, the drive steps of the electric drive lens of the test camera are sequentially adjusted, and the electric drive lens is controlled to capture the test virtual images presented on the image display board at multiple drive steps, obtaining multiple frames of reference images captured by the test camera. The second adjustment step size is smaller than the first adjustment step size.

[0028] In yet another possible implementation, the mapping relationship between the drive steps and the virtual image distance is a functional relationship between the drive steps and the virtual image distance;

[0029] The functional relationship is obtained through the following method:

[0030] Determine multiple test distances;

[0031] For each test distance, when the actual distance between the test camera and the target physical object is the test distance, control the electric drive lens of the test camera to capture images of the target physical object at different test drive steps, obtaining multiple frames of object images captured by the test camera. Among them, different frames of object images correspond to different test drive steps;

[0032] Determine the sharpness of each frame of object image;

[0033] For each test distance, based on the sharpness of each object image and the drive steps corresponding to each object image, determine the target test drive step corresponding to the electric drive lens being at the focal position at the test distance;

[0034] Taking the target test driving steps corresponding to each test distance as the driving steps corresponding to a virtual image distance, based on the target test driving steps corresponding to different test distances, fitting the functional relationship between the target test driving steps and the test distance, and determining the functional relationship as the functional relationship between the driving steps and the virtual image distance.

[0035] In yet another possible implementation, the image display board is a windshield for installation on a vehicle;

[0036] The test virtual image is a virtual image projected by the head-up display device to be tested onto the windshield.

[0037] On the other hand, the present application also provides a virtual image distance detection system, including:

[0038] A test control device, a test camera, an image display board, and an optical display module to be tested;

[0039] Wherein, the optical display module is configured to output a test virtual image to the image display board;

[0040] The image display board is configured to present the test virtual image;

[0041] The test camera has an electrically driven lens, and the test camera is configured to collect the test virtual image presented on the image display board through the electrically driven lens under the control of the test control device;

[0042] The test control device is configured to execute the virtual image distance detection method described in any one of the above.

[0043] In a possible implementation, the optical display module is a head-up display device for installation in a vehicle, and the head-up display device is located at a first coordinate position in the vehicle coordinate system for setting the head-up display device;

[0044] The image display board is a windshield for installation in the vehicle, the windshield faces the projection direction of the test virtual image projected by the head-up display device, and is located at a second coordinate position in the vehicle coordinate system for setting the windshield;

[0045] Wherein, the head-up display device is configured to project the test virtual image onto the windshield;

[0046] The optical center of the test camera is located at the set mid-eye position of the driver in the vehicle coordinate system.

[0047] In yet another possible implementation, the virtual image distance detection system further includes: a head-up display stand for installing and fixing the head-up display device;

[0048] And, a camera fixing device for fixing the test camera.

[0049] With the above technical solution, by controlling the electric drive lens of the test camera to collect the test virtual image output by the optical display module onto the image display board at different drive steps, the clarity of multiple reference images collected by the electric drive lens can reflect the clarity of the test virtual image seen by the human eye at different distances from the test virtual image. On this basis, considering that the image clarity is the highest when the electric drive lens is at the focal position, therefore, by combining the clarity of each reference image and the drive steps when the electric drive lens collects each reference image, the target drive step corresponding to the electric drive lens being at the focal position can be determined, and the virtual image distance corresponding to the target drive step when the electric drive lens is at the focal position actually represents the virtual image distance between the human eye and the test virtual image output by the optical display module, so that the virtual image distance corresponding to the optical display module can be detected. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Combined with the drawings and referring to the following specific embodiments, the above and other features, advantages and aspects of the various embodiments of the present disclosure will become more obvious. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic and the original components and elements are not necessarily drawn to scale.

[0051] Figure 1 It is a schematic diagram of a composition architecture of the virtual image distance detection system provided by the present application;

[0052] Figure 2 It is another schematic diagram of a composition architecture of the virtual image distance detection system provided by the present application;

[0053] Figure 3 It is a schematic flowchart of a virtual image distance detection method provided by the present application;

[0054] Figure 4 It is an example diagram of a fitting curve between the clarity of the fitted image and the drive steps;

[0055] Figure 5 It is an example diagram of a pattern of the test virtual image provided by the present application;

[0056] Figure 6 It is another schematic flowchart of a virtual image distance detection method provided by the present application;

[0057] Figure 7 It is an example diagram of an interested region outlined by the user in the checkerboard pattern;

[0058] Figure 8 It is another schematic flowchart of a virtual image distance detection method provided by the present application;

[0059] Figure 9 It is a schematic diagram of an implementation process for determining the functional relationship between the driving steps and the virtual image distance in this application;

[0060] Figure 10 It is another schematic diagram of the process of the virtual image distance detection method provided by this application. Specific embodiments

[0061] The embodiments of this application will be described below with reference to the accompanying drawings in the embodiments of this application. The terms used in the embodiments of this application are only used to explain the specific embodiments of this application, rather than intended to limit this application. Those of ordinary skill in the art will know that with the development of technology and the emergence of new scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0062] The terms "first", "second", etc. in the specification, claims and above-mentioned drawings of this application are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that such terms can be interchanged under appropriate circumstances, which is only a way of distinguishing when describing objects with the same attributes in the embodiments of this application. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion, so that a process, method, system, product or device including a series of units does not have to be limited to those units, but may include other units that are not clearly listed or are inherent to these processes, methods, products or devices.

[0063] The virtual image distance detection method of this application can be applied to test the virtual image distance suitable for optical display devices that can project virtual images in any field.

[0064] For example, the optical display device can be a HUD device used in the vehicle field. On this basis, the virtual image distance is the distance between the human eye and the virtual image projected by the HUD device.

[0065] For another example, the optical display device can also be an optical display device in a virtual reality device. Then the virtual image distance can be the distance between the human eye and the virtual image output by the optical display module of the virtual reality device to the display screen in the virtual reality device, or the distance between the virtual images projected by the optical display module of the virtual reality device onto a wall or other display board.

[0066] Of course, there may be other possibilities for the optical display device, and no restrictions are imposed on this.

[0067] Such as Figure 1 , which shows a schematic diagram of a composition architecture of the virtual image distance detection system provided by the embodiments of this application.

[0068] In Figure 1 the virtual image distance detection system may include: a test control device 101, a test camera 102, an image display panel 103, and an optical display module 104 to be tested.

[0069] Among them, the optical display module 104 is configured to output a test virtual image to the image display panel. The test virtual image is a virtual image output by the optical display module for virtual image distance detection.

[0070] Correspondingly, the image display panel 103 is configured to present the test virtual image output by the optical display module.

[0071] The test camera 102 has an electrically driven lens. Moreover, the test camera 102 is configured to collect the test virtual image presented on the image display panel through the electrically driven lens under the control of the test control device 101.

[0072] The test control device 101 is configured to control the electrically driven lens of the test camera to collect the test virtual image presented on the image display panel at different driving steps respectively, to obtain multiple frames of reference images collected by the test camera. Different reference images correspond to different driving steps of the electrically driven lens; to determine the sharpness of each frame of reference image; based on the sharpness of each reference image and the driving step corresponding to each reference image, to determine the target driving step corresponding to the focal position of the electrically driven lens; based on the mapping relationship between the driving step and the virtual image distance, to determine the target virtual image distance corresponding to the target driving step, and to determine the virtual image distance corresponding to the optical display module as the target virtual image distance.

[0073] Among them, there may be a communication connection between the test control device and the test camera. For example, the test control device can establish a communication connection with the test camera through wired or wireless communication means. The test control device can accurately control and adjust the aperture, focus, and zoom of the electrically driven lens of the test camera by sending an electrical signal to the test camera.

[0074] In this application, when the driving steps of the electrically driven lens are different, the distance between the electrically driven lens and the test virtual image presented on the image display panel is different. Therefore, by controlling the driving steps of the electrically driven lens, the distance between the electrically driven lens and the test virtual image presented on the image display panel can be changed.

[0075] In this application, the test control device may be an electronic device with control and computing functions. For example, the test control device may be a personal computer, a laptop computer, or other electronic devices, without limitation.

[0076] It can be seen that by controlling the electric drive lens of the test camera to collect the test virtual images on the output image display board of the optical display module at different drive steps, the clarity of multiple reference images collected by the electric drive lens can reflect the clarity of the test virtual images seen by the human eye at different distances from the test virtual images. On this basis, considering that the image clarity is the highest when the electric drive lens is at the focal position, therefore, by combining the clarity of each reference image and the drive steps when the electric drive lens collects each reference image, the target drive step corresponding to the electric drive lens at the focal position can be determined, and the virtual image distance corresponding to the target drive step when the electric drive lens is at the focal position actually represents the virtual image distance between the human eye and the test virtual image output by the optical display module, so that the virtual image distance corresponding to the optical display module can be detected.

[0077] It can be understood that in this application, there is no requirement for the pixel resolution of the test camera. In practical applications, in order to ensure the detection effect, a high-quality camera with a relatively high resolution can be selected as the test camera. For example, a camera with a pixel resolution of not less than 10 million can be selected as the test camera.

[0078] In order to enable the test camera to collect the complete test virtual image, the field of view angle of the test camera should be greater than the field of view angle of the optical display module.

[0079] Furthermore, in order to ensure the detection accuracy of the virtual image distance, in this application, the center of the reference image collected by the test camera should be consistent with the center of the test virtual image in the reference image. Based on this principle, the relative position relationship between the test camera and the optical display module or the image display board can be appropriately adjusted.

[0080] In a possible implementation manner, in order to be able to fix the test camera and the optical display module and be able to reasonably adjust the relative position relationship between the two, in this application, the virtual image distance detection system may further include: a module mount for installing and fixing the optical display module. The optical display module can be installed on the module mount, and the spatial position of the optical display module can be adjusted through the module mount, and the optical display module can be fixed to the required spatial position.

[0081] Correspondingly, the system may further include: a camera fixing device for installing the test camera. After the test camera is installed on the camera fixing device, the spatial position of the test camera can be adjusted through the camera fixing device. For example, the test camera can be translated on different coordinate axes of the three-dimensional coordinate system and rotated around different coordinate axes through the camera fixing device, so that the relative position relationship between the test camera and the optical display module meets the detection requirements.

[0082] In this application, according to different application scenarios, the connection relationship and positional relationship between the optical display module and the image display board will also be different. Of course, in order to detect the virtual image distance, as long as the connection relationship and positional relationship between the optical display module to be tested and the image display board are consistent with the connection relationship and positional relationship between the optical display module and the image display board in the actual application scenario.

[0083] For example, in a possible implementation, the optical display module is a head-up display device for being set in a vehicle, and the head-up display device is located at a first coordinate position for setting the head-up display device in the vehicle coordinate system corresponding to the vehicle. That is to say, the first coordinate position is the coordinate position where the vehicle actually installs the head-up display device in the vehicle coordinate system, so that during the process of detecting the virtual image distance, the spatial position where the head-up display device is located is consistent with the spatial position where the head-up display device is designed and installed in the vehicle.

[0084] Correspondingly, the image display board is a windshield for being set in the vehicle, the windshield projects a test virtual image towards the head-up display device, and is located at a second coordinate position for setting the windshield in the vehicle coordinate system. That is, the second coordinate position is the coordinate position where the vehicle actually installs the windshield in the vehicle coordinate system.

[0085] Among them, the head-up display device and the windshield can be products that need to be set on vehicles of the same model.

[0086] In this implementation, in order to make the reference image collected by the test camera reflect the viewing effect of the test virtual image by the driver of the vehicle, the optical center of the test camera can be located at the mid-eye position of the driver set in the vehicle coordinate system.

[0087] Among them, the set mid-eye position of the driver can be the center of the line connecting the left and right eyes of the driver with a set height. For example, the set mid-eye position of the driver can be the mid-eye position of the mid-eye box of the driver. Among them, the mid-eye box of the driver is determined by statistically analyzing the positions of the eyes of multiple drivers, and the mid-eye position of the mid-eye box is the center point position of the line connecting the eyes of most drivers.

[0088] Among them, the optical center refers to a special point in the optical system. In the optical system, when light passes through a lens or a mirror surface, the light passing through the optical center does not undergo deflection. Usually, the optical center is located at the geometric center of the optical element (such as a lens). Correspondingly, in this application, the optical center of the test camera can be the geometric center of the electric drive lens in the test camera.

[0089] Further, when the optical display module is a head-up display device, the virtual image distance detection system may further include: a head-up display stand for installing and fixing the head-up display device, and a camera fixing device for fixing the test camera.

[0090] For ease of understanding, reference may be made to Figure 2 , which shows another schematic structural diagram of the virtual image distance detection system in the present application.

[0091] As can be seen from Figure 2 , the virtual image distance detection system includes: a head-up display device 201, a head-up display stand 202 for supporting the head-up display device, a windshield 203, a test camera 204, and a camera fixing device 205 for setting the test camera. The virtual image distance detection system further includes a test control device ( Figure 2 not shown in the figure), and the present application does not limit the specific installation position of the test control device.

[0092] Among them, the head-up display stand may include an installation stand for installing the head-up display device, and a fixed base connected to the installation stand and located below the installation stand. Among them, the installation stand and the head-up display device can be connected by screws or the like to fix the head-up display device. By adjusting the position of the installation stand relative to the fixed base, the spatial position of the head-up display device can be changed.

[0093] As described above, in the present application, the spatial position of the head-up display device installed on the head-up display stand needs to be consistent with the spatial position where the head-up display device is set in the vehicle. Correspondingly, the spatial position of the windshield needs to be consistent with the actual installation position of the windshield in the vehicle.

[0094] As Figure 2 , in the direction in which the head-up display device projects the test virtual image, the windshield is located in front of the head-up display device, so that the test virtual image projected by the head-up display device can be presented on the windshield.

[0095] Similarly, in order to enable the reference image collected by the test camera to reflect the effect of viewing the test virtual image presented on the windshield from the driver's perspective, the camera needs to be adjusted to the set mid-eye position of the driver through the camera fixing device. Further, it is also necessary to ensure that the center of the test virtual image included in the reference image collected by the camera is consistent with the center of the reference image.

[0096] In Figure 2 's scenario, the selection of the test camera can be as described above, for example, the field of view angle of the test camera is greater than the field of view angle of the head-up display device, etc., which will not be elaborated here.

[0097] It can be understood that throughFigure 2 The virtual image distance detection system can restore the true positional relationship between the head-up display device and the windshield in the vehicle. By means of the test virtual image on the windshield collected by the test camera and analyzing the clarity corresponding to the test virtual image collected by the test camera, when the lens of the test camera is at the focal position, the distance between the lens and the test virtual image can be analyzed. Since the lens is actually used to simulate the human eye of the driver, the distance between the lens and the test virtual image is the virtual image distance from the human eye of the driver to the virtual image projected by the head-up display device, so that the virtual image distance of the head-up display device can be detected.

[0098] It can be understood that Figure 2 takes the optical display module as the head-up display device as an example. However, if the optical display module is the optical display module in the virtual reality device, and the optical display module of the virtual reality device projects a test pattern onto the glass or other image display board, then only the relative position between the optical display module of the virtual reality device and the image display board needs to be kept consistent with the actual application scenario, and the other components are the same as Figure 2 which will not be elaborated here.

[0099] If the optical display module is the optical display module in the virtual reality device, and the image display board is a display screen with a communication connection to the optical display module, then only the relative positional relationship between the test camera and the display screen needs to be the same as the Figure 2 positional relationship between the test camera and the windshield in

[0100] Combined with the above introduction of the virtual image distance detection system, the virtual image distance detection method of the present application will be introduced from the perspective of the test control device below.

[0101] As Figure 3 , a flowchart of a virtual image distance detection method provided by an embodiment of the present application is shown. The method of this embodiment is applied to the test control device mentioned above. The method of this embodiment may include:

[0102] S301, controlling the electric drive lens of the test camera to collect the test virtual images presented on the image display board at different drive steps, and obtaining multiple frames of reference images collected by the test camera.

[0103] Among them, the test virtual image is the virtual image (also called the virtual image) output by the optical display module to be tested to the image display board. Correspondingly, the reference image is an image including the test virtual image.

[0104] It can be understood that since the multiple frames of reference images are the images collected by the electric drive lens of the test camera at different drive steps, different reference images correspond to different drive steps of the electric drive lens.

[0105] Among them, the electric drive lens of the test camera can collect the test virtual image description presented on the image display board. The electric drive lens of the test camera is oriented towards the image display board. On this basis, adjusting the drive steps of the electric drive lens is actually adjusting the electric drive lens back and forth in the direction from the test camera to the image display board. Therefore, changing the drive steps of the electric drive lens essentially adjusts the distance between the electric drive lens and the test virtual image presented in the image display board.

[0106] S302, determine the clarity of the reference image.

[0107] In this application, any method for determining the clarity of an image can be used to determine the clarity of the reference image, and there is no restriction on this.

[0108] For example, the gray values of the pixel points on both sides of any edge line in the reference image can be combined, and using the Spatial Frequency Response (SFR) algorithm, the clarity of the image can be calculated. The basic principle of this SFR algorithm is based on the transition situation between the pixel points with different gray values on both sides of the edge line to determine the clarity of the image. If there are more pixel points with gray value transitions on both sides of the edge line, the clarity of the image is lower; conversely, the clarity of the image is higher.

[0109] Among them, the SFR algorithm should have the following characteristics:

[0110] 1). Unimodality. That is, for the same target, when the object distance is determined, there is a unique focus.

[0111] 2). High sensitivity. Higher sensitivity can ensure effective discrimination of slight defocus. The sensitivity of the image clarity calculation algorithm determines the ranging accuracy of the image.

[0112] 3). Strong robustness. In the actual environment, there are many influencing factors. Temperature, light, the imaging system, and noise will all affect the imaging quality of the image. Therefore, it is required that the clarity calculation function has a certain degree of robustness so that the image can maintain the stability of the calculation when affected by the environment.

[0113] For another example, this application can also use the Modulation Transfer Function (MTF) algorithm to calculate the MTF curve of the reference image. This MTF curve is a curve between the sampling frequency and the clarity. On this basis, by selecting an appropriate sampling frequency, the clarity corresponding to the selected sampling frequency is determined as the clarity of the image.

[0114] Among them, since the reference image is an image obtained by collecting a test virtual image, the clarity of the reference image is actually the clarity of the test virtual image collected by the test camera.

[0115] S303. Determine the target driving step number corresponding to the focus position of the electric driving lens based on the clarity of each reference image and the driving step number corresponding to each reference image.

[0116] It can be understood that the electric driving lens of the test camera is a group of lenses. When parallel light rays pass through the lenses, they will converge to a point, and this point is the focus. When the electric driving lens can converge the parallel light rays to the focus, the position where the electric driving lens is located is the focus position. Based on this, the electric driving lens being at the focus position is the lens position when the electric lens finds the focus through focusing.

[0117] It can be understood that when the electric driving lens is at the focus position, it is also the lens position when the electric driving lens can capture the clearest test virtual image. Based on this, by combining the clarity of multiple frames of reference images and the driving step number corresponding to each frame of reference image captured by the electric driving lens, we can analyze the driving step number by which the electric driving lens is adjusted when it can capture the reference image with the highest clarity, and naturally obtain the driving step number corresponding to the electric driving lens being at the focus position.

[0118] In this application, for the sake of easy distinction, the driving step number corresponding to the electric driving lens being at the focus position is called the target driving step number.

[0119] Among them, there can be multiple ways to implement the determination of the target driving step number, and there is no limitation on this. The following takes two possible implementation methods as examples for illustration:

[0120] For example, in a possible implementation method, if the number of times of adjusting the driving step number in step S301 is large enough to make the number of reference images large enough, the reference image with the highest clarity can be determined, and the driving step number corresponding to the reference image with the highest clarity is determined as the target driving step number corresponding to the electric driving lens being at the focus position.

[0121] It can be understood that if each driving step number controls the test camera to collect one frame of reference image, it will make the number of reference images large, which will not only lead to too large a data processing volume, but also lead to too long a time-consuming for detecting the virtual image distance. Based on this, in another possible implementation method, a curve function between the clarity of the reference image and the driving step number can be fitted by using a polynomial fitting method based on the clarity and driving step number corresponding to each reference image. Correspondingly, based on this curve function, the target driving step number corresponding to the electric driving lens being at the focus position can be determined.

[0122] Among them, by combining the sharpness and the number of driving steps corresponding to each of the multiple reference images, a high-order polynomial fitting algorithm can be used to fit a polynomial function between the sharpness of the reference image and the number of driving steps. This polynomial function is the curve function between the sharpness of the reference image and the number of driving steps. This application places no restrictions on the specific fitting process.

[0123] Among them, when the curve function between the sharpness of the reference image and the number of driving steps is determined, the point with the highest sharpness in this curve function can be determined, and the number of driving steps corresponding to the point with the highest sharpness is determined as the target number of driving steps. For example, the derivative of this curve function can be calculated, and the point where the derivative is 0 is the point with the highest sharpness, and the number of driving steps corresponding to the point with the highest sharpness is the target number of driving steps.

[0124] Such as Figure 4 , shows an example diagram of the fitting curve between the sharpness of the fitted image and the number of driving steps. From Figure 4 it can be seen that based on this curve, the sharpness of the reference image corresponding to different numbers of driving steps can be determined. By taking the derivative of the Figure 4 shown curve, the point where the derivative is zero is the highest point of the curve, that is, the position point with the highest sharpness, and the number of driving steps corresponding to this position point is the target number of driving steps.

[0125] S304. Based on the mapping relationship between the number of driving steps and the virtual image distance, determine the target virtual image distance corresponding to the target number of driving steps, and determine the target virtual image distance as the virtual image distance corresponding to the optical display module.

[0126] Among them, the mapping relationship between the number of driving steps and the virtual image distance may include the corresponding relationship between different numbers of driving steps and the virtual image distance. Based on this, by querying this mapping relationship, the target virtual image distance corresponding to this target number of driving steps can be found.

[0127] In a possible implementation, considering that the virtual image distance corresponding to each number of driving steps is calibrated separately, then a complex calibration operation needs to be performed for each number of driving steps. Based on this, the mapping relationship between the number of driving steps and the virtual image distance can be a functional relationship between the number of driving steps and the virtual image distance. Based on this, substituting the target number of driving steps into this functional relationship can obtain the target virtual image distance. Among them, this functional relationship can be constructed based on multiple sets of pre-calibrated corresponding relationships between the number of driving steps and the virtual image distance, and the specific method is not restricted.

[0128] It can be understood that when the driving steps of the electric driving lens are adjusted to the target driving steps, the clarity of the test virtual image collected by the electric driving lens is the highest. At this time, the distance from the electric driving lens to the test virtual image is actually the virtual image distance from the user's pupil to the test virtual image when the user can clearly view the test virtual image. Based on this, the target virtual image distance corresponding to the target driving steps is also the virtual image distance corresponding to the optical display module to be tested.

[0129] By means of the above technical solution, by controlling the electric driving lens of the test camera to collect the test virtual images output by the optical display module onto the image display board at different driving steps, the clarity of multiple frames of reference images collected by the electric driving lens can reflect the clarity of the test virtual images seen by the human eye at different distances from the test virtual image. On this basis, considering that the image clarity is the highest when the electric driving lens is at the focal position, therefore, by combining the clarity of each reference image and the driving steps when the electric driving lens collects each reference image, the target driving steps corresponding to the electric driving lens being at the focal position can be determined. And the virtual image distance corresponding to the target driving steps when the electric driving lens is at the focal position actually represents the virtual image distance between the human eye and the test virtual image output by the optical display module, so that the virtual image distance corresponding to the optical display module can be detected.

[0130] In the present application, the specific display content of the test virtual image can be unrestricted as long as the content of the test virtual image can be used to test the clarity of the image, that is, it includes the clarity corresponding to the reference image of the test image. For example, the test virtual image can be a checkerboard pattern or other forms of images containing different gray values and having edge lines.

[0131] Among them, after collecting the reference image containing the test virtual image, in order to make the clarity of the reference image accurately reflect the clarity of the test virtual image, the present application can also pre-determine the region of interest in the reference image for calculating the clarity, and then determine the image clarity based on the image within the region of interest.

[0132] For example, in a possible implementation manner, for any frame of reference image, the image area within the region of interest can meet the requirements for clarity calculation. Specifically, for each frame of reference image, the target image area within the set region of interest in the reference image can be determined. Among them, the target image area includes a first image area, a second image area, and an edge line between the first image area and the second image area. The first image area is composed of multiple pixel points with a first gray value, the second image area is composed of multiple pixel points with a second gray value, and the difference between the first gray value and the second gray value is greater than the set threshold.

[0133] For example, the color of each pixel in the first image region is white, that is, the first gray value of the pixel is 255; while the color of each pixel in the second image region is black, that is, the second gray value of the pixel is 0.

[0134] Correspondingly, the sharpness of the target image area is determined, and the sharpness of the target image area is determined as the sharpness of the reference image. Among them, since the target image area includes an edge line and a transition area with two different gray values, the SFR algorithm or MTF algorithm mentioned above can be combined to calculate the sharpness of the target image area. The sharpness of the target image area represents the sharpness of the test virtual image in the reference image, that is, it represents the sharpness of the reference image.

[0135] Among them, the region of interest can be pre-calibrated by the user. In order to make the region of interest meet the requirements of sharpness calculation, there needs to be an edge line in the region of interest calibrated by the user, and the gray values of the image regions on both sides of the edge are different, which makes the complexity of the user calibrating the region of interest relatively high. Based on this, in order to reduce the complexity of the user calibrating the region of interest, in this application, the test virtual image can be a checkerboard pattern rotated by a set angle clockwise or counterclockwise.

[0136] Among them, the checkerboard pattern is composed of multiple black and white squares, each square is all black or all white, and the colors of any two adjacent squares are different.

[0137] In this application, in order to make the region of interest selected by the user from the checkerboard easily contain an edge line and partial regions of the black and white squares on both sides of the edge line, the test virtual image can be a checkerboard pattern rotated by a certain angle clockwise or counterclockwise. As Figure 5 , a pattern example diagram of the test virtual image in this application is shown.

[0138] In Figure 5 , on the basis of this, the user frames a square containing an edge line between adjacent black and white squares, and the square easily contains partial regions of the black and white squares.

[0139] Next, a specific implementation method for the user to frame the region of interest and determine the image sharpness will be described in conjunction with Figure 6 . As Figure 6 , a schematic flowchart of another process of the virtual image distance detection method provided in this application is shown. The method of this embodiment may include:

[0140] S601, controlling the electric drive lens of the test camera to collect the test virtual image presented on the image display board at different drive steps, and obtaining multiple frames of reference images collected by the test camera.

[0141] Among them, different reference images correspond to different driving steps of the electric drive lens.

[0142] In this embodiment, the test virtual image is the virtual image output by the optical display module to be tested to the image display board, and the test virtual image is a checkerboard pattern rotated by a set angle value clockwise or counterclockwise.

[0143] It can be understood that in any embodiment of this application, before controlling the test camera to collect the reference image, the optical display module has been turned on and outputs a test virtual image to the image display board. Moreover, the test camera and the electric drive lens of the test camera have also been initialized, so that the electric drive lens can collect images that meet certain clarity requirements at the initial position.

[0144] S602, display the collected target reference image on the display interface.

[0145] Among them, the target reference image is any one of the multiple frames of reference images.

[0146] S603, determine the region of interest marked by the user in the target reference image, and obtain the coordinates corresponding to the region of interest.

[0147] Among them, the region of interest includes partial edge lines of two adjacent squares in the checkerboard pattern of the target reference image, and partial regions of each of the two adjacent squares.

[0148] For the sake of easy understanding, the test virtual image is Figure 5 illustrated by the pattern shown. On this basis, the displayed reference image will include Figure 5 the checkerboard pattern shown. On this basis, the user can use the edge line between two corner points (the position points where the corners of any square are located) shared by two adjacent black and white squares in the checkerboard pattern as the positioning line, and frame a rectangle on the positioning line, and the center of the rectangle is the center of the positioning line. The side length of the rectangle is half of the horizontal connection line of the two corner points on the positioning line. As Figure 7 shown, in Figure 7 the red rectangle frame is the region of interest framed by the user in the checkerboard pattern.

[0149] From Figure 7 it can be seen that the rectangle frame includes partial edge lines of the edges of the black and white squares, and the rectangle frame includes two different color image regions located on both sides of the edge line and coming from the black and white squares respectively.

[0150] Of course, Figure 7 it is only an example, in Figure 5Based on this, when the user frames out partial edge lines of adjacent black and white squares, it is very easy to frame out an image that includes partial edge lines, and the areas on both sides of the edge lines respectively include a partial area of white squares and a partial area of black squares.

[0151] It can be understood that the operation of determining the region of interest only needs to be performed once. Subsequently, based on the region of interest marked by the user, the image areas belonging to the region of interest in each frame of the reference image can be determined respectively.

[0152] S604. For any frame of the reference image, based on the coordinate region of the region of interest, determine the target image area in the reference image that is within the region of interest.

[0153] Among them, the target image area includes a first image area, a second image area, and an edge line between the first image area and the second image area. Among them, the first image area is composed of a plurality of pixel points with a first gray value, the second image area is composed of a plurality of pixel points with a second gray value, and the difference between the first gray value and the second gray value is greater than a set threshold.

[0154] It can be understood that when the direction of the test camera relative to the image display board remains unchanged, the image content included in the region of interest in each frame of the reference image collected by the test camera is the same, except that the clarity of the region of interest in different reference images is different. Based on this, from the calibration of the region of interest in the front, it can be known that the target image area must include an edge line and two image areas with different gray values on both sides of the edge line.

[0155] S605. Determine the clarity of the target image area, and determine the clarity of the target image area as the clarity of the reference image.

[0156] The implementation principle of determining the clarity of the target image area is similar to the specific implementation principle of determining the clarity of the reference image, and will not be elaborated here.

[0157] S606. Based on the clarity of each reference image and the driving steps corresponding to each reference image, determine the target driving steps corresponding to the focal position of the electric driving lens.

[0158] S607. Based on the mapping relationship between the driving steps and the virtual image distance, determine the target virtual image distance corresponding to the target driving steps, and determine the target virtual image distance as the virtual image distance corresponding to the optical display module.

[0159] For the above steps S606 and S607, reference can be made to the relevant introduction in the previous embodiments, and details will not be elaborated here.

[0160] In this application, in order to more efficiently find the drive steps corresponding to the electric drive lens when it is at the focus position, this application can also, according to the set search strategy, first adjust the drive steps of the electric drive lens in the test camera within a relatively large search range, so as to locate the drive step range corresponding to the focus position where the electric drive lens is located. Then, perform a precise search within this drive step range to finally determine the target drive steps corresponding to the electric drive lens when it is at the focus position. This will be described in detail in conjunction with Figure 8 as follows. As Figure 8 , Fig. shows another schematic implementation flow of the virtual image distance detection method provided by this application. This embodiment may include:

[0161] S801, Based on the first adjustment step size, sequentially adjust the drive steps of the electric drive lens of the test camera within the set initial drive step range, and control the electric drive lens to collect the test virtual images presented on the image display board at multiple different drive steps, to obtain multiple frames of candidate images collected by this test camera.

[0162] This test virtual image is the virtual image output by the optical display module to the image display board. As specifically introduced before, it will not be elaborated here.

[0163] Among them, during the process of adjusting the drive steps of the electric drive lens according to the first adjustment step size, each time the drive steps of the electric drive lens are increased by the number of drive steps of this first adjustment step size. Moreover, each time the drive steps are adjusted, control the electric drive lens to collect the test virtual images presented on the image display board to obtain one frame of image. For the sake of easy distinction, the images collected during the process of adjusting the drive steps of the electric drive lens according to the first adjustment step size are called candidate images.

[0164] Among them, the initial drive step range can be set according to experience. For example, it can be estimated that the set step range before and after the drive steps corresponding to the focus position is the initial drive step range.

[0165] S802, For each frame of candidate image, determine the clarity of this candidate image.

[0166] Among them, the specific implementation manner of determining the clarity of the candidate image is the same as the specific implementation process of determining the clarity of the reference image before. For example, it is possible to determine the candidate image area located within the region of interest in the candidate image, determine the clarity of this candidate image area, and use this clarity as the clarity of the candidate image. The specific implementation can refer to the relevant introduction of determining the clarity of the reference image before, and will not be elaborated here.

[0167] S803, Based on the clarity of each candidate image and the drive steps corresponding to each frame of candidate image, determine the target drive step range corresponding to the motor drive lens when it is at the focus position from the set initial drive step range.

[0168] Among them, based on the clarity and the number of driving steps corresponding to each candidate image, the interval with the highest image clarity and the fewest driving steps can be determined from the initial driving step interval as the target driving step interval. This target driving step interval belongs to a sub-interval of the initial driving step interval.

[0169] For example, assume that the initial driving step interval is [x0, x3], where x0 and x3 are two integers and x3 is greater than x0. On this basis, the Fibonacci method (also known as the Fibonacci fraction method) can be used to search for the target driving step interval with the highest image clarity and an interval length less than the set value within this interval. For example, based on the Fibonacci method, two test points x1 and x2 can be selected from the interval [x0, x3], where x2 is greater than x1. If the clarity corresponding to x2 is greater than the clarity corresponding to x1, the current search interval changes to [x1, x3]; if the clarity corresponding to x2 is less than the clarity corresponding to x1, the current search interval changes to [x0, x2]. Repeat this process continuously. If the length (or distance) of the latest determined search interval is less than the set value A, then this search interval is determined as the target driving step interval.

[0170] S804, based on the second adjustment step size, sequentially adjust the driving steps of the electric driving lens of the test camera within the target driving step interval, and control the electric driving lens to collect the test virtual images presented on the image display board at multiple driving steps, to obtain multiple frames of reference images collected by the test camera.

[0171] Among them, the second adjustment step size is less than the first adjustment step size.

[0172] Among them, different reference images correspond to different driving steps.

[0173] It can be understood that since the target driving step interval includes the driving steps corresponding to the electric driving lens being at the focal position, and in order to subsequently determine the driving steps corresponding to the electric driving lens being at the focal position within the target driving step interval, more refined driving step adjustments need to be made within this target driving step interval, so that the gap between the driving steps corresponding to multiple frames of reference images is smaller.

[0174] S805, respectively determine the clarity of each reference image.

[0175] S806, based on the clarity of each reference image and the driving steps corresponding to each reference image, determine the target driving steps corresponding to the electric driving lens being at the focal position.

[0176] S807. Based on the mapping relationship between the driving steps and the virtual image distance, determine the target virtual image distance corresponding to the target driving steps, and determine this target virtual image distance as the virtual image distance corresponding to the optical display module.

[0177] Among them, for steps S805 to S807, reference can be made to the relevant descriptions in the previous embodiments, and details will not be elaborated here.

[0178] In this embodiment, first quickly and roughly determine the target driving step interval corresponding to the electric driving lens being at the focal position, and then more finely adjust the driving steps of the electric driving lens within the target driving steps and collect reference images, which can reduce the number of movements of the electric driving lens and the number of image acquisitions, is conducive to more efficiently determining the target driving steps corresponding to the electric driving lens being at the focal position, and can reduce the number of image acquisitions and the amount of image processing.

[0179] As described above, there can be various possible implementation manners for determining the mapping relationship between the driving steps and the virtual image distance in this application. To reduce the complexity and time consumption of determining this mapping relationship, in this application, this mapping relationship can be a functional relationship. The following takes an example of an implementation of determining the functional relationship between the driving steps and the virtual image distance for illustration. As Figure 9 , shows a schematic flowchart of an implementation of determining the functional relationship between the driving steps and the virtual image distance in this application, and this process can include:

[0180] S901. Determine multiple test distances.

[0181] For example, a distance interval [a, b] can be calibrated, and the values of a and b can be set as needed. Select a distance point every c meters within the distance interval [a, b], and multiple test distances can be determined. The value of c can be set as needed.

[0182] S902. For each test distance, when the actual distance between the test camera and the target physical object is this test distance, control the electric driving lens of the test camera to collect images of the target physical object at different test driving steps respectively, and obtain multiple frames of object images collected by the test camera.

[0183] Among them, different frames of object images correspond to different test driving steps. In this embodiment, for the sake of easy distinction, during the process of determining the functional relationship, the driving steps of the electric driving lens are called test driving steps.

[0184] Among them, the target physical object is a real physical object. For example, the target physical object can be an item or other object, and there is no limitation thereto.

[0185] For the sake of easy distinction, the image of the target physical object collected by the electric drive lens of the test camera is referred to as the object image.

[0186] S903. Determine the sharpness of each frame of the object image.

[0187] Among them, the specific implementation of determining the sharpness of the object image can be the same as the implementation process of determining the sharpness of the reference image before, and will not be elaborated here.

[0188] S904. For each test distance, based on the sharpness of each object image and the drive steps corresponding to each object image, determine the target test drive steps corresponding to the focus position of the electric drive lens at this test distance.

[0189] For example, a curve function of the sharpness of the object image and the drive steps can be fitted, and based on the curve function, the test drive steps corresponding to the highest sharpness of the object image are determined, and the test drive steps are determined as the target test drive steps.

[0190] Of course, there can be other ways to determine the target test drive steps. Specifically, it is similar to the process of determining the target drive steps before, and will not be elaborated here.

[0191] S905. Take the target test drive steps corresponding to each test distance as the drive steps corresponding to a virtual image distance, and based on the target test drive steps corresponding to different test distances, fit the functional relationship between the target test drive steps and the test distance, and determine the functional relationship as the functional relationship between the drive steps and the virtual image distance.

[0192] It can be understood that each test distance can actually be used as a virtual image distance. Therefore, the target test drive steps corresponding to each test distance are actually the drive steps corresponding to the virtual image distance associated with this test distance.

[0193] Among them, a high-order coefficient equation can be used to fit the functional relationship between the target test drive steps and the test distance, and the specific fitting process is not limited.

[0194] For the sake of easy understanding of the solution of the present application, the following takes the application scenario of detecting the virtual image distance of the head-up display device in a vehicle as an example for illustration. For example Figure 10 , a schematic flow chart of the virtual image distance detection method provided by the present application in an application scenario is shown. In this embodiment, the detection of the virtual image distance of the head-up display device is taken as an example for illustration. Correspondingly, the image display board is the windshield for presenting the image projected by the head-up display device. This embodiment may include:

[0195] S1001. Based on the first adjustment step size, sequentially adjust the driving steps of the electric driving lens of the test camera within the initial driving step range, and control the electric driving lens to collect the test virtual images presented on the windshield at multiple different driving steps, so as to obtain multiple frames of candidate images collected by the test camera.

[0196] Among them, different candidate images correspond to different driving steps of the electric driving lens.

[0197] It can be understood that before performing step S1001, the head-up display device can be fixed to the head-up display stand first, and the relative spatial position between the head-up display device and the windshield can be adjusted to be consistent with the designed spatial relative position relationship between the two in the vehicle. Then, turn on the head-up display device, and let the user adjust the brightness of the head-up display device to a reasonable range according to experience, and then control the head-up display device to project a test virtual image onto the windshield.

[0198] Among them, the test virtual image is the virtual image projected by the head-up display module to be tested onto the windshield.

[0199] For example, the test virtual image can be a checkerboard pattern rotated by a set angle clockwise or counterclockwise. For example, the test virtual image can be a checkerboard, and the pattern obtained by rotating it 5 degrees clockwise, as Figure 5 shown. Among them, the side length dimension of the checkerboard in the checkerboard pattern can be reasonably set according to the virtual image size of the head-up display device. The basic principle is that the checkerboard pattern can cover the central field of view of the head-up display device.

[0200] In order to reduce the influence of the distortion of the head-up display device on the test result of the virtual image distance, in this application, the test virtual image can be the virtual image after inverse distortion processing to ensure that the projected test virtual image has no distortion or the distortion is as small as possible.

[0201] In addition, before step S1001, it is necessary to adjust the position of the test camera through the camera fixing device so that the optical center of the test camera is located at the set mid-eye position of the driver in the vehicle coordinate system.

[0202] In addition, the electric driving lens and the test camera can also be initialized so that the clarity of the test virtual image on the windshield collected by the electric driving lens meets the requirements of the naked eye. On this basis, the test camera can also be used to photograph the test virtual image (such as a checkerboard pattern) projected by the head-up display device onto the windshield, and observe whether the image quality of the photographed image meets the requirements. After judging that the image quality meets the requirements according to experience, then perform step S1001.

[0203] Among them, whether the image quality meets the requirements can be judged from the following four aspects:

[0204] 1) Test whether the virtual image is fully presented within the field of view of the test camera. If there is a missing virtual image in the field of view of the test camera, the installation positions of the head-up display device and the test camera need to be adjusted.

[0205] 2) Check whether there are problems such as incorrect tilt angles or uneven brightness in the virtual image captured by the test camera. If such a situation exists, the relative positions of the test camera and the head-up display device need to be adjusted.

[0206] 3) Check whether the center of the virtual image captured by the test camera coincides with the center of the image captured by the test camera. If they do not coincide, the relative positions of the test camera and the head-up display device need to be adjusted.

[0207] 4) Check whether the brightness of the image captured by the test camera is appropriate. If the image is too bright or too dark, the brightness of the captured image can be adjusted by adding or reducing attenuation filters, increasing or decreasing the exposure, etc.

[0208] S1002. For each candidate image, based on the coordinate region corresponding to the calibrated region of interest, determine the target candidate image region in the candidate image that belongs to the region of interest.

[0209] In this embodiment, since it is necessary to quickly locate the target driving step interval corresponding to the focus position of the electric drive lens first, the present application can obtain the coordinate region corresponding to the calibrated region of interest after obtaining the candidate image and before determining the clarity of the candidate image.

[0210] Among them, the specific implementation of calibrating the coordinate region corresponding to the region of interest can be as introduced before. For example, any one of the candidate images can be selected as the target reference image. After displaying the target reference image on the display interface, determine the region of interest marked by the user in the target reference image to obtain the coordinate region corresponding to the region of interest.

[0211] In this embodiment, the region of interest includes partial edge lines of two adjacent squares in the checkerboard pattern and partial regions of each of the two adjacent squares.

[0212] In this embodiment, the image region in the candidate image that is within the region of interest is called the target candidate image region.

[0213] S1003. Determine the clarity of the target candidate image region and determine the clarity of the candidate image as the clarity of the target candidate image region.

[0214] S1004. Based on the clarity of each candidate image and the driving steps corresponding to each of the multiple candidate images, determine the target driving step interval corresponding to the focus position of the motor-driven lens from the initial driving step interval.

[0215] S1005. Based on the second adjustment step size, within the target driving step range, sequentially adjust the driving steps of the electric driving lens of the test camera, and control the electric driving lens to collect the test virtual images presented on the windshield at multiple driving steps, so as to obtain multiple frames of reference images collected by the test camera.

[0216] Wherein, the second adjustment step size is smaller than the first adjustment step size.

[0217] Different reference images correspond to different driving steps.

[0218] S1006. For each frame of reference image, based on the coordinate region of the calibrated region of interest, determine the target image region within the region of interest in this reference image.

[0219] S1007. Determine the clarity of this target image region, and determine the clarity of this reference image as the clarity of this target image region.

[0220] S1008. Based on the clarity and driving steps corresponding to each reference image, use the polynomial fitting method to fit the curve function between the clarity of the reference image and the driving steps.

[0221] S1009. Based on this curve function, determine the target driving step corresponding to the focal position of this electric driving lens.

[0222] S1010. Based on the pre - constructed functional relationship between the driving steps and the virtual image distance, determine the target virtual image distance corresponding to this target driving step, and determine this target virtual image distance as the virtual image distance corresponding to the head - up display device.

[0223] In the embodiments of the present application, there is also provided a computer program product including computer - readable instructions. When the computer - readable instructions run on an electronic device, the electronic device implements any one of the methods for detecting the virtual image distance provided by the embodiments of the present application.

[0224] In the embodiments of the present application, there is also provided a computer - readable storage medium. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any one of the methods for detecting the virtual image distance provided by the embodiments of the present application.

[0225] It should be further noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the attached drawings of the device embodiments provided in this application, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines.

[0226] Through the description of the above embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by dedicated hardware including application-specific integrated circuits, dedicated CPUs, dedicated memories, dedicated components, etc. Generally, functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structures for implementing the same function can also be diverse, such as analog circuits, digital circuits or dedicated circuits, etc. However, for this application, software programs are more often the better implementation method. Based on such an understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk or optical disc of a computer, and includes several instructions to enable a computer device (which can be a personal computer, training device, or network device, etc.) to execute the methods described in various embodiments of this application.

[0227] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product.

[0228] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that can be stored by a computer or a data storage device such as a training device or a data center that includes one or more integrated available media. The available medium may be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)).

Claims

1. A virtual image distance detection method, characterized in that, Including: Controlling the electric drive lens of the test camera to collect the test virtual images presented on the image display board at different drive steps, obtaining multiple frames of reference images collected by the test camera, where different reference images correspond to different drive steps of the electric drive lens, and the test virtual image is the virtual image output by the optical display module to be tested to the image display board; Determining the clarity of the reference images; Based on the clarity of each reference image and the drive step corresponding to each reference image, determining the target drive step corresponding to the focal position of the electric drive lens; Based on the mapping relationship between the drive step and the virtual image distance, determining the target virtual image distance corresponding to the target drive step, and determining the target virtual image distance as the virtual image distance corresponding to the optical display module.

2. The virtual image distance detection method according to claim 1, wherein The determining the clarity of the reference images includes: Determining the target image area within the set region of interest in the reference image, where the target image area includes a first image area, a second image area, and an edge line between the first image area and the second image area. The first image area is composed of multiple pixel points with a first gray value, the second image area is composed of multiple pixel points with a second gray value, and the difference between the first gray value and the second gray value is greater than the set threshold; Determining the clarity of the target image area, and determining the clarity of the target image area as the clarity of the reference image.

3. The virtual image distance detection method according to claim 2, wherein The test virtual image is a checkerboard pattern rotated by a set angle clockwise or counterclockwise; Before determining the target image area within the set region of interest in the reference image, it further includes: Displaying the collected target reference image on the display interface, where the target reference image is any one of the multiple frames of reference images; Determining the region of interest marked by the user in the target reference image, obtaining the coordinate region corresponding to the region of interest, where the region of interest includes partial edge lines of two adjacent squares in the checkerboard pattern of the target reference image, and partial regions of each of the two adjacent squares; The determining the target image area within the set region of interest in the reference image includes: Based on the coordinate region of the region of interest, determining the target image area within the region of interest in the reference image.

4. The virtual image distance detection method according to claim 1, wherein The based on the clarity of each reference image and the drive step corresponding to each reference image, determining the target drive step corresponding to the focal position of the electric drive lens includes: Based on the clarity and drive step corresponding to each reference image, fitting a curve function between the clarity of the reference image and the drive step by using polynomial fitting; Based on the curve function, determining the target drive step corresponding to the focal position of the electric drive lens.

5. The virtual image distance detection method according to claim 1, characterized in that The controlling the electric drive lens of the test camera to collect the test virtual images presented on the image display board at different drive steps, obtaining multiple frames of reference images collected by the test camera, includes: Based on the first adjustment step size, within the set initial driving step number range, sequentially adjust the driving step number of the electric driving lens of the test camera, and control the electric driving lens to collect the test virtual images presented on the image display board at multiple different driving step numbers, to obtain multiple candidate images collected by the test camera, where different candidate images correspond to different driving step numbers of the electric driving lens; Determine the clarity of the candidate images; Based on the clarity of the candidate images and the driving step numbers corresponding to each of the multiple candidate images, determine, from the initial driving step number range, the target driving step number range corresponding to the motor driving lens being at the focal position; Based on the second adjustment step size, within the target driving step number range, sequentially adjust the driving step number of the electric driving lens of the test camera, and control the electric driving lens to collect the test virtual images presented on the image display board at multiple driving step numbers, to obtain multiple reference images collected by the test camera, where the second adjustment step size is smaller than the first adjustment step size.

6. The virtual image distance detection method according to claim 1, characterized in that The mapping relationship between the driving step number and the virtual image distance is a functional relationship between the driving step number and the virtual image distance; The functional relationship is obtained through the following method: Determine multiple test distances; For each test distance, when the actual distance between the test camera and the target physical object is the test distance, control the electric driving lens of the test camera to collect images of the target physical object at different test driving step numbers respectively, to obtain multiple object images collected by the test camera, where different frames of object images correspond to different test driving step numbers; Determine the clarity of each frame of object image; For each test distance, based on the clarity of each object image and the driving step number corresponding to each object image, determine the target test driving step number corresponding to the electric driving lens being at the focal position at the test distance; Taking the target test driving step number corresponding to each test distance as the driving step number corresponding to a virtual image distance, based on the target test driving step numbers corresponding to different test distances, fit the functional relationship between the target test driving step number and the test distance, and determine the functional relationship as the functional relationship between the driving step number and the virtual image distance.

7. The virtual image distance detection method according to claim 1, characterized in that The image display board is a windshield for installation on a vehicle; The test virtual image is a virtual image projected by the head-up display device to be tested onto the windshield; 8. A virtual image distance detection system, characterized in that, It includes: A test control device, a test camera, an image display board, and an optical display module to be tested; Wherein, the optical display module is used to output a test virtual image to the image display board; The image display board is used to present the test virtual image; The test camera has an electric driving lens, and the test camera is used to collect the test virtual image presented on the image display board through the electric driving lens under the control of the test control device; The test control device is used to execute the virtual image distance detection method according to any one of claims 1 to 7 above.

9. The virtual image distance detection system according to claim 8, wherein, The optical display module is a head-up display device for installation in a vehicle, and the head-up display device is located at the first coordinate position in the vehicle coordinate system of the vehicle for setting the head-up display device; The image display panel is a windshield for being disposed in the vehicle, facing the projection direction of the test virtual image projected by the head-up display device, and located at a second coordinate position for setting the windshield in the vehicle coordinate system; Wherein, the head-up display device is configured to project the test virtual image onto the windshield; The optical center of the test camera is located at the mid-eye position of the driver set in the vehicle coordinate system.

10. The virtual image distance detection system according to claim 9, characterized in that It further includes: A head-up display stand for mounting and fixing the head-up display device; And a camera fixing device for fixing the test camera.

Citation Information

Cited By

  • Virtual image distance determination system, method and device and storage medium

    CN121323935A