Method for adjusting depth of field of display screen of electronic rearview mirror, electronic equipment and medium
By calculating and adjusting the depth of field of the electronic rearview mirror display, the dizziness caused by the difference in the focal length of the electronic rearview mirror display and the human eye is solved, improving driving safety and lowering cost.
Patent Information
- Application Number
- CN202411591827.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2024-12-31
AI Technical Summary
The difference in focal length between the electronic rearview mirror display and the human eye causes the driver to feel dizzy when observing the rearview mirror for a long time, affecting driving safety.
The depth of field of the electronic rearview mirror display is calculated and adjusted based on the target vehicle image, vehicle license plate width, camera focal length, driver iris diameter and eye image to reduce the driver's vertigo. The specific steps include determining a first distance between the target vehicle and the electronic rearview mirror, a second distance between the driver's eye and the display screen, and a third distance between the driver's eye and the focus plane, and adjusting the display screen based on these distances depth of field.
It effectively reduces the driver's dizziness when observing the electronic rearview mirror, improves driving safety, and is cheaper than the method of distance measurement of lidar.
Smart Images

Figure CN119218106A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle electronic rearview mirrors, and in particular to a method for adjusting the depth of field of an electronic rearview mirror display screen, an electronic device, and a medium. Background Art
[0002] With the continuous development of automotive electronic technology, the application prospects of automotive electronic rearview mirrors are becoming more and more broad. It can not only improve the driver's field of vision and safety, but also integrate more driving assistance functions to provide drivers with a more comprehensive and convenient driving experience. In addition, with the gradual relaxation of relevant regulations and the increasing demand of consumers for intelligent vehicles, automotive electronic rearview mirrors are expected to become one of the standard configurations of future cars. However, there is a focal length difference between the display screen of the electronic rearview mirror and the human eye. This difference will cause the driver to constantly adjust the focus of the eyes when observing the rearview mirror for a long time, which will cause dizziness and affect driving safety. In addition, due to the difference between the focal length of the camera and the focal length of the human eye, the picture ratio on the display screen may be different from the actual scene, which further increases the driver's discomfort.
[0003] In view of this, this application is hereby filed. Summary of the invention
[0004] The purpose of the present application is to provide a method for adjusting the depth of field of an electronic rearview mirror display screen, an electronic device and a medium, so as to solve the problem in the prior art that the driver is prone to dizziness when observing the electronic rearview mirror display screen.
[0005] In order to achieve the above objectives, this application adopts the following technical solutions: In a first aspect, the present application provides a method for adjusting the depth of field of an electronic rearview mirror display screen, comprising: Determine a first distance between the target vehicle and the electronic rearview mirror according to the target vehicle image, the target vehicle license plate width, the target camera focal length, and the distance between the vehicle body camera and the electronic rearview mirror; determining a second distance between the driver's eyes and the electronic rearview mirror display screen based on the driver's iris diameter, the initial driver's eye image, and the focal length of the camera on the electronic rearview mirror display screen; determining a third distance between the driver's eye and the focus plane according to the second distance, the driver's iris diameter, the initial driver's eye image and the current driver's eye image; The depth of field of the electronic rearview mirror display screen is adjusted according to the first distance, the second distance and the third distance.
[0006] As a further preferred technical solution, the first distance between the target vehicle and the electronic rearview mirror is determined according to the target vehicle image, the target vehicle license plate width, the target camera focal length, and the distance between the vehicle body camera and the electronic rearview mirror, including: According to the target vehicle image, determine the pixel width of the target vehicle license plate and the pixel width of the target vehicle outer edge; Determining a fourth distance between the target camera and the target vehicle license plate according to the target vehicle license plate width, the target camera focal length, and the target vehicle license plate pixel width; Determine a fifth distance between the target camera and the target vehicle according to the fourth distance, the pixel width of the target vehicle outer edge and the pixel width of the target vehicle license plate; A first distance between the target vehicle and the electronic rearview mirror is determined according to the fifth distance and the distance between the vehicle body camera and the electronic rearview mirror.
[0007] As a further preferred technical solution, the fourth distance between the vehicle body camera and the target vehicle license plate is determined according to the target vehicle license plate width, the target camera focal length and the target vehicle license plate pixel width, including: The target vehicle license plate width, the target camera focal length and the target vehicle license plate pixel width are input into a fourth relationship to obtain a fourth distance between the target camera and the target vehicle license plate. The fourth relationship is pre-calibrated using a fourth reference distance measured by a rangefinder.
[0008] As a further preferred technical solution, determining the fifth distance between the target camera and the target vehicle according to the fourth distance, the pixel width of the target vehicle outer edge, and the pixel width of the target vehicle license plate includes: The fourth distance, the target vehicle target outer edge pixel width and the target vehicle license plate pixel width are input into a fifth relationship to determine the fifth distance between the target camera and the target vehicle. The fifth relationship is calibrated in advance using the fifth reference distance measured by a rangefinder.
[0009] As a further preferred technical solution, determining a third distance between the driver's eyes and the focusing plane according to the second distance, the driver's iris diameter, the initial driver's eye image and the current driver's eye image includes: Determine the driver's eye focal length according to the second distance, the driver's iris diameter and the initial driver's eye image; Determining a rotation angle of the driver's eyes according to the initial driver's eye image and the current driver's eye image; A third distance between the driver's eyes and the focusing plane is determined according to the driver's eye focal length and the driver's eye rotation angle.
[0010] As a further preferred technical solution, the determining the focal length of the driver's eye according to the second distance, the driver's iris diameter and the initial driver's eye image includes: Determining the driver's iris pixel diameter and the driver's pupil pixel diameter according to the initial driver's eye image; Determining the driver's pupil diameter according to the driver's iris pixel diameter, the driver's pupil pixel diameter and the driver's iris diameter; The focal length of the driver's eye is determined according to the second distance, the driver's pupil pixel diameter and the driver's pupil diameter.
[0011] As a further preferred technical solution, adjusting the depth of field of the electronic rearview mirror display screen according to the first distance, the second distance and the third distance includes: When the difference between the first distance and the second distance subtracted from the third distance is greater than zero, controlling the depth of field of the electronic rearview mirror display screen to be adjusted inwards; When the difference between the first distance and the second distance subtracted from the third distance is equal to zero, controlling the depth of field of the electronic rearview mirror display screen not to be adjusted; When the difference between the first distance and the second distance subtracted from the third distance is less than zero, the depth of field of the electronic rearview mirror display screen is controlled to be adjusted outward.
[0012] As a further preferred technical solution, the method further includes: responding to a depth of field adjustment on / off instruction, controlling the on / off of the depth of field adjustment function of the electronic rearview mirror display screen; the depth of field adjustment on / off instruction includes a voice instruction or a touch instruction.
[0013] In a second aspect, the present application provides an electronic device, including: at least one processor, and a memory communicatively coupled to at least one of the processors; The memory stores instructions that can be executed by at least one of the processors, and the instructions are executed by at least one of the processors so that at least one of the processors can perform the above method.
[0014] In a third aspect, the present application provides a computer-readable storage medium, on which computer instructions are stored, and the computer instructions are used to enable a computer to execute the above method.
[0015] Compared with the prior art, the beneficial effects of this application are: The electronic rearview mirror display screen depth adjustment method provided by the present application determines the first distance between the target vehicle and the electronic rearview mirror according to the target vehicle image, the target vehicle license plate width, the target camera focal length, and the distance between the body camera and the electronic rearview mirror; determines the second distance between the driver's eyes and the electronic rearview mirror display screen according to the driver's iris diameter, the initial driver's eye image, and the focal length of the camera on the electronic rearview mirror display screen; determines the third distance between the driver's eyes and the focal plane according to the second distance, the driver's pupil diameter, the initial driver's eye image, and the current driver's eye image; and adjusts the depth of field of the electronic rearview mirror display screen according to the first distance, the second distance, and the third distance. The method can determine the first distance, the second distance, and the third distance according to a specific image, the focal length of the target camera, and the specific driver's characteristics, etc., which is less costly than the method of using laser radar ranging. The depth of field of the electronic rearview mirror display screen is adjusted based on the first distance, the second distance, and the third distance, so that when the driver switches between the display screen perspective and the vehicle front window perspective, the pupil focal length changes less and the dizziness is reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0017] Figure 1 It is a flow chart of the method for adjusting the depth of field of the electronic rearview mirror display screen provided by the present application; Figure 2 It is a structural schematic diagram of the depth of field adjustment device for the electronic rearview mirror display screen provided by the present application; Figure 3 It is a structural schematic diagram of the depth of field adjustment system of the electronic rearview mirror display screen provided by the present application; Figure 4 It is a structural schematic diagram of the electronic device provided by this application. DETAILED DESCRIPTION
[0018] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0019] In this application, the body camera is the body camera of the vehicle, the electronic rearview mirror is the electronic rearview mirror of the vehicle, and the vehicle is the vehicle to which the electronic rearview mirror display screen depth adjustment method is applied. The distances mentioned are all X-direction distances, that is, the distances in the X direction of the vehicle coordinate system, and the X direction is the direction pointing to the front of the vehicle.
[0020] As mentioned in the background technology, the prior art has the problem that the driver is prone to dizziness when observing the electronic rearview mirror display screen. In this regard, the present application automatically adjusts the depth of field of the electronic rearview mirror display screen based on the target vehicle image, the target vehicle license plate width, the target camera focal length, the distance between the vehicle body camera and the electronic rearview mirror, the driver's iris diameter, the camera focal length on the electronic rearview mirror display screen, the driver's pupil diameter, the initial driver's eye image and the current driver's eye image to reduce the driver's dizziness. The present application is further described in detail below in conjunction with the embodiments.
[0021] Example 1 Figure 1 This is a flow chart of a method for adjusting the depth of field of an electronic rearview mirror display screen provided in this embodiment. The method can be executed by an electronic rearview mirror display screen depth of field adjustment device, which can be composed of software and / or hardware and is generally integrated in an electronic device. The electronic device can be a vehicle computer or other mobile terminal (such as a smart phone, tablet computer, etc.). For ease of understanding, each step in the adjustment method of this embodiment is executed by the vehicle computer.
[0022] like Figure 1 As shown, this embodiment provides a method for adjusting the depth of field of an electronic rearview mirror display screen, comprising the following steps: S110, determining a first distance between the target vehicle and the electronic rearview mirror according to the target vehicle image, the width of the target vehicle license plate, the focal length of the target camera, and the distance between the vehicle body camera and the electronic rearview mirror.
[0023] Among them, the "target vehicle image" refers to the image of the vehicle closest to the vehicle in all directions captured by the body camera or the camera outside the electronic rearview mirror. The various directions include the rear, the left rear, and the right rear. If there are three vehicles behind the vehicle, the target vehicle is the vehicle closest to the vehicle among the three vehicles. If there are two vehicles behind the side of the vehicle, the target vehicle is the vehicle closest to the vehicle among the two vehicles.
[0024] The "target vehicle license plate width" can be obtained from a preset license plate width table, which contains standard license plate widths for various types of vehicles, such as a motorcycle front license plate size of 220mm×95mm, a rear license plate size of 220mm×140mm, and a car license plate size of 440mm×140mm. Therefore, this embodiment also includes the steps of identifying the target vehicle type based on the target vehicle image, and then determining the target vehicle license plate width based on the target vehicle type. As for the specific method of identifying the target vehicle type based on the target vehicle image, any achievable method in the prior art can be adopted, and this embodiment does not make any special restrictions. For example, the target vehicle image can be input into a vehicle type matching database for matching to obtain the target vehicle type, and the vehicle type matching database stores images of different vehicle types.
[0025] "Focal length of target camera" is the focal length of the camera that collects the target vehicle image. If the target vehicle is directly behind the vehicle, the target camera is the rear body camera of the vehicle. If the target vehicle is behind the side of the vehicle, the target camera is the external camera of the electronic rearview mirror.
[0026] The "distance between the body camera and the electronic rearview mirror" is related to the vehicle's own configuration and is known data.
[0027] In an optional implementation, determining a first distance between the target vehicle and the electronic rearview mirror according to the target vehicle image, the target vehicle license plate width, the target camera focal length, and the distance between the vehicle body camera and the electronic rearview mirror includes: According to the target vehicle image, determine the pixel width of the target vehicle license plate and the pixel width of the target vehicle outer edge; Determining a fourth distance between the vehicle body camera and the target vehicle license plate according to the target vehicle license plate width, the target camera focal length, and the target vehicle license plate pixel width; Determine a fifth distance between the vehicle body camera and the target vehicle based on the fourth distance, the pixel width of the target vehicle's target outer edge, and the pixel width of the target vehicle's license plate; A first distance between the target vehicle and the electronic rearview mirror is determined according to the fifth distance and the distance between the vehicle body camera and the electronic rearview mirror.
[0028] Among them, "target vehicle license plate pixel width" is the horizontal pixel number of the target vehicle license plate image in the target vehicle image. "Target vehicle target outer edge pixel width" is the horizontal pixel number of the target vehicle target outer edge image in the target vehicle image. The target outer edge is the outer edge used to determine the distance between the host vehicle and the target vehicle. For example, when the target vehicle is directly behind or to the side of the host vehicle, the target outer edge is the lower edge of the target vehicle's front.
[0029] This implementation method first determines the pixel width of the target vehicle license plate and the pixel width of the target vehicle target outer edge based on the target vehicle image, and then determines the fourth distance between the body camera and the target vehicle license plate, and the fifth distance between the body camera and the target vehicle, and finally obtains the first distance between the target vehicle and the electronic rearview mirror. This method combines the specific pixel width (such as the pixel width of the target vehicle license plate), focal length (such as the focal length of the target camera), specific real width (such as the width of the target vehicle license plate) and specific real distance (such as the distance between the body camera and the electronic rearview mirror) in the image, and the first distance obtained is more reliable. And the reason why the fourth distance is determined first and then the fifth distance is determined is that the width of the outer edge of different vehicles is different and the difference is large. Based on the width of the target vehicle license plate, known information can be used more effectively to calculate, reducing the difficulty of calculation.
[0030] In an optional implementation, determining the pixel width of the target vehicle license plate and the pixel width of the target vehicle outer edge according to the target vehicle image includes: The target vehicle image is subjected to edge detection in sequence, the target vehicle contour is found, the license plate contour and the target outer edge contour are found, the license plate contour bounding box and the target outer edge contour bounding box are calculated, the license plate area and the target outer edge area are intercepted, and the target vehicle license plate pixel width and the target vehicle target outer edge pixel width are determined.
[0031] This embodiment obtains the pixel width of the target vehicle license plate and the pixel width of the target vehicle outer edge by performing a series of operations on the target vehicle image. Among them, edge detection, finding the target vehicle outline, finding the license plate outline and finding the target outer edge outline, calculating the license plate outline bounding box and the target outer edge outline bounding box, and intercepting the license plate area and the target outer edge area can all be implemented in any existing manner, and this embodiment does not impose any special restrictions.
[0032] In an optional implementation, the fourth distance D4 is calculated using the following formula: D4=W4×F4 / P4 (1), where W4 is the width of the target vehicle license plate, F4 is the focal length of the target camera, and P4 is the pixel width of the target vehicle license plate; The fifth distance D5 is calculated using the following formula: D5=D5×P5 / P4 (2), where P5 is the pixel width of the target vehicle’s outer edge; The first distance D1 is calculated using the following formula: D1=D5+D7 (where D7 is the distance between the body camera and the electronic rearview mirror when the target vehicle is directly behind the vehicle) Formula (3) or D1=D5 (when the target vehicle is to the side and rear of the vehicle) Formula (4).
[0033] When the target vehicle is directly behind the vehicle, the image of the target vehicle is collected by the vehicle's rear body camera (referred to as the body camera in this article), so the fifth distance is actually the distance between the body camera and the target vehicle. Therefore, the first distance between the target vehicle and the electronic rearview mirror also needs to add the distance between the body camera and the electronic rearview mirror on the basis of the fifth distance. When the target vehicle is to the side and rear of the vehicle, the image of the target vehicle is collected by the electronic rearview mirror's exterior camera, so the fifth distance is actually the distance between the electronic rearview mirror's exterior camera and the target vehicle, which is equal to the first distance between the target vehicle and the electronic rearview mirror. The above fourth and fifth distances only consider the image and the focal length of the target camera when calculating, and there may be certain errors in the actual calculation, so other methods can be used for calculation.
[0034] Optionally, determining a fourth distance between the vehicle body camera and the target vehicle license plate according to the target vehicle license plate width, the target camera focal length, and the target vehicle license plate pixel width includes: The target vehicle license plate width, the target camera focal length and the target vehicle license plate pixel width are input into a fourth relationship to obtain a fourth distance between the target camera and the target vehicle license plate. The fourth relationship is pre-calibrated using a fourth reference distance measured by a rangefinder.
[0035] This method uses a fourth relationship when determining the fourth distance. The relationship is calibrated in advance using a fourth reference distance measured by a rangefinder. The distance measured by the rangefinder is usually more accurate and reliable. Therefore, the fourth relationship obtained by calibrating the fourth reference distance measured by the rangefinder is also more accurate and reliable. The rangefinder is, for example, a laser rangefinder, a photoelectric rangefinder, or an electronic rangefinder. The fourth reference distance is the actual distance between the target camera and the license plate of the target vehicle.
[0036] The fourth relationship can be obtained by adding a correction coefficient to the formula (1), that is, D4=K4×W4×F4 / P4 (5), where K4 is the fourth correction coefficient.
[0037] Optionally, determining a fifth distance between the target camera and the target vehicle according to the fourth distance, the pixel width of the target vehicle's target outer edge, and the pixel width of the target vehicle's license plate includes: The fourth distance, the pixel width of the target vehicle's target outer edge and the pixel width of the target vehicle's license plate are input into the fifth relationship to determine the fifth distance between the target camera and the target vehicle. The fifth relationship is calibrated in advance using the fifth reference distance measured by the rangefinder.
[0038] The determination of the fifth distance and the construction of the fifth relational expression are similar to the determination of the fourth distance and the construction of the fourth relational expression, and thus will not be described in detail. The fifth reference distance is the actual distance between the target camera and the target vehicle.
[0039] The fifth relationship can be obtained by adding a correction coefficient to the formula (2), that is, D5=K5×D5×P5 / P4 (6), where K5 is the fifth correction coefficient.
[0040] S120: Determine a second distance between the driver's eyes and the electronic rearview mirror display screen according to the driver's iris diameter, the initial driver's eye image, and the focal length of the camera on the electronic rearview mirror display screen.
[0041] The "driver's iris diameter" can be the driver's own iris diameter pre-entered by the driver into the depth of field adjustment device of the electronic rearview mirror display screen, or the average iris diameter of an adult (11.7mm). The "initial driver's eye image" is the image of the driver's eyes captured by the camera integrated on the electronic rearview mirror display screen when the driver looks directly at the camera. The "focal length of the camera on the electronic rearview mirror display screen" is the focal length of the camera integrated on the electronic rearview mirror display screen.
[0042] In an optional implementation, determining a second distance between the driver's eyes and the electronic rearview mirror display screen according to the driver's iris diameter, the initial driver's eye image, and the focal length of the camera on the electronic rearview mirror display screen includes: Determine the driver's iris pixel diameter according to the initial driver's eye image; A second distance between the driver's eyes and the electronic rearview mirror display screen is determined based on the driver's iris diameter, the focal length of the camera on the electronic rearview mirror display screen, and the driver's iris pixel diameter.
[0043] The "driver iris pixel diameter" is the number of pixels of the driver iris diameter in the initial driver eye image. The specific method of determining the driver iris pixel diameter based on the initial driver eye image is similar to determining the pixel width of the target vehicle license plate, which will not be repeated here.
[0044] Optionally, the second distance D2 is calculated using the following formula: D2=W2×F2 / P2 (7), where W2 is the driver's iris diameter, F2 is the focal length of the camera on the electronic rearview mirror display, and P2 is the driver's iris pixel diameter.
[0045] Similarly, determining a second distance between the driver's eyes and the electronic rearview mirror display screen according to the driver's iris diameter, the focal length of the camera on the electronic rearview mirror display screen, and the driver's iris pixel diameter includes: The driver's iris diameter, the focal length of the camera on the electronic rearview mirror display screen and the driver's iris pixel diameter are input into the second relationship to determine the second distance between the driver's eyes and the electronic rearview mirror display screen. The second relationship is calibrated in advance using the second reference distance measured by the rangefinder.
[0046] The second reference distance is the actual distance between the driver's eyes and the electronic rearview mirror display screen.
[0047] The second relationship can be obtained by adding a correction coefficient to the equation (7), that is, D2=K2×W2×F2 / P2 (8), where K2 is the second correction coefficient.
[0048] S130: Determine a third distance between the driver's eyes and the focusing plane according to the second distance, the driver's iris diameter, the initial driver's eye image, and the current driver's eye image.
[0049] Among them, the focus plane refers to the plane where the driver's eyes are focused. If the driver's eyes are focused on the rear of the vehicle in front, the focus plane is the vertical plane where the rear of the vehicle in front is located (i.e., the plane perpendicular to the road surface). The current driver's eye image refers to the image of the driver's eyes at the current moment captured by the camera integrated on the electronic rearview mirror display. If the driver is looking at the front of the vehicle at the current moment, the current driver's eye image is different from the initial driver's eye image, which is mainly reflected in the change of the eye angle.
[0050] In an optional implementation, determining a third distance between the driver's eye and the focusing plane according to the second distance, the driver's iris diameter, and the initial driver's eye image comprises: Determining the driver's eye focal length according to the second distance, the driver's iris diameter and the initial driver's eye image; Determining a driver's eye rotation angle according to an initial driver's eye image and a current driver's eye image; A third distance between the driver's eyes and the focusing plane is determined according to the driver's eye focal length and the driver's eye rotation angle.
[0051] In this embodiment, the focal length of the driver's eyes and the rotation angle of the driver's eyes are first determined, and then the third distance between the driver's eyes and the focusing plane is determined based on the determined third distance, and the obtained third distance is more accurate.
[0052] According to the initial driver eye image and the current driver eye image, the driver's eye rotation angle can be determined by the MediaPipe Iris model. The MediaPipe Iris model is based on the research of MediaPipe Face Mesh, and tracks key points involving iris, pupil and eye contour in real time through a single RGB camera. The first step is to use MediaPipe Face Mesh to generate a mesh that approximates the facial geometry, from which the eye area in the original image is extracted for the subsequent iris tracking step. The MediaPipe Iris model can output 478 3D landmarks around the eyes, including 468 facial landmarks and 10 iris landmarks (5 for each eye), and pupil landmarks. These landmarks include key points of the eye contour, which can be used to analyze the position and movement of the eyes. The rotation angle of the eye can be estimated by the change in the position of the eye key points in consecutive frames. For example, the rotation angle of the eye can be estimated by comparing the change in the pupil position in consecutive frames, and the key point data can be analyzed in time series to track the movement of the eye. The rotation angle of the eye can be calculated using geometric methods. For example, the rotation angle can be estimated by calculating the change in the vector formed by the eye key points between different frames. MediaPipe Iris can also determine the distance between the object and the camera with a relative error of less than 10%, which can further help analyze the eye's accommodation state and thus more accurately estimate the eye's rotation angle.
[0053] In an optional implementation, determining the driver's eye focal length according to the second distance, the driver's iris diameter and the initial driver's eye image includes: Determining the driver's iris pixel diameter and the driver's pupil pixel diameter according to the initial driver's eye image; Determining the driver's pupil diameter according to the driver's iris pixel diameter, the driver's pupil pixel diameter and the driver's iris diameter; The focal length of the driver's eye is determined according to the second distance, the driver's pupil pixel diameter and the driver's pupil diameter.
[0054] In this embodiment, the method of determining the driver's iris pixel diameter and the driver's pupil pixel diameter based on the initial driver's eye image is similar to the method of determining the target vehicle license plate pixel width based on the target vehicle image, and will not be repeated here.
[0055] The driver's pupil diameter d1 can be calculated using the following formula: d1=A1×d2 / A2 (9), where A1 is the driver's pupil pixel diameter, d2 is the driver's iris diameter, and A2 is the driver's iris pixel diameter.
[0056] The focal length F3 of the driver's eye can be calculated using the following formula: F3=D2×A1 / d1 (10).
[0057] Similarly, according to the focal length of the driver's eyes and the rotation angle of the driver's eyes, a third distance between the driver's eyes and the focusing plane is determined, including: The focal length of the driver's eye and the rotation angle of the driver's eye are input into a third relationship to obtain a third distance between the driver's eye and the focusing plane. The third relationship is pre-calibrated using a third reference distance measured by a rangefinder.
[0058] The third reference distance is the actual distance between the driver's eyes and the focusing plane.
[0059] S140: Adjust the depth of field of the electronic rearview mirror display screen according to the first distance, the second distance, and the third distance.
[0060] In an optional implementation, adjusting the depth of field of the electronic rearview mirror display screen according to the first distance, the second distance, and the third distance includes: When the difference between the first distance and the second distance subtracted from the third distance is greater than zero, controlling the depth of field of the electronic rearview mirror display screen to adjust inwards; When the difference between the first distance and the second distance subtracted from the third distance is equal to zero, the depth of field of the electronic rearview mirror display screen is controlled not to be adjusted; When the difference between the third distance and the first distance and the second distance is less than zero, the depth of field of the electronic rearview mirror display screen is controlled to be adjusted outward.
[0061] Optionally, the distance for adjusting the depth of field inward is the difference between the third distance and the first distance and the second distance, and the distance for adjusting the depth of field outward is the absolute value of the difference between the third distance and the first distance and the second distance.
[0062] In an optional embodiment, the method further includes: responding to the depth of field adjustment on-off instruction, controlling the opening or closing of the depth of field adjustment function of the electronic rearview mirror display screen; the depth of field adjustment on-off instruction includes a voice instruction or a touch instruction. The depth of field adjustment method of the electronic rearview mirror display screen in this embodiment can automatically turn on the depth of field adjustment function of the electronic rearview mirror display screen after the vehicle is started. If there are passengers in the vehicle participating in the use of the electronic rearview mirror display screen or the driver / passenger has other needs, the depth of field adjustment on-off instruction can be used to control the closing of the depth of field adjustment function. If it needs to be opened again, the depth of field adjustment function can also be turned on by the depth of field adjustment on-off instruction. It can be understood that when the control is closed or the control is opened, the specific content of the instruction is different. For example, when the control is closed, the voice instruction can be "please turn off the depth of field adjustment function", and when the control is opened, the voice instruction can be "please turn on the depth of field adjustment function". After the depth of field adjustment device of the electronic rearview mirror display screen recognizes the above instructions, it can execute the operation corresponding to the instruction.
[0063] The above method can determine the first distance, the second distance and the third distance according to a specific image, the focal length of the target camera and the specific driver characteristics, which is less costly than the method of using a laser radar to measure distance. The depth of field of the electronic rearview mirror display screen is adjusted based on the first distance, the second distance and the third distance, so that when the driver switches between the display screen perspective and the vehicle front window perspective, the pupil focal length changes less and the feeling of dizziness is reduced.
[0064] Example 2 like Figure 2 As shown, this embodiment provides a device for adjusting the depth of field of an electronic rearview mirror display screen, comprising: A first distance determination module 101 is used to determine a first distance between a target vehicle and the electronic rearview mirror according to a target vehicle image, a target vehicle license plate width, a target camera focal length, and a distance between a vehicle body camera and the electronic rearview mirror; A second distance determination module 102, for determining a second distance between the driver's eyes and the electronic rearview mirror display screen according to the driver's iris diameter, the initial driver's eye image and the focal length of the camera on the electronic rearview mirror display screen; The third distance determination module 103 is used to determine the third distance between the driver's eye and the focus plane according to the second distance, the driver's iris diameter, the initial driver's eye image and the current driver's eye image. The depth of field adjustment module 104 is used to adjust the depth of field of the electronic rearview mirror display screen according to the first distance, the second distance and the third distance.
[0065] The device is used to execute the above method, and thus has at least functional modules and beneficial effects corresponding to the above method.
[0066] Optionally, the adjustment device also includes a depth of field adjustment function on / off control module, which is used to respond to the depth of field adjustment on / off instructions to control the on / off of the electronic rearview mirror display screen depth of field adjustment function; the depth of field adjustment on / off instructions include voice instructions or touch instructions.
[0067] Example 3 like Figure 4 As shown, this embodiment provides an electronic rearview mirror display screen depth adjustment system, including: an electronic rearview mirror display screen depth adjustment device 201, an electronic rearview mirror vehicle exterior camera 202, a vehicle body camera 203, and an electronic rearview mirror display screen 204, wherein the electronic rearview mirror display screen depth adjustment device 201 is respectively connected to the electronic rearview mirror vehicle exterior camera 202, the vehicle body camera 203, and the electronic rearview mirror display screen 204. The electronic rearview mirror display screen depth adjustment device 201 adopts the electronic rearview mirror display screen depth adjustment device of Example 2.
[0068] The system includes the above-mentioned electronic rearview mirror display screen depth of field adjustment device, and thus has at least the beneficial effects corresponding to the above-mentioned device.
[0069] Example 4 like Figure 4 As shown, this embodiment provides an electronic device, including: at least one processor; and a memory communicatively connected to at least one processor; wherein, The memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor so that at least one processor can perform the above method. At least one processor in the electronic device can perform the above method, and thus has at least the same advantages as the above method.
[0070] Optionally, the electronic device also includes interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on a memory to display graphical information of a GUI (Graphical User Interface) on an external input / output device (such as a display device coupled to an interface). In other embodiments, if necessary, multiple processors can be used together with multiple memories, and / or multiple buses can be used together with multiple memories. Similarly, multiple electronic devices can be connected (for example, as a server array, a group of blade servers, or a multi-processor system), and each device provides some necessary operations. Figure 4 A processor 301 is taken as an example.
[0071] The memory 302, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as the program instructions / modules corresponding to the method for adjusting the depth of field of the electronic rearview mirror display screen in the embodiment of the present application (for example, the first distance determination module, the second distance determination module, the third distance determination module, and the depth of field adjustment module in the device for adjusting the depth of field of the electronic rearview mirror display screen). The processor 301 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 302, that is, realizes the above-mentioned method for adjusting the depth of field of the electronic rearview mirror display screen.
[0072] The memory 302 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 302 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 302 may further include a memory remotely arranged relative to the processor 301, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0073] The electronic device may further include: an input device 303 and an output device 304. The processor 301, the memory 302, the input device 303 and the output device 304 may be connected via a bus or other means. Figure 4 The example of connecting through bus is taken in the following.
[0074] The input device 303 can receive input digital or character information, and the output device 304 can include a display device, an auxiliary lighting device (e.g., LED), and a tactile feedback device (e.g., a vibration motor), etc. The display device can include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display, and a plasma display. In some embodiments, the display device can be a touch screen.
[0075] Example 5 This embodiment provides a computer-readable storage medium, on which computer instructions are stored, and the computer instructions are used to enable a computer to execute the above method. The computer instructions on the computer-readable storage medium are used to enable a computer to execute the above method, and thus have at least the same advantages as the above method.
[0076] The medium in this application may adopt any combination of one or more computer-readable media. The medium may be a computer-readable signal medium or a computer-readable storage medium. The medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples of the medium (a non-exhaustive list) include: an electrical connection with one or more wires, 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 thereof. In this document, the medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device, or device.
[0077] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0078] The program code contained on the computer-readable medium can be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, RF (Radio Frequency), etc., or any suitable combination of the above.
[0079] Computer program code for performing the operation of the present application can be written in one or more programming languages or a combination thereof, 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 (e.g., using an Internet service provider to connect through the Internet).
[0080] 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 recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution disclosed in this application can be achieved, and this document is not limited here.
[0081] The above specific implementations do not constitute a limitation on the protection scope of this application. 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 modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.
Claims
1. A method for adjusting the depth of field of an electronic rearview mirror display screen, characterized in that: include: Determine a first distance between the target vehicle and the electronic rearview mirror according to the target vehicle image, the target vehicle license plate width, the target camera focal length, and the distance between the vehicle body camera and the electronic rearview mirror; determining a second distance between the driver's eyes and the electronic rearview mirror display screen based on the driver's iris diameter, the initial driver's eye image, and the focal length of the camera on the electronic rearview mirror display screen; determining a third distance between the driver's eye and the focus plane according to the second distance, the driver's iris diameter, the initial driver's eye image and the current driver's eye image; The depth of field of the electronic rearview mirror display screen is adjusted according to the first distance, the second distance and the third distance.
2. The method for adjusting the depth of field of the electronic rearview mirror display screen according to claim 1, characterized in that: Determining a first distance between the target vehicle and the electronic rearview mirror according to the target vehicle image, the target vehicle license plate width, the target camera focal length, and the distance between the vehicle body camera and the electronic rearview mirror includes: According to the target vehicle image, determine the pixel width of the target vehicle license plate and the pixel width of the target vehicle outer edge; Determining a fourth distance between the target camera and the target vehicle license plate according to the target vehicle license plate width, the target camera focal length, and the target vehicle license plate pixel width; Determine a fifth distance between the target camera and the target vehicle according to the fourth distance, the pixel width of the target vehicle outer edge and the pixel width of the target vehicle license plate; A first distance between the target vehicle and the electronic rearview mirror is determined according to the fifth distance and the distance between the vehicle body camera and the electronic rearview mirror.
3. The method for adjusting the depth of field of the electronic rearview mirror display screen according to claim 2, characterized in that: The step of determining a fourth distance between the vehicle body camera and the target vehicle license plate according to the target vehicle license plate width, the target camera focal length, and the target vehicle license plate pixel width comprises: The target vehicle license plate width, the target camera focal length and the target vehicle license plate pixel width are input into a fourth relationship to obtain a fourth distance between the target camera and the target vehicle license plate. The fourth relationship is pre-calibrated using a fourth reference distance measured by a rangefinder.
4. The method for adjusting the depth of field of the electronic rearview mirror display screen according to claim 2, characterized in that: Determining a fifth distance between the target camera and the target vehicle according to the fourth distance, the pixel width of the target vehicle outer edge, and the pixel width of the target vehicle license plate includes: The fourth distance, the target vehicle target outer edge pixel width and the target vehicle license plate pixel width are input into a fifth relationship to determine the fifth distance between the target camera and the target vehicle. The fifth relationship is calibrated in advance using the fifth reference distance measured by a rangefinder.
5. The method for adjusting the depth of field of an electronic rearview mirror display screen according to claim 1, characterized in that: The step of determining a third distance between the driver's eye and the focusing plane according to the second distance, the driver's iris diameter, the initial driver's eye image, and the current driver's eye image comprises: Determine the driver's eye focal length according to the second distance, the driver's iris diameter and the initial driver's eye image; Determining a rotation angle of the driver's eyes according to the initial driver's eye image and the current driver's eye image; A third distance between the driver's eyes and the focusing plane is determined according to the driver's eye focal length and the driver's eye rotation angle.
6. The method for adjusting the depth of field of the electronic rearview mirror display screen according to claim 5, characterized in that: The step of determining the driver's eye focal length according to the second distance, the driver's iris diameter and the initial driver's eye image comprises: Determining the driver's iris pixel diameter and the driver's pupil pixel diameter according to the initial driver's eye image; Determining the driver's pupil diameter according to the driver's iris pixel diameter, the driver's pupil pixel diameter and the driver's iris diameter; The focal length of the driver's eye is determined according to the second distance, the driver's pupil pixel diameter and the driver's pupil diameter.
7. The method for adjusting the depth of field of an electronic rearview mirror display screen according to claim 1, characterized in that: The step of adjusting the depth of field of the electronic rearview mirror display screen according to the first distance, the second distance, and the third distance includes: When the difference between the first distance and the second distance subtracted from the third distance is greater than zero, controlling the depth of field of the electronic rearview mirror display screen to adjust inwards; When the difference between the first distance and the second distance subtracted from the third distance is equal to zero, controlling the depth of field of the electronic rearview mirror display screen not to be adjusted; When the difference between the first distance and the second distance subtracted from the third distance is less than zero, the depth of field of the electronic rearview mirror display screen is controlled to be adjusted outward.
8. The method for adjusting the depth of field of an electronic rearview mirror display screen according to claim 1, characterized in that: The method further includes: responding to a depth of field adjustment on / off instruction, controlling to turn on or off a depth of field adjustment function of the electronic rearview mirror display screen; the depth of field adjustment on / off instruction includes a voice instruction or a touch instruction.
9. An electronic device, characterized in that: include: at least one processor, and a memory communicatively coupled to at least one of the processors; The memory stores instructions executable by at least one of the processors, and the instructions are executed by at least one of the processors so that the at least one processor can execute the method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 8.
