Method and device for measuring distance between human eyes and display equipment and electronic equipment

By monitoring the usage data of the display device and selecting suitable distance measurement methods (binary or monocular), accurate distance measurement between the human eye and the display device is achieved, the problem of vision damage is solved and the user's awareness of vision protection is improved.

CN119492353AActive Publication Date: 2025-02-21GUANGZHOU SHIYUAN ELECTRONICS CO LTD +2
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202311055340.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-21
Publication Date
2025-02-21
Estimated Expiration
2043-08-21

AI Technical Summary

Technical Problem

The prior art is difficult to effectively solve the problem of vision damage caused by too close distance between the human eye and the display device, especially among adolescent users, which are prone to myopia or worsening myopia.

Method used

By monitoring the usage data of the display device, it is determined whether the binocular distance measurement conditions are met. If they are satisfied, the binocular distance measurement method is adopted. If they are not satisfied, the monocular distance measurement method is adopted to achieve the distance measurement between the human eye and the display device.

Benefits of technology

It improves the accuracy and efficiency of distance measurement between the human eye and the display device, and can obtain distance measurement results in real time and accurately, reminding users to maintain appropriate distances to protect their vision.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119492353A_ABST
    Figure CN119492353A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a distance measurement method and device between human eyes and display equipment, electronic equipment and a storage medium, and the method comprises the steps: obtaining the use data of a display screen, judging whether the use data meets a binocular distance measurement condition, if yes, carrying out the distance measurement between the human eyes and the display equipment through employing a binocular distance measurement method, and if not, carrying out the distance measurement between the human eyes and the display equipment through employing a binocular distance measurement method. A monocular distance measurement method is adopted to measure the distance between the human eyes and the display device. The method comprises the following steps: analyzing use data of a display screen, judging whether the use data meets a binocular distance measurement condition or not, if the condition is met, carrying out distance measurement between human eyes and display equipment by adopting a binocular distance measurement method with relatively high precision, and if the condition is not met, carrying out distance measurement between the human eyes and the display equipment by adopting a monocular distance measurement method with relatively short time consumption. The distance measurement processing between the human eyes and the display equipment is performed in a targeted manner, so that the distance measurement result is accurately obtained in real time, and the accuracy and efficiency of distance measurement between the human eyes and the display equipment are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a distance measurement method, device, electronic device and storage medium between a human eye and a display device. Background Art

[0002] At present, with the popularity of electronic devices such as computers, smart phones, tablets, etc., people's work, entertainment and life are heavily dependent on electronic screens, that is, display screens. When the distance between the human eye and the display device is too close, it will cause vision damage, especially when teenagers do not pay attention to keep their eyes away from the display screen, it is very easy to cause myopia or worsen myopia. Summary of the invention

[0003] Based on this, the present application provides a method, device, electronic device and storage medium for measuring the distance between the human eye and the display device, which can improve the accuracy and efficiency of the distance measurement between the human eye and the display device.

[0004] As a first aspect of an embodiment of the present application, a method for measuring distance between a human eye and a display device is provided, comprising the following steps:

[0005] Monitoring usage data of the display device, and determining whether the usage data meets binocular ranging conditions;

[0006] Determine whether the usage data meets the binocular ranging condition, and if so, obtain a first image and a second image of the user to be measured taken by two cameras on the display device, perform human eye feature point detection on the first image and the second image respectively, obtain first feature point coordinates and second feature point coordinates corresponding to the same human eye feature point, and obtain a ranging result according to the first feature point coordinates and the second feature point coordinates;

[0007] If not satisfied, obtain a third image of the user to be tested taken by a camera on the display device, perform human eye feature detection on the third image, obtain left eye feature point coordinates and right eye feature point coordinates, and obtain a ranging result based on the left eye feature point coordinates and the right eye feature point coordinates.

[0008] As a second aspect of an embodiment of the present application, a distance measuring device between a human eye and a display device is provided, comprising:

[0009] A monitoring module, used to monitor the usage data of the display device and determine whether the usage data meets the binocular ranging condition;

[0010] A first ranging module, used to determine whether the usage data meets the binocular ranging condition, and if so, obtain a first image and a second image of the user to be measured taken by two cameras on the display device, perform human eye feature point detection on the first image and the second image respectively, obtain first feature point coordinates and second feature point coordinates corresponding to the same human eye feature point, and obtain a ranging result according to the first feature point coordinates and the second feature point coordinates;

[0011] The second ranging module is used to obtain, if the conditions are not met, a third image of the user to be measured taken by a camera on the display device, perform human eye feature detection on the third image, obtain left eye feature point coordinates and right eye feature point coordinates, and obtain a ranging result based on the left eye feature point coordinates and the right eye feature point coordinates.

[0012] As a third aspect of an embodiment of the present application, an electronic device is provided, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor; when the computer program is executed by the processor, the steps of the method for measuring the distance between the human eye and the display device as described in the first aspect are implemented.

[0013] As a fourth aspect of an embodiment of the present application, a storage medium is provided, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for measuring the distance between the human eye and the display device as described in the first aspect are implemented.

[0014] The embodiment of the present application analyzes the usage data of the display device to determine whether the usage data meets the binocular ranging condition. If the condition is met, a binocular ranging method with higher accuracy is used to measure the distance between the human eye and the display device. If the condition is not met, a monocular ranging method with shorter time consumption is used to measure the distance between the human eye and the display device. The ranging process between the human eye and the display device is performed in a targeted manner, thereby achieving real-time and accurate acquisition of the ranging result, and improving the accuracy and efficiency of the ranging between the human eye and the display device.

[0015] For better understanding and implementation, the present application is described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 An application environment of the distance measurement method between the human eye and the display device provided in the first embodiment of the present application;

[0017] Figure 2 A schematic flow chart of a distance measurement method between a human eye and a display device provided in the first embodiment of the present application;

[0018] Figure 3A schematic diagram of the flow of S1 in the distance measurement method between the human eye and the display device provided in the first embodiment of the present application;

[0019] Figure 4 A schematic diagram of the flow of S1 in the distance measurement method between the human eye and the display device provided in the second embodiment of the present application;

[0020] Figure 5 A schematic diagram of the flow of S1 in the distance measurement method between the human eye and the display device provided in the third embodiment of the present application;

[0021] Figure 6 A schematic diagram of the process of S2 in the distance measurement method between the human eye and the display device provided in the first embodiment of the present application;

[0022] Figure 7 A schematic diagram of the process of S21 in the distance measurement method between the human eye and the display device provided in the first embodiment of the present application;

[0023] Figure 8 A schematic diagram of the process of S3 in the distance measurement method between the human eye and the display device provided in the first embodiment of the present application;

[0024] Fig. 9 A schematic diagram of the flow of S33 in the distance measurement method between the human eye and the display device provided in the fourth embodiment of the present application;

[0025] Fig.10 A schematic flow chart of a distance measurement method between a human eye and a display device provided in a fifth embodiment of the present application;

[0026] Fig.11 A schematic diagram of the structure of a distance measuring device between a human eye and a display device provided in a sixth embodiment of the present application;

[0027] Fig.12 A schematic diagram of the structure of an electronic device provided in the seventh embodiment of the present application. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solution and advantages of the present application clearer, the embodiments of the present application will be further described in detail below in conjunction with the accompanying drawings. Wherein, when the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements.

[0029] It should be clear that the implementation methods described in the embodiments described below do not represent all implementation methods consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims. Based on the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.

[0030] The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application are also intended to include plural forms, unless the context clearly indicates other meanings. In addition, in the description of this application, unless otherwise specified, "multiple" refers to two or more. It should also be understood that the term "and / or" used in this article refers to and includes any or all possible combinations of one or more listed items, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone; the character " / " generally indicates that the objects associated before and after are in an "or" relationship.

[0031] It should be understood that, although the terms first, second, third, etc. may be used in the present application to describe various information, such information should not be limited to these terms, and these terms are only used to distinguish similar objects, and do not have to be used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances. Depending on the context, the words "if" / "if" used in the present application can be interpreted as "at the time of" or "when" or "in response to determination".

[0032] See also Figure 1 , Figure 1 The application environment of the distance measurement method between the human eye and the display device provided in the first embodiment of the present application includes a display device 10 and a distance measurement device (not shown). The display device 10 is provided with at least two cameras 20; the two cameras 20 are used to capture the image of the user to be measured. The distance measurement device is connected to the display device 10.

[0033] In an optional embodiment, the display device 10 is externally connected to a distance measuring device, and the distance measuring device is used to execute the distance measuring method between the human eye and the display device of the present application. At this time, the hardware pointed to by the distance measuring device essentially refers to a computer device. For example, the distance measuring method device between the human eye and the display device can be a computer, a mobile phone, a tablet, or an intelligent device such as an intelligent interactive tablet.

[0034] In another optional embodiment, a ranging device is provided in the display device 10, and the ranging device is used to execute the ranging method between the human eye and the display device of the present application. In this case, the hardware pointed to by the ranging device may be a microcontroller (MCU) or the like.

[0035] When a user uses the display device, the user faces the display device 10, and the ranging device controls the camera 11 on the display device 10 to take a picture of the user to be measured to obtain an image of the user to be measured. The ranging device performs ranging processing on the image to obtain a ranging result between the human eye and the electronic screen of the ranging device.

[0036] See also Figure 2 , Figure 2 A flow chart of a method for measuring distance between a human eye and a display device provided in the first embodiment of the present application, the method comprising the following steps:

[0037] S1: Monitor the usage data of the display device and determine whether the usage data meets the binocular ranging condition.

[0038] Compared with monocular ranging, binocular ranging has higher accuracy and applicability, but it is time-consuming and consumes high resources. Therefore, in this embodiment, the ranging device obtains the usage data of the display device at a preset time interval, and determines whether the usage data meets the binocular ranging conditions, so as to adopt a more suitable ranging solution according to the current usage situation.

[0039] The usage data is used to indicate the current usage of the display device. The usage data may include power consumption data, camera data, remaining power data, resource usage data, etc.

[0040] In an optional embodiment, the usage data may include power consumption data, wherein the power consumption data is used to reflect the power consumption usage of the display device. Figure 3 , Figure 3 The flowchart of S1 in the distance measurement method between the human eye and the display device provided in the first embodiment of the present application includes step S101, which is as follows:

[0041] S101: If the power consumption data is less than a preset power consumption threshold, it is determined that the usage data meets the binocular ranging condition; if the power consumption data is greater than or equal to the preset power consumption threshold, it is determined that the usage data does not meet the binocular ranging condition.

[0042] The power consumption data can reflect the resource usage of the current display device. It can be understood that in actual use, especially when the ranging device is a microcontroller built into the display device and is a part of the display device, in addition to executing the ranging method of the present application, the ranging device may also perform image display processing and data processing for other applications, etc., which may lead to insufficient resources allocated to the ranging method and make it impossible to perform binocular ranging. Therefore, in order to perform effective ranging, it is necessary to judge the power consumption data.

[0043] Specifically, if the power consumption data is less than the preset power consumption threshold, it means that the display device can provide sufficient power consumption resources for binocular ranging. Therefore, the ranging process between the human eye and the display device can be performed in real time to improve the accuracy of ranging. If the power consumption data is greater than or equal to the preset power consumption threshold, it means that the ranging device cannot provide sufficient power consumption for binocular ranging. If the binocular ranging method is forcibly adopted, the ranging process between the human eye and the display device cannot be performed in time, and there is even the possibility that the ranging device will be blocked and damaged.

[0044] The embodiment of the present application achieves a balance between power consumption control of a display device and distance measurement processing between the human eye and the display device by setting a power consumption threshold.

[0045] In another optional embodiment, the usage data may include camera data, wherein the camera data is used to reflect the usage of the camera on the display device, such as whether the user is making a video call or broadcasting live, etc. Figure 4 , Figure 4 The flowchart of S1 in the distance measurement method between the human eye and the display device provided in the second embodiment of the present application includes steps S111 to S112, which are specifically as follows:

[0046] S111: According to the camera data, the number of cameras allowed to be called for distance measurement is obtained.

[0047] In this embodiment, the distance measuring device obtains the number of cameras on the display device that are allowed to be called according to the camera data, so as to avoid interfering with the user's current camera usage status.

[0048] S112: If the number of cameras allowed to be called for ranging is two or more, determine whether the usage data meets the binocular ranging conditions; if the number of cameras allowed to be called for ranging is less than two, determine whether the usage monitoring data does not meet the binocular ranging conditions.

[0049] When the power consumption of the display device is not controlled, the ranging device needs to perform binocular ranging through two cameras in order to obtain a more accurate ranging result while ensuring normal use of the user. In this embodiment, if the number of cameras allowed to be called for ranging is two or more, it means that normal binocular ranging processing can be performed, and the ranging device determines whether the usage data meets the binocular ranging conditions. If the number of cameras allowed to be called for ranging is less than two, it means that normal binocular ranging processing cannot be performed, and the ranging device determines that the usage monitoring data does not meet the binocular ranging conditions.

[0050] In yet another embodiment, see Figure 5 , Figure 5The flowchart of S1 in the distance measurement method between the human eye and the display device provided in the third embodiment of the present application includes steps S121 to S122, which are specifically as follows:

[0051] S121: If the power consumption data is less than a preset power consumption threshold, the number of cameras allowed to be called for distance measurement is obtained according to the camera data.

[0052] S122: If the number of cameras allowed to be called for ranging is two or more, determine whether the used data meets the binocular ranging conditions; if the number of cameras allowed to be called for ranging is less than two, determine whether the used monitoring data does not meet the binocular ranging conditions.

[0053] In this embodiment, if the power consumption data is less than a preset power consumption threshold, the ranging device obtains the number of cameras allowed to be called for ranging based on the camera data. If the number of cameras allowed to be called for ranging is two or more, it means that the ranging device can provide sufficient power consumption for binocular ranging, and then judges whether the usage data meets the binocular ranging conditions. If the number of cameras allowed to be called for ranging is less than two, it is judged that the usage monitoring data does not meet the binocular ranging conditions.

[0054] By combining the power consumption data and the camera data, when the power consumption data and the camera data simultaneously meet the binocular ranging conditions, the ranging device adopts a binocular ranging method with higher accuracy to measure the distance between the human eye and the display device. If the conditions are not met, a monocular ranging method with shorter time consumption is adopted to measure the distance between the human eye and the display device. The ranging processing between the human eye and the display device is carried out in a targeted manner, so as to obtain the ranging results in real time and accurately, thereby improving the accuracy and efficiency of the ranging between the human eye and the display device.

[0055] S2: If the conditions are met, obtain the first image and the second image of the user to be tested taken by two cameras on the display device, perform human eye feature point detection on the first image and the second image respectively, obtain the first feature point coordinates and the second feature point coordinates corresponding to the same human eye feature point, and obtain the ranging result according to the first feature point coordinates and the second feature point coordinates.

[0056] The first feature point coordinates and the second feature point coordinates are coordinates in the camera coordinate system. In an optional embodiment, the ranging device can perform human eye feature point detection on the first image and the second image respectively through a target detection algorithm to obtain the first feature point coordinates and the second feature point coordinates corresponding to the same human eye feature point.

[0057] In another optional embodiment, the ranging device detects eye feature points on the first image and the second image respectively through a target detection model to obtain first feature point coordinates and second feature point coordinates corresponding to the same eye feature point. Specifically, the target detection model can be a MediaPipe deep learning model or a Yolo model.

[0058] Among them, to obtain the first feature point coordinates and the second feature point coordinates corresponding to the same human eye feature point, the left eye feature point can be selected as the target feature point, and the target feature point coordinates on the first image and the target feature point coordinates on the second image are respectively used as the first feature point coordinates and the second feature point coordinates. To obtain the first feature point coordinates and the second feature point coordinates corresponding to the same human eye feature point, the right eye feature point can be selected as the target feature point, and the target feature point coordinates on the first image and the target feature point coordinates on the second image are respectively used as the first feature point coordinates and the second feature point coordinates.

[0059] See also Figure 6 , Figure 6 The flowchart of S2 in the distance measurement method between the human eye and the display device provided in the first embodiment of the present application includes steps S21 to S22, which are specifically as follows:

[0060] S21: Subtract the horizontal coordinate in the first feature point coordinates from the horizontal coordinate in the second feature point coordinates to obtain a disparity parameter between the first image and the second image.

[0061] The disparity parameter indicates the difference in directions of the same object captured by two cameras on the display device.

[0062] Typically, the two cameras used to capture the first image and the second image are set at the same height. In order to reduce the amount of calculation and improve the efficiency of ranging, in this embodiment, the ranging device subtracts the horizontal coordinate in the first feature point coordinates from the horizontal coordinate in the second feature point coordinates to obtain the disparity parameter between the first image and the second image.

[0063] S22: Obtain a ratio between a preset focal length parameter and a parallax parameter between the first image and the second image, and multiply the ratio by a preset baseline parameter to obtain a distance measurement result.

[0064] The baseline parameter is used to indicate the distance between the two cameras, and specifically refers to the baseline on the ideal imaging plane.

[0065] In this embodiment, the ranging device obtains a ratio between a preset focal length parameter and a parallax parameter between the first image and the second image, and multiplies the ratio by a preset baseline parameter to obtain a first depth parameter as a ranging result, as follows:

[0066] Z c,1 =B×f / Disp

[0067] In the formula, Z c,1 is the first depth parameter, B is the baseline parameter, f is the preset focal length parameter, and Disp is the disparity parameter.

[0068] The embodiment of the present application first detects the coordinates of the feature points corresponding to the same human eye feature points corresponding to the first image and the second image, calculates the disparity parameters, and uses the calculated disparity parameters to measure the distance between the human eye and the display device, thereby achieving timely and accurate distance measurement between the human eye and the display device.

[0069] See also Figure 7 , Figure 7 The flowchart of S21 in the distance measurement method between the human eye and the display device provided in the first embodiment of the present application includes steps S211 to S212, which are specifically as follows:

[0070] S211: Correcting the first feature point coordinates and the second feature point coordinates according to preset correction parameters to obtain corrected first feature point coordinates and second feature point coordinates.

[0071] The correction parameters include rotation matrix, photography matrix, binocular baseline, camera intrinsic matrix, and distortion coefficient.

[0072] In order to calculate the disparity parameters between the first image and the second image, it is necessary to match the feature points corresponding to the first image and the second image. For this purpose, a binocular correction method is usually used to match the first image and the second image. However, image distortion is easily generated during the binocular correction process, resulting in inaccurate image matching and reducing the accuracy of binocular ranging.

[0073] In this embodiment, the ranging device may adopt a binocular positioning method to obtain correction parameters of the cameras corresponding to the first image and the second image, and correct the first feature point coordinates and the second feature point coordinates according to the correction parameters. Specifically, the ranging device eliminates distortion and aligns the first feature point coordinates and the second feature point coordinates according to the correction parameters, and obtains the corrected first feature point coordinates and the second feature point coordinates to improve the accuracy of binocular ranging.

[0074] S212: Subtract the horizontal coordinate in the corrected first feature point coordinates from the horizontal coordinate in the corrected second feature point coordinates to obtain a disparity parameter between the first image and the second image.

[0075] In this embodiment, the ranging device subtracts the horizontal coordinate in the corrected first feature point coordinates from the horizontal coordinate in the corrected second feature point coordinates to obtain a disparity parameter between the first image and the second image to improve the accuracy of binocular ranging.

[0076] The embodiment of the present application first detects the coordinates of the feature points corresponding to the same human eye feature points corresponding to the first image and the second image, calculates the disparity parameters, and uses the calculated disparity parameters to perform ranging between the human eye and the display device, thereby avoiding the need to perform image correction and stereo matching on all pixels in the image in the depth estimation of classic binocular ranging, greatly improving the efficiency of binocular ranging and realizing real-time binocular ranging.

[0077] S3: If not satisfied, obtain a third image of the user to be tested taken by a camera on the display device, perform human eye feature detection on the third image, obtain left eye feature point coordinates and right eye feature point coordinates, and obtain a distance measurement result based on the left eye feature point coordinates and the right eye feature point coordinates.

[0078] The left eye feature point coordinates and the right eye feature point coordinates are coordinates in the camera coordinate system. In this embodiment, if it is not satisfied, the ranging device obtains a third image of the user to be measured taken by a camera on the display device, performs human eye feature detection on the third image, and obtains the left eye feature point coordinates and the right eye feature point coordinates.

[0079] See also Figure 8 , Figure 8 The flowchart of S3 in the distance measurement method between the human eye and the display device provided in the first embodiment of the present application includes steps S31 to S32, which are specifically as follows:

[0080] S31: Obtain a first horizontal-axis space transformation parameter according to the horizontal coordinate in the left-eye feature point coordinates, the horizontal coordinate in the right-eye feature point coordinates, and a preset horizontal-axis focal length parameter; obtain a first vertical-axis space transformation parameter according to the vertical coordinate in the left-eye feature point coordinates, the vertical coordinate in the right-eye feature point coordinates, and a preset vertical-axis focal length parameter.

[0081] The horizontal axis focal length parameter and the vertical axis focal length parameter are used to represent the focal length of the camera lens on the horizontal axis and the focal length on the vertical axis respectively.

[0082] In this embodiment, the ranging device obtains the first horizontal axis space transformation parameter according to the horizontal coordinate in the left eye feature point coordinates, the horizontal coordinate in the right eye feature point coordinates, and the preset horizontal axis focal length parameter, which is as follows:

[0083]

[0084] Where H1 is the first horizontal axis space transformation parameter, u1 is the horizontal coordinate of the left eye feature point coordinate corresponding to the first image, u2 is the horizontal coordinate of the right eye feature point coordinate corresponding to the first image, and f x It is the preset horizontal focal length parameter.

[0085] The ranging device obtains the first longitudinal axis space transformation parameter according to the longitudinal coordinate in the left eye feature point coordinate, the longitudinal coordinate in the right eye feature point coordinate and the preset longitudinal axis focal length parameter, which is as follows:

[0086]

[0087] Where Y1 is the first vertical axis space transformation parameter, v1 is the vertical coordinate of the left eye feature point coordinate corresponding to the first image, v2 is the vertical coordinate of the right eye feature point coordinate corresponding to the first image, and f y It is the preset vertical axis focal length parameter.

[0088] S32: Obtaining a distance measurement result according to the first horizontal axis space transformation parameter, the first vertical axis space transformation parameter and a preset priori distance parameter.

[0089] The prior distance parameter is used to indicate the actual distance between the left eye feature point and the right eye feature point.

[0090] In this embodiment, the ranging device obtains a second depth parameter as a ranging result according to the first horizontal axis space transformation parameter, the first vertical axis space transformation parameter and a preset priori distance parameter, which is specifically as follows:

[0091]

[0092] In the formula, Z c,2 is the first depth parameter, and d is the prior distance parameter.

[0093] Based on the pre-set a priori distance parameters, the ranging device can use only the third image obtained by one camera to determine the coordinates of the left eye feature points and the right eye feature points. In an embodiment of the present application, the ranging device pre-sets the a priori distance parameters and uses a method based on prior knowledge to perform ranging according to the actual size of the target object and the size in the image. That is, the ranging device in the present application can use only the third image obtained by one camera to achieve ranging between the human eye and the display device, thereby improving the efficiency of ranging.

[0094] When different users use the display device, since the a priori distance parameters of different users are different, if the a priori distance parameters of the user who is different from the current user of the display device are used to measure the distance between the human eye and the display device, it will lead to a large measurement error and inaccurate distance measurement results. In order to solve the above problem, in an optional embodiment, step S33 is further included: updating the a priori distance parameters, see Fig. 9 , Fig. 9 The flowchart of S33 in the distance measurement method between the human eye and the display device provided in the fourth embodiment of the present application also includes steps S331 to S334, which are as follows:

[0095] S331: In response to the prior distance parameter update instruction, obtain usage data of the display device at the current moment.

[0096] The prior distance parameter update instruction may be issued by a user, or may be generated by the distance measuring device according to a preset time interval.

[0097] In this embodiment, the distance measuring device obtains the usage data of the display device at the current moment in response to the priori distance parameter update instruction.

[0098] S332: If the usage data at the current moment meets the binocular ranging condition, the first feature point coordinates, the second feature point coordinates and the corresponding ranging result at the current moment are used as the first sampling coordinates, the second sampling coordinates and the sampling ranging result respectively; if the usage data at the current moment does not meet the binocular ranging condition, the first feature point coordinates, the second feature point coordinates and the corresponding ranging result at the closest time to the current moment that meet the binocular ranging condition are used as the first sampling coordinates, the second sampling coordinates and the sampling ranging result respectively.

[0099] In this embodiment, if the usage data at the current moment meets the binocular ranging condition, the ranging device uses the first feature point coordinates, the second feature point coordinates and the corresponding ranging result at the current moment as the first sampling coordinates, the second sampling coordinates and the sampled ranging result respectively; if the usage data at the current moment does not meet the binocular ranging condition, the first feature point coordinates, the second feature point coordinates and the corresponding ranging result at the most recent time that meet the binocular ranging condition are used as the first sampling coordinates, the second sampling coordinates and the sampled ranging result respectively to confirm that the user currently using the display device is the same user.

[0100] S333: Obtain a second horizontal axis space transformation parameter according to the horizontal coordinate in the first sampling coordinate, the horizontal coordinate in the second sampling coordinate and the preset horizontal axis focal length parameter; obtain a second vertical axis space transformation parameter according to the vertical coordinate in the first sampling coordinate, the vertical coordinate in the second sampling coordinate and the preset vertical axis focal length parameter.

[0101] In this embodiment, the ranging device obtains the second horizontal axis space transformation parameter according to the horizontal coordinate in the first sampling coordinate, the horizontal coordinate in the second sampling coordinate, and the preset horizontal axis focal length parameter, which is as follows:

[0102]

[0103] Wherein, H2 is the first horizontal axis space transformation parameter, U1 is the horizontal coordinate in the first sampling coordinate, and U2 is the horizontal coordinate in the second sampling coordinate.

[0104] The ranging device obtains the second longitudinal axis space transformation parameter according to the longitudinal coordinate in the first sampling coordinate, the longitudinal coordinate of the second sampling coordinate, and the preset longitudinal axis focal length parameter, which is as follows:

[0105]

[0106] Wherein, Y2 is the first longitudinal axis space transformation parameter, V1 is the longitudinal coordinate in the first sampling coordinate, and V2 is the longitudinal coordinate in the second sampling coordinate.

[0107] S334: Obtain updated a priori distance parameters according to the second horizontal axis space transformation parameter, the second vertical axis space transformation parameter and the distance measurement result at the current moment, and update the a priori distance parameters.

[0108] In this embodiment, the ranging device obtains an updated priori distance parameter according to the second horizontal axis space transformation parameter, the second vertical axis space transformation parameter and the ranging result at the current moment, and updates the priori distance parameter as follows:

[0109]

[0110] Where d' is the updated prior distance parameter, Z' c is the distance measurement result at the current moment.

[0111] By continuously updating the prior distance parameters, not only can more accurate distance measurement be performed between the human eye and the display device for multiple users using the display device, but also when the usage data does not meet the binocular distance measurement conditions, that is, when the display device switches from binocular distance measurement to monocular distance measurement in a high-power consumption scenario, more accurate distance measurement between the human eye and the display device can be achieved in real time, thereby obtaining a more accurate distance measurement result.

[0112] See also Fig.10 , Fig.10 The flowchart of the distance measurement method between the human eye and the display device provided in the fifth embodiment of the present application further includes step S4, which is as follows:

[0113] S4: When the distance measurement result is less than a preset distance measurement threshold, control the display device to perform a reminder operation.

[0114] In this embodiment, the ranging device controls the display device to perform a reminder operation based on the ranging result and the preset ranging threshold. If the ranging result is less than or equal to the ranging threshold, the reminder operation is not performed if the ranging result is greater than the ranging threshold. This can timely remind the current user that the distance between the user and the display screen is too close, thereby reducing the risk of myopia or worsening myopia of the user.

[0115] Please refer to Fig.11 , Fig.11 This is a schematic diagram of the structure of a distance measuring device between a human eye and a display device provided in a sixth embodiment of the present application. The device can implement all or part of the distance measuring method between a human eye and a display device through software, hardware, or a combination of both. The distance measuring device 11 between a human eye and a display device includes:

[0116] The data monitoring module 111 is used to monitor the usage data of the display device and determine whether the usage data meets the binocular ranging condition;

[0117] The first ranging module 112 is used to obtain a first image and a second image of the user to be measured taken by two cameras on the display device if the conditions are met, perform human eye feature point detection on the first image and the second image respectively, obtain first feature point coordinates and second feature point coordinates corresponding to the same human eye feature point, and obtain a ranging result according to the first feature point coordinates and the second feature point coordinates;

[0118] The second ranging module 113 is used to obtain a third image of the user to be measured taken by a camera on the display device if the conditions are not met, perform human eye feature detection on the third image, obtain the coordinates of the left eye feature points and the right eye feature points, and obtain the ranging result according to the coordinates of the left eye feature points and the right eye feature points.

[0119] The data monitoring module 111 includes a first sub-data monitoring module, a second sub-data monitoring module and a third sub-data monitoring module.

[0120] The first sub-data monitoring module is used to determine whether the usage data meets the binocular ranging condition if the power consumption data is less than a preset power consumption threshold; if the power consumption data is greater than or equal to the preset power consumption threshold, determine whether the usage data does not meet the binocular ranging condition.

[0121] The second sub-data monitoring module is used to obtain the number of cameras allowed to be called for ranging according to the camera data; if the number of cameras allowed to be called for ranging is two or more, determine whether the usage data meets the binocular ranging conditions; if the number of cameras allowed to be called for ranging is less than two, determine that the usage data does not meet the binocular ranging conditions.

[0122] The third sub-data monitoring module is used to obtain the number of cameras allowed to be called for ranging according to the camera data if the power consumption data is less than a preset power consumption threshold; if the number of cameras allowed to be called for ranging is two or more, determine whether the usage data meets the binocular ranging conditions; if the number of cameras allowed to be called for ranging is less than two, determine that the usage monitoring data does not meet the binocular ranging conditions.

[0123] The first ranging module 112 includes a disparity calculation module and a first sub-ranging module.

[0124] a disparity calculation module, used for subtracting the horizontal coordinate in the first feature point coordinates from the horizontal coordinate in the second feature point coordinates to obtain a disparity parameter between the first image and the second image;

[0125] The first sub-distance measurement module is used to obtain the ratio between the preset focal length parameter and the parallax parameter between the first image and the second image, and multiply the ratio by the preset baseline parameter to obtain the distance measurement result; wherein the baseline parameter is used to indicate the distance between the two cameras.

[0126] The disparity calculation module includes a correction module and a sub-disparity calculation module.

[0127] A correction module, used to correct the first feature point coordinates and the second feature point coordinates according to preset correction parameters, respectively, to obtain the corrected first feature point coordinates and the corrected second feature point coordinates; wherein the correction parameters include a rotation matrix, a photographic matrix, a binocular baseline, a camera intrinsic parameter matrix and a distortion coefficient;

[0128] The sub-disparity calculation module is used to subtract the horizontal coordinate in the corrected first feature point coordinates from the horizontal coordinate in the corrected second feature point coordinates to obtain the disparity parameter between the first image and the second image.

[0129] The second ranging module 113 includes a space transformation module and a second sub-ranging module.

[0130] A spatial transformation module, used to obtain a first horizontal axis spatial transformation parameter according to the horizontal coordinates in the left eye feature point coordinates, the horizontal coordinates in the right eye feature point coordinates and a preset horizontal axis focal length parameter; and to obtain a first vertical axis spatial transformation parameter according to the vertical coordinates in the left eye feature point coordinates, the vertical coordinates in the right eye feature point coordinates and a preset vertical axis focal length parameter;

[0131] The second sub-distance measurement module is used to obtain a distance measurement result according to the first horizontal axis space transformation parameter, the first vertical axis space transformation parameter and a preset priori distance parameter; wherein the priori distance parameter is used to indicate the real distance between the left eye feature point and the right eye feature point.

[0132] See also Fig.12 , Fig.12 A schematic diagram of the structure of an electronic device provided for the seventh embodiment of the present application. The embodiment of the present application also provides an electronic device, including: a processor 121, a memory 122, and a computer program 123 stored in the memory 122 and executable on the processor; the electronic device may store a plurality of instructions, the instructions being suitable for the processor to load and execute the method steps of the above-mentioned embodiments 1 to 5, and the specific execution process may refer to the specific description of embodiments 1 to 5, which will not be described in detail here.

[0133] Among them, the processor may include one or more processing cores. The processor 121 uses various interfaces and lines to connect various parts in the electronic device, and executes various functions and processes data of the distance measuring device 11 between the human eye and the display device by running or executing instructions, programs, code sets or instruction sets stored in the memory 122, and calling the data in the memory 122. Optionally, the processor 121 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programble Logic Array, PLA). The processor 121 can integrate one or more combinations of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the touch display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 121, and it can be implemented by a single chip.

[0134] Among them, the memory 122 may include a random access memory (RAM) or a read-only memory (Read-Only Memory). Optionally, the memory 122 includes a non-transitory computer-readable storage medium. The memory 122 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 122 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch instructions, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 122 may also be optionally at least one storage device located away from the aforementioned processor 121.

[0135] The embodiment of the present application also provides a storage medium, which can store multiple instructions. The instructions are suitable for being loaded by a processor and executing the method steps of the above-mentioned embodiments one to five. The specific execution process can be found in the specific descriptions of embodiments one to five, which will not be repeated here.

[0136] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0137] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0138] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0139] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0140] 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 on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0141] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0142] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc.

[0143] The present application is not limited to the above-mentioned implementation modes. If various changes or modifications to the present application do not depart from the spirit and scope of the present application, and if these changes and modifications fall within the claims of the present application and the scope of equivalent technologies, the present application is also intended to include these changes and modifications.

Claims

1. A distance measurement method between a human eye and a display device, characterized in that: The steps include: Monitoring usage data of the display device, and determining whether the usage data meets binocular ranging conditions; If the conditions are met, obtaining a first image and a second image of the user to be tested taken by two cameras on the display device; Performing eye feature point detection on the first image and the second image respectively, obtaining first feature point coordinates and second feature point coordinates corresponding to the same eye feature point, and obtaining a distance measurement result according to the first feature point coordinates and the second feature point coordinates; If not satisfied, obtain a third image of the user to be tested taken by a camera on the display device, perform human eye feature detection on the third image, obtain left eye feature point coordinates and right eye feature point coordinates, and obtain a ranging result based on the left eye feature point coordinates and the right eye feature point coordinates.

2. The method for measuring the distance between the human eye and the display device according to claim 1, characterized in that: The usage data includes power consumption data; The step of judging whether the usage data meets the binocular ranging condition comprises the following steps: If the power consumption data is less than a preset power consumption threshold, it is determined that the usage data meets the binocular ranging condition; if the power consumption data is greater than or equal to the preset power consumption threshold, it is determined that the usage data does not meet the binocular ranging condition.

3. The method for measuring the distance between the human eye and the display device according to claim 1, characterized in that: The usage data includes camera data; the camera data is used to reflect the usage of the camera on the display device; According to the camera data, the number of cameras allowed to be called for ranging is obtained; If the number of cameras allowed to be called for ranging is two or more, determine whether the usage data meets the binocular ranging condition; if the number of cameras allowed to be called for ranging is less than two, determine that the usage data does not meet the binocular ranging condition.

4. The distance measurement method between the human eye and the display device according to any one of claims 1 to 3, characterized in that: The step of obtaining a distance measurement result according to the first feature point coordinates and the second feature point coordinates comprises the following steps: Subtracting the horizontal coordinate of the first feature point coordinates from the horizontal coordinate of the second feature point coordinates to obtain a disparity parameter between the first image and the second image; A ratio between a preset focal length parameter and a parallax parameter between the first image and the second image is obtained, and the ratio is multiplied by a preset baseline parameter to obtain a distance measurement result; wherein the baseline parameter is used to indicate the distance between the two cameras.

5. The method for measuring the distance between the human eye and the display device according to claim 4, characterized in that: The step of subtracting the horizontal coordinate in the first feature point coordinates from the horizontal coordinate in the second feature point coordinates to obtain the disparity parameter between the first image and the second image comprises the following steps: According to preset correction parameters, the first feature point coordinates and the second feature point coordinates are corrected respectively to obtain the corrected first feature point coordinates and the corrected second feature point coordinates; wherein the correction parameters include a rotation matrix, a photographic matrix, a binocular baseline, a camera intrinsic parameter matrix, and a distortion coefficient; The horizontal coordinate in the corrected first feature point coordinates is subtracted from the horizontal coordinate in the corrected second feature point coordinates to obtain a disparity parameter between the first image and the second image.

6. The distance measurement method between the human eye and the display device according to any one of claims 1 to 3, characterized in that: The method of obtaining the distance measurement result according to the left eye feature point coordinates and the right eye feature point coordinates comprises the steps of: Obtaining a first horizontal axis space transformation parameter according to the horizontal coordinate in the left eye feature point coordinates, the horizontal coordinate in the right eye feature point coordinates, and a preset horizontal axis focal length parameter; Obtaining a first longitudinal axis space transformation parameter according to the longitudinal coordinate in the left eye feature point coordinates, the longitudinal coordinate in the right eye feature point coordinates, and a preset longitudinal axis focal length parameter; A distance measurement result is obtained according to the first horizontal axis space transformation parameter, the first vertical axis space transformation parameter and a preset priori distance parameter; wherein the priori distance parameter is used to indicate the real distance between the left eye feature point and the right eye feature point.

7. The distance measurement method between human eyes and a display device according to claim 6, characterized in that: Also includes the steps: In response to the a priori distance parameter update instruction, obtaining usage data of the display device at the current moment; If the usage data at the current moment meets the binocular ranging condition, the first feature point coordinates, the second feature point coordinates and the corresponding ranging result at the current moment are used as the first sampling coordinates, the second sampling coordinates and the sampling ranging result respectively; if the usage data at the current moment does not meet the binocular ranging condition, the first feature point coordinates, the second feature point coordinates and the corresponding ranging result at the closest time to the current moment that meet the binocular ranging condition are used as the first sampling coordinates, the second sampling coordinates and the sampling ranging result respectively; Obtain a second horizontal axis spatial transformation parameter according to the horizontal coordinate in the first sampling coordinate, the horizontal coordinate in the second sampling coordinate, and a preset horizontal axis focal length parameter; obtain a second vertical axis spatial transformation parameter according to the vertical coordinate in the first sampling coordinate, the vertical coordinate in the second sampling coordinate, and a preset vertical axis focal length parameter; The priori distance parameter is updated according to the second horizontal axis space transformation parameter, the second vertical axis space transformation parameter and the sampled distance measurement result.

8. A distance measuring device between a human eye and a display device, characterized in that: include: A data monitoring module, used to monitor the usage data of the display device and determine whether the usage data meets the binocular ranging condition; A first ranging module, configured to obtain, if conditions are met, a first image and a second image of the user to be measured taken by two cameras on the display device, respectively detect eye feature points on the first image and the second image, obtain first feature point coordinates and second feature point coordinates corresponding to the same eye feature point, and obtain a ranging result according to the first feature point coordinates and the second feature point coordinates; The second ranging module is used to obtain, if the conditions are not met, a third image of the user to be measured taken by a camera on the display device, perform human eye feature detection on the third image, obtain left eye feature point coordinates and right eye feature point coordinates, and obtain a ranging result based on the left eye feature point coordinates and the right eye feature point coordinates.

9. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor; when the computer program is executed by the processor, the steps of the method for measuring the distance between the human eye and the display device as described in any one of claims 1 to 7 are implemented.

10. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for measuring the distance between the human eye and the display device as described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Intelligent display system automatically tracking head posture

    CN103558910A

  • Eye-screen distance prompt myopia prevention system based on machine vision

    CN113012407A

  • Monocular distance measurement method, target physical parameter measurement method and device, and unmanned aerial vehicle

    CN113345012A

  • Ranging method, device and system, electronic equipment and storage medium

    CN113658251A

  • Method and system for binocular ranging for children

    US20230237682A1