CN105094465B - Ambient light measurement method and device - Google Patents

Ambient light measurement method and device Download PDF

Info

Publication number
CN105094465B
CN105094465B CN201510493105.XA CN201510493105A CN105094465B CN 105094465 B CN105094465 B CN 105094465B CN 201510493105 A CN201510493105 A CN 201510493105A CN 105094465 B CN105094465 B CN 105094465B
Authority
CN
China
Prior art keywords
sensor
sampling
sampling sensor
ambient light
sensors
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510493105.XA
Other languages
Chinese (zh)
Other versions
CN105094465A (en
Inventor
李国盛
杨坤
冯炜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiaomi Inc
Original Assignee
Xiaomi Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiaomi Inc filed Critical Xiaomi Inc
Priority to CN201510493105.XA priority Critical patent/CN105094465B/en
Publication of CN105094465A publication Critical patent/CN105094465A/en
Application granted granted Critical
Publication of CN105094465B publication Critical patent/CN105094465B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Photometry And Measurement Of Optical Pulse Characteristics (AREA)
  • Position Input By Displaying (AREA)
  • Circuit Arrangement For Electric Light Sources In General (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The disclosure belongs to electronic applications on a kind of ambient light measurement method and device.Methods described includes:In the optical sensor being distributed according to preset rules on the touch-screen, N number of sampling sensor is selected, N is the natural number more than 1;According to the measured value of N number of sampling sensor, the brightness value of ambient light is determined;Wherein, the preset rules are:The distribution lines of the sampling sensor are selected on the touch-screen, when choosing sampling sensor along the distribution lines, if fractional-sample sensor operated member is blocked, selection and the sampling sensor not being blocked of the operative sensor corresponding number.The disclosure solves an optical sensor being arranged in aperture and is easily blocked, and the problem of the brightness value inaccuracy of the ambient light measured, has reached the effect for the measurement accuracy for improving ambient light.

Description

Ambient light measuring method and device
Technical Field
The present disclosure relates to the field of electronics, and in particular, to an ambient light measurement method and apparatus.
Background
A light sensor is a common sensor, and is widely used in electronic devices such as mobile phones, tablet computers, and notebook computers.
In general, an aperture is formed in an upper edge of a front surface of a housing of an electronic device, and a light sensor is disposed in the aperture, so that when ambient light generated by a light source enters the light sensor through the aperture, the electronic device can measure a brightness value of the ambient light by the light sensor.
Disclosure of Invention
To solve the problems in the related art, the present disclosure provides an ambient light measurement method and apparatus.
According to a first aspect of the embodiments of the present disclosure, there is provided an ambient light measurement method for use in an electronic device including a touch screen on which light sensors are uniformly distributed, the method including:
selecting N sampling sensors from the optical sensors distributed on the touch screen according to a preset rule, wherein N is a natural number greater than 1;
determining the brightness value of the ambient light according to the measurement values of the N sampling sensors;
wherein, the preset rule is as follows: and selecting a distribution line of the sampling sensors on the touch screen, and selecting the sampling sensors which are not shielded and have the number corresponding to the partial sensors if the partial sampling sensors are shielded by an operation body when the sampling sensors are selected along the distribution line.
Optionally, the continuously selecting the remaining photosensors according to the predetermined rule includes:
acquiring an operation area of the operation body acting on the touch screen, determining a failure area containing the operation area, and blocking ambient light emitted into a light sensor in the failure area by the operation body;
for each sampling sensor to be selected, detecting whether the sampling sensor to be selected is located in the failure area;
when the sampling sensor to be selected is located in the failure area, replacing the sampling sensor to be selected with an alternative sampling sensor, wherein the ambient light emitted into the alternative sampling sensor is not shielded by the operating body;
and when the sampling sensor to be selected is positioned outside the failure area, selecting the sampling sensor to be selected.
Optionally, the replacing the sampling sensor to be selected with an alternative sampling sensor includes:
when the optical sensors are distributed on the touch screen in an array manner, selecting the optical sensor which is closest to the sampling sensor to be selected and is positioned outside the failure area in the row direction or the column direction to obtain the alternative sampling sensor; or,
when the N sampling sensors are selected on a first line along a preset direction, determining a second line which is parallel to the first line and does not intersect with the failure area, and acquiring an optical sensor corresponding to the sampling sensor to be selected on the second line to obtain the alternative sampling sensor; or, selecting a light sensor located outside the failure region on the first line along the predetermined direction, resulting in the alternative sampling sensor.
Optionally, the method further includes:
jumping from the alternative sampling sensor to the sampling sensor to be selected, and selecting a next sampling sensor to be selected in the predetermined direction on the first line with the sampling sensor to be selected as a starting point; or,
determining a next sampling sensor to be selected in the predetermined direction on the second line starting from the alternative sampling sensor.
Optionally, the determining the brightness value of the ambient light according to the measurement values of the N sampling sensors includes:
acquiring the measurement values of the N sampling sensors;
deleting the largest i measurement values and the smallest j measurement values from all the measurement values, wherein i and j are positive integers;
and calculating the average value of the rest measured values, and taking the average value as the brightness value of the environment light.
According to a second aspect of the embodiments of the present disclosure, there is provided an ambient light measuring device for use in an electronic device including a touch screen on which light sensors are uniformly distributed, the device including:
the sensor selection module is configured to select N sampling sensors from the optical sensors distributed on the touch screen according to a preset rule, wherein N is a natural number greater than 1;
a brightness value measuring module configured to determine a brightness value of the ambient light according to the measurement values of the N sampling sensors selected by the sensor selecting module;
wherein, the preset rule is as follows: and selecting a distribution line of the sampling sensors on the touch screen, and selecting the sampling sensors which are not shielded and have the number corresponding to the partial sensors if the partial sampling sensors are shielded by an operation body when the sampling sensors are selected along the distribution line.
Optionally, the sensor selection module includes:
the area determination submodule is configured to acquire an operation area of the operation body acting on the touch screen and determine a failure area containing the operation area, and ambient light emitted into the optical sensor in the failure area is shielded by the operation body;
a sensor detection sub-module configured to detect, for each sampling sensor to be selected, whether the sampling sensor to be selected is located within the failure region determined by the region determination sub-module;
a first selection submodule configured to replace the sampling sensor to be selected with an alternative sampling sensor when the sensor detection submodule detects that the sampling sensor to be selected is located in the failure region, and ambient light incident to the alternative sampling sensor is not blocked by the operating body;
a second selection submodule configured to select the sampling sensor to be selected when the sensor detection submodule detects that the sampling sensor to be selected is located outside the failure region.
Optionally, the first selection sub-module is further configured to:
when the optical sensors are distributed on the touch screen in an array manner, selecting the optical sensor which is closest to the sampling sensor to be selected and is positioned outside the failure area in the row direction or the column direction to obtain the alternative sampling sensor; or,
when the N sampling sensors are selected on a first line along a preset direction, determining a second line which is parallel to the first line and does not intersect with the failure area, and acquiring an optical sensor corresponding to the sampling sensor to be selected on the second line to obtain the alternative sampling sensor; or, selecting a light sensor located outside the failure region on the first line along the predetermined direction, resulting in the alternative sampling sensor.
Optionally, the sensor selection module further includes:
a third selection submodule configured to jump from the alternative sampling sensor to the sampling sensor to be selected, starting from the sampling sensor to be selected, selecting the next sampling sensor to be selected in the predetermined direction on the first line; or,
a fourth selection submodule configured to determine a next sampling sensor to be selected in the predetermined direction on the second line starting from the alternative sampling sensor.
Optionally, the brightness value measuring module includes:
a measurement selection sub-module configured to obtain measurements of the N sampling sensors;
a measurement value deleting submodule configured to delete the largest i measurement values and the smallest j measurement values from all the measurement values, wherein i and j are positive integers;
a brightness value calculation sub-module configured to calculate an average value of the remaining respective measurement values as a brightness value of the ambient light.
According to a third aspect of the embodiments of the present disclosure, there is provided an ambient light measuring device, the device including:
the touch screen is uniformly distributed with optical sensors;
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
selecting N sampling sensors from the optical sensors distributed on the touch screen according to a preset rule, wherein N is a natural number greater than 1;
determining the brightness value of the ambient light according to the measurement values of the N sampling sensors;
wherein, the preset rule is as follows: and selecting a distribution line of the sampling sensors on the touch screen, and selecting the sampling sensors which are not shielded and have the number corresponding to the partial sensors if the partial sampling sensors are shielded by an operation body when the sampling sensors are selected along the distribution line.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
when the ambient light of the sampling sensor to be selected is emitted by the operating body, the light sensor which is not emitted by the operating body is used for replacing the sampling sensor to be selected, and N sampling sensors which are not emitted by the operating body can be selected, so that the brightness value of the ambient light is calculated according to the N accurate measurement values, the problems that one sampling sensor arranged in the small hole is easily emitted, and the measured brightness value of the ambient light is inaccurate are solved, and the effect of improving the measurement accuracy of the ambient light is achieved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flow diagram illustrating an ambient light measurement method according to an exemplary embodiment.
FIG. 2A is a flow chart illustrating an ambient light measurement method according to another exemplary embodiment.
Fig. 2B is a schematic diagram illustrating a distribution of light sensors according to another exemplary embodiment.
Fig. 2C is a schematic diagram of a first circuit shown in accordance with another exemplary embodiment.
Fig. 2D is a schematic diagram of a first line and a second line shown in accordance with another example embodiment.
FIG. 3 is a block diagram illustrating an ambient light measuring device according to an exemplary embodiment.
FIG. 4 is a block diagram illustrating an ambient light measuring device according to an exemplary embodiment.
FIG. 5 is a block diagram illustrating an apparatus for ambient light measurement in accordance with an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a flowchart illustrating an ambient light measurement method applied to an electronic device including a touch screen on which light sensors are uniformly distributed, as shown in fig. 1, according to an exemplary embodiment, the ambient light measurement method including the following steps.
In step 101, N sampling sensors are selected from the optical sensors distributed on the touch screen according to a preset rule, where N is a natural number greater than 1.
In step 102, a brightness value of the ambient light is determined based on the measurements of the N sampling sensors.
Wherein, the preset rule is as follows: the method comprises the steps that a distribution line of sampling sensors is selected on a touch screen, and when the sampling sensors are selected along the distribution line, if part of the sampling sensors are shielded by an operation body, the sampling sensors which are not shielded and correspond to the part of the sampling sensors in number are selected.
In summary, according to the ambient light measurement method provided by the present disclosure, when the ambient light incident into the to-be-selected sampling sensor is blocked by the operating body, the to-be-selected sampling sensor is replaced by the optical sensor that the incident ambient light is not blocked by the operating body, and N sampling sensors that are not blocked by the operating body can be selected, so as to calculate the luminance value of the ambient light according to the N accurate measurement values, thereby solving the problems that one optical sensor disposed in the small hole is easily blocked and the measured luminance value of the ambient light is inaccurate, and achieving the effect of improving the measurement accuracy of the ambient light.
Fig. 2A is a flowchart illustrating an ambient light measurement method applied to an electronic device including a touch screen on which light sensors are uniformly distributed, according to another exemplary embodiment, as shown in fig. 2A, the ambient light measurement method including the following steps.
In step 201, an operation area where an operation body acts on the touch screen is acquired, a failure area including the operation area is determined, and ambient light incident on a light sensor in the failure area is blocked by the operation body.
In this embodiment, the touch screen is uniformly distributed with optical sensors. Referring to the distribution diagram of the photo sensors shown in fig. 2B, the photo sensors 210 are represented by dots, the control chip 220 is represented by the uppermost rectangle, the conductive lines 230 are represented by lines, and the pixel color patches 240 are represented by the respective rectangles distributed below, wherein each photo sensor 210 is connected to the control chip 220 through the conductive lines 230.
Because a plurality of optical sensors are distributed on the touch screen, and more resources are consumed for measuring the ambient light through all the optical sensors, the electronic equipment can select N optical sensors for sampling, and the brightness value of the ambient light is measured according to the sampling sensors. In the process of selecting the N sampling sensors, if a user triggers a touch operation on the touch screen, the electronic device may sense the touch operation of the operating body acting on the touch screen. The operation body may be a finger of the user, a palm of the user, or another part of the user, and this embodiment is not limited.
The electronic equipment determines an area formed by the touch units with the changed capacitance values as an operation area of the touch operation. In this embodiment, the touch unit with the capacitance value changed is referred to as a touch point.
Since the operating body is in contact with the operating area, for the light sensors located in the operating area, the ambient light that should be incident on the light sensors is blocked by the operating body, and the measured values measured by the light sensors are not the actual brightness values of the ambient light, thereby affecting the accuracy of measuring the brightness values of the ambient light. In addition, when the light source is located above the electronic device, the operating body illuminated by the ambient light may form a shadow on the touch screen, and a measurement value measured by the light sensor located in the shadow is not an actual brightness value of the ambient light, and may also affect the accuracy of measuring the brightness value of the ambient light. Therefore, when measuring the brightness value of the ambient light, it is necessary to exclude the measurement values of these light sensors.
In this embodiment, a region formed by the photosensor, in which incident ambient light is blocked by the operating body, is used as a failure region, and the failure region includes an operating region and a shadow region. Because the operation body may be a finger or a palm, and the shadows generated by the finger and the palm during operation are different, different shadow algorithms are selected according to the different shadows generated by the finger and the palm during operation, the problem that the determination of the failure region is inaccurate due to the fact that the failure regions generated by the finger and the palm are calculated according to the same shadow algorithm is solved, and the effect of improving the accuracy of determining the failure region is achieved. The following explains a method of determining a failure region.
In a first determination method, a first predetermined length is obtained, wherein the first predetermined length is greater than the distance from any point in an operation area to the center position of the operation area; and determining a failure area containing the operation area according to a first preset length by taking the central position as a center.
Wherein the first predetermined length needs to be greater than the distance from any point in the operating area to the center position of the operating area, so as to ensure that all points in the operating area are located in the failure area. Generally, the first predetermined length may be set to be larger, for example, set to 20mm, or set to other values, and the value of the first predetermined length is not limited in this embodiment.
In this embodiment, the shape of the failure region may also be set. For example, the shape of the failure region may be circular, elliptical, regular polygonal, irregular, and the like. When the shape of the failure region is circular, the first predetermined length is the length of the radius; when the shape of the failure region is a regular polygon, the first predetermined length is a length of half of the diagonal line.
In the second determination method, the operation strength of the touch operation acting on each contact in the operation area is obtained, the direction in which the operation strength decreases fastest is determined as the major axis direction, an elliptical failure area is generated, the major axis direction is the direction in which the first endpoint on the major axis points to the second endpoint, the distance between the first endpoint and the operation area is smaller than the distance between the second endpoint and the operation area, and the elliptical failure area includes the operation area.
Since the shadow of the finger is elongated, an oval-shaped failure zone may also be provided. When the method is implemented, the shadow area can be determined according to the direction of the finger, and then the failure area can be determined according to the shadow area and the operation area. Wherein, the direction of the finger can be embodied by the operation force.
In a third determination method, a second predetermined length is obtained; and taking the contact on the boundary of the operation area as a starting point, extending outwards for a second preset length along a preset direction, and determining an area surrounded by all the obtained contacts as a failure area containing the operation area, wherein the preset direction is a direction in which the central position of the operation area points to the contact.
The second predetermined length may be set to be smaller, for example, the second predetermined length is smaller than the first predetermined length. When the first predetermined length is 10mm, the second predetermined length may be set to 20mm, and of course, the second predetermined length may be set to other values, and the value of the second predetermined length is not limited in this embodiment.
In step 202, for each sampling sensor to be selected in the N, detecting whether the sampling sensor to be selected is located in a failure area; when the sampling sensor to be selected is positioned in the failure area, replacing the sampling sensor to be selected with a substitute sampling sensor, wherein the ambient light emitted into the substitute sampling sensor is not shielded by the operating body; and when the sampling sensor to be selected is positioned outside the failure area, selecting the sampling sensor to be selected, wherein N is a natural number greater than 1.
In this embodiment, the electronic device may determine the sampling sensor to be selected according to a predetermined rule. When the optical sensors are distributed on the touch screen in an array, the predetermined rule may be that a row is determined every q rows, a sampling sensor to be selected is determined every p optical sensors in a row, and p and q are positive integers. The determined sampling sensors to be selected are uniformly distributed on the touch screen, so that the measured brightness value of the ambient light is more accurate. For example, 100 × 100 photosensors are distributed on the electronic device, and if N is 100, the 1 st, 11 th, and 21 … 91 photosensors in the 1 st row may be determined as the sampling sensors to be selected, the 1 st, 11 th, and 21 … 91 photosensors in the 11 th row may be determined as the sampling sensors to be selected, …, and the 1 st, 11 th, and 21 … 91 photosensors in the 91 th row may be determined as the sampling sensors to be selected, so as to obtain 100 sampling sensors to be selected. Or,
the predetermined rule may be to determine a distribution line of the sampling sensors on the touch screen, and use the distribution line as a first line on which the N sampling sensors to be selected are uniformly determined. The first line may be a straight line, a broken line, or a curved line, and this embodiment is not limited. Referring to fig. 2C, a schematic diagram of a first circuit is shown, in which the first circuit a is a horizontal straight line, the first circuit b is a vertical line, the first circuit C is a diagonal line, and the first circuit d is a curved line.
In this embodiment, after each sampling sensor to be selected is determined, it is further required to detect whether the sampling sensor to be selected is located in a failure region, and when the sampling sensor to be selected is located in the failure region, a sampling sensor to be replaced by the sampling sensor needs to be obtained, and the sampling sensor to be replaced is used as a finally selected sampling sensor; when the sampling sensor to be selected is located outside the failure area, the sampling sensor to be selected is directly selected as the finally selected sampling sensor without acquiring the sampling sensor to be replaced.
This embodiment provides two alternatives for replacing the sampling sensor to be selected with an alternative sampling sensor, which are described below.
In a first alternative, when the optical sensors are distributed on the touch screen in an array, the optical sensor closest to the sampling sensor to be selected and located outside the failure region is selected in the row direction or the column direction, so as to obtain a substituted sampling sensor.
The electronic equipment can select the optical sensor which is closest to the sampling sensor to be selected and is positioned outside the failure area in the row direction, and the optical sensor is determined as a substitute sampling sensor; or selecting the optical sensor which is closest to the sampling sensor to be selected and is positioned outside the failure area in the column direction, and determining the optical sensor as a substitute sampling sensor; the optical sensor closest to the sampling sensor to be selected and located outside the failure region can be selected in the row direction, the optical sensor closest to the sampling sensor to be selected and located outside the failure region is selected in the column direction, and the optical sensor closest to the sampling sensor to be selected in the two optical sensors is determined as the alternative sampling sensor.
For example, when the sampling sensor to be selected is the 20 th photosensor in row 15 and the 18 th to 25 th photosensors in row 15 are located in the failure region, the 17 th photosensor in row 15 may be determined as the alternative sampling sensor.
In a second alternative, when selecting N sampling sensors along a predetermined direction on a first line, determining a second line parallel to the first line and not intersecting with the failure region, and acquiring an optical sensor corresponding to the sampling sensor to be selected on the second line to obtain a substituted sampling sensor; alternatively, a light sensor located outside the failure zone is selected on the first line in a predetermined direction, resulting in a replacement sampling sensor.
Please refer to fig. 2D, which shows a schematic diagram of a first circuit and a second circuit, wherein the first circuit is a transverse circuit, the failure region is a circular region, and the second circuit is parallel to the first circuit and does not intersect with the circular region.
For example, when the 15 th line is selected as the first line, the sampling sensor to be selected is the 20 th optical sensor on the first line, and the 18 th to 25 th optical sensors on the first line are located in the failure region, the second line which does not intersect with the failure region may be determined as the 20 th line, and the 20 th sensor on the second line may be determined as the alternative sampling sensor; or, the 26 th light sensor on the first line is determined as the alternative sampling sensor.
After the alternative sampling sensor is selected, the electronic device continues to determine the next sampling sensor to be selected according to a predetermined rule until the remaining sampling sensors are selected and then stops.
When the first line and the second line exist, the electronic device may determine a next sampling sensor to be selected on the first line, and may also determine a next sampling sensor to be selected on the second line, which is not limited in this embodiment. In the process of selecting the optical sensor, the probability that the operating body acts on the touch operation again on the same line is low, so that the time consumed by obtaining the alternative sampling sensor again is avoided, and the effect of improving the selection efficiency is achieved.
Optionally, the method provided in this embodiment further includes:
1) jumping from the alternative sampling sensor to a sampling sensor to be selected, and selecting the next sampling sensor to be selected along a predetermined direction on the first line with the sampling sensor to be selected as a starting point; or,
2) starting with the alternative sampling sensor, the next sampling sensor to be selected is determined in a predetermined direction on the second line.
If 9 optical sensors are arranged between every two sampling sensors to be selected at intervals, determining that the next sampling sensor to be selected is the 30 th optical sensor on the first line according to the fact that the current sampling sensor to be selected is the 20 th optical sensor; alternatively, it may be determined that the next sampling sensor to be selected is the 30 th photosensor on the second line.
In step 203, obtaining the measurement values of the N sampling sensors; deleting the largest i measurement values and the smallest j measurement values from all the measurement values, wherein i and j are positive integers; the average value of the remaining individual measurement values is calculated and used as the brightness value of the ambient light.
Since the light source is mostly natural light, the ambient light generated by the natural light is uniformly incident to each sampling sensor, and therefore, the measured value of each sampling sensor should be equal or similar. When the measured value measured by a sampling sensor is too high or too low, it may be that the sampling sensor has a problem, and the measured value is also inaccurate, so when measuring the brightness value of the ambient light, the measured values of the sampling sensors need to be excluded.
In this embodiment, the measurement values may be first filtered, the largest i measurement values and the smallest j measurement values are deleted, and then the average value of the remaining measurement values is calculated, so as to improve the accuracy of the calculated brightness value.
Wherein, when deleting the largest i measurement values and the smallest j measurement values, one possible implementation is: sequencing the measured values in a descending order to obtain a measured value sequence; deleting the first i measurement values in the measurement value sequence and the last j measurement values in the measurement value sequence.
For the sake of simplifying the calculation process, the touch screen includes 5 sampling sensors for illustration, and in practical implementation, the number of the light sensors is much greater than 5. Assuming that the measured values measured by the 5 sampling sensors are N1, N2, N3, N4, and N5, respectively, and N3 > N5 > N2 > N4 > N1, and i ═ j ═ 1, the luminance value of the ambient light is (N2+ N4+ N5)/3.
In summary, according to the ambient light measurement method provided by the present disclosure, when the ambient light incident into the to-be-selected sampling sensor is blocked by the operating body, the to-be-selected sampling sensor is replaced by the optical sensor that the incident ambient light is not blocked by the operating body, and N sampling sensors that are not blocked by the operating body can be selected, so as to calculate the luminance value of the ambient light according to the N accurate measurement values, thereby solving the problems that one optical sensor disposed in the small hole is easily blocked and the measured luminance value of the ambient light is inaccurate, and achieving the effect of improving the measurement accuracy of the ambient light.
In addition, the alternative sampling sensor jumps to the sampling sensor to be selected, the sampling sensor to be selected is taken as a starting point, the next sampling sensor to be selected is selected on the first line along the preset direction, and in the process of selecting the sampling sensor, the probability that the operating body acts on the same line again is low, so that the time consumed by obtaining the alternative sampling sensor again is avoided, and the effect of improving the selection efficiency is achieved.
Fig. 3 is a block diagram illustrating an ambient light measuring device applied to an electronic device including a touch screen on which light sensors are uniformly distributed, according to an exemplary embodiment, as shown in fig. 3, the ambient light measuring device including: a sensor selection module 310 and a brightness value measurement module 320.
The sensor selection module 310 is configured to select N sampling sensors from the optical sensors distributed on the touch screen according to a preset rule, where N is a natural number greater than 1;
the brightness value measuring module 320 is configured to determine the brightness value of the ambient light according to the measured values of the N sampling sensors selected by the sensor selecting module 310;
wherein, the preset rule is as follows: the method comprises the steps that a distribution line of sampling sensors is selected on a touch screen, and when the sampling sensors are selected along the distribution line, if part of the sampling sensors are shielded by an operation body, the sampling sensors which are not shielded and correspond to the part of the sampling sensors in number are selected.
In summary, according to the ambient light measuring device provided by the present disclosure, when the ambient light entering the to-be-selected sampling sensor is blocked by the operating body, the to-be-selected sampling sensor is replaced by the optical sensor that the entered ambient light is not blocked by the operating body, and N sampling sensors that are not blocked by the operating body can be selected, so as to calculate the luminance value of the ambient light according to the N accurate measurement values, thereby solving the problems that one optical sensor disposed in the small hole is easily blocked and the measured luminance value of the ambient light is inaccurate, and achieving the effect of improving the measurement accuracy of the ambient light.
Fig. 4 is a block diagram illustrating an ambient light measuring device applied to an electronic device including a touch screen on which light sensors are uniformly distributed, according to an exemplary embodiment, as shown in fig. 4, the ambient light measuring device including: a sensor selection module 410 and a brightness value measurement module 420.
The sensor selection module 410 is configured to select N sampling sensors from the optical sensors distributed on the touch screen according to a preset rule, where N is a natural number greater than 1;
the brightness value measuring module 420 is configured to determine the brightness value of the ambient light according to the measured values of the N sampling sensors selected by the sensor selecting module 410;
wherein, the preset rule is as follows: the method comprises the steps that a distribution line of sampling sensors is selected on a touch screen, and when the sampling sensors are selected along the distribution line, if part of the sampling sensors are shielded by an operation body, the sampling sensors which are not shielded and correspond to the part of the sampling sensors in number are selected.
Optionally, the sensor selection module 410 includes: an area determination submodule 411, a sensor detection submodule 412, a first selection submodule 413 and a second selection submodule 414;
the area determination submodule 411 is configured to acquire an operation area of the operation body acting on the touch screen, and determine a failure area including the operation area, where ambient light entering the optical sensor in the failure area is blocked by the operation body;
the sensor detection submodule 412 is configured to detect whether the sampling sensor to be selected is located in the failure region determined by the region determination submodule for each sampling sensor to be selected;
the first selection submodule 413 is configured to replace the sampling sensor to be selected with an alternative sampling sensor when the sensor detection submodule 412 detects that the sampling sensor to be selected is located in the failure area, and ambient light entering the alternative sampling sensor is not shielded by the operating body;
the second selection submodule 414 is configured to select the sampling sensor to be selected when the sensor detection submodule 412 detects that the sampling sensor to be selected is located outside the failure region.
Optionally, the first selection submodule 413 is further configured to:
when the optical sensors are distributed on the touch screen in an array manner, selecting the optical sensor which is closest to the sampling sensor to be selected and is positioned outside the failure area in the row direction or the column direction to obtain a substituted sampling sensor; or,
when N sampling sensors are selected on a first line along a preset direction, determining a second line which is parallel to the first line and is not intersected with a failure area, and acquiring an optical sensor corresponding to the sampling sensor to be selected on the second line to obtain a substituted sampling sensor; alternatively, a light sensor located outside the failure zone is selected on the first line in a predetermined direction, resulting in a replacement sampling sensor.
Optionally, the sensor selection module 410 further includes: a third selection submodule 415 or a fourth selection submodule 416;
the third selection submodule 415 configured to jump from the alternative sampling sensor to the sampling sensor to be selected, and select the next sampling sensor to be selected in the predetermined direction on the first line starting from the sampling sensor to be selected; or,
the fourth selection submodule 416 is configured to determine the next sampling sensor to be selected in a predetermined direction on the second line starting from the alternative sampling sensor.
Optionally, the brightness value measuring module 420 includes: a measurement value selection sub-module 421, a measurement value deletion sub-module 422, and a brightness value calculation sub-module 423;
the measurement value selection submodule 421 configured to obtain measurement values of the N sampling sensors;
the measurement value deletion sub-module 422 is configured to delete the largest i measurement values and the smallest j measurement values from all the measurement values, where i and j are positive integers;
the luminance value calculation sub-module 423 is configured to calculate an average value of the remaining respective measurement values, taking the average value as the luminance value of the ambient light.
In summary, according to the ambient light measuring device provided by the present disclosure, when the ambient light entering the to-be-selected sampling sensor is blocked by the operating body, the to-be-selected sampling sensor is replaced by the optical sensor that the entered ambient light is not blocked by the operating body, and N sampling sensors that are not blocked by the operating body can be selected, so as to calculate the luminance value of the ambient light according to the N accurate measurement values, thereby solving the problems that one optical sensor disposed in the small hole is easily blocked and the measured luminance value of the ambient light is inaccurate, and achieving the effect of improving the measurement accuracy of the ambient light.
In addition, the alternative sampling sensor jumps to the sampling sensor to be selected, the sampling sensor to be selected is taken as a starting point, the next sampling sensor to be selected is selected on the first line along the preset direction, and in the process of selecting the sampling sensor, the probability that the operating body acts on the same line again is low, so that the time consumed by obtaining the alternative sampling sensor again is avoided, and the effect of improving the selection efficiency is achieved.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
An exemplary embodiment of the present disclosure provides an ambient light measuring device capable of implementing an ambient light measuring method provided by the present disclosure, the ambient light measuring device including: the touch screen is uniformly distributed with optical sensors; a processor, a memory for storing processor-executable instructions;
wherein the processor is configured to:
selecting N sampling sensors from optical sensors distributed on the touch screen according to a preset rule, wherein N is a natural number greater than 1;
determining the brightness value of the ambient light according to the measurement values of the N sampling sensors;
wherein, the preset rule is as follows: the method comprises the steps that a distribution line of sampling sensors is selected on a touch screen, and when the sampling sensors are selected along the distribution line, if part of the sampling sensors are shielded by an operation body, the sampling sensors which are not shielded and correspond to the part of the sampling sensors in number are selected.
FIG. 5 is a block diagram illustrating an apparatus 500 for ambient light measurement according to an exemplary embodiment. For example, the apparatus 500 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 5, the apparatus 500 may include one or more of the following components: processing component 502, memory 504, power component 506, multimedia component 508, audio component 510, input/output (I/O) interface 512, sensor component 514, and communication component 516.
The processing component 502 generally controls overall operation of the device 500, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 502 may include one or more processors 518 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 502 can include one or more modules that facilitate interaction between the processing component 502 and other components. For example, the processing component 502 can include a multimedia module to facilitate interaction between the multimedia component 508 and the processing component 502.
The memory 504 is configured to store various types of data to support operations at the apparatus 500. Examples of such data include instructions for any application or method operating on device 500, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 504 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 506 provides power to the various components of the device 500. The power components 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 500.
The multimedia component 508 includes a screen that provides an output interface between the device 500 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 500 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 510 is configured to output and/or input audio signals. For example, audio component 510 includes a Microphone (MIC) configured to receive external audio signals when apparatus 500 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 504 or transmitted via the communication component 516. In some embodiments, audio component 510 further includes a speaker for outputting audio signals.
The I/O interface 512 provides an interface between the processing component 502 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 514 includes one or more sensors for providing various aspects of status assessment for the device 500. For example, the sensor assembly 514 may detect an open/closed state of the apparatus 500, the relative positioning of the components, such as a display and keypad of the apparatus 500, the sensor assembly 514 may also detect a change in the position of the apparatus 500 or a component of the apparatus 500, the presence or absence of user contact with the apparatus 500, orientation or acceleration/deceleration of the apparatus 500, and a change in the temperature of the apparatus 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 514 may also include light sensors distributed across the touch screen, such as CMOS or CCD image sensors, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 516 is configured to facilitate communication between the apparatus 500 and other devices in a wired or wireless manner. The apparatus 500 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 516 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 516 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 500 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 504 comprising instructions, executable by the processor 518 of the apparatus 500 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (9)

1. An ambient light measurement method for use in an electronic device comprising a touch screen having light sensors uniformly distributed thereon, the method comprising:
acquiring an operation area acted on the touch screen by an operation body, determining a failure area containing the operation area, and blocking ambient light emitted into a light sensor in the failure area by the operation body;
for each sampling sensor to be selected in the N, detecting whether the sampling sensor to be selected is located in the failure area;
when the sampling sensor to be selected is located in the failure area, replacing the sampling sensor to be selected with an alternative sampling sensor, wherein the ambient light emitted into the alternative sampling sensor is not shielded by the operating body;
when the sampling sensor to be selected is located outside the failure area, selecting the sampling sensor to be selected, wherein N is a natural number greater than 1;
and determining the brightness value of the ambient light according to the measurement values of the N sampling sensors.
2. The method of claim 1, wherein replacing the sampling sensor to be selected with an alternative sampling sensor comprises:
when the optical sensors are distributed on the touch screen in an array manner, selecting the optical sensor which is closest to the sampling sensor to be selected and is positioned outside the failure area in the row direction or the column direction to obtain the alternative sampling sensor; or,
when the N sampling sensors are selected on a first line along a preset direction, determining a second line which is parallel to the first line and does not intersect with the failure area, and acquiring an optical sensor corresponding to the sampling sensor to be selected on the second line to obtain the alternative sampling sensor; or, selecting a light sensor located outside the failure region on the first line along the predetermined direction, resulting in the alternative sampling sensor.
3. The method of claim 2, further comprising:
jumping from the alternative sampling sensor to the sampling sensor to be selected, and selecting a next sampling sensor to be selected in the predetermined direction on the first line with the sampling sensor to be selected as a starting point; or,
determining a next sampling sensor to be selected in the predetermined direction on the second line starting from the alternative sampling sensor.
4. The method according to any one of claims 1 to 3, wherein determining the brightness value of the ambient light based on the measurements of the N sampling sensors comprises:
acquiring the measurement values of the N sampling sensors;
deleting the largest i measurement values and the smallest j measurement values from all the measurement values, wherein i and j are positive integers;
and calculating the average value of the rest measured values, and taking the average value as the brightness value of the environment light.
5. An ambient light measuring device for use in an electronic device including a touch screen having light sensors uniformly distributed thereon, the device comprising:
the area determination submodule is configured to acquire an operation area acted on the touch screen by an operation body, determine a failure area containing the operation area, and shield ambient light emitted into the optical sensor in the failure area by the operation body;
a sensor detection sub-module configured to detect, for each sampling sensor to be selected of the N, whether the sampling sensor to be selected is located within the failure region determined by the region determination sub-module;
a first selection submodule configured to replace the sampling sensor to be selected with an alternative sampling sensor when the sensor detection submodule detects that the sampling sensor to be selected is located in the failure region, the ambient light incident on the alternative sampling sensor being not blocked by the operating body;
a second selection submodule configured to select the sampling sensor to be selected when the sensor detection submodule detects that the sampling sensor to be selected is located outside the failure region, where N is a natural number greater than 1;
a brightness value measuring module configured to determine a brightness value of the ambient light according to the measurement values of the N sampling sensors selected by the sensor selecting module.
6. The apparatus of claim 5, wherein the first selection submodule is further configured to:
when the optical sensors are distributed on the touch screen in an array manner, selecting the optical sensor which is closest to the sampling sensor to be selected and is positioned outside the failure area in the row direction or the column direction to obtain the alternative sampling sensor; or,
when the N sampling sensors are selected on a first line along a preset direction, determining a second line which is parallel to the first line and does not intersect with the failure area, and acquiring an optical sensor corresponding to the sampling sensor to be selected on the second line to obtain the alternative sampling sensor; or, selecting a light sensor located outside the failure region on the first line along the predetermined direction, resulting in the alternative sampling sensor.
7. The apparatus of claim 6, further comprising:
a third selection submodule configured to jump from the alternative sampling sensor to the sampling sensor to be selected, starting from the sampling sensor to be selected, selecting the next sampling sensor to be selected in the predetermined direction on the first line; or,
a fourth selection submodule configured to determine a next sampling sensor to be selected in the predetermined direction on the second line starting from the alternative sampling sensor.
8. The apparatus according to any one of claims 5 to 7, wherein the brightness value measuring module comprises:
a measurement selection sub-module configured to obtain measurements of the N sampling sensors;
a measurement value deleting submodule configured to delete the largest i measurement values and the smallest j measurement values from all the measurement values, wherein i and j are positive integers;
a brightness value calculation sub-module configured to calculate an average value of the remaining respective measurement values as a brightness value of the ambient light.
9. An ambient light measuring device, the device comprising:
the touch screen is uniformly distributed with optical sensors;
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
acquiring an operation area acted on the touch screen by an operation body, determining a failure area containing the operation area, and blocking ambient light emitted into a light sensor in the failure area by the operation body;
for each sampling sensor to be selected in the N, detecting whether the sampling sensor to be selected is located in the failure area;
when the sampling sensor to be selected is located in the failure area, replacing the sampling sensor to be selected with an alternative sampling sensor, wherein the ambient light emitted into the alternative sampling sensor is not shielded by the operating body;
when the sampling sensor to be selected is located outside the failure area, selecting the sampling sensor to be selected, wherein N is a natural number greater than 1;
and determining the brightness value of the ambient light according to the measurement values of the N sampling sensors.
CN201510493105.XA 2015-08-12 2015-08-12 Ambient light measurement method and device Active CN105094465B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510493105.XA CN105094465B (en) 2015-08-12 2015-08-12 Ambient light measurement method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510493105.XA CN105094465B (en) 2015-08-12 2015-08-12 Ambient light measurement method and device

Publications (2)

Publication Number Publication Date
CN105094465A CN105094465A (en) 2015-11-25
CN105094465B true CN105094465B (en) 2018-02-02

Family

ID=54575071

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510493105.XA Active CN105094465B (en) 2015-08-12 2015-08-12 Ambient light measurement method and device

Country Status (1)

Country Link
CN (1) CN105094465B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105094616B (en) 2015-08-12 2019-02-12 小米科技有限责任公司 Touch screen control method and device
CN106842544B (en) * 2017-03-27 2019-09-03 深圳市荣者光电科技发展有限公司 Night vision device and shooting device
GB2572978B (en) * 2018-04-18 2022-01-26 Ge Aviat Systems Ltd Method and apparatus for a display module control system
CN108766387B (en) * 2018-05-30 2021-01-22 京东方科技集团股份有限公司 Display device, method for automatically adjusting brightness of display screen and terminal equipment
CN108922478B (en) * 2018-07-02 2020-09-29 Oppo(重庆)智能科技有限公司 Backlight brightness adjusting method and system and display device
CN111866785B (en) * 2019-04-28 2023-10-17 北京小米移动软件有限公司 Terminal, parameter measurement method, device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2579550A1 (en) * 2011-10-03 2013-04-10 Research In Motion Limited Method and apparatus pertaining to automatically moving a component that comprises a part of a portable electronic device
CN103218036A (en) * 2011-09-14 2013-07-24 宏达国际电子股份有限公司 Devices and methods involving display interaction using photovoltaic arrays
CN104122988A (en) * 2013-04-29 2014-10-29 敦南科技股份有限公司 Motion sensing device and motion sensing system thereof
CN104484032A (en) * 2013-07-01 2015-04-01 黑莓有限公司 Gesture detection using ambient light sensors

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103218036A (en) * 2011-09-14 2013-07-24 宏达国际电子股份有限公司 Devices and methods involving display interaction using photovoltaic arrays
EP2579550A1 (en) * 2011-10-03 2013-04-10 Research In Motion Limited Method and apparatus pertaining to automatically moving a component that comprises a part of a portable electronic device
CN104122988A (en) * 2013-04-29 2014-10-29 敦南科技股份有限公司 Motion sensing device and motion sensing system thereof
CN104484032A (en) * 2013-07-01 2015-04-01 黑莓有限公司 Gesture detection using ambient light sensors

Also Published As

Publication number Publication date
CN105094465A (en) 2015-11-25

Similar Documents

Publication Publication Date Title
CN105094616B (en) Touch screen control method and device
CN105094465B (en) Ambient light measurement method and device
US10234923B2 (en) Methods and devices for waking up a screen
US9671911B2 (en) Touch input control method and device
CN106570442B (en) Fingerprint identification method and device
CN105488464A (en) Fingerprint identification method and fingerprint identification apparatus
US10268371B2 (en) Method, device and storage medium for inputting characters
US10061497B2 (en) Method, device and storage medium for interchanging icon positions
EP3232301B1 (en) Mobile terminal and virtual key processing method
JP2017527061A5 (en)
US20190064989A1 (en) Fingerprint circuit, force touch control method and device and computer-readable storage medium
EP3629318B1 (en) Method and apparatus for compensating operating parameter of display circuit
CN113654459B (en) Method, device and storage medium for determining position of under-screen photosensitive sensor
CN112394825B (en) Method, device and storage medium for calibrating capacitive touch module
CN106126050B (en) Menu display method and device
CN108319899B (en) Fingerprint identification method and device
US9753319B2 (en) Liquid crystal display including display panel that includes wires and protruding spacers
CN116204073A (en) Touch control method, touch control device, electronic equipment and storage medium
US10957250B2 (en) Terminal device, sensing method and apparatus with sensor for fingerprint identification
CN108427943B (en) Fingerprint identification method and device
CN110956938A (en) Screen brightness adjusting method and device, electronic equipment and readable storage medium
CN114187860B (en) Spectrum information determining method and device, electronic equipment and medium
CN114860138B (en) Image display method, device, electronic equipment and storage medium
CN113739912A (en) Optical signal detection module and light intensity detection method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant