Illumination intensity acquisition method and device, screen brightness adjustment method and device and electronic equipment
By constructing the spot position relationship between the device and the light source, and calculating and transmitting the light intensity, the brightness mismatch problem of devices that do not support automatic adjustment of the screen brightness when used under different ambient light conditions is solved, achieving a better user experience.
Patent Information
- Application Number
- CN202510273620.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-05-13
AI Technical Summary
When used under different ambient light conditions, devices that do not support automatic adjustment of screen brightness may easily lead to mismatch between the screen brightness and the ambient brightness, resulting in visual fatigue.
The image is captured by the camera of the first device and the image captured by the camera of the second device, and the spot position relationship formed by the second device, the first device and the light source is constructed, the distance between the light spot and the first device is obtained, and the light intensity at the position of the second device is calculated based on the light intensity detected by the first device, and sent to the second device to adjust its screen brightness.
The matching of the screen brightness and ambient brightness of devices that do not support automatic adjustment of screen brightness is achieved, reducing visual fatigue and improving user experience.
Smart Images

Figure CN119993088A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of electronic equipment, and in particular relates to a method, device and electronic equipment for obtaining light intensity and adjusting screen brightness. Background Art
[0002] With the development of digital technology, digital screens are present in all aspects of daily life, including mobile phones, televisions, tablets, watches, etc. These devices can usually adjust the display brightness to adapt to viewing needs in different environments, especially smartphones.
[0003] Laptops or desktops do not support automatic adjustment of screen brightness. Although the office environment is relatively fixed, there are still changes in ambient brightness caused by adjusting the laptop's office position or working in the same office position from morning to night, as well as turning on and off indoor lights. These changes will cause the screen brightness to not match the ambient brightness when the user is using the display device, and working for a long time at inappropriate brightness will cause visual fatigue and other effects. Summary of the invention
[0004] The embodiments of the present application provide a method, device and electronic device for obtaining light intensity and adjusting screen brightness, so as to solve the problem of screen brightness adjustment for devices that do not support automatic adjustment of screen brightness.
[0005] In order to solve the above technical problems, this application is implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides a method for obtaining light intensity, comprising:
[0007] According to a first image captured by a first camera of the first device and a second image captured by a second camera of the second device, a positional relationship among a light spot formed by the second device, the first device, and a light source is constructed to obtain a first distance between the light spot and the first device, wherein the first image at least includes the light spot formed by the light source;
[0008] acquiring, according to the first distance and the first light intensity detected by the first device, a second light intensity corresponding to the position of the second device, wherein the second light intensity is used to adjust the brightness of a display screen of the second device;
[0009] The second light intensity is sent to a second device.
[0010] Optionally, the first camera captures a first image located on one side of a display screen of the first device, and the first device detects a first light intensity located on one side of the display screen of the first device.
[0011] Optionally, the second device captures a second image located on one side of a display screen of the second device, and the second image and the first image contain at least an image formed by a target feature, and the target feature includes at least one of the following: a light source, a target object facing the display screen of the second device.
[0012] Optionally, the second image includes a light spot formed by the light source, and constructing a positional relationship among the second device, the first device, and the light spot formed by the light source, and acquiring a first distance between the light spot and the first device includes:
[0013] Constructing a coordinate system with the second device as the origin;
[0014] Acquire a first distance between the light spot and the first device according to the first angle, the second angle, and the second distance in the coordinate system;
[0015] Among them, the first angle is the angle between the light spot and the first plane, and the first plane is the plane where the second device and the first device are located in the coordinate system; the second angle is the angle between the light spot to the second device and the angle between the first device and the second device; the second distance is the distance from the second device to the first device.
[0016] Optionally, the second image includes only an image of a target object facing a display screen of the second device, and constructing a positional relationship between a light spot formed by the second device, the first device, and the light source, and acquiring a first distance between the light spot and the first device includes:
[0017] Constructing a coordinate system with the second device as the origin;
[0018] Acquire a third distance from the first device to the target object in the coordinate system;
[0019] Determining the position coordinates of the target object according to the third distance;
[0020] Determine the position coordinates of the light spot according to the position coordinates of the target object, the position coordinates of the first device, the third angle, the fourth angle, and the fifth angle;
[0021] Determining a first distance between the light spot and the first device according to the position coordinates of the light spot and the position coordinates of the first device;
[0022] Among them, the third angle is the angle between the light spot and the first device and the first device to the target object; the fourth angle is the angle between the line from the first device to the light spot and the plane where the second device and the first device are located in the coordinate system; the fifth angle is the angle between the line from the target object to the light spot and the second plane, and the second plane is a plane perpendicular to the plane where the second device and the first device are located in the coordinate system.
[0023] Optionally, acquiring a third distance from the first device to the target object in the coordinate system includes:
[0024] Acquire a sixth angle, where the sixth angle is an angle between the second device and the first device and between the first device and the target object;
[0025] Determine a third distance from the first device to the target object according to the fourth distance between the second device and the target object, the sixth angle, and the second distance;
[0026] The second distance is the distance from the second device to the first device.
[0027] Optionally, the method further includes:
[0028] Obtain a first distance determined based on a microphone of the second device and a speaker of the first device;
[0029] Obtain a second distance determined based on the speaker of the second device and the microphone of the first device;
[0030] Acquire a third distance determined based on the Bluetooth communication module of the second device and the Bluetooth communication module of the first device;
[0031] Acquire the position coordinates of the first device in the coordinate system according to the first spacing, the second spacing, and the third spacing;
[0032] The second distance is determined according to the position coordinates.
[0033] Optionally, acquiring a second light intensity corresponding to a position of the second device according to the first distance and the first light intensity detected by the first device includes:
[0034] According to the first distance, the first light intensity, and the angle between the first device and the light spot and the light spot and the second device, a third light intensity of the mapping position of the first device is obtained, wherein the mapping position is located on the extension line of the line connecting the light spot and the second device, and the distance from the mapping position to the light spot is equal to the first distance, wherein when the distance to the light spot position is the same, the light source angle and the light intensity satisfy the Lambertian distribution law;
[0035] Based on the third light intensity, the first distance, and the distance between the second device and the light spot, a second light intensity corresponding to the position of the second device is acquired.
[0036] In a second aspect, an embodiment of the present application further provides a light intensity acquisition device, comprising:
[0037] A first acquisition module, configured to construct a positional relationship between a light spot formed by the second device, the first device, and the light source, and acquire a first distance between the light spot and the first device according to a first image captured by a first camera of the first device and a second image captured by a second camera of the second device, wherein the first image at least includes the light spot formed by the light source;
[0038] A second acquisition module, configured to acquire a second light intensity corresponding to the position of the second device according to the first distance and the first light intensity detected by the first device, wherein the second light intensity is used to adjust the brightness of a display screen of the second device;
[0039] A sending module is used to send the second light intensity to a second device.
[0040] Optionally, the second image includes a light spot formed by a light source, and the first acquisition module includes:
[0041] A first construction unit, used to construct a coordinate system with the second device as the origin;
[0042] A first acquisition unit, configured to acquire a first distance between the light spot and the first device according to the first angle, the second angle, and the second distance in the coordinate system;
[0043] Among them, the first angle is the angle between the light spot and the first plane, and the first plane is the plane where the second device and the first device are located in the coordinate system; the second angle is the angle between the light spot to the second device and the angle between the first device and the second device; the second distance is the distance from the second device to the first device.
[0044] Optionally, the second image only includes an image of a target object facing a display screen of the second device, and the first acquisition module includes:
[0045] A second construction unit, used to construct a coordinate system with the second device as the origin;
[0046] A second acquisition unit, configured to acquire a third distance from the first device to the target object in the coordinate system;
[0047] A first determining unit, configured to determine the position coordinates of the target object according to the third distance;
[0048] A second determining unit, configured to determine the position coordinates of the light spot according to the position coordinates of the target object, the position coordinates of the first device, the third angle, the fourth angle, and the fifth angle;
[0049] a third determining unit, configured to determine a first distance between the light spot and the first device according to the position coordinates of the light spot and the position coordinates of the first device;
[0050] Among them, the third angle is the angle between the light spot and the first device and the first device to the target object; the fourth angle is the angle between the line from the first device to the light spot and the plane where the second device and the first device are located in the coordinate system; the fifth angle is the angle between the line from the target object to the light spot and the second plane, and the second plane is a plane perpendicular to the plane where the second device and the first device are located in the coordinate system.
[0051] Optionally, the second acquiring unit is used to:
[0052] Acquire a sixth angle, where the sixth angle is an angle between the second device and the first device and between the first device and the target object;
[0053] Determine a third distance from the first device to the target object according to the fourth distance between the second device and the target object, the sixth angle, and the second distance;
[0054] The second distance is the distance from the second device to the first device.
[0055] Optionally, the device further comprises:
[0056] A third acquisition module, used to acquire a first distance determined based on a microphone of the second device and a speaker of the first device;
[0057] A fourth acquisition module, configured to acquire a second distance determined based on a speaker of the second device and a microphone of the first device;
[0058] A fifth acquisition module, used to acquire a third distance determined based on the Bluetooth communication module of the second device and the Bluetooth communication module of the first device;
[0059] a sixth acquisition module, configured to acquire the position coordinates of the first device in the coordinate system according to the first interval, the second interval, and the third interval;
[0060] The first determining module is used to determine the second distance according to the position coordinates.
[0061] Optionally, the second acquisition module includes:
[0062] A third acquisition unit is used to acquire a third light intensity of a mapping position of the first device according to the first distance, the first light intensity, and an angle between the first device and the light spot and between the light spot and the second device, wherein the mapping position is located on an extension line of a line connecting the light spot and the second device, and the distance from the mapping position to the light spot is equal to the first distance, wherein, when the distance to the light spot position is the same, the light source angle and the light intensity satisfy the Lambertian distribution law;
[0063] The fourth acquisition unit is used to acquire the second light intensity corresponding to the position of the second device based on the third light intensity, the first distance, and the distance between the second device and the light spot.
[0064] In a third aspect, an embodiment of the present application further provides a screen brightness adjustment method, comprising:
[0065] According to a first image captured by a first camera of the first device and a second image captured by a second camera of the second device, a positional relationship among a light spot formed by the second device, the first device, and a light source is constructed to obtain a first distance between the light spot and the first device, wherein the first image at least includes the light spot formed by the light source;
[0066] acquiring, according to the first distance and the first light intensity detected by the first device, a second light intensity corresponding to the position of the second device, wherein the second light intensity is used to adjust the brightness of a display screen of the second device;
[0067] The brightness of the display screen is adjusted according to the second light intensity.
[0068] In a fourth aspect, an embodiment of the present application further provides a screen brightness adjustment device, comprising:
[0069] A seventh acquisition module, configured to construct a positional relationship between a light spot formed by the second device, the first device, and the light source according to a first image captured by a first camera of the first device and a second image captured by a second camera of the second device, and to acquire a first distance between the light spot and the first device, wherein the first image at least includes the light spot formed by the light source;
[0070] an eighth acquisition module, configured to acquire a second light intensity corresponding to the position of the second device according to the first distance and the first light intensity detected by the first device, wherein the second light intensity is used to adjust the brightness of a display screen of the second device;
[0071] An adjustment module is used to adjust the brightness of the display screen according to the second light intensity.
[0072] In a fifth aspect, an embodiment of the present application further provides an electronic device, comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the above-mentioned light intensity acquisition method or screen brightness adjustment method.
[0073] In a sixth aspect, an embodiment of the present application further provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the above-mentioned light intensity acquisition method or screen brightness adjustment method are implemented.
[0074] In a seventh aspect, an embodiment of the present application further provides a computer program product, comprising computer instructions, which, when executed by a processor, implement the steps of the above-mentioned light intensity acquisition method or screen brightness adjustment method.
[0075] In an embodiment of the present application, by constructing a positional relationship of a light spot formed by the second device, the first device and the light source based on a first image captured by a first camera of the first device and a second image captured by a second camera of the second device, a first distance between the light spot and the first device is obtained, and based on the first distance and a first light intensity detected by the first device, a second light intensity corresponding to a position of the second device is obtained, and the second light intensity is sent to the second device, thereby achieving acquisition of the light intensity at the position of the second device, and further achieving brightness adjustment of the display screen of the second device. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] Figure 1 is a flow chart of a method for obtaining light intensity according to an embodiment of the present application;
[0077] Figure 2 This is a schematic diagram of scenario one;
[0078] Figure 3 This is a schematic diagram of scene two;
[0079] Figure 4 This is a coordinate diagram of scene one;
[0080] Figure 5 is an image of a light spot taken by the first device and a schematic diagram of its coordinates and orientation;
[0081] Figure 6 Schematic diagram of the principle of obtaining the first angle;
[0082] Figure 7 is an image of the light spot taken by the second device and a schematic diagram of its coordinates and orientation;
[0083] Figure 8 It is a schematic diagram of the cosine response curve of the light source's luminous angle, the absolute intensity of the light field, and the light source's angular distribution;
[0084] Fig. 9 This is a coordinate diagram of scene 2;
[0085] Fig.10 The image of the target object and the light spot taken by the first device and the coordinate orientation diagram;
[0086] Fig.11 It is a schematic diagram of the positions of the target object (e.g., human eye), the light source, and the camera;
[0087] Fig.12It is a hardware architecture diagram of an embodiment of the present application;
[0088] Fig.13 is an internal framework diagram of the first device and the second device in the embodiment of the present application;
[0089] Fig.14 This is one of the schematic diagrams of how to obtain the spacing;
[0090] Fig.15 This is the second schematic diagram of the method for obtaining the spacing;
[0091] Fig.16 This is the third schematic diagram of the method for obtaining the spacing;
[0092] Fig.17 This is a detailed application flow diagram of scenario 1;
[0093] Fig.18 This is a detailed application flow diagram of scenario 2;
[0094] Fig.19 is a module schematic diagram of a light intensity acquisition device according to an embodiment of the present application;
[0095] Fig. 20 is a flow chart of a method for adjusting screen brightness according to an embodiment of the present application;
[0096] Fig.21 It is a module schematic diagram of the screen brightness adjustment device of an embodiment of the present application. DETAILED DESCRIPTION
[0097] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0098] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0099] In combination with the accompanying drawings, the light intensity acquisition, screen brightness adjustment method, device and electronic device provided in the embodiments of the present application are described in detail through specific embodiments and their application scenarios.
[0100] like Figure 1 As shown, an embodiment of the present application provides a method for obtaining light intensity, which is applied to an electronic device, and the method includes:
[0101] Step 11, constructing a positional relationship among the second device, the first device, and a light spot formed by the light source according to a first image captured by a first camera of the first device and a second image captured by a second camera of the second device, and acquiring a first distance between the light spot and the first device, wherein the first image at least includes the light spot formed by the light source;
[0102] Step 12: acquiring a second light intensity corresponding to the position of the second device according to the first distance and the first light intensity detected by the first device, where the second light intensity is used to adjust the brightness of a display screen of the second device;
[0103] Step 13: Send the second light intensity to the second device.
[0104] It should be noted that, through the above-mentioned implementation steps of the embodiment of the present application, it is possible to obtain the light intensity at the location of the second device, and then adjust the brightness of the display screen of the second device, thereby improving the user experience of the second device.
[0105] Optionally, the second device mentioned in the embodiment of the present application mainly refers to a device that does not support automatic adjustment of screen brightness, that is, the second device does not have a sensor for detecting ambient light (e.g., a photosensor), for example, the second device may be a laptop. The first device mentioned in the embodiment of the present application mainly refers to a device that supports automatic adjustment of screen brightness, that is, the first device has a sensor for detecting ambient light, for example, the first device may be a mobile phone.
[0106] Optionally, the first camera captures a first image located on one side of a display screen of the first device, and the first device detects a first light intensity located on one side of the display screen of the first device.
[0107] This situation can be understood as that the first camera is the camera corresponding to the display screen side, for example, the first camera is the front camera.
[0108] Optionally, the second device captures a second image located on one side of the display screen of the second device, and the second image and the first image contain at least an image formed by a target feature, and the target feature includes at least one of the following: a light source, and a target object facing the display screen of the second device. That is, when the first device is used to assist in adjusting the screen brightness of the second device, the image captured by the first device should at least include the target object within the range of the side facing the display screen of the second device.
[0109] It should be noted that the embodiments of the present application mainly include the following scenarios:
[0110] Scene 1: The first image includes a light spot formed by the light source, and the second image includes a light spot formed by the light source, that is, both the first device and the second device can capture the light source.
[0111] For example, a specific scenario such as Figure 2 As shown, the display screen of the second device faces the light source.
[0112] Scenario 2: The first device includes a light spot formed by the light source, but the second image does not include the light spot formed by the light source. In this case, other features are needed, namely the target object. The target object is facing the display screen of the second device. For example, the target object can be the facial features of the user. In this case, at least the second device needs to capture the target object.
[0113] For example, a specific scenario such as Figure 3 As shown, the display screen of the second device is facing away from the light source.
[0114] It should be noted that the above application scenario is based on the example of a single-screen mobile phone as the first device, that is, the mobile phone is placed on the table with the screen facing up, and the camera that takes the image is also the camera on the same side as the screen, that is, the front camera; if the first device is a multi-screen mobile phone, the mobile phone should be placed with at least one screen facing up, and the camera that takes the image is also the camera on the same side as the screen facing up.
[0115] The following provides examples of specific applications of how to obtain the second light intensity corresponding to the location of the second device in different scenarios.
[0116] 1. Obtaining the second light intensity corresponding to the location of the second device in the scene
[0117] Optionally, in this case, the specific implementation of constructing the position relationship of the light spot formed by the second device, the first device and the light source, and acquiring the first distance between the light spot and the first device includes:
[0118] Step A11, constructing a coordinate system with the second device as the origin;
[0119] Step A12: acquiring a first distance between the light spot and the first device according to the first angle, the second angle, and the second distance in the coordinate system;
[0120] Among them, the first angle is the angle between the light spot and the first plane, and the first plane is the plane where the second device and the first device are located in the coordinate system; the second angle is the angle between the light spot to the second device and the angle between the first device and the second device; the second distance is the distance from the second device to the first device.
[0121] Specifically, a rectangular coordinate system is established based on the second device as the origin, as follows Figure 4 As shown, the origin is O(0,0,0) and the first device position is A(X A ,Y A ,Z A ), the first device is mapped to a point on the LO extension line as A'(X A' ,Y A' ,Z A' ), where the length of line segment LA is equal to the length of line segment LA'. This position is used to analyze the illumination information of point O. The spot position corresponding to the center of the light source is L(X L ,Y L ,Z L ).
[0122] It should be noted that the image of the light spot taken by the first device is as follows: Figure 5 As shown, based on the center position of the light spot in the first image taken by the first device, the relative orientation information between the light spot and the first device is obtained to obtain the first angle, that is, ∠OAL.
[0123] For example, establishing Figure 6 The reference coordinate system shown in the figure, where point A is defined as the plane of the slave device lens, and point O is the first device. Point D is the projection point of A on the charge-coupled device (CCD) plane; L1 is the imaging position of point L on the CCD screen; O1 is the projection of point O on the CCD plane; line segment DO1 is parallel to L1 to obtain L1O2; where line segment AD is equal to the focal length of the camera f, which is a known quantity.
[0124] Among them, ∠OAL=∠O2L1L, the coordinates of point O, point O1, point L1, point A, and point D are known, so ∠O1DE=∠O2L1A, in the triangular cone L1DF-A,
[0125] After obtaining AL1, L1F, and AF, we can further deduce ∠AL1F. Since ∠AL1F=∠O2L1L=∠OAL, the first angle can be determined.
[0126] It should be noted that the method for obtaining the first angle is a relatively mature technology at present. The above method of determining the first angle by the camera focal length and display position is only an example and does not constitute a limitation to the embodiments of the present application.
[0127] It should be noted that the image of the light spot taken by the second device is as follows: Figure 7 As shown, the relative orientation information between the light spot and the second device is obtained through the center position of the light spot in the second image taken by the second device, and the second angle, namely ∠AOL, is obtained.
[0128] It should be noted that the second angle can be obtained in the same manner as the first angle, and the method for obtaining the second angle is a relatively mature technology at present. Any method that can obtain the second angle falls within the protection scope of the embodiments of the present application.
[0129] Through the above analysis, the length of line segment OA (i.e. the second distance), ∠AOL, and ∠OAL are known. Using formula 1 (the formula corresponding to the law of sine), we can calculate the length of line segment LA of △OAL, i.e. the first distance.
[0130]
[0131] Optionally, in one implementation, the specific implementation of acquiring the second light intensity corresponding to the position of the second device according to the first distance and the first light intensity detected by the first device includes:
[0132] Step A21, acquiring a third light intensity of a mapping position of the first device according to the first distance, the first light intensity, and the angle between the first device and the light spot and the light spot and the second device, wherein the mapping position is located on an extension line of a line connecting the light spot and the second device, and the distance from the mapping position to the light spot is equal to the first distance, wherein, when the distance to the light spot position is the same, the light source angle and the light intensity satisfy the Lambertian distribution law;
[0133] Step A22: Based on the third light intensity, the first distance, and the distance between the second device and the light spot, obtain the second light intensity corresponding to the position of the second device.
[0134] Optionally, the angle between the first device and the light spot and the light spot and the second device, i.e., ∠ALO in △OAL, can be obtained in the following way: if ∠OAL and ∠AOL are known, ∠ALO can be determined based on the theorem that the sum of the three angles in a triangle is 180 degrees. Since the mapping position of the first device is located on the extension line of the line connecting the light spot and the second device, and the distance from the mapping position to the light spot is equal to the first distance, i.e., LA=LA', based on the Lambertian distribution law of a typical light source (satisfying the cosine response curve), i.e. Where I represents the main intensity of the light source, l represents the distance from the light source, and E represents the light intensity. The light intensity at the first device can be known through the detection of the first device, and the light intensity at A' can be determined through ∠ALO. For example, the light intensity at A' can be determined by Figure 8 The distance from the light source is determined by the light source's luminous angle, the absolute intensity of the light field, and the cosine response curve of the light source's angle distribution at the same distance.
[0135] After obtaining the light intensity at A', the light intensity at O (i.e., at the second device) can be determined. That is, when the light intensity information at point A' is known to be E A′ (i.e., the third light intensity at the mapping position of the first device), derive E O (i.e., the second light intensity corresponding to the location of the second device), according to the second formula for the relationship between illumination and distance, the inverse square relationship is satisfied:
[0136]
[0137] It should be noted that LO, that is, the distance between the second device and the light spot, can be determined by the above formula 1.
[0138] Based on Formula 2, the second light intensity corresponding to the location of the second device can be determined.
[0139] 2. Obtaining the second light intensity corresponding to the location of the second device in scene 2
[0140] Optionally, in this case, the specific implementation of constructing the position relationship of the light spot formed by the second device, the first device and the light source, and acquiring the first distance between the light spot and the first device includes:
[0141] Step B11, constructing a coordinate system with the second device as the origin;
[0142] It should be noted that the process is based on the second device as the origin to establish a rectangular coordinate system, as shown in the following example: Fig. 9 As shown, the origin is O(0,0,0) and the first device position is A(X A ,Y A ,Z A ), the first device is mapped to a point on the LO extension line as A'(XA' ,Y A' ,Z A' ), where the length of line segment LA is equal to the length of line segment LA'. This position is used to analyze the illumination information of point O. The spot position corresponding to the center of the light source is L(X L ,Y L ,Z L ).
[0143] Step B12, obtaining a third distance from the first device to the target object in the coordinate system;
[0144] Optionally, in one implementation, the specific implementation of step B12 includes:
[0145] Step B121, obtaining a sixth angle, where the sixth angle is an angle between the second device and the first device and between the first device and the target object;
[0146] Step B122: determining a third distance from the first device to the target object according to the fourth distance between the second device and the target object, the sixth angle, and the second distance;
[0147] The second distance is the distance from the second device to the first device.
[0148] It should be noted that in Fig. 9 In △OAB, if OB, OA and ∠OAB (i.e. the sixth angle) are known, the distance AB (i.e. the third distance from the first device to the target object) can be derived, and then the coordinates of point B (X B ,Y B ,Z B ).
[0149] It should be noted that the sixth angle can be obtained in the same manner as the first angle, and the method for obtaining the sixth angle is a relatively mature technology at present. Any method that can obtain the sixth angle falls within the protection scope of the embodiments of the present application.
[0150] Step B13, determining the position coordinates of the target object according to the third distance;
[0151] Step B14, determining the position coordinates of the light spot according to the position coordinates of the target object, the position coordinates of the first device, the third angle, the fourth angle and the fifth angle;
[0152] Among them, the third angle is the angle between the light spot and the first device and the first device to the target object; the fourth angle is the angle between the line from the first device to the light spot and the plane where the second device and the first device are located in the coordinate system; the fifth angle is the angle between the line from the target object to the light spot and the second plane, and the second plane is a plane perpendicular to the plane where the second device and the first device are located in the coordinate system.
[0153] Optionally, the image of the target object and the light spot taken by the first device is as follows: Fig.10 As shown, Fig. 9 The ∠LAB (i.e., the third angle) can be obtained in the same way as the first angle, and the method for obtaining the third angle is a relatively mature technology at present. Any method that can obtain the third angle falls within the protection scope of the embodiments of the present application.
[0154] Optionally, the fourth angle can be obtained in the same manner as the first angle, and the method for obtaining the fourth angle is a relatively mature technology at present. Any method that can obtain the fourth angle falls within the protection scope of the embodiments of the present application.
[0155] Since the second camera of the second device cannot capture the light source position information, it can capture the target object (e.g., facial information (e.g., human face)). The distance from the second device to the target object and the orientation information of the light source point relative to the human face can be obtained by calculating the camera focal length and display position. By establishing an auxiliary plane (i.e., the second plane) with the position of the B coordinate point, the fifth angle can be known. The orientation of the target object (e.g., human eye), the light source, and the camera can be obtained. Fig.11 As shown, the fifth angle can be obtained in the same manner as the first angle, and the method for obtaining the fifth angle is a relatively mature technology at present. Any method that can obtain the fifth angle falls within the protection scope of the embodiments of the present application.
[0156] In such Fig. 9 In the △LBA shown, AB and ∠LAB as well as ∠α (i.e., the fourth angle) and ∠β (i.e., the fifth angle) in space are known, and the coordinates of point L need to be solved. In the specific implementation, a variety of calculation methods can be used. Only one of them is listed in the embodiment of the present application, which does not constitute a limitation to the embodiments of the present application.
[0157] According to formula 3, formula 4 and formula 5, the coordinates of point L are obtained:
[0158]
[0159] Among them, X1 represents X2 means X3 indicates
[0160] By solving the three formulas, the coordinates of point L in three directions can be determined.
[0161] Step B15, determining a first distance between the light spot and the first device according to the position coordinates of the light spot and the position coordinates of the first device;
[0162] When the coordinates of two points are known, the distance between the two points can be obtained based on the distance formula.
[0163] Optionally, in one implementation, the specific implementation of acquiring the second light intensity corresponding to the position of the second device according to the first distance and the first light intensity detected by the first device includes:
[0164] Step A21, acquiring a third light intensity of a mapping position of the first device according to the first distance, the first light intensity, and the angle between the first device and the light spot and the light spot and the second device, wherein the mapping position is located on an extension line of a line connecting the light spot and the second device, and the distance from the mapping position to the light spot is equal to the first distance, wherein, when the distance to the light spot position is the same, the light source angle and the light intensity satisfy the Lambertian distribution law;
[0165] Step A22: Based on the third light intensity, the first distance, and the distance between the second device and the light spot, obtain the second light intensity corresponding to the position of the second device.
[0166] Optionally, the angle between the first device and the light spot and the light spot and the second device, i.e., ∠ALO in △OAL, can be obtained in the following way: if ∠OAL and ∠AOL are known, ∠ALO can be determined based on the theorem that the sum of the three angles in a triangle is 180 degrees. Since the mapping position of the first device is located on the extension line of the line connecting the light spot and the second device, and the distance from the mapping position to the light spot is equal to the first distance, i.e., LA=LA', based on the Lambertian distribution law of a typical light source (satisfying the cosine response curve), i.e. Where I represents the main intensity of the light source, I represents the distance from the light source, and E represents the light intensity. The light intensity at the first device can be known through the detection of the first device, and the light intensity at A' can be determined through ∠ALO. For example, the light intensity at A' can be determined by Figure 8 The distance shown is determined by the light source's luminous angle, the absolute intensity of the light field, and the cosine response curve of the light source's angle distribution at the same distance from the light source.
[0167] After obtaining the light intensity at A', the light intensity at O (i.e., at the second device) can be determined. That is, when the light intensity information at point A' is known to be E A′ (i.e., the third light intensity at the mapping position of the first device), derive E O(that is, the second light intensity corresponding to the location of the second device), according to Formula 2 on the relationship between illumination and distance, the second light intensity corresponding to the location of the second device can be determined.
[0168] Optionally, a method for acquiring the second distance in the embodiment of the present application is:
[0169] Obtain a first distance determined based on a microphone of the second device and a speaker of the first device;
[0170] Obtain a second distance determined based on the speaker of the second device and the microphone of the first device;
[0171] Acquire a third distance determined based on the Bluetooth communication module of the second device and the Bluetooth communication module of the first device;
[0172] Acquire the position coordinates of the first device in the coordinate system according to the first spacing, the second spacing, and the third spacing;
[0173] The second distance is determined according to the position coordinates.
[0174] It should be noted that in the embodiment of the present application, the first device and the second device cooperate to obtain three different distances. Based on these three distances, the position coordinates of the first device in the coordinate system can be determined, and then the second distance between the first device and the second device can be determined based on the position coordinates.
[0175] The specific implementation method of the embodiment of the present application is illustrated below by way of example.
[0176] The hardware architecture of the embodiment of the present application is as follows Fig.12 As shown, it mainly includes: a first device 101, a second device 105, and further involved components are mainly:
[0177] The first camera 102 of the first device 101 is used to capture the position of the ambient light source;
[0178] The first device microphone 103 is used to receive the ultrasonic signal emitted by the second device speaker 106;
[0179] The first device speaker 104 is used to transmit ultrasonic signals to the second device microphone 107;
[0180] The second device speaker 106 is used to transmit ultrasonic signals to the first device microphone 103 .
[0181] The second device microphone 107 is used to receive the ultrasonic signal emitted by the first device speaker 104 .
[0182] The second camera 108 of the second device 105 is used to capture the position of the ambient light source.
[0183] The hardware architecture of the first device and the second device is as follows Fig.13 As shown, the ambient light sensor 201 inside the first device is used to detect the intensity of ambient light; the audio system (BOX / MIC) 202 of the first device is used to transmit and receive audio signals; the inertial sensor (IMU) 203 detects the posture of the first device, determines whether it is horizontal and whether the position relationship is moved, and is used to compensate for the difference in ambient light angles and re-establish the relative position; the front camera 204 of the first device is used to capture the position of the ambient light source; the controller 205 of the first device is used for data processing (including processing of audio data); the Bluetooth communication module 206 of the first device is used to communicate with the second device and perform positioning; the power supply 207 of the first device is used to power the first device system; the front camera 208 of the second device is used to capture the position of the ambient light source; the audio system (BOX / MIC) 209 of the second device is used to transmit and receive audio signals; the Bluetooth communication module 210 of the second device is used to communicate with the first device and perform positioning; the controller 211 of the second device is used for data processing (including processing of audio data); the power supply 212 of the second device is used to power the first device system.
[0184] like Figures 14 to 16 As shown, in the embodiment of the present application, the distance between the first device and the second device is determined in three ways: Fig.14 The first device microphone 103 and the second device speaker 106 are used to obtain a first distance, Fig.15 The first device speaker 104 and the second device microphone 107 are used to obtain a second distance, Fig.16 The third distance is obtained by using the Bluetooth communication module 206 of the first device and the Bluetooth communication module 210 of the second device. Based on these three distances, the relative position relationship between the first device and the second device can be determined.
[0185] like Fig.17 As shown in the figure, the specific application implementation process of scenario 1 includes:
[0186] Step 171, locate the positional relationship between the first device and the second device, and obtain the distance from the second device to the first device;
[0187] Step 172, the first device and the second device take photos respectively to obtain a first image and a second image;
[0188] Step 173, establishing a positional relationship of the light spot formed by the second device, the first device, and the light source based on the first image and the second image and the distance from the second device to the first device;
[0189] Step 174, obtaining the light intensity of the second device;
[0190] Step 175, determining whether the light intensity detected by the first device has changed, if not, executing step 176, otherwise, executing step 174;
[0191] Step 177, determining whether the positional relationship between the first device and the second device has changed, if so, executing step 171, otherwise, executing step 178;
[0192] Step 178, adjusting the screen brightness of the second device;
[0193] Step 179, determine whether the second device has been used up. If not, execute step 175; otherwise, end the process.
[0194] like Fig.18 As shown in the figure, the specific application implementation process of scenario 2 includes:
[0195] Step 1801, locate the position relationship between the first device and the second device, and obtain the distance from the second device to the first device;
[0196] Step 1802: The first device and the second device take photos respectively to obtain a first image and a second image;
[0197] Step 1803, determining whether the master device can detect the ambient light direction;
[0198] If it cannot be detected, execute step 1804, otherwise, execute step 1805;
[0199] Step 1804, establishing a relative position relationship between the second device, the target object, and the light source;
[0200] Step 1805, establishing a positional relationship between the light spot formed by the second device, the first device and the light source;
[0201] Step 1806, obtaining the light intensity of the second device;
[0202] Step 1807, determining whether the light intensity detected by the first device has changed, if not, executing step 1808, otherwise, executing step 1806;
[0203] Step 1808, determining whether the positional relationship between the first device and the second device has changed, if so, executing step 1801, otherwise, executing step 1809;
[0204] Step 1809, adjusting the screen brightness of the second device;
[0205] Step 1810, determine whether the second device has been used up. If not, execute step 1807; otherwise, end the process.
[0206] It should be noted that the above application can map the light intensity detected by the first device to the light intensity of the second device by establishing the position information and relationship between the first device, the second device and the light source. In the scenario where the second device is polarized and backlit, a real-time, high-precision, large-range, and high-linear second device ambient light detection solution can be implemented, so that the second device that does not support automatic adjustment of screen brightness (such as a laptop, etc.) has the ability to adjust.
[0207] It should be noted that in order to solve the problem that the second device (taking a laptop computer as an example) does not have an automatic screen dimming function and that the ambient light intensity at the second device location cannot be accurately derived, the embodiment of the present application proposes a solution to enable devices without ambient light detection capabilities to support automatic screen dimming. Through the spatial positioning technology of the first device (smartphone) and the second device, utilizing the existing ultrasonic positioning and Bluetooth positioning of the devices, combined with the light source orientation detection solution, the position information and light source distribution information are reconstructed and restored, the ambient light energy at the target location is accurately calculated, and the changes in ambient illumination are monitored in real time, thereby realizing a real-time, high-precision, large-range, and high-linearity main device ambient light detection solution, so that the main device that does not support automatic adjustment of screen brightness (laptop computers, etc.) has automatic adjustment capabilities.
[0208] like Fig.19 As shown, at least one embodiment of the present application further provides a light intensity acquisition device, which is applied to an electronic device, and the device includes:
[0209] A first acquisition module 1901 is used to construct a positional relationship between a light spot formed by the second device, the first device, and the light source according to a first image captured by a first camera of the first device and a second image captured by a second camera of the second device, and to acquire a first distance between the light spot and the first device, wherein the first image at least includes the light spot formed by the light source;
[0210] A second acquisition module 1902 is used to acquire a second light intensity corresponding to the position of the second device according to the first distance and the first light intensity detected by the first device, where the second light intensity is used to adjust the brightness of a display screen of the second device;
[0211] The sending module 1903 is configured to send the second light intensity to a second device.
[0212] Optionally, the first camera captures a first image located on one side of a display screen of the first device, and the first device detects a first light intensity located on one side of the display screen of the first device.
[0213] Optionally, the second device captures a second image located on one side of a display screen of the second device, and the second image and the first image contain at least an image formed by a target feature, and the target feature includes at least one of the following: a light source, a target object facing the display screen of the second device.
[0214] Optionally, the second image includes a light spot formed by a light source, and the first acquisition module 1901 includes:
[0215] A first construction unit, used to construct a coordinate system with the second device as the origin;
[0216] A first acquisition unit, configured to acquire a first distance between the light spot and the first device according to the first angle, the second angle, and the second distance in the coordinate system;
[0217] Among them, the first angle is the angle between the light spot and the first plane, and the first plane is the plane where the second device and the first device are located in the coordinate system; the second angle is the angle between the light spot to the second device and the angle between the first device and the second device; the second distance is the distance from the second device to the first device.
[0218] Optionally, the second image only includes an image of a target object facing a display screen of the second device, and the first acquisition module 1901 includes:
[0219] A second construction unit, used to construct a coordinate system with the second device as the origin;
[0220] A second acquisition unit, configured to acquire a third distance from the first device to the target object in the coordinate system;
[0221] A first determining unit, configured to determine the position coordinates of the target object according to the third distance;
[0222] A second determining unit, configured to determine the position coordinates of the light spot according to the position coordinates of the target object, the position coordinates of the first device, the third angle, the fourth angle, and the fifth angle;
[0223] a third determining unit, configured to determine a first distance between the light spot and the first device according to the position coordinates of the light spot and the position coordinates of the first device;
[0224] Among them, the third angle is the angle between the light spot and the first device and the first device to the target object; the fourth angle is the angle between the line from the first device to the light spot and the plane where the second device and the first device are located in the coordinate system; the fifth angle is the angle between the line from the target object to the light spot and the second plane, and the second plane is a plane perpendicular to the plane where the second device and the first device are located in the coordinate system.
[0225] Optionally, the second acquiring unit is used to:
[0226] Acquire a sixth angle, where the sixth angle is an angle between the second device and the first device and between the first device and the target object;
[0227] Determine a third distance from the first device to the target object according to the fourth distance between the second device and the target object, the sixth angle, and the second distance;
[0228] The second distance is the distance from the second device to the first device.
[0229] Optionally, the device further comprises:
[0230] A third acquisition module, used to acquire a first distance determined based on a microphone of the second device and a speaker of the first device;
[0231] A fourth acquisition module, configured to acquire a second distance determined based on a speaker of the second device and a microphone of the first device;
[0232] A fifth acquisition module, used to acquire a third distance determined based on the Bluetooth communication module of the second device and the Bluetooth communication module of the first device;
[0233] a sixth acquisition module, configured to acquire the position coordinates of the first device in the coordinate system according to the first interval, the second interval, and the third interval;
[0234] The first determining module is used to determine the second distance according to the position coordinates.
[0235] Optionally, the second acquisition module 1902 includes:
[0236] A third acquisition unit is used to acquire a third light intensity of a mapping position of the first device according to the first distance, the first light intensity, and an angle between the first device and the light spot and between the light spot and the second device, wherein the mapping position is located on an extension line of a line connecting the light spot and the second device, and the distance from the mapping position to the light spot is equal to the first distance, wherein, when the distance to the light spot position is the same, the light source angle and the light intensity satisfy the Lambertian distribution law;
[0237] The fourth acquisition unit is used to acquire the second light intensity corresponding to the position of the second device based on the third light intensity, the first distance, and the distance between the second device and the light spot.
[0238] It should be noted that the device embodiment corresponds to the above method, and all implementation methods in the above method embodiment are applicable to the device embodiment and can achieve the same technical effect.
[0239] The light intensity acquisition device provided in the embodiment of the present application can achieve Figure 1 The various processes implemented by the method embodiment and achieving the same technical effect are not described here to avoid repetition.
[0240] An embodiment of the present application further provides an electronic device, including a processor and a communication interface, wherein the processor is used to construct a positional relationship between a light spot formed by a second device, the first device, and a light source according to a first image captured by a first camera of a first device and a second image captured by a second camera of a second device, and obtain a first distance between the light spot and the first device, wherein the first image at least includes the light spot formed by the light source;
[0241] acquiring, according to the first distance and the first light intensity detected by the first device, a second light intensity corresponding to the position of the second device, wherein the second light intensity is used to adjust the brightness of a display screen of the second device;
[0242] The communication interface is used to send the second light intensity to a second device.
[0243] Optionally, the first camera captures a first image located on one side of a display screen of the first device, and the first device detects a first light intensity located on one side of the display screen of the first device.
[0244] Optionally, the second device captures a second image located on one side of a display screen of the second device, and the second image and the first image contain at least an image formed by a target feature, and the target feature includes at least one of the following: a light source, a target object facing the display screen of the second device.
[0245] Optionally, the second image includes a light spot formed by a light source, and the processor is configured to:
[0246] Constructing a coordinate system with the second device as the origin;
[0247] Acquire a first distance between the light spot and the first device according to the first angle, the second angle, and the second distance in the coordinate system;
[0248] Among them, the first angle is the angle between the light spot and the first plane, and the first plane is the plane where the second device and the first device are located in the coordinate system; the second angle is the angle between the light spot to the second device and the angle between the first device and the second device; the second distance is the distance from the second device to the first device.
[0249] Optionally, the second image only includes an image of a target object facing a display screen of the second device, and the processor is configured to:
[0250] Constructing a coordinate system with the second device as the origin;
[0251] Acquire a third distance from the first device to the target object in the coordinate system;
[0252] Determining the position coordinates of the target object according to the third distance;
[0253] Determine the position coordinates of the light spot according to the position coordinates of the target object, the position coordinates of the first device, the third angle, the fourth angle, and the fifth angle;
[0254] Determining a first distance between the light spot and the first device according to the position coordinates of the light spot and the position coordinates of the first device;
[0255] Among them, the third angle is the angle between the light spot and the first device and the first device to the target object; the fourth angle is the angle between the line from the first device to the light spot and the plane where the second device and the first device are located in the coordinate system; the fifth angle is the angle between the line from the target object to the light spot and the second plane, and the second plane is a plane perpendicular to the plane where the second device and the first device are located in the coordinate system.
[0256] Optionally, the processor is configured to:
[0257] Acquire a sixth angle, where the sixth angle is an angle between the second device and the first device and between the first device and the target object;
[0258] Determine a third distance from the first device to the target object according to the fourth distance between the second device and the target object, the sixth angle, and the second distance;
[0259] The second distance is the distance from the second device to the first device.
[0260] Optionally, the processor is further configured to:
[0261] Obtain a first distance determined based on a microphone of the second device and a speaker of the first device;
[0262] Obtain a second distance determined based on the speaker of the second device and the microphone of the first device;
[0263] Acquire a third distance determined based on the Bluetooth communication module of the second device and the Bluetooth communication module of the first device;
[0264] Acquire the position coordinates of the first device in the coordinate system according to the first spacing, the second spacing, and the third spacing;
[0265] The second distance is determined according to the position coordinates.
[0266] Optionally, the processor is configured to:
[0267] According to the first distance, the first light intensity, and the angle between the first device and the light spot and the light spot and the second device, a third light intensity of the mapping position of the first device is obtained, wherein the mapping position is located on the extension line of the line connecting the light spot and the second device, and the distance from the mapping position to the light spot is equal to the first distance, wherein when the distance to the light spot position is the same, the light source angle and the light intensity satisfy the Lambertian distribution law;
[0268] Based on the third light intensity, the first distance, and the distance between the second device and the light spot, a second light intensity corresponding to the position of the second device is acquired.
[0269] like Fig. 20 As shown, an embodiment of the present application provides a screen brightness adjustment method, which is applied to an electronic device, and the method includes:
[0270] Step 2001, constructing a positional relationship among a light spot formed by the second device, the first device, and a light source according to a first image captured by a first camera of the first device and a second image captured by a second camera of the second device, and acquiring a first distance between the light spot and the first device, wherein the first image at least includes the light spot formed by the light source;
[0271] Step 2002: acquiring a second light intensity corresponding to the position of the second device according to the first distance and the first light intensity detected by the first device, where the second light intensity is used to adjust the brightness of a display screen of the second device;
[0272] Step 2003: Adjust the brightness of the display screen according to the second light intensity.
[0273] It should be noted that, through the above-mentioned implementation steps of the embodiment of the present application, it is possible to obtain the light intensity at the location of the second device, and then adjust the brightness of the display screen of the second device, thereby improving the user experience of the second device.
[0274] Optionally, the first camera captures a first image located on one side of a display screen of the first device, and the first device detects a first light intensity located on one side of the display screen of the first device.
[0275] Optionally, the second device captures a second image located on one side of a display screen of the second device, and the second image and the first image contain at least an image formed by a target feature, and the target feature includes at least one of the following: a light source, a target object facing the display screen of the second device.
[0276] Optionally, the second image includes a light spot formed by the light source, and constructing a positional relationship among the second device, the first device, and the light spot formed by the light source, and acquiring a first distance between the light spot and the first device includes:
[0277] Constructing a coordinate system with the second device as the origin;
[0278] Acquire a first distance between the light spot and the first device according to the first angle, the second angle, and the second distance in the coordinate system;
[0279] Among them, the first angle is the angle between the light spot and the first plane, and the first plane is the plane where the second device and the first device are located in the coordinate system; the second angle is the angle between the light spot to the second device and the angle between the first device and the second device; the second distance is the distance from the second device to the first device.
[0280] Optionally, the second image includes only an image of a target object facing a display screen of the second device, and constructing a positional relationship between a light spot formed by the second device, the first device, and the light source, and acquiring a first distance between the light spot and the first device includes:
[0281] Constructing a coordinate system with the second device as the origin;
[0282] Acquire a third distance from the first device to the target object in the coordinate system;
[0283] Determining the position coordinates of the target object according to the third distance;
[0284] Determine the position coordinates of the light spot according to the position coordinates of the target object, the position coordinates of the first device, the third angle, the fourth angle, and the fifth angle;
[0285] Determining a first distance between the light spot and the first device according to the position coordinates of the light spot and the position coordinates of the first device;
[0286] Among them, the third angle is the angle between the light spot and the first device and the first device to the target object; the fourth angle is the angle between the line from the first device to the light spot and the plane where the second device and the first device are located in the coordinate system; the fifth angle is the angle between the line from the target object to the light spot and the second plane, and the second plane is a plane perpendicular to the plane where the second device and the first device are located in the coordinate system.
[0287] Optionally, acquiring a third distance from the first device to the target object in the coordinate system includes:
[0288] Acquire a sixth angle, where the sixth angle is an angle between the second device and the first device and between the first device and the target object;
[0289] Determine a third distance from the first device to the target object according to the fourth distance between the second device and the target object, the sixth angle, and the second distance;
[0290] The second distance is the distance from the second device to the first device.
[0291] Optionally, the method further includes:
[0292] Obtain a first distance determined based on a microphone of the second device and a speaker of the first device;
[0293] Obtain a second distance determined based on the speaker of the second device and the microphone of the first device;
[0294] Acquire a third distance determined based on the Bluetooth communication module of the second device and the Bluetooth communication module of the first device;
[0295] Acquire the position coordinates of the first device in the coordinate system according to the first spacing, the second spacing, and the third spacing;
[0296] The second distance is determined according to the position coordinates.
[0297] Optionally, acquiring a second light intensity corresponding to a position of the second device according to the first distance and the first light intensity detected by the first device includes:
[0298] According to the first distance, the first light intensity, and the angle between the first device and the light spot and the light spot and the second device, a third light intensity of the mapping position of the first device is obtained, wherein the mapping position is located on the extension line of the line connecting the light spot and the second device, and the distance from the mapping position to the light spot is equal to the first distance, wherein when the distance to the light spot position is the same, the light source angle and the light intensity satisfy the Lambertian distribution law;
[0299] Based on the third light intensity, the first distance, and the distance between the second device and the light spot, a second light intensity corresponding to the position of the second device is acquired.
[0300] It should be noted that all implementation methods in the above-mentioned light intensity acquisition method embodiment are applicable to the screen brightness adjustment method embodiment, and will not be described again here to avoid repetition.
[0301] like Fig.21 As shown, at least one embodiment of the present application further provides a screen brightness adjustment device, which is applied to an electronic device, and the device includes:
[0302] A seventh acquisition module 2101 is used to construct a positional relationship between the second device, the first device, and a light spot formed by the light source according to a first image captured by a first camera of the first device and a second image captured by a second camera of the second device, and to acquire a first distance between the light spot and the first device, wherein the first image at least includes the light spot formed by the light source;
[0303] an eighth acquisition module 2102, configured to acquire a second light intensity corresponding to the position of the second device according to the first distance and the first light intensity detected by the first device, wherein the second light intensity is used to adjust the brightness of a display screen of the second device;
[0304] The adjustment module 2103 is used to adjust the brightness of the display screen according to the second light intensity.
[0305] Optionally, the first camera captures a first image located on one side of a display screen of the first device, and the first device detects a first light intensity located on one side of the display screen of the first device.
[0306] Optionally, the second device captures a second image located on one side of a display screen of the second device, and the second image and the first image contain at least an image formed by a target feature, and the target feature includes at least one of the following: a light source, a target object facing the display screen of the second device.
[0307] Optionally, the second image includes a light spot formed by a light source, and the seventh acquisition module 2101 includes:
[0308] A third construction unit, used to construct a coordinate system with the second device as the origin;
[0309] A fifth acquisition unit, configured to acquire a first distance between the light spot and the first device according to the first angle, the second angle, and the second distance in the coordinate system;
[0310] Among them, the first angle is the angle between the light spot and the first plane, and the first plane is the plane where the second device and the first device are located in the coordinate system; the second angle is the angle between the light spot to the second device and the angle between the first device and the second device; the second distance is the distance from the second device to the first device.
[0311] Optionally, the second image only includes an image of a target object facing the display screen of the second device, and the seventh acquisition module 2101 includes:
[0312] A fourth construction unit, used to construct a coordinate system with the second device as the origin;
[0313] A sixth acquisition unit, configured to acquire a third distance from the first device to the target object in the coordinate system;
[0314] a fourth determining unit, configured to determine the position coordinates of the target object according to the third distance;
[0315] a fifth determining unit, configured to determine the position coordinates of the light spot according to the position coordinates of the target object, the position coordinates of the first device, the third angle, the fourth angle, and the fifth angle;
[0316] A sixth determining unit, configured to determine a first distance between the light spot and the first device according to the position coordinates of the light spot and the position coordinates of the first device;
[0317] Among them, the third angle is the angle between the light spot and the first device and the first device to the target object; the fourth angle is the angle between the line from the first device to the light spot and the plane where the second device and the first device are located in the coordinate system; the fifth angle is the angle between the line from the target object to the light spot and the second plane, and the second plane is a plane perpendicular to the plane where the second device and the first device are located in the coordinate system.
[0318] Optionally, the sixth acquiring unit is used to:
[0319] Acquire a sixth angle, where the sixth angle is an angle between the second device and the first device and between the first device and the target object;
[0320] Determine a third distance from the first device to the target object according to the fourth distance between the second device and the target object, the sixth angle, and the second distance;
[0321] The second distance is the distance from the second device to the first device.
[0322] Optionally, the device further comprises:
[0323] An eighth acquisition module, configured to acquire a first distance determined based on a microphone of the second device and a speaker of the first device;
[0324] A ninth acquisition module, configured to acquire a second distance determined based on a speaker of the second device and a microphone of the first device;
[0325] a tenth acquisition module, configured to acquire a third distance determined based on the Bluetooth communication module of the second device and the Bluetooth communication module of the first device;
[0326] an eleventh acquisition module, configured to acquire the position coordinates of the first device in the coordinate system according to the first interval, the second interval, and the third interval;
[0327] The second determining module is used to determine the second distance according to the position coordinates.
[0328] Optionally, the eighth acquisition module 2102 includes:
[0329] a seventh acquisition unit, configured to acquire a third light intensity of a mapping position of the first device according to the first distance, the first light intensity, and an angle between the first device and the light spot and between the light spot and the second device, wherein the mapping position is located on an extension line of a line connecting the light spot and the second device, and the distance from the mapping position to the light spot is equal to the first distance, wherein, when the distance to the light spot position is the same, the light source angle and the light intensity satisfy the Lambertian distribution law;
[0330] An eighth acquisition unit is used to acquire a second light intensity corresponding to the position of the second device based on the third light intensity, the first distance, and the distance between the second device and the light spot.
[0331] It should be noted that the device embodiment corresponds to the above method, and all implementation methods in the above method embodiment are applicable to the device embodiment and can achieve the same technical effect.
[0332] The screen brightness adjustment device provided in the embodiment of the present application can achieve Fig. 20 The various processes implemented by the method embodiment and achieving the same technical effect are not described here to avoid repetition.
[0333] An embodiment of the present application further provides an electronic device, including a processor and a communication interface, wherein the processor is used to construct a positional relationship between a light spot formed by a second device, the first device, and a light source according to a first image captured by a first camera of a first device and a second image captured by a second camera of a second device, and obtain a first distance between the light spot and the first device, wherein the first image at least includes the light spot formed by the light source;
[0334] acquiring, according to the first distance and the first light intensity detected by the first device, a second light intensity corresponding to the position of the second device, wherein the second light intensity is used to adjust the brightness of a display screen of the second device;
[0335] The brightness of the display screen is adjusted according to the second light intensity.
[0336] Optionally, the first camera captures a first image located on one side of a display screen of the first device, and the first device detects a first light intensity located on one side of the display screen of the first device.
[0337] Optionally, the second device captures a second image located on one side of a display screen of the second device, and the second image and the first image contain at least an image formed by a target feature, and the target feature includes at least one of the following: a light source, a target object facing the display screen of the second device.
[0338] Optionally, the second image includes a light spot formed by a light source, and the processor is used to: construct a coordinate system with the second device as the origin;
[0339] Acquire a first distance between the light spot and the first device according to the first angle, the second angle, and the second distance in the coordinate system;
[0340] Among them, the first angle is the angle between the light spot and the first plane, and the first plane is the plane where the second device and the first device are located in the coordinate system; the second angle is the angle between the light spot to the second device and the angle between the first device and the second device; the second distance is the distance from the second device to the first device.
[0341] Optionally, the second image only includes an image of a target object facing a display screen of the second device, and the processor is configured to: construct a coordinate system with the second device as the origin;
[0342] Acquire a third distance from the first device to the target object in the coordinate system;
[0343] Determining the position coordinates of the target object according to the third distance;
[0344] Determine the position coordinates of the light spot according to the position coordinates of the target object, the position coordinates of the first device, the third angle, the fourth angle, and the fifth angle;
[0345] Determining a first distance between the light spot and the first device according to the position coordinates of the light spot and the position coordinates of the first device;
[0346] Among them, the third angle is the angle between the light spot and the first device and the first device to the target object; the fourth angle is the angle between the line from the first device to the light spot and the plane where the second device and the first device are located in the coordinate system; the fifth angle is the angle between the line from the target object to the light spot and the second plane, and the second plane is a plane perpendicular to the plane where the second device and the first device are located in the coordinate system.
[0347] Optionally, the processor is configured to:
[0348] Acquire a sixth angle, where the sixth angle is an angle between the second device and the first device and between the first device and the target object;
[0349] Determine a third distance from the first device to the target object according to the fourth distance between the second device and the target object, the sixth angle, and the second distance;
[0350] The second distance is the distance from the second device to the first device.
[0351] Optionally, the processor is further configured to:
[0352] Obtain a first distance determined based on a microphone of the second device and a speaker of the first device;
[0353] Obtain a second distance determined based on the speaker of the second device and the microphone of the first device;
[0354] Acquire a third distance determined based on the Bluetooth communication module of the second device and the Bluetooth communication module of the first device;
[0355] Acquire the position coordinates of the first device in the coordinate system according to the first spacing, the second spacing, and the third spacing;
[0356] The second distance is determined according to the position coordinates.
[0357] Optionally, the processor is configured to:
[0358] According to the first distance, the first light intensity, and the angle between the first device and the light spot and the light spot and the second device, a third light intensity of the mapping position of the first device is obtained, wherein the mapping position is located on the extension line of the line connecting the light spot and the second device, and the distance from the mapping position to the light spot is equal to the first distance, wherein when the distance to the light spot position is the same, the light source angle and the light intensity satisfy the Lambertian distribution law;
[0359] Based on the third light intensity, the first distance, and the distance between the second device and the light spot, a second light intensity corresponding to the position of the second device is acquired.
[0360] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned light intensity acquisition method or screen brightness adjustment method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0361] The readable storage medium may be non-volatile or non-transient. The readable storage medium may include a computer-readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0362] The embodiments of the present application further provide a computer program / program product, which is stored in a storage medium. The computer program / program product is executed by at least one processor to implement the various processes of the above-mentioned light intensity acquisition method or screen brightness adjustment method embodiments, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0363] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A method for obtaining light intensity, characterized in that: include: According to a first image captured by a first camera of the first device and a second image captured by a second camera of the second device, a positional relationship among a light spot formed by the second device, the first device, and a light source is constructed to obtain a first distance between the light spot and the first device, wherein the first image at least includes the light spot formed by the light source; acquiring, according to the first distance and the first light intensity detected by the first device, a second light intensity corresponding to the position of the second device, wherein the second light intensity is used to adjust the brightness of a display screen of the second device; The second light intensity is sent to a second device.
2. The method according to claim 1, characterized in that The first camera captures a first image located on one side of the display screen of the first device, and the first device detects a first light intensity located on one side of the display screen of the first device.
3. The method according to claim 2, characterized in that The second device captures a second image located on one side of the display screen of the second device. The second image and the first image contain at least an image formed by a target feature, and the target feature includes at least one of the following: a light source and a target object facing the display screen of the second device.
4. The method according to any one of claims 1 to 3, characterized in that: The second image includes a light spot formed by the light source, and constructing a positional relationship among the second device, the first device, and the light spot formed by the light source to obtain a first distance between the light spot and the first device includes: Constructing a coordinate system with the second device as the origin; Acquire a first distance between the light spot and the first device according to the first angle, the second angle, and the second distance in the coordinate system; Among them, the first angle is the angle between the light spot and the first plane, and the first plane is the plane where the second device and the first device are located in the coordinate system; the second angle is the angle between the light spot to the second device and the angle between the first device and the second device; the second distance is the distance from the second device to the first device.
5. The method according to any one of claims 1 to 3, characterized in that: The second image only includes an image of a target object facing the display screen of the second device, and constructing a positional relationship of a light spot formed by the second device, the first device, and the light source, and acquiring a first distance between the light spot and the first device includes: Constructing a coordinate system with the second device as the origin; Acquire a third distance from the first device to the target object in the coordinate system; Determining the position coordinates of the target object according to the third distance; Determine the position coordinates of the light spot according to the position coordinates of the target object, the position coordinates of the first device, the third angle, the fourth angle, and the fifth angle; Determining a first distance between the light spot and the first device according to the position coordinates of the light spot and the position coordinates of the first device; Among them, the third angle is the angle between the light spot and the first device and the first device to the target object; the fourth angle is the angle between the line from the first device to the light spot and the plane where the second device and the first device are located in the coordinate system; the fifth angle is the angle between the line from the target object to the light spot and the second plane, and the second plane is a plane perpendicular to the plane where the second device and the first device are located in the coordinate system.
6. The method according to claim 5, characterized in that The acquiring a third distance from the first device to the target object in the coordinate system includes: Acquire a sixth angle, where the sixth angle is an angle between the second device and the first device and between the first device and the target object; Determine a third distance from the first device to the target object according to the fourth distance between the second device and the target object, the sixth angle, and the second distance; The second distance is the distance from the second device to the first device.
7. The method according to claim 4 or 6, characterized in that: Also includes: Obtain a first distance determined based on a microphone of the second device and a speaker of the first device; Obtain a second distance determined based on the speaker of the second device and the microphone of the first device; Acquire a third distance determined based on the Bluetooth communication module of the second device and the Bluetooth communication module of the first device; Acquire the position coordinates of the first device in the coordinate system according to the first spacing, the second spacing, and the third spacing; The second distance is determined according to the position coordinates.
8. The method according to any one of claims 1 to 3, characterized in that: The acquiring, according to the first distance and the first light intensity detected by the first device, a second light intensity corresponding to a position of the second device includes: According to the first distance, the first light intensity, and the angle between the first device and the light spot and the light spot and the second device, a third light intensity of the mapping position of the first device is obtained, wherein the mapping position is located on the extension line of the line connecting the light spot and the second device, and the distance from the mapping position to the light spot is equal to the first distance, wherein when the distance to the light spot position is the same, the light source angle and the light intensity satisfy the Lambertian distribution law; Based on the third light intensity, the first distance, and the distance between the second device and the light spot, a second light intensity corresponding to the position of the second device is acquired.
9. A light intensity acquisition device, characterized in that: include: A first acquisition module, configured to construct a positional relationship between a light spot formed by the second device, the first device, and the light source, and acquire a first distance between the light spot and the first device according to a first image captured by a first camera of the first device and a second image captured by a second camera of the second device, wherein the first image at least includes the light spot formed by the light source; A second acquisition module, configured to acquire a second light intensity corresponding to the position of the second device according to the first distance and the first light intensity detected by the first device, wherein the second light intensity is used to adjust the brightness of a display screen of the second device; A sending module is used to send the second light intensity to a second device.
10. The device according to claim 9, characterized in that The second image includes a light spot formed by a light source, and the first acquisition module includes: A first construction unit, used to construct a coordinate system with the second device as the origin; A first acquisition unit, configured to acquire a first distance between the light spot and the first device according to the first angle, the second angle, and the second distance in the coordinate system; Among them, the first angle is the angle between the light spot and the first plane, and the first plane is the plane where the second device and the first device are located in the coordinate system; the second angle is the angle between the light spot to the second device and the angle between the first device and the second device; the second distance is the distance from the second device to the first device.
11. The device according to claim 9, characterized in that The second image only includes an image of a target object facing a display screen of the second device, and the first acquisition module includes: A second construction unit, used to construct a coordinate system with the second device as the origin; A second acquisition unit, configured to acquire a third distance from the first device to the target object in the coordinate system; A first determining unit, configured to determine the position coordinates of the target object according to the third distance; A second determining unit, configured to determine the position coordinates of the light spot according to the position coordinates of the target object, the position coordinates of the first device, the third angle, the fourth angle, and the fifth angle; a third determining unit, configured to determine a first distance between the light spot and the first device according to the position coordinates of the light spot and the position coordinates of the first device; Among them, the third angle is the angle between the light spot and the first device and the first device to the target object; the fourth angle is the angle between the line from the first device to the light spot and the plane where the second device and the first device are located in the coordinate system; the fifth angle is the angle between the line from the target object to the light spot and the second plane, and the second plane is a plane perpendicular to the plane where the second device and the first device are located in the coordinate system.
12. The device according to claim 11, characterized in that The second acquiring unit is used for: Acquire a sixth angle, where the sixth angle is an angle between the second device and the first device and between the first device and the target object; Determine a third distance from the first device to the target object according to the fourth distance between the second device and the target object, the sixth angle, and the second distance; The second distance is the distance from the second device to the first device.
13. The device according to claim 10 or 12, characterized in that Also includes: A third acquisition module, used to acquire a first distance determined based on a microphone of the second device and a speaker of the first device; A fourth acquisition module, configured to acquire a second distance determined based on a speaker of the second device and a microphone of the first device; A fifth acquisition module, used to acquire a third distance determined based on the Bluetooth communication module of the second device and the Bluetooth communication module of the first device; a sixth acquisition module, configured to acquire the position coordinates of the first device in the coordinate system according to the first interval, the second interval, and the third interval; The first determining module is used to determine the second distance according to the position coordinates.
14. The device according to claim 9, characterized in that The second acquisition module includes: A third acquisition unit is used to acquire a third light intensity of a mapping position of the first device according to the first distance, the first light intensity, and an angle between the first device and the light spot and between the light spot and the second device, wherein the mapping position is located on an extension line of a line connecting the light spot and the second device, and the distance from the mapping position to the light spot is equal to the first distance, wherein, when the distance to the light spot position is the same, the light source angle and the light intensity satisfy the Lambertian distribution law; The fourth acquisition unit is used to acquire the second light intensity corresponding to the position of the second device based on the third light intensity, the first distance, and the distance between the second device and the light spot.
15. A screen brightness adjustment method, characterized in that: include: According to a first image captured by a first camera of the first device and a second image captured by a second camera of the second device, a positional relationship among a light spot formed by the second device, the first device, and a light source is constructed to obtain a first distance between the light spot and the first device, wherein the first image at least includes the light spot formed by the light source; acquiring, according to the first distance and the first light intensity detected by the first device, a second light intensity corresponding to the position of the second device, wherein the second light intensity is used to adjust the brightness of a display screen of the second device; The brightness of the display screen is adjusted according to the second light intensity.
16. A screen brightness adjustment device, characterized in that: include: A seventh acquisition module, configured to construct a positional relationship between a light spot formed by the second device, the first device, and the light source according to a first image captured by a first camera of the first device and a second image captured by a second camera of the second device, and to acquire a first distance between the light spot and the first device, wherein the first image at least includes the light spot formed by the light source; an eighth acquisition module, configured to acquire a second light intensity corresponding to the position of the second device according to the first distance and the first light intensity detected by the first device, wherein the second light intensity is used to adjust the brightness of a display screen of the second device; An adjustment module is used to adjust the brightness of the display screen according to the second light intensity.
17. An electronic device, characterized in that: It includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the light intensity acquisition method as described in any one of claims 1 to 8 or the steps of the screen brightness adjustment method as described in claim 15.
18. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the light intensity acquisition method as described in any one of claims 1 to 8 or the steps of the screen brightness adjustment method as described in claim 15 are implemented.
19. A computer program product, characterized in that It includes computer instructions, which, when executed by a processor, implement the steps of the light intensity acquisition method as described in any one of claims 1 to 8 or the steps of the screen brightness adjustment method as described in claim 15.